Added functionality to add a benchmark result
This commit is contained in:
44
views/result/index.erb
Normal file
44
views/result/index.erb
Normal file
@ -0,0 +1,44 @@
|
||||
<div class="grid-x grid-margin-x">
|
||||
<div class="cell small-12">
|
||||
<h1>List of results</h1>
|
||||
</div>
|
||||
|
||||
<div class="cell small-12">
|
||||
<p>
|
||||
<a href="/result/add">Add new result</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="grid-x grid-margin-x">
|
||||
<% if results.length > 0 %>
|
||||
<div class="cell small-12">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Hardware</th>
|
||||
<th>Benchmark</th>
|
||||
<th>Score (type)</th>
|
||||
<th>Date added</th>
|
||||
<th>Date modified</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% results.each do |r| %>
|
||||
<tr>
|
||||
<td><%= r.hardware.name %></td>
|
||||
<td><%= r.benchmark.name %></td>
|
||||
<td><%= r.score %> (<%= r.benchmark.scoring %>)</td>
|
||||
<td><%= date_format(r.created_at) %></td>
|
||||
<td><%= date_format(r.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 results added yet. Check again later!</p>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
Reference in New Issue
Block a user