1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-04-02 04:35:26 +00:00

Moving pages to tournament from static_pages

This commit is contained in:
2015-11-04 16:10:56 -05:00
parent 0ad274b421
commit f86a577c8b
15 changed files with 111 additions and 114 deletions

View File

@@ -5,10 +5,10 @@
</div>
<ul class="nav navbar-nav navbar-right navbar-custom-link">
<% if @tournament %>
<li><%= link_to "Brackets" , "/static_pages/weights?tournament=#{@tournament.id}" %></li>
<li><%= link_to "Upcoming Matches" , "/static_pages/up_matches?tournament=#{@tournament.id}" %></li>
<li><%= link_to "Brackets" , "/tournaments/#{@tournament.id}/weights" %></li>
<li><%= link_to "Upcoming Matches" , "/tournaments/#{@tournament.id}/up_matches" %></li>
<li><%= link_to "Results" , "/static_pages/results?tournament=#{@tournament.id}" %></li>
<li><%= link_to "Team Scores" , "/static_pages/team_scores?tournament=#{@tournament.id}" %></li>
<li><%= link_to "Team Scores" , "/tournaments/#{@tournament.id}/team_scores" %></li>
<% end %>
<% if user_signed_in? %>
<li><%=link_to "Log out", destroy_user_session_url ,:method => 'delete' %></li>

View File

@@ -13,7 +13,7 @@
}
</script>
<%= link_to "Back to #{@tournament.name} weights", "/static_pages/weights?tournament=#{@tournament.id}" %>
<%= link_to "Back to #{@tournament.name} weights", "/tournaments/#{@tournament.id}/weights" %>
<br>
<br>
<button type="submit" class="btn btn-primary" onclick="exportDataToRtf()">Export to file for printing</button>

View File

@@ -5,6 +5,6 @@
<br>
<p>If you would like to run a tournament, please click log in and then click sign up.</p>
<br>
<%= link_to "Browse Tournaments", '/static_pages/tournaments', class: "btn btn-large btn-primary" %>
<%= link_to "Browse Tournaments", '/tournaments', class: "btn btn-large btn-primary" %>
<p></p>
</div>

View File

@@ -1,14 +1,19 @@
<h1>Listing tournaments</h1>
<table>
<h1>Pick A Tournament</h1>
<script>
$(document).ready(function() {
$('#tournamentList').dataTable();
pagingType: "bootstrap";
} );
</script>
<% if user_signed_in? %>
<%= link_to 'New Tournament', new_tournament_path, :class=>"btn btn-success" %>
<% end %>
</br>
</br>
<table class="display compact cell-border" id="tournamentList">
<thead>
<tr>
<th>Name</th>
<th>Address</th>
<th>Director</th>
<th>Director email</th>
<th></th>
<th></th>
<th></th>
</tr>
</thead>
@@ -17,12 +22,12 @@
<% @tournaments.each do |tournament| %>
<tr>
<td><%= tournament.name %></td>
<td><%= tournament.address %></td>
<td><%= tournament.director %></td>
<td><%= tournament.director_email %></td>
<td><%= link_to 'Show', tournament %></td>
<td><%= link_to 'Edit', edit_tournament_path(tournament) %></td>
<td><%= link_to 'Destroy', tournament, method: :delete, data: { confirm: 'Are you sure?' } %></td>
<td><%= link_to 'Show', tournament, :class=>"btn btn-default" %>
<% if tournament_permissions(tournament) %>
<%= link_to 'Edit', edit_tournament_path(tournament), :class=>"btn btn-primary" %>
<%= link_to 'Destroy', tournament, method: :delete, data: { confirm: 'Are you sure?' }, :class=>"btn btn-danger" %>
<% end %>
</td>
</tr>
<% end %>
</tbody>
@@ -30,4 +35,4 @@
<br>
<%= link_to 'New Tournament', new_tournament_path %>

View File

@@ -2,7 +2,7 @@
<% if tournament_permissions(@tournament) %>
<%= link_to "Edit #{@tournament.name}", edit_tournament_path(@tournament), :class=>"btn btn-primary" %> |
<% end %>
<%= link_to 'Back', '/static_pages/tournaments', :class=>"btn btn-default" %>
<%= link_to 'Back', '/tournaments', :class=>"btn btn-default" %>
<h1>
<%= @tournament.name %>
@@ -31,7 +31,7 @@
</p>
<br>
<% if tournament_permissions(@tournament) %>
<%= link_to "Generate Pool Matches" , "/static_pages/generate_matches?tournament=#{@tournament.id}", data: { confirm: 'Are you sure? This will delete all current matches.' }, :class=>"btn btn-success" %>
<%= link_to "Generate Brackets" , "/tournaments/#{@tournament.id}/generate_matches", data: { confirm: 'Are you sure? This will delete all current matches.' }, :class=>"btn btn-success" %>
<br><br>
<%= link_to "Weigh In Page" , "/static_pages/weigh_in?tournament=#{@tournament.id}", :class=>"btn btn-primary" %>
<br>