Skip to content

Commit

Permalink
fix: APPS-2896 Styling: Ursus Item Detail View - keywords not aligned (
Browse files Browse the repository at this point in the history
…#1153)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Andy Wallace <andrewwallace@library.ucla.edu>
  • Loading branch information
3 people authored Aug 29, 2024
1 parent ba2e8e8 commit 1ccf5b3
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions app/views/catalog/work_record--ursus/_keyword_metadata.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,17 @@
<% end %>
<% end %>
<% if (@document[:subject_tesim].present? && !@document[:subject_tesim].empty?) || (document[:subject_topic_tesim].present? && !@document[:subject_topic_tesim].empty?) %>
<dt class="blacklight-subjects metadata-block__label-key">
<!-- KEY -->
Subjects
<!-- VALUE -->
<% keyword.each do |field_name, field| %>
<% if field_name == "subject_tesim" || field_name == "subject_topic_tesim" %>
<dd class="blacklight-<%= field_name.parameterize %> metadata-block__label-value metadata-block__label-value--ursus">
<%= doc_presenter.field_value field %>
</dd>
<% end %>
<% end %>
</dt>

<% keyword.select { |field_name, _field| field_name == "subject_tesim" || field_name == "subject_topic_tesim" }
.each_with_index do |(field_name, field), i| %>
<!-- KEY -->
<dt class="blacklight-subjects metadata-block__label-key">
<%= 'Subjects' if i.zero? %>
</dt>
<!-- VALUE -->
<dd class="blacklight-<%= field_name.parameterize %> metadata-block__label-value metadata-block__label-value--ursus">
<%= doc_presenter.field_value field %>
</dd>
<% end %>
<% end %>
</dl>
<hr class='divider divider--ursus'>
Expand Down

0 comments on commit 1ccf5b3

Please sign in to comment.