diff options
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/games/index.html.erb | 2 | ||||
-rw-r--r-- | app/views/layouts/application.html.erb | 2 | ||||
-rw-r--r-- | app/views/sessions/new.html.erb | 23 | ||||
-rw-r--r-- | app/views/tournaments/_selected.html.erb | 13 | ||||
-rw-r--r-- | app/views/tournaments/index.html.erb | 9 | ||||
-rw-r--r-- | app/views/tournaments/new.html.erb | 8 | ||||
-rw-r--r-- | app/views/users/new.html.erb | 6 |
7 files changed, 38 insertions, 25 deletions
diff --git a/app/views/games/index.html.erb b/app/views/games/index.html.erb index 77f6a56..79acd1e 100644 --- a/app/views/games/index.html.erb +++ b/app/views/games/index.html.erb @@ -1,6 +1,6 @@ <h1>Listing games</h1> -<table> +<table class="table table-hover"> <thead> <tr> <th>Name</th> diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 7578d82..976ee85 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -33,7 +33,7 @@ <div class="container"><%= yield %></div> <footer> - <p>Leaguer is copyright © 2014, Tomer Kimia, Andrew Murrell, Luke Shumaker, Nathaniel Foy, Davis Webb, and Guntas Grewal</p> + <p>Leaguer © 2014, Tomer Kimia, Andrew Murrell, Luke Shumaker, Nathaniel Foy, Davis Webb, and Guntas Grewal</p> </footer> <%= debug(params) if Rails.env.development? %> </body> diff --git a/app/views/sessions/new.html.erb b/app/views/sessions/new.html.erb index 550a54d..b4acf77 100644 --- a/app/views/sessions/new.html.erb +++ b/app/views/sessions/new.html.erb @@ -1,20 +1,23 @@ <h1>Sign in</h1> <% if @user.nil? %> - <p class="errors"> The username or password is incorrect. Verify that CAPS LOCK is not on, and then retype the current username and password. </p> + <p class="errors"> The email/username or password is incorrect. Verify that CAPS LOCK is not on, and then retype the current email/username and password. </p> <% end %> -<div class="row"> + <div class="span6 offset3"> <%= form_for(:session, url: sessions_path) do |f| %> - - <%= f.label :email %> - <%= f.text_field :email %> - - <%= f.label :password %> + <p> + <%= f.label(:username_or_email, "Username/Email") %><br/> + <%= f.text_field :username_or_email%> + </p> + <p> + <%= f.label :password %><br/> <%= f.password_field :password %> - + </p> + <p> <%= f.submit "Sign in", class: "btn btn-large btn-primary" %> + </p> <% end %> - <p>New user? <%= link_to "Sign up now!", new_user_path %></p> + <p>New user? <%= link_to("Sign up now!", new_user_path) %></p> </div> -</div> + diff --git a/app/views/tournaments/_selected.html.erb b/app/views/tournaments/_selected.html.erb index 551dc40..9b1b7f8 100644 --- a/app/views/tournaments/_selected.html.erb +++ b/app/views/tournaments/_selected.html.erb @@ -2,14 +2,21 @@ <%= render "common/error_messages", :target => @tournament %> <%= f.hidden_field(:game_id) %> + <% @chosen = Game.find_by(params[:game]) %> <% @tournament.attributes.each do |name, value| %> - <% if (name == "id") or (name =~ /.*_at$/) %> + <% if (name == "id") or (name =~ /.*_at$/) or (name == "game_id") or (name == "status") %> <% next %> <% end %> <p> - <%= f.label name %><br> - <%= f.text_field name %> + <%= f.label name %><br> + <% if !@chosen.attributes[name].nil? %> + <%= f.text_field(name, :value => @chosen.attributes[name] ) %> + <% else %> + <%= f.text_field name %> + <% end %> + </p> + <% end %> <%= f.submit %> <% end %> diff --git a/app/views/tournaments/index.html.erb b/app/views/tournaments/index.html.erb index 3d54b8c..80d68a3 100644 --- a/app/views/tournaments/index.html.erb +++ b/app/views/tournaments/index.html.erb @@ -1,6 +1,7 @@ -<h1>Listing tournaments</h1> +<h1>Listing Tournaments</h1> -<table> +<% if @tournaments.length > 0 %> +<table class="table table-hover"> <thead> <tr> <th>Game</th> @@ -35,7 +36,9 @@ <% end %> </tbody> </table> - +<% else %> + <p class="no-entries"> No tournaments going on right now... Why not start your own? </p> +<% end %> <br> <%= 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 e007e31..8c74068 100644 --- a/app/views/tournaments/new.html.erb +++ b/app/views/tournaments/new.html.erb @@ -2,13 +2,13 @@ <%= form_tag(new_tournament_path, method: "get") do %> <%= select_tag('game', - options_from_collection_for_select(@games, 'id', 'name', @tournament.game.nil? || @tournament.game.id), - :prompt => "Select a Game Type") %> - <%= submit_tag("Select", :class => "btn-warning btn-lg") %> + options_from_collection_for_select(@games, 'id', 'name', @tournament.game.nil? || @tournament.game.id), + :prompt => "Select a Game Type") %> + <%= submit_tag("Select", :class => "btn btn-success btn-xs") %> <% end %> <div id='ajax-form'> - <% unless @tournament.game.nil? %> + <% if not @tournament.game.nil? %> <%= render 'selected' %> <% end %> </div> diff --git a/app/views/users/new.html.erb b/app/views/users/new.html.erb index 704aa10..c23f76d 100644 --- a/app/views/users/new.html.erb +++ b/app/views/users/new.html.erb @@ -19,14 +19,14 @@ <%= f.password_field :password %> </p> <p> - <%= f.label :password_confirm %><br> + <%= f.label(:password_confirmation, "Confirm Password") %><br> <%= f.password_field :password_confirmation %> </p> <p> - <%= f.submit %> + <%= f.submit("Be a Leaguer", :class => "signup") %> </p> <% end %> -<%= link_to 'Already Have an Account? Log in', new_session_path, :class => "btn btn-warning btn-lg" %> +<%= link_to 'Already Have an Account? Log in', new_session_path, :class => "signin" %> |