game-data/views/test/index.erb
Gregory Ballantine 175ce24b27
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Started work to redo the UI for database changes
2023-12-21 01:29:59 -05:00

43 lines
1.0 KiB
Plaintext

<div class="grid-x grid-margin-x">
<div class="cell small-12">
<h1>List of tests</h1>
</div>
<div class="cell small-12">
<p>
<a href="/test/add">Add new test</a>
</p>
</div>
</div>
<div class="grid-x grid-margin-x">
<% if tests.length > 0 %>
<div class="cell small-12">
<table>
<thead>
<tr>
<th>Test name</th>
<th># of results</th>
<th>Date added</th>
<th>Date modified</th>
</tr>
</thead>
<tbody>
<% tests.each do |t| %>
<tr>
<td><a href="/test/<%= t.id %>"><%= t.name %></a></td>
<td><%= t.results.length %></td>
<td><%= date_format(t.created_at) %></td>
<td><%= date_format(t.updated_at) %></td>
</tr>
<% end %>
</tbody>
</table>
</div>
<% else %>
<div class="cell small-12">
<p>I'm sorry, there don't appear to be any tests added yet. Check again later!</p>
</div>
<% end %>
</div>