Open-Source-Access-Control-.../app/views/resources/show.html.erb

75 lines
1.7 KiB
Plaintext
Raw Normal View History

2014-02-14 08:09:16 +00:00
<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>
2014-02-09 10:42:17 +00:00
<h2><%=h @resource.name %>
<%= link_to 'Back', resources_path, class: "btn btn-default" %>
2014-02-09 12:13:35 +00:00
<%= link_to 'Edit', edit_resource_path(@resource), class: "btn btn-primary" if can? :edit, @resource %>
2014-02-09 10:42:17 +00:00
</h2>
2014-02-09 11:32:45 +00:00
<% if @resource.user || @resource.owner %>
<p>
<b>Owner:</b>
<%=h (@resource.user || @resource.owner).name %>
</p>
<% end %>
2014-02-09 10:42:17 +00:00
<p>
<b>Category:</b>
<%=h @resource.resource_category.name if @resource.resource_category %>
2014-02-09 10:42:17 +00:00
</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 %>
2014-02-09 11:32:45 +00:00
<% if @resource.disposed_at %>
<b>Disposed:</b>
<%=h @resource.disposed_at.to_date %>
<% end %>
2014-02-09 10:42:17 +00:00
</p>
<p>
<b>Donatable:</b>
<%=h @resource.donatable %>
</p>
<p>
<b>Estimated Value:</b>
<%=h @resource.estimated_value %>
</p>
<p>
<b>Notes:</b>
2014-02-14 08:09:16 +00:00
<div class="row">
<div class="col-sm-6">
<%= simple_format @resource.notes %>
</div>
</div>
2014-02-09 10:42:17 +00:00
</p>
2014-02-09 11:32:45 +00:00
<%= 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 %>