From f6ecbb9f4dec239db3661c9337b318c870e74bf3 Mon Sep 17 00:00:00 2001 From: Absurdon Date: Thu, 13 Apr 2017 19:32:07 +0200 Subject: [PATCH] gave referees a possibility to signup for matches --- app/views/matches/show.html.erb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/views/matches/show.html.erb b/app/views/matches/show.html.erb index 0a62dd4..0592286 100755 --- a/app/views/matches/show.html.erb +++ b/app/views/matches/show.html.erb @@ -122,6 +122,14 @@ <%= link_to "Referee Admin", match_ref_path(@match), class: 'button' %> <% end %> + <% if cuser and @match.referee.nil? and cuser.ref? %> +
+ <%= form_for @match do |f| %> + <%= f.hidden_field :referee_id, value: cuser.id %> + <%= f.submit "Signup as referee", class: 'button' %> + <% end %> +
+ <% end %> <%= add_comments @match %>