Files
game-data/views/test/index.erb
Gregory Ballantine 0231ebad2d
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Made some more style changes
2025-07-26 01:08:35 -04:00

43 lines
1.0 KiB
Plaintext

<div class="row mb-3">
<div class="col-12">
<h1>List of tests</h1>
</div>
<div class="col-12">
<p>
<a href="/test/add">Add new test</a>
</p>
</div>
</div>
<div class="row mb-3">
<% if tests.length > 0 %>
<div class="col-12">
<table class="table table-hover table-responsive">
<thead class="table-light">
<tr>
<th>Test name</th>
<th># of benchmarks</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.benchmarks.length %></td>
<td><%= date_format(t.created_at) %></td>
<td><%= date_format(t.updated_at) %></td>
</tr>
<% end %>
</tbody>
</table>
</div>
<% else %>
<div class="col-12">
<p>I'm sorry, there doesn't appear to be any tests added yet. Check again later!</p>
</div>
<% end %>
</div>