mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-03-25 01:14:43 +00:00
Do not show brackets or bout board if you tournament is not public
This commit is contained in:
@@ -5,21 +5,22 @@
|
||||
<div class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li><%= link_to " Tournament Home" , "/tournaments/#{@tournament.id}", class: "fas fa-home" %></li>
|
||||
<li class="dropdown">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#"><i class="fas fa-poll-h"> Tournament Results/Brackets</i>
|
||||
<span class="caret"></span></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><strong>Results</strong></li>
|
||||
<li><%= link_to "Team Scores" , "/tournaments/#{@tournament.id}/team_scores" %></li>
|
||||
<li><strong>Brackets</strong></li>
|
||||
<% @tournament.weights.sort_by{|weight| weight.max }.each do |weight| %>
|
||||
<li><%= link_to "#{weight.max}" , "/tournaments/#{@tournament.id}/brackets/#{weight.id}" %></li>
|
||||
<% end %>
|
||||
<li><%= link_to "All Brackets (Printable)", "/tournaments/#{@tournament.id}/all_brackets?print=true", target: :_blank %></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><%= link_to " Bout Board" , "/tournaments/#{@tournament.id}/up_matches", class: "fas fa-list-alt" %></li>
|
||||
|
||||
<% if can? :read, @tournament %>
|
||||
<li class="dropdown">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#"><i class="fas fa-poll-h"> Tournament Results/Brackets</i>
|
||||
<span class="caret"></span></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><strong>Results</strong></li>
|
||||
<li><%= link_to "Team Scores" , "/tournaments/#{@tournament.id}/team_scores" %></li>
|
||||
<li><strong>Brackets</strong></li>
|
||||
<% @tournament.weights.sort_by{|weight| weight.max }.each do |weight| %>
|
||||
<li><%= link_to "#{weight.max}" , "/tournaments/#{@tournament.id}/brackets/#{weight.id}" %></li>
|
||||
<% end %>
|
||||
<li><%= link_to "All Brackets (Printable)", "/tournaments/#{@tournament.id}/all_brackets?print=true", target: :_blank %></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><%= link_to " Bout Board" , "/tournaments/#{@tournament.id}/up_matches", class: "fas fa-list-alt" %></li>
|
||||
<% end %>
|
||||
<% if can? :manage, @tournament %>
|
||||
<li class="dropdown">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#director"><i class="fas fa-tools"> Tournament Director Links</i>
|
||||
|
||||
Reference in New Issue
Block a user