app/views/curation_concern/images/_image.html.erb in curate-0.4.2 vs app/views/curation_concern/images/_image.html.erb in curate-0.5.0
- old
+ new
@@ -1,48 +1,60 @@
<%# This is a search result view %>
<% noid = image.noid %>
-<li id="document_<%= noid %>" class="row-fluid search-result">
- <div class="span3">
- <%= image_counter + 1 %>
- <%= render :partial => 'catalog/_index_partials/thumbnail_display', locals: {document: image} %>
- </div>
+<li id="document_<%= noid %>" class="search-result">
- <div class="span8">
- <% solr_doc = image.inner_object.solr_doc %>
- <%# Minimize Fedora hits by using solr_doc rather than document %>
- <%= link_to render_index_field_value(document: solr_doc, field: 'desc_metadata__title_tesim'), curation_concern_image_path(image), :id => "src_copy_link_#{noid}" %>
- <dl class="attributes">
- <% if solr_doc.has?('desc_metadata__contributor_tesim') %>
- <dt>Creator(s):</dt>
- <dd><%= render_index_field_value(document: solr_doc, field: 'desc_metadata__contributor_tesim') %></dd>
- <% end %>
+ <div class="row-fluid">
- <% if solr_doc.has?('desc_metadata__description_tesim') %>
- <dt>Description:</dt>
- <dd><%= truncate(render_index_field_value(document: solr_doc, field: 'desc_metadata__description_tesim'), length: 150) %></dd>
- <% end %>
+ <div class="span2 list-number">
+ <%= image_counter + 1 %>
+ <%= render :partial => 'catalog/_index_partials/type_display', locals: {document: image} %>
+ </div>
- <% if solr_doc.has?('desc_metadata__date_created_dtsim') %>
- <dt>Date:</dt>
- <dd><%= Date.parse(solr_doc['desc_metadata__date_created_dtsim'].first) %></dd>
- <% end %>
- </dl>
+ <div class="span6">
+ <% solr_doc = image.inner_object.solr_doc %>
+ <%# Minimize Fedora hits by using solr_doc rather than document %>
+ <%= link_to render_index_field_value(document: solr_doc, field: 'desc_metadata__title_tesim'), curation_concern_image_path(image), :id => "src_copy_link_#{noid}" %>
+ </div>
+ <div class="span4">
+ <% if current_user -%>
+ <%= render partial: 'add_to_collection_gui', locals: { document: image } %>
+
+ <%= link_to(
+ raw('<i class="icon-pencil icon-large"></i>'),
+ edit_curation_concern_image_path(image),
+ :class=> 'itemicon itemedit btn pull-right',
+ :title => 'Edit Image'
+ ) if can? :edit, image %>
+ <% end -%>
+ </div>
+
</div>
+ <div class="row-fluid">
- <div class="span1">
- <% if current_user && can?(:edit, image) %>
- <%= link_to(
- raw('<i class="icon-pencil icon-large"></i>'),
- edit_curation_concern_image_path(image),
- :class=> 'itemicon itemedit',
- :title => 'Edit Image')%>
- <% end -%>
+ <div class="span2">
+ <%= render :partial => 'catalog/_index_partials/thumbnail_display', locals: {document: image} %>
+ </div>
- <% if current_user %>
- <%= render partial: 'add_to_collection_gui', locals: { document: image } %>
- <% end %>
+ <div class="span10">
+ <dl class="attribute-list">
+ <% if solr_doc.has?('desc_metadata__contributor_tesim') %>
+ <dt>Creator(s):</dt>
+ <dd><%= render_index_field_value(document: solr_doc, field: 'desc_metadata__contributor_tesim') %></dd>
+ <% end %>
+
+ <% if solr_doc.has?('desc_metadata__description_tesim') %>
+ <dt>Description:</dt>
+ <dd><%= truncate(render_index_field_value(document: solr_doc, field: 'desc_metadata__description_tesim'), length: 150) %></dd>
+ <% end %>
+
+ <% if solr_doc.has?('desc_metadata__date_created_dtsim') %>
+ <dt>Date:</dt>
+ <dd><%= Date.parse(solr_doc['desc_metadata__date_created_dtsim'].first) %></dd>
+ <% end %>
+ </dl>
+ </div>
+
</div>
</li>
-