2023-07-05 22:08:37 -04:00
|
|
|
<div class="grid-x grid-margin-x">
|
|
|
|
<div class="cell small-12">
|
|
|
|
<h1>List of hardware</h1>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="cell small-12">
|
|
|
|
<p>
|
|
|
|
<a href="/hardware/add">Add new hardware</a>
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="grid-x grid-margin-x">
|
|
|
|
<% if hardware.length > 0 %>
|
|
|
|
<div class="cell small-12">
|
|
|
|
<table>
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>Hardware name</th>
|
|
|
|
<th>Type</th>
|
|
|
|
<th>Date added</th>
|
|
|
|
<th>Date modified</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<% hardware.each do |h| %>
|
|
|
|
<tr>
|
|
|
|
<td><%= h.name %></td>
|
|
|
|
<td><%= h.type %></td>
|
2023-07-05 22:27:07 -04:00
|
|
|
<td><%= date_format(h.created_at) %></td>
|
|
|
|
<td><%= date_format(h.updated_at) %></td>
|
2023-07-05 22:08:37 -04:00
|
|
|
</tr>
|
|
|
|
<% end %>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
<% else %>
|
|
|
|
<div class="cell small-12">
|
|
|
|
<p>I'm sorry, there doesn't appear to be any hardware added yet. Check again later!</p>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
</div>
|