Sha256: d38f15e6fd513cd275e64c47c1713210506aaffaaca84af1529b3442cbbd0ce2

Contents?: true

Size: 1.75 KB

Versions: 8

Compression:

Stored size: 1.75 KB

Contents

<% solr_documents_grid_block.with_solr_helper(self) %>
<div class="content-block item-grid-block row d-block clearfix">
  <div class="items-col align-content-start justify-content-between flex-wrap <%= solr_documents_grid_block.text? ? 'col-md-9' : 'col-md-12' %> <%= solr_documents_grid_block.content_align == 'right' ? 'float-right float-end' : 'float-left float-start' %>">
    <% if solr_documents_grid_block.documents? %>
        <% solr_documents_grid_block.each_document.each_with_index do |(block_options, document), index| %>
          <% doc_presenter = document_presenter(document) %>
          <div class="box item-<%= index %>" data-id="<%= document.id %>">
            <% if block_options[:thumbnail_image_url].present? %>
              <%= link_to_document(document, image_tag(block_options[:thumbnail_image_url], class: 'img-thumbnail', alt: doc_presenter.heading, skip_pipeline: true), counter: -1) %>
            <% elsif block_options[:iiif_tilesource_base].present?  %>
              <%= link_to_document(document, image_tag(block_options[:iiif_tilesource_base] + '/full/!400,400/0/default.jpg', class: 'img-thumbnail', alt: doc_presenter.heading, skip_pipeline: true), counter: -1) %>
            <% elsif doc_presenter.thumbnail.exists? %>
              <%= doc_presenter.thumbnail.thumbnail_tag({ class: 'img-thumbnail', alt: doc_presenter.heading }, document_counter: -1) %>
            <% end %>
          </div>
        <% end %>
    <% end %>
  </div>


  <% if solr_documents_grid_block.text? %>
    <div class="text-col col-md-3 mw-100">
      <% unless solr_documents_grid_block.title.blank? %>
        <h3><%= solr_documents_grid_block.title %></h3>
      <% end %>
      <%= sir_trevor_markdown solr_documents_grid_block.text %>
    </div>
  <% end %>
</div>

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
blacklight-spotlight-4.2.0 app/views/spotlight/sir_trevor/blocks/_solr_documents_grid_block.html.erb
blacklight-spotlight-4.1.2 app/views/spotlight/sir_trevor/blocks/_solr_documents_grid_block.html.erb
blacklight-spotlight-4.1.1 app/views/spotlight/sir_trevor/blocks/_solr_documents_grid_block.html.erb
blacklight-spotlight-4.1.0 app/views/spotlight/sir_trevor/blocks/_solr_documents_grid_block.html.erb
blacklight-spotlight-4.0.3 app/views/spotlight/sir_trevor/blocks/_solr_documents_grid_block.html.erb
blacklight-spotlight-4.0.2 app/views/spotlight/sir_trevor/blocks/_solr_documents_grid_block.html.erb
blacklight-spotlight-4.0.1 app/views/spotlight/sir_trevor/blocks/_solr_documents_grid_block.html.erb
blacklight-spotlight-4.0.0 app/views/spotlight/sir_trevor/blocks/_solr_documents_grid_block.html.erb