Skip to content

Commit

Permalink
Merge pull request #1401 from sul-dlss/row-nesting
Browse files Browse the repository at this point in the history
Remove row > row nesting
  • Loading branch information
jcoyne authored Oct 14, 2024
2 parents 68293eb + 50ef7b4 commit 72ee5e6
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 46 deletions.
96 changes: 51 additions & 45 deletions app/components/document_component.html.erb
Original file line number Diff line number Diff line change
@@ -1,51 +1,57 @@
<%= title %>
<div class="mb-2">
<div class="mb-2 row">
<%= render HeaderIconsComponent.new(document: @document) %>
</div>
<%= 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 %>
<link rel="canonical" href="<%= "#{Settings.HOST_URL}#{solr_document_path(@document.id)}" %>">
<div class="row">
<%= 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 %>
<link rel="canonical" href="<%= "#{Settings.HOST_URL}#{solr_document_path(@document.id)}" %>">
<% end %>
<% end %>
<div class="document-main-section">
<% @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 %>
</div>

<%= thumbnail %>
<% end %>
<div class="document-main-section">
<% @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 %>
</div>

<%= thumbnail %>
<%= footer %>
<% end %>
<%= footer %>
<% end %>

<section class="col-lg-6">
<% 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) %>
</section>
<div class="col-lg-6">
<% if (@document.image? || @document.item_viewer.iiif) && !@document[Settings.FIELDS[:GEOREFERENCED]] %>
<%= render AlertComponent.new(type: 'info', body: t('earthworks.show.no_georeference_message')) %>
<% end %>
<div id="viewer-container">
<%= 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) %>
</div>
<%= render Geoblacklight::AttributeTableComponent.new(document: @document) %>
<%= render Geoblacklight::IndexMapInspectComponent.new(document: @document) %>
</div>
</div>
2 changes: 1 addition & 1 deletion app/helpers/earthworks_blacklight_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 72ee5e6

Please sign in to comment.