<% content_for :title, t("tournaments.index.title", name: @club.name) %> <% content_for :robots, "noindex, nofollow" %>

<%= t("tournaments.index.heading") %>

<%= t("tournaments.index.lead") %>

<% if @can_create %> <%= link_to t("tournaments.index.new"), public_new_club_tournament_path(@club), class: "btn btn-primary" %> <% end %>
<% unless @can_create %>
<%= t("tournaments.index.upgrade") %> <%= link_to t("club.dashboard.subscription"), public_club_billing_path(@club) %>
<% end %>
<% if @tournaments.any? %>
<% @tournaments.each do |tournament| %> <% end %>
<%= t("tournaments.index.col_name") %> <%= t("tournaments.index.col_dates") %> <%= t("tournaments.index.col_status") %>
<%= tournament.name %> <%= l(tournament.starts_on) %> – <%= l(tournament.ends_on) %> <%= t("tournaments.status.#{tournament.status}") %>
<%= link_to t("tournaments.index.open"), public_tournament_path(tournament), class: "btn btn-secondary", style: "padding:8px 14px;font-size:0.9rem" %> <% if tournament.published? %> <%= link_to t("tournaments.hub.public_page"), public_tournament_page_path(tournament.slug), class: "btn btn-secondary", style: "padding:8px 14px;font-size:0.9rem", target: "_blank", rel: "noopener" %> <% end %> <%= button_to t("tournaments.index.delete"), public_tournament_path(tournament), method: :delete, class: "btn btn-secondary", style: "padding:8px 14px;font-size:0.9rem", form: { data: { turbo_confirm: t("tournaments.hub.delete_confirm", name: tournament.name), confirm_kind: "delete" } } %>
<% else %>

<%= t("tournaments.index.empty") %>

<% end %>