-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sideline our solr document embed block
- Loading branch information
1 parent
37b803c
commit b2c0978
Showing
2 changed files
with
56 additions
and
25 deletions.
There are no files selected for viewing
41 changes: 41 additions & 0 deletions
41
app/views/spotlight/sir_trevor/blocks/_old_solr_documents_embed_block.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
40 changes: 15 additions & 25 deletions
40
app/views/spotlight/sir_trevor/blocks/_solr_documents_embed_block.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |