Skip to content

Commit

Permalink
Merge pull request #505 from LD4P/some-minor-fixes
Browse files Browse the repository at this point in the history
Remove vestiges of wireframed resource template components
  • Loading branch information
ndushay committed May 7, 2019
2 parents ac6b546 + e97380f commit 2d17295
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
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

0 comments on commit 2d17295

Please sign in to comment.