diff --git a/app/views/layouts/_cdn.html.erb b/app/views/layouts/_cdn.html.erb index f923e78..02a3c20 100644 --- a/app/views/layouts/_cdn.html.erb +++ b/app/views/layouts/_cdn.html.erb @@ -6,13 +6,20 @@ + + + - - - - - diff --git a/app/views/layouts/_tournament-navbar.html.erb b/app/views/layouts/_tournament-navbar.html.erb index 81f864e..c34ea47 100644 --- a/app/views/layouts/_tournament-navbar.html.erb +++ b/app/views/layouts/_tournament-navbar.html.erb @@ -4,22 +4,25 @@
Name: <%= @school.name %> + <% if can? :manage, @school %><%= link_to " Edit", edit_school_path(@school),:class=>"fas fa-edit" %><% end %>
@@ -21,20 +16,12 @@
Tournament: <%= @school.tournament.name %> -
- - - - - -| Name | @@ -43,14 +30,14 @@Team Points Scored | Extra? | Next Bout/Mat | -Actions | + <% if can? :manage, @school %><%= link_to " New Wrestler" , "/wrestlers/new?school=#{@school.id}", :class=>"fas fa-plus"%> | <% end %>|
|---|---|---|---|---|---|---|
| <%= wrestler.name %> | +<%= link_to "#{wrestler.name}", wrestler %> | <%= wrestler.weight.max %> | <%= wrestler.original_seed %> @@ -60,13 +47,12 @@ Yes <% end %> | <%= wrestler.next_match_bout_number %> <%= wrestler.next_match_mat_name %> | -- <%= link_to 'Show', wrestler , :class=>"btn btn-default btn-sm" %> - <% 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 %> - | + <% if can? :manage, wrestler.school %> ++ <%= link_to '', edit_wrestler_path(wrestler),:class=>"fas fa-edit" %> + <%= link_to '', wrestler, method: :delete, data: { confirm: "Are you sure you want to delete #{wrestler.name}? This will delete all of his matches." }, :class=>"fas fa-trash-alt" %> + | + <% end %>
| Name | Date | -+ | <% if user_signed_in? %><%= link_to ' New Tournament', new_tournament_path, :class=>"fas fa-plus" %> | <% end %>|
|---|---|---|---|---|
| <%= tournament.name %> | +<%= link_to "#{tournament.name}", tournament %> | <%= tournament.date %> | -<%= link_to 'Show', tournament, :class=>"btn btn-default btn-sm" %> <% if can? :manage, tournament %> - <%= link_to 'Edit', edit_tournament_path(tournament), :class=>"btn btn-primary btn-sm" %> - <% end %> - <% if can? :destroy, tournament %> - <%= link_to 'Destroy', tournament, method: :delete, data: { confirm: 'Are you sure?' }, :class=>"btn btn-danger btn-sm" %> + | + <%= link_to '', edit_tournament_path(tournament), :class=>"fas fa-edit" %> + <% if can? :destroy, tournament %> + <%= link_to '', tournament, method: :delete, data: { confirm: "Are you sure you want to delete #{tournament.name}?" }, :class=>"fas fa-trash-alt" %> + <% end %> + | <% end %> -
| Name | Tournament Name | Tournament Date | -|||
|---|---|---|---|---|---|
| <%= school.name %> | +<%= link_to "#{school.name}", school %> | <%= school.tournament.name %> | <%= school.tournament.date %> | -<%= link_to 'Show', school, :class=>"btn btn-default btn-sm" %> - <% if can? :manage, school %> - <%= link_to 'Edit', edit_school_path(school), :class=>"btn btn-primary btn-sm" %> - <% end %> - |
| Name | Date | -+ | <% if user_signed_in? %><%= link_to ' New Tournament', new_tournament_path, :class=>"fas fa-plus" %> | <% end %>||
|---|---|---|---|---|---|
| <%= tournament.name %> | +<%= link_to "#{tournament.name}", tournament %> | <%= tournament.date %> | -<%= link_to 'Show', tournament, :class=>"btn btn-default btn-sm" %> <% if can? :manage, tournament %> - <%= link_to 'Edit', edit_tournament_path(tournament), :class=>"btn btn-primary btn-sm" %> - <% end %> - <% if can? :destroy, tournament %> - <%= link_to 'Destroy', tournament, method: :delete, data: { confirm: 'Are you sure?' }, :class=>"btn btn-danger btn-sm" %> - <% end %> - | ++ <%= link_to '', edit_tournament_path(tournament), :class=>"fas fa-edit" %> + <% if can? :destroy, tournament %> + <%= link_to '', tournament, method: :delete, data: { confirm: "Are you sure you want to delete #{tournament.name}?" }, :class=>"fas fa-trash-alt" %> + <% end %> + | + <% end %>
| Name | -+ <% if can? :manage, @tournament %> | <%= link_to " New School" , "/schools/new?tournament=#{@tournament.id}", :class=>"fas fa-plus" %> | <% end %>|||
|---|---|---|---|---|---|
| <%= school.name %> | -<%= link_to 'Show', school, :class=>"btn btn-default btn-sm" %> + | <%= link_to "#{school.name}", school %> <% if can? :manage, school %> - <%= link_to 'Edit', edit_school_path(school), :class=>"btn btn-primary btn-sm" %> - <% end %> - <% if can? :manage, @tournament %> - <%= link_to 'Destroy', school, method: :delete, data: { confirm: 'Are you sure?' }, :class=>"btn btn-danger btn-sm" %> + | <%= link_to '', edit_school_path(school), :class=>"fas fa-edit" %> + <% if can? :manage, @tournament %> + <%= link_to '', school, method: :delete, data: { confirm: "Are you sure you want to delete #{school.name}?" }, :class=>"fas fa-trash-alt" %> + <% end %> + | <% end %> +
| Weight Class | Bracket Size | -+ <% if can? :manage, @tournament %> | <%= link_to " New Weight Class" , "/weights/new?tournament=#{@tournament.id}", :class=>"fas fa-plus" %> | <% end %>||
|---|---|---|---|---|---|
| <%= weight.max %> | +<%= link_to "#{weight.max} lbs", weight %> | <%= weight.bracket_size %> | -<%= link_to 'Show', weight, :class=>"btn btn-default btn-sm" %> <% if can? :manage, @tournament %> - <%= link_to 'Edit', edit_weight_path(weight), :class=>"btn btn-primary btn-sm" %> - <%= link_to 'Destroy', weight, method: :delete, data: { confirm: 'Are you sure?' }, :class=>"btn btn-danger btn-sm" %> + | + <%= link_to '', edit_weight_path(weight), :class=>"fas fa-edit" %> + <%= link_to '', weight, method: :delete, data: { confirm: "Are you sure you want to delete the #{weight.max} weight class?" }, :class=>"fas fa-trash-alt" %> + | <% end %> -
| Name | -+ | <%= link_to " New Mat" , "/mats/new?tournament=#{@tournament.id}", :class=>"fas fa-plus" %> | |||
|---|---|---|---|---|---|
| <%= mat.name %> | -+ | <%= link_to "Mat #{mat.name}", mat %> | <% if can? :manage, @tournament %> - <%= link_to 'Show', mat, :class=>"btn btn-default btn-sm" %> - <%= link_to 'Destroy', mat, method: :delete, data: { confirm: 'Are you sure?' }, :class=>"btn btn-danger btn-sm" %> ++ <%= link_to '', mat, method: :delete, data: { confirm: "Are you sure you want to delete Mat #{mat.name}?" }, :class=>"fas fa-trash-alt" %> + | <% end %> -
| Name | @@ -18,7 +15,6 @@Record | Seed Criteria | Extra? | - <% if can? :manage, @tournament %>Actions for wrestler | <% end %>|
|---|---|---|---|---|---|
| <%= wrestler.name %> | +<%= link_to "#{wrestler.name}", wrestler %> | <%= wrestler.school.name %> | <% if can? :manage, @tournament %> @@ -43,8 +39,9 @@ Yes <% end %> | <% if can? :manage, @tournament %> -<%= link_to 'Show', wrestler , :class=>"btn btn-default btn-sm" %> - <%= link_to 'Destroy', wrestler, method: :delete, data: { confirm: 'Are you sure?' } , :class=>"btn btn-danger btn-sm" %> | ++ <%= link_to '', wrestler, method: :delete, data: { confirm: "Are you sure you want to delete #{wrestler.name}?" } , :class=>"fas fa-trash-alt" %> + | <% end %>