Skip to content

Commit

Permalink
sideline our solr document embed block
Browse files Browse the repository at this point in the history
  • Loading branch information
rawOrlando committed Feb 27, 2024
1 parent 37b803c commit b2c0978
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 25 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<%# This changed between spotlight versions. TODO: Will have to dig into if this is still working. How it was changed and how to change it it have same effects. %>
<% solr_documents_embed_block.with_solr_helper(self) %>

<div class="content-block items-block row">

<% if solr_documents_embed_block.documents? %>

<div class="items-col spotlight-flexbox pull-<%= solr_documents_embed_block.content_align %> <%= solr_documents_embed_block.text? ? "col-md-6" : "col-md-12" %> ">
<% solr_documents_embed_block.each_document do |block_options, document| %>
<%# Our code %>
<% doc_presenter = index_presenter(document) %>
<%# end of our %>
<div class="box" data-id="<%= document.id %>">
<%= render_document_partials document, blacklight_config.view.embed.partials, (blacklight_config.view.embed.locals || {}).reverse_merge(block: solr_documents_embed_block) %>
<%# Our code %>
<% if solr_documents_embed_block.primary_caption? %>
<div class="caption primary-caption">
<%= doc_presenter.field_value solr_documents_embed_block.primary_caption_field %>
</div>
<% end %>
<% if solr_documents_embed_block.secondary_caption? %>
<div class="caption secondary-caption">
<%= doc_presenter.field_value solr_documents_embed_block.secondary_caption_field %>
</div>
<% end %>
<%# end of our code %>
</div>
<% end %>
</div>
<% end %>
<% if solr_documents_embed_block.text? %>
<div class="text-col col-md-6">
<% unless solr_documents_embed_block.title.blank? %>
<h3><%= solr_documents_embed_block.title %></h3>
<% end %>
<%= sir_trevor_markdown solr_documents_embed_block.text %>
</div>
<% end %>
</div>
Original file line number Diff line number Diff line change
@@ -1,41 +1,31 @@
<%# This changed between spotlight versions. TODO: Will have to dig into if this is still working. How it was changed and how to change it it have same effects. %>
<% solr_documents_embed_block.with_solr_helper(self) %>

<div class="content-block items-block row">
<div class="content-block items-block row d-block clearfix">

<% if solr_documents_embed_block.documents? %>
<div class="items-col <%= solr_documents_embed_block.text? ? "col-md-6" : "col-md-12" %> <%= solr_documents_embed_block.content_align == 'right' ? 'float-right' : 'float-left' %>">
<% unless solr_documents_embed_block.text? %>
<% unless solr_documents_embed_block.title.blank? %>

<div class="items-col spotlight-flexbox pull-<%= solr_documents_embed_block.content_align %> <%= solr_documents_embed_block.text? ? "col-md-6" : "col-md-12" %> ">
<% solr_documents_embed_block.each_document do |block_options, document| %>
<%# Our code %>
<% doc_presenter = index_presenter(document) %>
<%# end of our %>
<div class="box" data-id="<%= document.id %>">
<%= render_document_partials document, blacklight_config.view.embed.partials, (blacklight_config.view.embed.locals || {}).reverse_merge(block: solr_documents_embed_block) %>
<%# Our code %>
<% if solr_documents_embed_block.primary_caption? %>
<div class="caption primary-caption">
<%= doc_presenter.field_value solr_documents_embed_block.primary_caption_field %>
</div>
<% end %>
<% if solr_documents_embed_block.secondary_caption? %>
<div class="caption secondary-caption">
<%= doc_presenter.field_value solr_documents_embed_block.secondary_caption_field %>
</div>
<% end %>
<%# end of our code %>
</div>
<h3><%= solr_documents_embed_block.title %></h3>
<% end %>
<% end %>
<div class="spotlight-flexbox">
<% solr_documents_embed_block.each_document do |block_options, document| %>
<div class="box" data-id="<%= document.id %>">
<%= render_document_partials document, blacklight_config.view.embed.partials, (blacklight_config.view.embed.locals || {}).reverse_merge(block: solr_documents_embed_block) %>
</div>
<% end %>
</div>
</div>
<% end %>
<% if solr_documents_embed_block.text? %>
<div class="text-col col-md-6">
<div class="text-col col-md-6 mw-100">
<% unless solr_documents_embed_block.title.blank? %>
<h3><%= solr_documents_embed_block.title %></h3>
<% end %>
<%= sir_trevor_markdown solr_documents_embed_block.text %>
</div>
<% end %>
</div>
</div>

0 comments on commit b2c0978

Please sign in to comment.