1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-04-19 14:00:27 +00:00

Finished setting owner for tournamenr and protecting paths

This commit is contained in:
2015-10-26 16:31:45 -04:00
parent ad9ea9dc42
commit d18e729012
16 changed files with 109 additions and 86 deletions

View File

@@ -1,6 +1,6 @@
<p id="notice"><%= notice %></p>
<%= link_to "Back to #{@tournament.name}", "/tournaments/#{@tournament.id}",:class=>"btn btn-default" %> |
<% if user_signed_in? %>
<% if tournament_permissions(@school.tournament) %>
<%= link_to "Edit #{@school.name}", edit_school_path(@school),:class=>"btn btn-primary" %>
<% end %>
<br>
@@ -25,7 +25,7 @@
<br>
<% if user_signed_in? %>
<% if tournament_permissions(@school.tournament) %>
<%= link_to "New #{@school.name} Wrestler" , "/wrestlers/new?school=#{@school.id}", :class=>"btn btn-success"%>
<% end %>
<br>
@@ -40,7 +40,7 @@
<th>Record</th>
<th>Seed Criteria</th>
<th>Extra?</th>
<% if user_signed_in? %>
<% if tournament_permissions(@school.tournament) %>
<th>Actions</th>
<% end %>
</tr>
@@ -60,7 +60,7 @@
<td><% if wrestler.extra? == true %>
Yes
<% end %></td>
<% if user_signed_in? %>
<% if tournament_permissions(@school.tournament) %>
<td>
<%= link_to 'Show', wrestler , :class=>"btn btn-default" %>
<%= link_to 'Edit', edit_wrestler_path(wrestler), :class=>"btn btn-default" %>