From f85943114dba527a1f87abb03229553472f57c0c Mon Sep 17 00:00:00 2001 From: tkimia Date: Sun, 6 Apr 2014 18:45:41 -0400 Subject: started SVG generation --- app/views/matches/index.html.erb | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) (limited to 'app/views') diff --git a/app/views/matches/index.html.erb b/app/views/matches/index.html.erb index 219507d..031b2a9 100644 --- a/app/views/matches/index.html.erb +++ b/app/views/matches/index.html.erb @@ -26,17 +26,39 @@
- +
- + <% (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 %> + /> <% end %> + +
\ No newline at end of file -- cgit v1.2.3-2-g168b