Skip to content

Commit

Permalink
Added new partial for attributes
Browse files Browse the repository at this point in the history
This extracts just the rows of attributes into a partial that can easily
be overridden to change the displayed attributes on the show page
  • Loading branch information
jcoyne committed Sep 17, 2015
1 parent 89780fa commit 9b37e82
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
7 changes: 7 additions & 0 deletions app/views/curation_concerns/base/_attribute_rows.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<%= @presenter.attribute_to_html(:description) %>
<%= @presenter.attribute_to_html(:creator, catalog_search_link: true ) %>
<%= @presenter.attribute_to_html(:contributor, label: 'Contributors', catalog_search_link: true) %>
<%= @presenter.attribute_to_html(:subject, catalog_search_link: true) %>
<%= @presenter.attribute_to_html(:publisher) %>
<%= @presenter.attribute_to_html(:language) %>

7 changes: 1 addition & 6 deletions app/views/curation_concerns/base/_attributes.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@
<tr><th>Attribute Name</th><th>Values</th></tr>
</thead>
<tbody>
<%= @presenter.attribute_to_html(:description) %>
<%= @presenter.attribute_to_html(:creator, catalog_search_link: true ) %>
<%= @presenter.attribute_to_html(:contributor, label: 'Contributors', catalog_search_link: true) %>
<%= @presenter.attribute_to_html(:subject, catalog_search_link: true) %>
<%= @presenter.attribute_to_html(:publisher) %>
<%= @presenter.attribute_to_html(:language) %>
<%= render 'attribute_rows' %>
<tr>
<th>Access Rights</th>
<td>
Expand Down

0 comments on commit 9b37e82

Please sign in to comment.