summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrewMurrell <amurrel@purdue.edu>2014-04-26 20:05:45 -0400
committerAndrewMurrell <amurrel@purdue.edu>2014-04-26 20:05:45 -0400
commit9eba4940c7b6f54153b3a619769bbae378be6fd8 (patch)
tree2a046e610807a72e4095805fba1c60bcc993fb4a
parentd5e4ac14fc51631f5cd77ba4226ba5911ffe7e37 (diff)
Refactored show.html.erb for matches
-rw-r--r--app/views/matches/show.html.erb20
1 files changed, 2 insertions, 18 deletions
diff --git a/app/views/matches/show.html.erb b/app/views/matches/show.html.erb
index 7a82527..8344a7a 100644
--- a/app/views/matches/show.html.erb
+++ b/app/views/matches/show.html.erb
@@ -78,24 +78,8 @@ function score_peers() {
<!-- Started, waiting to finish -->
<!-- This will depend on the Sampling Method Eventually instead of always being Manual -->
- <% case @tournament.sampling_method %>
- <% when "Manual" %>
- <% if @tournament.hosts.include? current_user %>
- <input type="hidden" name="update_action" value="finish">
- <% @match.teams.each do |team| %>
- <%= tag :input, {"type" => "radio", "name" => "winner", "value" => "#{team.id}" } %>
- <%= "Team #{team.id} Won" %>
- <% end %>
- <%= submit_tag("Finish match") %>
- <%= @tournament.settings['ScoringMethod'] %>
- <% else %>
- <p>The match is running; the host has yet to post the scores of the match.</p>
- <% end %>
- <% when "Double Blind" %>
- <p>Double Blind isn't implemented yet.</p>
- <% when "RiotAPI" %>
- <p>Riot API is being called for Statistics. Results will appear shortly.</p>
- <% end %>
+ <%= raw @match.tournament_stage.tournament.sampling_method.camelcase.constantize.render_user_interaction(@match, current_user) %>
+
<% when 2 %>
<!-- Finished, waiting for peer reviews -->
<input type="hidden" name="update_action" value="peer">