32 lines
833 B
Plaintext
Executable File
32 lines
833 B
Plaintext
Executable File
<h1>Resources</h1>
|
|
|
|
<%= link_to 'Add Equipment', new_resource_path, :class => "btn" if can? :create, Resource %>
|
|
|
|
<style>
|
|
.collapsible .thumbnail { height: 150px; }
|
|
</style>
|
|
|
|
<% unless @resources.blank? %>
|
|
<div class="panel-group" id="accordion">
|
|
<% @resources.sort_by{|r| [r.category_name,r.name] }.group_by(&:category).each do |category,resources| %>
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading">
|
|
<h4 class="panel-title">
|
|
<a data-toggle="collapse" data-parent="#accordion" href="#collapseOne">
|
|
<%= category.name %>
|
|
</a>
|
|
</h4>
|
|
</div>
|
|
<div id="collapseOne" class="panel-collapse collapse in">
|
|
<div class="panel-body">
|
|
<%= render resources %>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<% end %>
|
|
</div>
|
|
<% end %>
|
|
|
|
<br />
|
|
|