From d9b9fb1f6da39f45eee62ec13b806847fd23cfb9 Mon Sep 17 00:00:00 2001
From: DavisLWebb
Date: Sun, 2 Mar 2014 18:14:40 -0500
Subject: the users helper wasnt being push
---
app/views/sessions/new.html.erb | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
create mode 100644 app/views/sessions/new.html.erb
(limited to 'app/views')
diff --git a/app/views/sessions/new.html.erb b/app/views/sessions/new.html.erb
new file mode 100644
index 0000000..f942cf6
--- /dev/null
+++ b/app/views/sessions/new.html.erb
@@ -0,0 +1,18 @@
+Sign in
+
+
+
+ <%= form_for(:session, url: sessions_path) do |f| %>
+
+ <%= f.label :email %>
+ <%= f.text_field :email %>
+
+ <%= f.label :password %>
+ <%= f.password_field :password %>
+
+ <%= f.submit "Sign in", class: "btn btn-large btn-primary" %>
+ <% end %>
+
+
New user? <%= link_to "Sign up now!", signup_path %>
+
+
--
cgit v1.2.3-2-g168b
From 931c352e516adfac175eec5eafee9ea8e3311556 Mon Sep 17 00:00:00 2001
From: AndrewMurrell
Date: Sun, 2 Mar 2014 18:38:11 -0500
Subject: Made the button on the homepage redirect to the signup page.
---
app/views/static/homepage.html.erb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'app/views')
diff --git a/app/views/static/homepage.html.erb b/app/views/static/homepage.html.erb
index 760e087..4d52e5b 100644
--- a/app/views/static/homepage.html.erb
+++ b/app/views/static/homepage.html.erb
@@ -4,7 +4,7 @@
Welcome to Leaguer
This is a tournment management system designed to be used for any team sport. Our peer review system ensures that the best players move on to the next round! Try creating a new tournament and having people sign up for it.
-
<%= link_to 'Log In / Sign Up', "#", :class => "btn btn-warning btn-lg", :role => "button" %> <%= link_to 'See Ongoing Tournaments', tournaments_path, :class => "btn btn-warning btn-lg", :role => "button" %>
+
<%= link_to 'Log In / Sign Up', "signup", :class => "btn btn-warning btn-lg", :role => "button" %> <%= link_to 'See Ongoing Tournaments', tournaments_path, :class => "btn btn-warning btn-lg", :role => "button" %>
-
\ No newline at end of file
+
--
cgit v1.2.3-2-g168b
From e6b2993ad072d0cad2e52997c7957aae0a03415c Mon Sep 17 00:00:00 2001
From: DavisLWebb
Date: Sun, 2 Mar 2014 20:06:40 -0500
Subject: I changed the user controller
---
app/views/users/new.html.erb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'app/views')
diff --git a/app/views/users/new.html.erb b/app/views/users/new.html.erb
index 418f2e2..331abd4 100644
--- a/app/views/users/new.html.erb
+++ b/app/views/users/new.html.erb
@@ -19,7 +19,7 @@
<%= f.label :password_confirm %>
- <%= f.text_field :password_confirm %>
+ <%= f.text_field :password_confirmation %>
<%= f.submit %>
--
cgit v1.2.3-2-g168b
From 3e01db11def43419dd42727485e4005f78687c08 Mon Sep 17 00:00:00 2001
From: AndrewMurrell
Date: Sun, 2 Mar 2014 22:12:09 -0500
Subject: Since I don't know how to do stuff with forms, I edited the actual
HTML to fix where the form submits to. Tomer should help correct it.
---
app/views/users/new.html.erb | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
(limited to 'app/views')
diff --git a/app/views/users/new.html.erb b/app/views/users/new.html.erb
index 331abd4..715d40e 100644
--- a/app/views/users/new.html.erb
+++ b/app/views/users/new.html.erb
@@ -1,5 +1,6 @@
Sign Up
+<% if false %>
<%= form_for :user do |f| %>
<%= f.label :name %>
@@ -25,3 +26,32 @@
<%= f.submit %>
<% end %>
+
+
+<% end %>
+
+
\ No newline at end of file
--
cgit v1.2.3-2-g168b
From d220b5f8e86d1c8b4503948c09f2497d11710d98 Mon Sep 17 00:00:00 2001
From: AndrewMurrell
Date: Mon, 3 Mar 2014 11:40:05 -0500
Subject: Some of the stuff I forgot to commit last night. Updated and cleaned
up some pages as well as getting the gameType listing to work.
---
app/views/layouts/application.html.erb | 1 +
app/views/tournaments/index.html.erb | 8 ++++----
2 files changed, 5 insertions(+), 4 deletions(-)
(limited to 'app/views')
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb
index 8a81c0a..3910cf6 100644
--- a/app/views/layouts/application.html.erb
+++ b/app/views/layouts/application.html.erb
@@ -5,6 +5,7 @@
<%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
<%= javascript_include_tag "application", "data-turbolinks-track" => true %>
<%= csrf_meta_tags %>
+ <%= yield :head %>
diff --git a/app/views/tournaments/index.html.erb b/app/views/tournaments/index.html.erb
index 8ab3c15..7810b50 100644
--- a/app/views/tournaments/index.html.erb
+++ b/app/views/tournaments/index.html.erb
@@ -1,9 +1,9 @@
Listing tournaments
-
+
- Game
+
@@ -13,7 +13,7 @@
<% @tournaments.each do |tournament| %>
- <%= %>
+ <%= tournament.game %>
<%= link_to 'Show', tournament %>
<%= link_to 'Edit', edit_tournament_path(tournament) %>
<%= link_to 'Destroy', tournament, method: :delete, data: { confirm: 'Are you sure?' } %>
@@ -24,4 +24,4 @@
-<%= link_to 'New Tournament', new_tournament_path, :class => "btn btn-warning" %>
+<%= link_to 'New Tournament', new_tournament_path, :class => "btn btn-warning btn-lg" %>
--
cgit v1.2.3-2-g168b
From 06ff58091d4710d485d5944b3b4eed362715d8ff Mon Sep 17 00:00:00 2001
From: AndrewMurrell
Date: Mon, 3 Mar 2014 12:02:22 -0500
Subject: Oops, also forgot this one.
---
app/views/tournaments/new.html.erb | 12 ++++++++++++
1 file changed, 12 insertions(+)
create mode 100644 app/views/tournaments/new.html.erb
(limited to 'app/views')
diff --git a/app/views/tournaments/new.html.erb b/app/views/tournaments/new.html.erb
new file mode 100644
index 0000000..b168b1b
--- /dev/null
+++ b/app/views/tournaments/new.html.erb
@@ -0,0 +1,12 @@
+New tournament
+
+<%= select_tag 'tournament_id', options_for_select([] + Game.all.collect {|game| game.name}), :onchange => 'populate()' %>
+
+
+
+
+
+
+<%= link_to 'Create Tournament', create, :class => btn btn-warning btn-lg, :role => submit %>
+
+<%= link_to 'Back', tournaments_path %>
--
cgit v1.2.3-2-g168b
From d6cd8be7b4b5453e93faf11858c3e888f23a8ed9 Mon Sep 17 00:00:00 2001
From: DavisLWebb
Date: Mon, 3 Mar 2014 12:22:57 -0500
Subject: I HAVE THE WEBSITE RENDER THE USER'S USER NAME
---
app/views/layouts/application.html.erb | 7 +++++++
1 file changed, 7 insertions(+)
(limited to 'app/views')
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb
index 8a81c0a..469f024 100644
--- a/app/views/layouts/application.html.erb
+++ b/app/views/layouts/application.html.erb
@@ -18,9 +18,16 @@
<%= submit_tag("Go", {:class => "btn btn-warning"}) %>
<% end %>
+
+ <%= link_to "Sign out", signout_path, method: "delete" %>
+
+ <% if signed_in? %>
+ <%= current_user.user_name %>
+ <% end %>
+
<%= yield %>
--
cgit v1.2.3-2-g168b
From 764d9c06affc962428615b53574dbd5d3db62a7d Mon Sep 17 00:00:00 2001
From: AndrewMurrell
Date: Mon, 3 Mar 2014 12:23:04 -0500
Subject: What was broken has been reforged.
---
app/views/tournaments/index.html.erb | 2 +-
app/views/tournaments/new.html.erb | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
(limited to 'app/views')
diff --git a/app/views/tournaments/index.html.erb b/app/views/tournaments/index.html.erb
index 7810b50..73b064e 100644
--- a/app/views/tournaments/index.html.erb
+++ b/app/views/tournaments/index.html.erb
@@ -24,4 +24,4 @@
-<%= link_to 'New Tournament', new_tournament_path, :class => "btn btn-warning btn-lg" %>
+<%= link_to 'New Tournament', new_tournament_path %>
diff --git a/app/views/tournaments/new.html.erb b/app/views/tournaments/new.html.erb
index b168b1b..de80fb7 100644
--- a/app/views/tournaments/new.html.erb
+++ b/app/views/tournaments/new.html.erb
@@ -1,12 +1,12 @@
New tournament
-<%= select_tag 'tournament_id', options_for_select([] + Game.all.collect {|game| game.name}), :onchange => 'populate()' %>
+<%= select_tag 'tournament_id', options_for_select(["Select a Game Type"] + Game.all.collect {|game| game.name}), :onchange => 'populate()' %>
-<%= link_to 'Create Tournament', create, :class => btn btn-warning btn-lg, :role => submit %>
+<%= link_to 'Create Tournament', "create", :class => "btn btn-warning btn-lg", :role => "submit" %>
<%= link_to 'Back', tournaments_path %>
--
cgit v1.2.3-2-g168b
From def21c442c6e4b52b50f852cedd3e8bcaf436f9d Mon Sep 17 00:00:00 2001
From: AndrewMurrell
Date: Mon, 3 Mar 2014 13:17:02 -0500
Subject: Changed the views for tournament a little more.
---
app/views/tournaments/index.html.erb | 2 +-
app/views/tournaments/new.html.erb | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
(limited to 'app/views')
diff --git a/app/views/tournaments/index.html.erb b/app/views/tournaments/index.html.erb
index 73b064e..6006cad 100644
--- a/app/views/tournaments/index.html.erb
+++ b/app/views/tournaments/index.html.erb
@@ -24,4 +24,4 @@
-<%= link_to 'New Tournament', new_tournament_path %>
+<%= link_to 'New Tournament', new_tournament_path, :class => "btn btn-warning btn-lg" %>
diff --git a/app/views/tournaments/new.html.erb b/app/views/tournaments/new.html.erb
index de80fb7..dee18fb 100644
--- a/app/views/tournaments/new.html.erb
+++ b/app/views/tournaments/new.html.erb
@@ -7,6 +7,6 @@
-<%= link_to 'Create Tournament', "create", :class => "btn btn-warning btn-lg", :role => "submit" %>
+<%= link_to 'Create Tournament', "#", :class => "btn btn-warning btn-lg" %>
<%= link_to 'Back', tournaments_path %>
--
cgit v1.2.3-2-g168b
From 3425bfd0f56495b7d8d9f86ac740fcf90f0fbfdb Mon Sep 17 00:00:00 2001
From: DavisLWebb
Date: Mon, 3 Mar 2014 13:52:38 -0500
Subject: I added a lot of documentation to user.rb
---
app/views/layouts/application.html.erb | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
(limited to 'app/views')
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb
index 92fce3d..67848f6 100644
--- a/app/views/layouts/application.html.erb
+++ b/app/views/layouts/application.html.erb
@@ -19,16 +19,15 @@
<%= submit_tag("Go", {:class => "btn btn-warning"}) %>
<% end %>
+ <% if signed_in? %>
+ <%= current_user.user_name.upcase %>
+ <% end %>
<%= link_to "Sign out", signout_path, method: "delete" %>
- <% if signed_in? %>
- <%= current_user.user_name %>
- <% end %>
-
<%= yield %>
--
cgit v1.2.3-2-g168b
From 8c0cd2f7c5d3152c1674cd730d649a787a8eb67c Mon Sep 17 00:00:00 2001
From: AndrewMurrell
Date: Mon, 3 Mar 2014 13:53:21 -0500
Subject: Made it so 'log out' only appears if you're logged in.
---
app/views/layouts/application.html.erb | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
(limited to 'app/views')
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb
index 92fce3d..071c86b 100644
--- a/app/views/layouts/application.html.erb
+++ b/app/views/layouts/application.html.erb
@@ -20,7 +20,9 @@
<% end %>
- <%= link_to "Sign out", signout_path, method: "delete" %>
+ <%= if signed_in? do %>
+ <%= link_to "Sign out", signout_path, method: "delete" %>
+ <% end; end %>
--
cgit v1.2.3-2-g168b
From 455fa5b30e224407e4fdca46d087ba300a050567 Mon Sep 17 00:00:00 2001
From: AndrewMurrell
Date: Mon, 3 Mar 2014 14:09:32 -0500
Subject: Made it possible to log in from the sign up page. As in I put a link
under the mess I made.
---
app/views/users/new.html.erb | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
(limited to 'app/views')
diff --git a/app/views/users/new.html.erb b/app/views/users/new.html.erb
index 715d40e..2a745cc 100644
--- a/app/views/users/new.html.erb
+++ b/app/views/users/new.html.erb
@@ -54,4 +54,7 @@
-
\ No newline at end of file
+
+
+<%= link_to 'Already Have an Account? Log in', "signin", :class => "btn btn-warning btn-lg" %>
+
--
cgit v1.2.3-2-g168b
From a034c6fff6aad728eae7d7056e8e538f58a0e0e7 Mon Sep 17 00:00:00 2001
From: DavisLWebb
Date: Mon, 3 Mar 2014 14:16:43 -0500
Subject: view stuff
---
app/views/users/_form.html.erb | 25 +++++++++++++++++++++++++
app/views/users/edit.html.erb | 6 ++++++
app/views/users/index.html.erb | 29 +++++++++++++++++++++++++++++
app/views/users/index.json.jbuilder | 4 ++++
app/views/users/show.html.erb | 3 +++
app/views/users/show.json.jbuilder | 1 +
6 files changed, 68 insertions(+)
create mode 100644 app/views/users/_form.html.erb
create mode 100644 app/views/users/edit.html.erb
create mode 100644 app/views/users/index.html.erb
create mode 100644 app/views/users/index.json.jbuilder
create mode 100644 app/views/users/show.html.erb
create mode 100644 app/views/users/show.json.jbuilder
(limited to 'app/views')
diff --git a/app/views/users/_form.html.erb b/app/views/users/_form.html.erb
new file mode 100644
index 0000000..56d9f90
--- /dev/null
+++ b/app/views/users/_form.html.erb
@@ -0,0 +1,25 @@
+<%= form_for(@user) do |f| %>
+ <% if @user.errors.any? %>
+
+
<%= pluralize(@user.errors.count, "error") %> prohibited this user from being saved:
+
+
+ <% @user.errors.full_messages.each do |msg| %>
+ <%= msg %>
+ <% end %>
+
+
+ <% end %>
+
+
+ <%= f.label :name %>
+ <%= f.text_area :name %>
+
+
+ <%= f.label :pw_hash %>
+ <%= f.text_area :pw_hash %>
+
+
+ <%= f.submit %>
+
+<% end %>
diff --git a/app/views/users/edit.html.erb b/app/views/users/edit.html.erb
new file mode 100644
index 0000000..99bd4cc
--- /dev/null
+++ b/app/views/users/edit.html.erb
@@ -0,0 +1,6 @@
+Editing user
+
+<%= render 'form' %>
+
+<%= link_to 'Show', @user %> |
+<%= link_to 'Back', users_path %>
diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb
new file mode 100644
index 0000000..8b9056b
--- /dev/null
+++ b/app/views/users/index.html.erb
@@ -0,0 +1,29 @@
+Listing users
+
+
+
+
+ Name
+ Pw hash
+
+
+
+
+
+
+
+ <% @users.each do |user| %>
+
+ <%= user.name %>
+ <%= user.pw_hash %>
+ <%= link_to 'Show', user %>
+ <%= link_to 'Edit', edit_user_path(user) %>
+ <%= link_to 'Destroy', user, method: :delete, data: { confirm: 'Are you sure?' } %>
+
+ <% end %>
+
+
+
+
+
+<%= link_to 'New User', new_user_path %>
diff --git a/app/views/users/index.json.jbuilder b/app/views/users/index.json.jbuilder
new file mode 100644
index 0000000..182437e
--- /dev/null
+++ b/app/views/users/index.json.jbuilder
@@ -0,0 +1,4 @@
+json.array!(@users) do |user|
+ json.extract! user, :id, :name, :pw_hash
+ json.url user_url(user, format: :json)
+end
diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb
new file mode 100644
index 0000000..43c12fe
--- /dev/null
+++ b/app/views/users/show.html.erb
@@ -0,0 +1,3 @@
+app/views/users/show.html.erb
+
+<%= @user.name %>, <%= @user.email %>
diff --git a/app/views/users/show.json.jbuilder b/app/views/users/show.json.jbuilder
new file mode 100644
index 0000000..1262e80
--- /dev/null
+++ b/app/views/users/show.json.jbuilder
@@ -0,0 +1 @@
+json.extract! @user, :id, :name, :pw_hash, :created_at, :updated_at
--
cgit v1.2.3-2-g168b
From 7a8f0a0c74c96fcde2a38fbf98123b6c8d44308c Mon Sep 17 00:00:00 2001
From: AndrewMurrell
Date: Mon, 3 Mar 2014 15:03:26 -0500
Subject: Added some partial rendering.
---
app/views/tournaments/_selected.html.erb | 25 +++++++++++++++++++++++++
app/views/tournaments/new.html.erb | 4 ++--
2 files changed, 27 insertions(+), 2 deletions(-)
create mode 100644 app/views/tournaments/_selected.html.erb
(limited to 'app/views')
diff --git a/app/views/tournaments/_selected.html.erb b/app/views/tournaments/_selected.html.erb
new file mode 100644
index 0000000..302283d
--- /dev/null
+++ b/app/views/tournaments/_selected.html.erb
@@ -0,0 +1,25 @@
+
\ No newline at end of file
diff --git a/app/views/tournaments/new.html.erb b/app/views/tournaments/new.html.erb
index dee18fb..a47f643 100644
--- a/app/views/tournaments/new.html.erb
+++ b/app/views/tournaments/new.html.erb
@@ -4,9 +4,9 @@
+ <% render :partial => "selected" %>
-
-<%= link_to 'Create Tournament', "#", :class => "btn btn-warning btn-lg" %>
+
<%= link_to 'Back', tournaments_path %>
--
cgit v1.2.3-2-g168b