mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-03-25 01:14:43 +00:00
School delegates permissions are working
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
|
||||
<p id="notice"><%= notice %></p>
|
||||
<%= link_to "Back to #{@tournament.name}", "/tournaments/#{@tournament.id}",:class=>"btn btn-default" %>
|
||||
<% if can? :manage, @tournament %>
|
||||
<% if can? :manage, @school %>
|
||||
| <%= link_to "Edit #{@school.name}", edit_school_path(@school),:class=>"btn btn-primary" %>
|
||||
<% end %>
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
|
||||
<br>
|
||||
<% if can? :manage, @tournament %>
|
||||
<% if can? :manage, @school %>
|
||||
<%= link_to "New #{@school.name} Wrestler" , "/wrestlers/new?school=#{@school.id}", :class=>"btn btn-success"%>
|
||||
<% end %>
|
||||
<br>
|
||||
@@ -66,7 +66,7 @@
|
||||
<td><%= wrestler.nextMatchBoutNumber %> <%= wrestler.nextMatchMatName %></td>
|
||||
<td>
|
||||
<%= link_to 'Show', wrestler , :class=>"btn btn-default btn-sm" %>
|
||||
<% if can? :manage, @tournament %>
|
||||
<% if can? :manage, wrestler.school %>
|
||||
<%= link_to 'Edit', edit_wrestler_path(wrestler),:class=>"btn btn-primary btn-sm" %>
|
||||
<%= link_to 'Destroy', wrestler, method: :delete, data: { confirm: 'Are you sure?' }, :class=>"btn btn-danger btn-sm" %>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user