Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove vestiges of wireframed resource template components #505

Merged
merged 1 commit into from
May 7, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions __tests__/components/editor/ResourceTemplate.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ describe('<ResourceTemplate />', () => {
expect(wrapper.find('div.ResourceTemplate').length).toEqual(1)
})

it('displays the resource label of the resource template', () => {
expect(wrapper.find('h1').text()).toEqual(responseBody.response.body.resourceLabel)
})

// TODO: if we have more than one resourceTemplate form, they need to have unique ids (see #130)
it('contains <div> with id resourceTemplate', () => {
expect(wrapper.find('div#resourceTemplate').length).toEqual(1)
Expand Down
6 changes: 1 addition & 5 deletions src/components/editor/Editor.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,7 @@ class Editor extends Component {
<Header triggerEditorMenu={this.props.triggerHandleOffsetMenu}/>
{ authenticationMessage }
<div className="row">
<section className="col-md-9">
<h3>Resource Template Label</h3>
<h1>[Clone|Edit] <em>Name of Resource</em></h1>
</section>
<section className="col-md-3">
<section className="col-md-3" style={{float: 'right'}}>
<button type="button" className="btn btn-primary btn-sm" onClick={this.handleRdfShow}>Preview RDF</button>
</section>
</div>
Expand Down
5 changes: 4 additions & 1 deletion src/components/editor/ResourceTemplate.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ class ResourceTemplate extends Component {
renderRtData = () => {
return (
<div className='ResourceTemplate'>
<div id="resourceTemplate">
<div id="resourceTemplate" style={{marginTop: '-30px'}}>
<section className="col-md-9">
<h1><em>{this.state.rtData.resourceLabel}</em></h1>
</section>
<ResourceTemplateForm
propertyTemplates = {this.state.rtData.propertyTemplates}
resourceTemplate = {this.state.rtData}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
"remark": "http://access.rdatoolkit.org/3.3.html"
},
{
"propertyLabel": "WITH ALL VALUE CONSTRAINTS",
"propertyLabel": "Item Information",
"propertyURI": "http://id.loc.gov/ontologies/bibframe/itemPortion",
"repeatable": "true",
"resourceTemplates": [],
Expand Down Expand Up @@ -177,7 +177,7 @@
"defaults": []
},
"propertyURI": "http://id.loc.gov/ontologies/bibframe/contribution",
"propertyLabel": "LOC Names: locnames_ld4l_cache/person",
"propertyLabel": "Agent Contribution",
"remark": "http://id.loc.gov/authorities/names.html"
},
{
Expand Down Expand Up @@ -217,7 +217,7 @@
}
},
{
"propertyLabel": "LITERAL WITH DEFAULT",
"propertyLabel": "Holdings",
"propertyURI": "http://id.loc.gov/ontologies/bibframe/heldBy",
"resourceTemplates": [],
"type": "literal",
Expand Down