<%= link_to image_tag(@resource.picture.url(:medium), height: 300, width: 300), @resource.picture.url if @resource.picture? %>
<% [:picture2, :picture3, :picture4].each do |p| %> <% unless @resource.send(p).blank? %>
<%= link_to image_tag(@resource.send(p).url(:thumb)), @resource.send(p).url %>
<% end %> <% end %>

<%=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 %>

<% if @resource.user || @resource.owner %>

Owner: <%=h (@resource.user || @resource.owner).name %>

<% end %>

Category: <%=h @resource.resource_category.name if @resource.resource_category %>

Serial: <%=h @resource.serial %>

Specs: <%=h @resource.specs %>

Status/Location: <%=h @resource.status %> <% if @resource.disposed_at %> Disposed: <%=h @resource.disposed_at.to_date %> <% end %>

Donatable: <%=h @resource.donatable %>

Estimated Value: <%=h @resource.estimated_value %>

Notes:

<%= simple_format @resource.notes %>

<%= 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 %>