From c524bba025ffd09044ce35efc85ee720f3179111 Mon Sep 17 00:00:00 2001 From: tkimia Date: Mon, 7 Apr 2014 01:06:50 -0400 Subject: lol# On branch master --- app/views/matches/index.html.erb | 90 ++++++++++++++++++++------------ app/views/tournaments/_selected.html.erb | 1 - 2 files changed, 58 insertions(+), 33 deletions(-) (limited to 'app/views') diff --git a/app/views/matches/index.html.erb b/app/views/matches/index.html.erb index 052d176..1941179 100644 --- a/app/views/matches/index.html.erb +++ b/app/views/matches/index.html.erb @@ -37,8 +37,19 @@
+ <% lastrx = 0 + lastry = 0 + lastrh = 0 + lastrw = 0 %> + + + + + + <% (1..@matches.count).each do |i| %> - - - <% when 0 %> - <% if @matches[i-1].teams.count < @tournament.min_teams_per_match %> - stroke="red" - fill-opacity="0.6" - <% else %> - stroke="green" - <% end %> - <% when 1 %> - stroke="orange" - <% when 2 %> - stroke="yellow" - <% when 3 %> - stroke="grey" - <% end %> + + + <% when 0 %> + <% if @matches[i-1].teams.count < @tournament.min_teams_per_match %> + stroke="red" + fill-opacity="0.6" + <% else %> + stroke="green" + <% end %> + <% when 1 %> + stroke="orange" + <% when 2 %> + stroke="yellow" + <% when 3 %> + stroke="grey" + <% end %> /> + + + <% if @matches[i-1].teams.first %> + Team <%= @matches[i-1].teams.first.id %> + <% end %> + + VS + + + + <% if @matches[i-1].teams[1] %> + Team <%= @matches[i-1].teams[1].id %> + <% end %> + + + <% if i > 1 %> + + <% end %> + <% lastrx = rx + lastry = ry + lastrh = rh + lastrw = rw %> - <% if i > 1 %> - - <% end %> + <% end %>
diff --git a/app/views/tournaments/_selected.html.erb b/app/views/tournaments/_selected.html.erb index b66acb0..c3a1736 100644 --- a/app/views/tournaments/_selected.html.erb +++ b/app/views/tournaments/_selected.html.erb @@ -17,5 +17,4 @@

<% end %> - <%= f.submit %> <% end %> -- cgit v1.2.3-2-g168b