56 lines
1.2 KiB
Plaintext
56 lines
1.2 KiB
Plaintext
<%= link_to image_tag(@resource.picture.url(:medium)), @resource.picture.url, :popup => ['show_image_preview', 'height=300,width=400'] if @resource.picture? %>
|
|
|
|
<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>
|
|
<%=h @resource.notes %>
|
|
</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 %>
|