75 lines
1.7 KiB
Plaintext
75 lines
1.7 KiB
Plaintext
<div class="row">
|
|
<div class="thumbnail" style="width: 300px">
|
|
<div class="row">
|
|
<div class="col-xs-12">
|
|
<%= link_to image_tag(@resource.picture.url(:medium), height: 300, width: 300), @resource.picture.url if @resource.picture? %>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<% [:picture2, :picture3, :picture4].each do |p| %>
|
|
<% unless @resource.send(p).blank? %>
|
|
<div class="col-xs-4">
|
|
<%= link_to image_tag(@resource.send(p).url(:thumb)), @resource.send(p).url %>
|
|
</div>
|
|
<% end %>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<h2><%=h @resource.name %>
|
|
<%= link_to 'Back', resources_path, class: "btn btn-default" %>
|
|
<%= link_to 'Edit', edit_resource_path(@resource), class: "btn btn-primary" if can? :edit, @resource %>
|
|
</h2>
|
|
<% if @resource.user || @resource.owner %>
|
|
<p>
|
|
<b>Owner:</b>
|
|
<%=h (@resource.user || @resource.owner).name %>
|
|
</p>
|
|
<% end %>
|
|
<p>
|
|
<b>Category:</b>
|
|
<%=h @resource.resource_category.name if @resource.resource_category %>
|
|
</p>
|
|
|
|
<p>
|
|
<b>Serial:</b>
|
|
<%=h @resource.serial %>
|
|
</p>
|
|
|
|
<p>
|
|
<b>Specs:</b>
|
|
<%=h @resource.specs %>
|
|
</p>
|
|
|
|
<p>
|
|
<b>Status/Location:</b>
|
|
<%=h @resource.status %>
|
|
|
|
<% if @resource.disposed_at %>
|
|
<b>Disposed:</b>
|
|
<%=h @resource.disposed_at.to_date %>
|
|
<% end %>
|
|
</p>
|
|
|
|
<p>
|
|
<b>Donatable:</b>
|
|
<%=h @resource.donatable %>
|
|
</p>
|
|
|
|
<p>
|
|
<b>Estimated Value:</b>
|
|
<%=h @resource.estimated_value %>
|
|
</p>
|
|
|
|
<p>
|
|
<b>Notes:</b>
|
|
<div class="row">
|
|
<div class="col-sm-6">
|
|
<%= simple_format @resource.notes %>
|
|
</div>
|
|
</div>
|
|
</p>
|
|
|
|
<%= link_to 'Delete', resource_path(@resource), {:confirm => 'Are you sure you want to delete this forever?', :method => :delete, :class => "btn btn-danger"} if can? :destroy, @resource %>
|