From a916d160f7e5f8446751c5739d207c746e5d97b0 Mon Sep 17 00:00:00 2001 From: tkimia Date: Mon, 7 Apr 2014 01:34:30 -0400 Subject: your team is shown as light green in the tournament tree --- app/views/matches/index.html.erb | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'app/views/matches/index.html.erb') diff --git a/app/views/matches/index.html.erb b/app/views/matches/index.html.erb index 1941179..742de14 100644 --- a/app/views/matches/index.html.erb +++ b/app/views/matches/index.html.erb @@ -51,9 +51,9 @@ <% (1..@matches.count).each do |i| %> @@ -81,7 +81,7 @@ stroke="grey" <% end %> /> - + " stroke="black" /> <% if @matches[i-1].teams.first %> Team <%= @matches[i-1].teams.first.id %> @@ -89,13 +89,12 @@ VS - + " stroke="black" /> <% if @matches[i-1].teams[1] %> Team <%= @matches[i-1].teams[1].id %> <% end %> - <% if i > 1 %> <% end %> -- cgit v1.2.3-54-g00ecf From b7ddee6cc5255355e3f89833548917610760e5e8 Mon Sep 17 00:00:00 2001 From: tkimia Date: Mon, 7 Apr 2014 02:06:31 -0400 Subject: new graphics of the day --- app/views/matches/index.html.erb | 24 +++++++++++++----------- app/views/tournaments/_selected.html.erb | 4 ++-- 2 files changed, 15 insertions(+), 13 deletions(-) (limited to 'app/views/matches/index.html.erb') diff --git a/app/views/matches/index.html.erb b/app/views/matches/index.html.erb index 742de14..def97ba 100644 --- a/app/views/matches/index.html.erb +++ b/app/views/matches/index.html.erb @@ -60,8 +60,8 @@ /> - " stroke="black" /> - + " stroke="black" /> + <% if @matches[i-1].teams.first %> Team <%= @matches[i-1].teams.first.id %> <% end %> - VS + VS - " stroke="black" /> - + " stroke="black" /> + <% if @matches[i-1].teams[1] %> Team <%= @matches[i-1].teams[1].id %> <% end %> @@ -98,10 +98,12 @@ <% if i > 1 %> <% end %> - <% lastrx = rx - lastry = ry - lastrh = rh - lastrw = rw %> + <% if Math.log2(i+1) == Math.log2(i+1).ceil %> + <% lastrx = rx + lastry = ry + lastrh = rh + lastrw = rw %> + <% end %> <% end %> diff --git a/app/views/tournaments/_selected.html.erb b/app/views/tournaments/_selected.html.erb index d37c741..c0f8367 100644 --- a/app/views/tournaments/_selected.html.erb +++ b/app/views/tournaments/_selected.html.erb @@ -23,9 +23,9 @@ <% when 0 %> <%= setting_fields.text_field( setting.name, :name ) %> <% when 1 %> - <%= setting_fields.text_area( setting.name, setting.name ) %> + <%# setting_fields.text_area( setting.name, setting.name ) %> <% when 2 %> - <%= setting_fields.collection_radio_buttons( setting.name, setting.type_opt.split(',') ) %> + <%# setting_fields.collection_radio_buttons( setting.name, setting.type_opt.split(',') ) %> <% when 3 %> <%= setting_fields.collection_check_boxes( setting.name, setting.type_opt.split(',') ) %> <% when 4 %> -- cgit v1.2.3-54-g00ecf