mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-03-25 01:14:43 +00:00
Added all matches page and edit matches page
This commit is contained in:
37
app/views/tournaments/matches.html.erb
Normal file
37
app/views/tournaments/matches.html.erb
Normal file
@@ -0,0 +1,37 @@
|
||||
|
||||
|
||||
<h1>All <%= @tournament.name %> matches</h1>
|
||||
<br>
|
||||
<br>
|
||||
<%= link_to "Back to #{@tournament.name}", "/tournaments/#{@tournament.id}", :class=>"btn btn-default" %>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#matchesList').dataTable();
|
||||
pagingType: "bootstrap";
|
||||
} );
|
||||
</script>
|
||||
</br>
|
||||
</br>
|
||||
<table class="table table-striped table-bordered" id="matchesList">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Bout number</th>
|
||||
<th>Matchup</th>
|
||||
<th>Finished?</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<% @matches.each do |match| %>
|
||||
<tr>
|
||||
<td><%= match.bout_number %></td>
|
||||
<td><%= match.w1_name %> vs <%= match.w2_name %></td>
|
||||
<td><%= match.finished %></td>
|
||||
<td><%= link_to 'Show', match, :class=>"btn btn-default" %>
|
||||
<%= link_to 'Edit', edit_match_path(match), :class=>"btn btn-primary" %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
Reference in New Issue
Block a user