Skip to content

Commit

Permalink
render status and point page for not user fantasy teams
Browse files Browse the repository at this point in the history
  • Loading branch information
kortirso committed Jul 28, 2023
1 parent da94e6f commit bbc09e4
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@
<% if @fantasy_team %>
<section class="fantasy-team">
<h2><%= @fantasy_team.name %></h2>
<% if @fantasy_team.completed? && @fantasy_team.user == Current.user %>
<% if @fantasy_team.completed? %>
<%= link_to t('components.views.shared.fantasy_team_navigation_component.status'), fantasy_team_status_index_path(@fantasy_team.uuid), class: "sidebar-link #{'active' if current_page?(fantasy_team_status_index_path(@fantasy_team.uuid))}" %>
<%= link_to t('components.views.shared.fantasy_team_navigation_component.points'), fantasy_team_points_path(@fantasy_team.uuid), class: "sidebar-link #{'active' if current_page?(fantasy_team_points_path(@fantasy_team.uuid))}" %>
<%= link_to t('components.views.shared.fantasy_team_navigation_component.team'), fantasy_team_path(@fantasy_team.uuid), class: "sidebar-link #{'active' if current_page?(fantasy_team_path(@fantasy_team.uuid))}" %>
<%= link_to t('components.views.shared.fantasy_team_navigation_component.transfers'), fantasy_team_transfers_path(@fantasy_team.uuid), class: "sidebar-link #{'active' if current_page?(fantasy_team_transfers_path(@fantasy_team.uuid))}" %>
<%= link_to t('components.views.shared.fantasy_team_navigation_component.leagues'), fantasy_team_fantasy_leagues_path(@fantasy_team.uuid), class: "sidebar-link #{'active' if current_page?(fantasy_team_fantasy_leagues_path(@fantasy_team.uuid))}" %>
<% if @fantasy_team.user_id == Current.user.id %>
<%= link_to t('components.views.shared.fantasy_team_navigation_component.team'), fantasy_team_path(@fantasy_team.uuid), class: "sidebar-link #{'active' if current_page?(fantasy_team_path(@fantasy_team.uuid))}" %>
<%= link_to t('components.views.shared.fantasy_team_navigation_component.transfers'), fantasy_team_transfers_path(@fantasy_team.uuid), class: "sidebar-link #{'active' if current_page?(fantasy_team_transfers_path(@fantasy_team.uuid))}" %>
<%= link_to t('components.views.shared.fantasy_team_navigation_component.leagues'), fantasy_team_fantasy_leagues_path(@fantasy_team.uuid), class: "sidebar-link #{'active' if current_page?(fantasy_team_fantasy_leagues_path(@fantasy_team.uuid))}" %>
<% end %>
<% end %>
</section>
<% end %>
Expand Down

0 comments on commit bbc09e4

Please sign in to comment.