<% content_for :title, t("tournaments.hub.title", name: @tournament.name) %> <% content_for :robots, "noindex, nofollow" %>
<% logo = @tournament.effective_logo_url %>

<%= @tournament.name %>

<%= @tournament.sport_label %> · <%= l(@tournament.starts_on) %> – <%= l(@tournament.ends_on) %> · <%= t("tournaments.status.#{@tournament.status}") %> · <%= t("tournaments.form.formats.#{@tournament.format_kind}") %>

<% if @writable %>

<%= t("tournaments.hub.tournament_logo_hint") %>

<% end %>
<% if @tournament.published? %> <%= link_to t("tournaments.hub.public_page"), public_tournament_page_path(@tournament.slug), class: "btn btn-secondary", target: "_blank", rel: "noopener" %> <% if @writable %> <%= button_to t("tournaments.hub.unpublish"), public_unpublish_tournament_path(@tournament), method: :post, class: "btn btn-secondary" %> <% end %> <% elsif @writable %> <%= button_to t("tournaments.hub.publish"), public_publish_tournament_path(@tournament), method: :post, class: "btn btn-primary" %> <% end %> <% if @writable && !@tournament.archived? %> <%= button_to t("tournaments.hub.archive"), public_archive_tournament_path(@tournament), method: :post, class: "btn btn-secondary", form: { data: { turbo_confirm: t("tournaments.hub.archive") } } %> <% end %> <%= button_to t("tournaments.hub.delete"), public_tournament_path(@tournament), method: :delete, class: "btn btn-secondary", form: { data: { turbo_confirm: t("tournaments.hub.delete_confirm", name: @tournament.name), confirm_kind: "delete" } } %>
<% @overlap_warnings.each do |warning| %>
<%= warning %>
<% end %> <%= render "public/tournaments/tab_#{@tab}" %>