notebook/app/views/items/_list.html.erb
2016-04-06 23:30:14 -05:00

31 lines
1.0 KiB
Plaintext

<table class="table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<% if session[:user] %>
<th><%=t '.actions', :default => t("helpers.actions") %></th>
<% end %>
</tr>
</thead>
<tbody>
<% @content.each do |equipment| %>
<tr>
<td style="width: 160px;"><%= simple_format link_to equipment.name, equipment_path(equipment) %></td>
<td><%= simple_format equipment.item_type %></td>
<td><%= simple_format equipment.description %></td>
<td style="width: 240px;">
<% if session[:user] and session[:user] == equipment.user.id %>
<%= link_to t('.view', :default => t("helpers.links.view")),
equipment_path(equipment), :class => 'btn' %>
<%= link_to t('.edit', :default => t("helpers.links.edit")),
equipment_edit_path(equipment), :class => 'btn' %>
<% end %>
</td>
</tr>
<% end %>
</tbody>
</table>