1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-04-27 08:56:37 +00:00

Cleaning up main tournament page and tournament controller

This commit is contained in:
2015-06-30 13:43:09 +00:00
parent 3f3cc7014b
commit 0fddccf6f5
2 changed files with 36 additions and 45 deletions

View File

@@ -61,14 +61,6 @@ class TournamentsController < ApplicationController
end end
end end
def createHsWeights
if params[:tournament]
if user_signed_in?
@tournament.createHsWeights
end
redirect_to "/tournaments/#{@tournament.id}"
end
end
# DELETE /tournaments/1 # DELETE /tournaments/1
# DELETE /tournaments/1.json # DELETE /tournaments/1.json
def destroy def destroy

View File

@@ -30,19 +30,19 @@
<%= @tournament.tournament_type %> <%= @tournament.tournament_type %>
</p> </p>
<br> <br>
<br>
<% if user_signed_in? %> <% if user_signed_in? %>
<br>
<%= link_to "Generate Pool Matches" , "/static_pages/generate_matches?tournament=#{@tournament.id}", :class=>"btn btn-danger" %> <%= link_to "Generate Pool Matches" , "/static_pages/generate_matches?tournament=#{@tournament.id}", :class=>"btn btn-danger" %>
<% end %>
<br> <br>
<br> <br>
<% end %>
<br>
<h3>School Lineups</h3> <h3>School Lineups</h3>
<br> <br>
<% if user_signed_in? %><%= link_to "New #{@tournament.name} School" , "/schools/new?tournament=#{@tournament.id}", :class=>"btn btn-default" %><% end %> <% if user_signed_in? %>
<%= link_to "New #{@tournament.name} School" , "/schools/new?tournament=#{@tournament.id}", :class=>"btn btn-default" %>
<br> <br>
<br> <br>
<% end %>
<table class="table table-striped table-bordered"> <table class="table table-striped table-bordered">
<thead> <thead>
<tr> <tr>
@@ -76,9 +76,9 @@
<%= link_to "New #{@tournament.name} Weight" , "/weights/new?tournament=#{@tournament.id}", :class=>"btn btn-default" %> <%= link_to "New #{@tournament.name} Weight" , "/weights/new?tournament=#{@tournament.id}", :class=>"btn btn-default" %>
<br> <br>
<%= link_to "Create HS Weights" , "/static_pages/createCustomWeights?tournament=#{@tournament.id}&customValue=hs", :class=>"btn btn-default" %> <%= link_to "Create HS Weights" , "/static_pages/createCustomWeights?tournament=#{@tournament.id}&customValue=hs", :class=>"btn btn-default" %>
<br>
<br>
<% end %> <% end %>
<br>
<br>
<table class="table table-striped table-bordered"> <table class="table table-striped table-bordered">
<thead> <thead>
<tr> <tr>
@@ -104,16 +104,14 @@
</tbody> </tbody>
</table> </table>
<% if user_signed_in? %>
<br> <br>
<br> <br>
<h3>Mats</h3> <h3>Mats</h3>
<br> <br>
<% if user_signed_in? %>
<%= link_to "New #{@tournament.name} Mat" , "/mats/new?tournament=#{@tournament.id}", :class=>"btn btn-default" %> <%= link_to "New #{@tournament.name} Mat" , "/mats/new?tournament=#{@tournament.id}", :class=>"btn btn-default" %>
<br> <br>
<br> <br>
<% end %>
<table class="table table-striped table-bordered"> <table class="table table-striped table-bordered">
<thead> <thead>
<tr> <tr>
@@ -135,6 +133,7 @@
<% end %> <% end %>
</tbody> </tbody>
</table> </table>
<% end %>