From 50ef7b4917ce62a567d9d872b9f2021a64c5fcf9 Mon Sep 17 00:00:00 2001 From: Nick Budak Date: Wed, 11 Sep 2024 14:54:23 -0700 Subject: [PATCH] Remove row > row nesting This fixes some alignment issues and removes some redundant classes. Closes #1318 See also https://github.com/geoblacklight/geoblacklight/pull/1607 --- app/components/document_component.html.erb | 96 +++++++++++---------- app/helpers/earthworks_blacklight_helper.rb | 2 +- 2 files changed, 52 insertions(+), 46 deletions(-) diff --git a/app/components/document_component.html.erb b/app/components/document_component.html.erb index 003d1742..da059b77 100644 --- a/app/components/document_component.html.erb +++ b/app/components/document_component.html.erb @@ -1,51 +1,57 @@ <%= title %> -
+
<%= render HeaderIconsComponent.new(document: @document) %>
-<%= content_tag @component, - id: @id, - data: { - 'document-id': @document.id.to_s.parameterize, - 'document-counter': @counter, - }, - itemscope: true, - itemtype: @document.itemtype, - class: classes.flatten.join(' ') do %> - <%= header %> - <% if body.present? %> - <%= body %> - <% else %> - <% if @document.stanford? %> - <% content_for :head do %> - "> +
+ <%= content_tag @component, + id: @id, + data: { + 'document-id': @document.id.to_s.parameterize, + 'document-counter': @counter, + }, + itemscope: true, + itemtype: @document.itemtype, + class: classes.flatten.join(' ') do %> + <%= header %> + <% if body.present? %> + <%= body %> + <% else %> + <% if @document.stanford? %> + <% content_for :head do %> + "> + <% end %> <% end %> +
+ <% @document.display_note.each do |display_note| %> + <%= render Geoblacklight::DisplayNoteComponent.new(display_note: display_note) %> + <% end %> + <%= embed %> + <%= content %> + <%= metadata %> + <% metadata_sections.each do |section| %> + <%= section %> + <% end %> + + <% partials.each do |partial| %> + <%= partial %> + <% end %> +
+ + <%= thumbnail %> <% end %> -
- <% @document.display_note.each do |display_note| %> - <%= render Geoblacklight::DisplayNoteComponent.new(display_note: display_note) %> - <% end %> - <%= embed %> - <%= content %> - <%= metadata %> - <% metadata_sections.each do |section| %> - <%= section %> - <% end %> - - <% partials.each do |partial| %> - <%= partial %> - <% end %> -
- - <%= thumbnail %> + <%= footer %> <% end %> - <%= footer %> -<% end %> - -
- <% if (@document.image? || @document.item_viewer.iiif) && !@document[Settings.FIELDS[:GEOREFERENCED]] %> - <%= render AlertComponent.new(type: 'info', body: t('earthworks.show.no_georeference_message')) %> - <% end %> - <%= render Geoblacklight::ViewerContainerComponent.new(document: @document) %> - <%= render Geoblacklight::AttributeTableComponent.new(document: @document) %> - <%= render Geoblacklight::IndexMapInspectComponent.new(document: @document) %> -
+
+ <% if (@document.image? || @document.item_viewer.iiif) && !@document[Settings.FIELDS[:GEOREFERENCED]] %> + <%= render AlertComponent.new(type: 'info', body: t('earthworks.show.no_georeference_message')) %> + <% end %> +
+ <%= render Geoblacklight::ViewerHelpTextComponent.new('viewer_protocol', @document.viewer_protocol) %> + <%= render Geoblacklight::IndexMapLegendComponent.new(document: @document) %> + <%= render Geoblacklight::ItemMapViewerComponent.new(document: @document) %> + <%= render Geoblacklight::IiifDragDropComponent.new(document: @document) %> +
+ <%= render Geoblacklight::AttributeTableComponent.new(document: @document) %> + <%= render Geoblacklight::IndexMapInspectComponent.new(document: @document) %> +
+
diff --git a/app/helpers/earthworks_blacklight_helper.rb b/app/helpers/earthworks_blacklight_helper.rb index 2199c574..7eb3ac48 100644 --- a/app/helpers/earthworks_blacklight_helper.rb +++ b/app/helpers/earthworks_blacklight_helper.rb @@ -2,7 +2,7 @@ module EarthworksBlacklightHelper include Blacklight::LayoutHelperBehavior # Blacklight override for show main content def show_content_classes - 'col-lg-10 show-document row' + 'col-lg-10 show-document' end # Blacklight override for show page sidebar