From f08191c3966851b19edc949d7819cc58190037d7 Mon Sep 17 00:00:00 2001
From: nfoy
Date: Tue, 1 Apr 2014 18:45:00 -0400
Subject: Edit Users now works. Added delayed_job gem.
---
app/views/users/_form.html.erb | 8 ++++++++
app/views/users/edit.html.erb | 2 +-
app/views/users/show.html.erb | 2 +-
3 files changed, 10 insertions(+), 2 deletions(-)
(limited to 'app/views')
diff --git a/app/views/users/_form.html.erb b/app/views/users/_form.html.erb
index 4d28738..ae63f06 100644
--- a/app/views/users/_form.html.erb
+++ b/app/views/users/_form.html.erb
@@ -23,6 +23,14 @@
<%= f.label :user_name %>
<%= f.text_field :user_name %>
+
+ <%= f.label(:password, "New Password (or use old)") %>
+ <%= f.password_field :password %>
+
+
+ <%= f.label(:password_confirmation, "Confirm Password") %>
+ <%= f.password_field :password_confirmation %>
+
<%= f.submit %>
diff --git a/app/views/users/edit.html.erb b/app/views/users/edit.html.erb
index 99bd4cc..52f32a2 100644
--- a/app/views/users/edit.html.erb
+++ b/app/views/users/edit.html.erb
@@ -3,4 +3,4 @@
<%= render 'form' %>
<%= link_to 'Show', @user %> |
-<%= link_to 'Back', users_path %>
+<%= link_to 'Users', users_path %>
diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb
index dafa73e..7bda009 100644
--- a/app/views/users/show.html.erb
+++ b/app/views/users/show.html.erb
@@ -18,4 +18,4 @@
<%= link_to 'Edit', edit_user_path(@user) %> |
-<%= link_to 'Back', users_path %>
+<%= link_to 'Users', users_path %>
--
cgit v1.2.3-2-g168b
From dacab01db3ac4b9d9e2281daff74230a003f138e Mon Sep 17 00:00:00 2001
From: tkimia
Date: Thu, 3 Apr 2014 16:45:05 -0400
Subject: small change in form (Set Rounds no longer viewable). AJAX fixed so
that start tournament button enables or disables based on players here.
---
app/views/tournaments/_selected.html.erb | 2 +-
app/views/tournaments/show.html.erb | 7 +++++++
2 files changed, 8 insertions(+), 1 deletion(-)
(limited to 'app/views')
diff --git a/app/views/tournaments/_selected.html.erb b/app/views/tournaments/_selected.html.erb
index 8734b14..8a704b5 100644
--- a/app/views/tournaments/_selected.html.erb
+++ b/app/views/tournaments/_selected.html.erb
@@ -4,7 +4,7 @@
<% @chosen = Game.find_by(params[:game]) %>
<% @tournament.attributes.each do |name, value| %>
- <% if (name == "id") or (name =~ /.*_at$/) or (name == "game_id") or (name == "status") %>
+ <% if (name == "id") or (name =~ /.*_at$/) or (name == "game_id") or (name == "status") or (name == "set_rounds") %>
<% next %>
<% end %>
diff --git a/app/views/tournaments/show.html.erb b/app/views/tournaments/show.html.erb
index b771701..d246f7a 100644
--- a/app/views/tournaments/show.html.erb
+++ b/app/views/tournaments/show.html.erb
@@ -134,11 +134,18 @@ function donehandle( tournament ) {
$("#prog-bar").width( (pct_complete * 100) +"%");
$("#players-needed").text(here + " " + (here==1?"player has":"players have") + " signed up. " + needed + " players needed. ");
players = "";
+
+ //creates the present user list
for (var i = 0; i < tournament["players"].length; i++) {
players = players+"
"+tournament["players"][i]["user_name"]+""
}
+
+ //updates the user list
$("#tournament-users").html(players);
+ //if there are enough players to start, enable the button, else disable it.
+ $("input[value=\"Start Tournament\"]").prop('disabled', (pct_complete >= 1)? false : true);
+
}
setTimeout(function(){$.ajax({url: "<%= url_for @tournament %>.json"}).done(donehandle)}, 3000);
}
--
cgit v1.2.3-2-g168b