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') 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-2-g168b From 55f1d11f66f216f0aff40fbe3ba90373339beb55 Mon Sep 17 00:00:00 2001 From: tkimia Date: Mon, 7 Apr 2014 02:48:17 -0400 Subject: profiles updated --- app/views/matches/index.html.erb | 3 ++- app/views/users/show.html.erb | 36 ++++++++++++++++++++++++++++++------ 2 files changed, 32 insertions(+), 7 deletions(-) (limited to 'app') diff --git a/app/views/matches/index.html.erb b/app/views/matches/index.html.erb index def97ba..78c97bb 100644 --- a/app/views/matches/index.html.erb +++ b/app/views/matches/index.html.erb @@ -38,7 +38,8 @@ + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink"> <% lastrx = 0 lastry = 0 lastrh = 0 diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index 7bda009..c2b5c75 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -1,10 +1,8 @@ -

- <%= image_tag 'http://www.gravatar.com/avatar/' + Digest::MD5.hexdigest(@user.email) + '?s=100&d=mm' %> -

+ +

<%= @user.user_name %>'s Profile

- Name: - <%= @user.name %> + <%= image_tag 'http://www.gravatar.com/avatar/' + Digest::MD5.hexdigest(@user.email) + '?s=100&d=mm' %>

@@ -13,9 +11,35 @@

- User name: + Preferred name: <%= @user.user_name %>

+

+ Relationship Status: + too single +

+ +
+
+

Recent Tournaments Players

+
    + <% @user.tournaments_played.each do |t| %> +
  • <%= t.name %>
  • + <% end %> +
+
+
+

Recent Tournaments Hosted

+ <% if @user.tournaments_hosted.count == 0 %>

<%= @user.user_name %> has never hosted a tournament

<%end %> +
    + <% @user.tournaments_hosted.each do |t| %> +
  • <%= t.name %>
  • + <% end %> +
+
+
+ + <%= link_to 'Edit', edit_user_path(@user) %> | <%= link_to 'Users', users_path %> -- cgit v1.2.3-2-g168b