summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'app/views')
-rw-r--r--app/views/sessions/new.html.erb4
-rw-r--r--app/views/static/homepage.html.erb12
-rw-r--r--app/views/users/index.html.erb7
-rw-r--r--app/views/users/new.html.erb8
4 files changed, 22 insertions, 9 deletions
diff --git a/app/views/sessions/new.html.erb b/app/views/sessions/new.html.erb
index f942cf6..2e7a0d3 100644
--- a/app/views/sessions/new.html.erb
+++ b/app/views/sessions/new.html.erb
@@ -1,5 +1,7 @@
<h1>Sign in</h1>
-
+<% if @fail %>
+ <p class="error">Email and password combination not found</p>
+<% end %>
<div class="row">
<div class="span6 offset3">
<%= form_for(:session, url: sessions_path) do |f| %>
diff --git a/app/views/static/homepage.html.erb b/app/views/static/homepage.html.erb
index 4d52e5b..8b96e11 100644
--- a/app/views/static/homepage.html.erb
+++ b/app/views/static/homepage.html.erb
@@ -1,10 +1,18 @@
<div role="main" class="container theme-showcase">
- <!-- Main jumbotron for a primary marketing message or call to action -->
<div class="jumbotron">
<h1>Welcome to Leaguer</h1>
<p>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. </p>
- <p id="jumbo-buttons"><%= 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" %> </p>
+ <p id="jumbo-buttons">
+ <% if !signed_in? %>
+ <%= link_to 'Log In', "/signin", :class => "btn btn-warning btn-lg", :role => "button" %>
+ <%= link_to 'Sign Up', "/signup", :class => "btn btn-warning btn-lg", :role => "button" %>
+ <% else %>
+ <%= link_to 'Start a Tournament', new_tournament_path, :class => "btn btn-warning btn-lg", :role => "button" %>
+ <% end %>
+ <%= link_to 'See Ongoing Tournaments', tournaments_path, :class => "btn btn-warning btn-lg", :role => "button" %>
+
+ </p>
</div>
</div>
diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb
index 3692112..d7b46da 100644
--- a/app/views/users/index.html.erb
+++ b/app/views/users/index.html.erb
@@ -1,22 +1,25 @@
<h1>Listing users</h1>
-<table>
+<table class="table table-hover">
<thead>
<tr>
+ <th>Username</th>
<th>Name</th>
<th>Email</th>
<th>User name</th>
<th></th>
<th></th>
<th></th>
+ <th></th>
</tr>
</thead>
<tbody>
<% @users.each do |user| %>
<tr>
+ <td><%= link_to("#{user.user_name}", user, nil) %></td>
<td><%= user.name %></td>
- <td><%= user.email %></td>
+ <td> ******* </td>
<td><%= user.user_name %></td>
<td><%= link_to 'Show', user %></td>
<td><%= link_to 'Edit', edit_user_path(user) %></td>
diff --git a/app/views/users/new.html.erb b/app/views/users/new.html.erb
index 2a745cc..aa71f00 100644
--- a/app/views/users/new.html.erb
+++ b/app/views/users/new.html.erb
@@ -16,11 +16,11 @@
</p>
<p>
<%= f.label :password %><br>
- <%= f.text_field :password %>
+ <%= f.password_field :password %>
</p>
<p>
<%= f.label :password_confirm %><br>
- <%= f.text_field :password_confirmation %>
+ <%= f.password_field :password_confirmation %>
</p>
<p>
<%= f.submit %>
@@ -45,11 +45,11 @@
</p>
<p>
<label for="user_password">Password</label><br>
- <input id="user_password" name="user[password]" type="text" />
+ <input id="user_password" name="user[password]" type="password" />
</p>
<p>
<label for="user_password_confirm">Password confirm</label><br>
- <input id="user_password_confirmation" name="user[password_confirmation]" type="text" />
+ <input id="user_password_confirmation" name="user[password_confirmation]" type="password" />
</p>
<p>
<input name="commit" type="submit" value="Save User" />