diff --git a/app/controllers/cups_controller.rb b/app/controllers/cups_controller.rb index c7622fa1..b96a00ed 100644 --- a/app/controllers/cups_controller.rb +++ b/app/controllers/cups_controller.rb @@ -16,6 +16,7 @@ def show @current_cup = @cup @grouped_events = @cup.events.order(:start_on).group_by { |e| e.start_on.to_date } @headlines = @cup.headlines.shown.order("headlines.created_at DESC") + @shinpans = @cup.kenshis.shinpans.order(:last_name, :first_name) template = if @cup.canceled? "show_canceled" elsif Date.current > @cup.start_on.to_date diff --git a/app/views/cups/show.html.erb b/app/views/cups/show.html.erb index 58506526..198f04bc 100644 --- a/app/views/cups/show.html.erb +++ b/app/views/cups/show.html.erb @@ -96,6 +96,34 @@

<%= t(".shinpans.info") %>

+ <% if @shinpans.any? %> +

+ <%= t(".shinpans.invited.title") %> +

+ + + <% @shinpans.each.with_index do |shinpan, index| %> + + + + + + + + <% end %> + +
+ <%= index + 1 %>. + + <%= shinpan.female ? User.human_attribute_name(:ms) : User.human_attribute_name(:mr) %> + + <%= shinpan.full_name %> + + <%= shinpan.grade %> + + <%= shinpan.club.name %> +
+ <% end %> <% if @cup.products.any? %>
diff --git a/config/locales/views/cups.en.yml b/config/locales/views/cups.en.yml index 97170f62..ed88b2e4 100644 --- a/config/locales/views/cups.en.yml +++ b/config/locales/views/cups.en.yml @@ -58,6 +58,8 @@ en: title: Shinpan (referees) info: | This year, we will have a few invited official referees, but we still rely on the most senior among you to supplement the referee team when you are not competing. + invited: + title: Invited referees social: title: Follow us on venue: diff --git a/config/locales/views/cups.fr.yml b/config/locales/views/cups.fr.yml index 2e2e80ba..17852214 100644 --- a/config/locales/views/cups.fr.yml +++ b/config/locales/views/cups.fr.yml @@ -52,6 +52,8 @@ fr: title: Shinpan (arbitres) info: | Cette année, nous aurons quelques arbitres officiels invités, mais nous comptons toujours sur les plus gradés d'entre vous pour compléter l'effectif des arbitres lorsque vous ne combattez pas. + invited: + title: Arbitres invités social: title: Retrouvez-nous sur venue: