-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Document: revert to old view until thumbnail migration is finished
- Loading branch information
Showing
2 changed files
with
68 additions
and
39 deletions.
There are no files selected for viewing
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,47 +1,29 @@ | ||
<% bookmarked = current_user.document_is_bookmarked?(document) ? 'bookmarked' : '' %> | ||
|
||
<% if document.respond_to?('friendlier_id') %> | ||
<%= content_tag :li, id: document.friendlier_id, class: "#{bookmarked} mb-3" do %> | ||
<div class="row"> | ||
<div class="doc-actions ml-3"> | ||
<%= check_box_tag nil, nil, false, data: { id: document.friendlier_id, action: 'click->results#checkChecked'}%> | ||
<%= render 'admin/documents/document_bookmark', document: document %> | ||
</div> | ||
<div class="doc-hit col ml-2 mb-2"> | ||
<div class="row" style="font-size:1.1rem;"> | ||
<%= "#{@documents.meta['pages']['offset_value'] + index + 1}." if @documents %> | ||
<%= link_to document.title, edit_admin_document_path(document.friendlier_id), { class: "js-truncate mb-2" } %> | ||
</div> | ||
<div class="row"> | ||
<div class="media"> | ||
<% if document&.members&.first&.file&.exists? %> | ||
<%= link_to edit_admin_document_path(document.friendlier_id) do %> | ||
<%= image_tag(document.members.first.file_url(:thumb_mini_2X), { height: 64, width:64 }) %> | ||
<% end %> | ||
<% else %> | ||
<img class="" data-src="holder.js/64x64" alt="placeholder" src="data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%2264%22%20height%3D%2264%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2064%2064%22%20preserveAspectRatio%3D%22none%22%3E%3Cdefs%3E%3Cstyle%20type%3D%22text%2Fcss%22%3E%23holder_18bb5833508%20text%20%7B%20fill%3Argba(255%2C255%2C255%2C.75)%3Bfont-weight%3Anormal%3Bfont-family%3AHelvetica%2C%20monospace%3Bfont-size%3A10pt%20%7D%20%3C%2Fstyle%3E%3C%2Fdefs%3E%3Cg%20id%3D%22holder_18bb5833508%22%3E%3Crect%20width%3D%2264%22%20height%3D%2264%22%20fill%3D%22%23777%22%3E%3C%2Frect%3E%3Cg%3E%3Ctext%20x%3D%2213.83984375%22%20y%3D%2236.65%22%3E64x64%3C%2Ftext%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E" data-holder-rendered="true" style="width: 64px; height: 64px;"> | ||
<% end %> | ||
<div class="media-body ml-3"> | ||
<%- if document.send(Settings.FIELDS.RESOURCE_CLASS) %> | ||
<%= geoblacklight_icon(document.send(Settings.FIELDS.RESOURCE_CLASS)&.first) %> | ||
<% end %> | ||
<%= publication_state_badge(document) %> | ||
<% if document.send("schema_provider_s") %> | ||
· <%= document.send("schema_provider_s") %> | ||
<% end %> | ||
<% if document.send("dct_temporal_sm") %> | ||
· <%= document.send("dct_temporal_sm").join("-") %> | ||
<% end %> | ||
<% if document.send("dct_description_sm").present? %> | ||
<p class="js-truncate"><%= document.send("dct_description_sm").join %></p> | ||
<% end %> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<%= content_tag :li, id: document.friendlier_id, class: bookmarked do %> | ||
<%= check_box_tag nil, nil, false, data: { id: document.friendlier_id, action: 'click->results#checkChecked'}%> | ||
|
||
<%= render 'admin/documents/document_bookmark', document: document %> | ||
|
||
<%= "#{@documents.meta['pages']['offset_value'] + index + 1}." if @documents %> | ||
|
||
<%= link_to document.title, edit_admin_document_path(document.friendlier_id) %> | ||
· <%= publication_state_badge(document) %> | ||
|
||
<% if document.send("schema_provider_s") %> | ||
· <%= document.send("schema_provider_s") %> | ||
<% end %> | ||
<% if document.send("dct_temporal_sm") %> | ||
· <%= document.send("dct_temporal_sm").join("-") %> | ||
<% end %> | ||
<% if document.send("dct_description_sm").present? %> | ||
<p class="js-truncate"><%= document.send("dct_description_sm").join %></p> | ||
<% end %> | ||
|
||
<% end %> | ||
<% else %> | ||
<li> | ||
<p><strong>Missing from database: </strong><%= document.inspect %></p> | ||
</li> | ||
<% end %> | ||
<% end %> |
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,47 @@ | ||
<% bookmarked = current_user.document_is_bookmarked?(document) ? 'bookmarked' : '' %> | ||
|
||
<% if document.respond_to?('friendlier_id') %> | ||
<%= content_tag :li, id: document.friendlier_id, class: "#{bookmarked} mb-3" do %> | ||
<div class="row"> | ||
<div class="doc-actions ml-3"> | ||
<%= check_box_tag nil, nil, false, data: { id: document.friendlier_id, action: 'click->results#checkChecked'}%> | ||
<%= render 'admin/documents/document_bookmark', document: document %> | ||
</div> | ||
<div class="doc-hit col ml-2 mb-2"> | ||
<div class="row" style="font-size:1.1rem;"> | ||
<%= "#{@documents.meta['pages']['offset_value'] + index + 1}." if @documents %> | ||
<%= link_to document.title, edit_admin_document_path(document.friendlier_id), { class: "js-truncate mb-2" } %> | ||
</div> | ||
<div class="row"> | ||
<div class="media"> | ||
<% if document&.members&.first&.file&.exists? %> | ||
<%= link_to edit_admin_document_path(document.friendlier_id) do %> | ||
<%= image_tag(document.members.first.file_url(:thumb_mini_2X), { height: 64, width:64 }) %> | ||
<% end %> | ||
<% else %> | ||
<img class="" data-src="holder.js/64x64" alt="placeholder" src="data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%2264%22%20height%3D%2264%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2064%2064%22%20preserveAspectRatio%3D%22none%22%3E%3Cdefs%3E%3Cstyle%20type%3D%22text%2Fcss%22%3E%23holder_18bb5833508%20text%20%7B%20fill%3Argba(255%2C255%2C255%2C.75)%3Bfont-weight%3Anormal%3Bfont-family%3AHelvetica%2C%20monospace%3Bfont-size%3A10pt%20%7D%20%3C%2Fstyle%3E%3C%2Fdefs%3E%3Cg%20id%3D%22holder_18bb5833508%22%3E%3Crect%20width%3D%2264%22%20height%3D%2264%22%20fill%3D%22%23777%22%3E%3C%2Frect%3E%3Cg%3E%3Ctext%20x%3D%2213.83984375%22%20y%3D%2236.65%22%3E64x64%3C%2Ftext%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E" data-holder-rendered="true" style="width: 64px; height: 64px;"> | ||
<% end %> | ||
<div class="media-body ml-3"> | ||
<%- if document.send(Settings.FIELDS.RESOURCE_CLASS) %> | ||
<%= geoblacklight_icon(document.send(Settings.FIELDS.RESOURCE_CLASS)&.first) %> | ||
<% end %> | ||
<%= publication_state_badge(document) %> | ||
<% if document.send("schema_provider_s") %> | ||
· <%= document.send("schema_provider_s") %> | ||
<% end %> | ||
<% if document.send("dct_temporal_sm") %> | ||
· <%= document.send("dct_temporal_sm").join("-") %> | ||
<% end %> | ||
<% if document.send("dct_description_sm").present? %> | ||
<p class="js-truncate"><%= document.send("dct_description_sm").join %></p> | ||
<% end %> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<% end %> | ||
<% else %> | ||
<li> | ||
<p><strong>Missing from database: </strong><%= document.inspect %></p> | ||
</li> | ||
<% end %> |