diff options
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/layouts/application.html.erb | 73 | ||||
-rw-r--r-- | app/views/main/homepage.html.erb | 31 | ||||
-rw-r--r-- | app/views/servers/_form.html.erb | 2 | ||||
-rw-r--r-- | app/views/tournaments/_form.html.erb | 2 | ||||
-rw-r--r-- | app/views/users/_form.html.erb | 2 |
5 files changed, 57 insertions, 53 deletions
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index af26e29..28ec6f7 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html> +<html lang="en"> <head> <title>Leaguer</title> @@ -16,42 +16,51 @@ <body> <header> <nav> - <%# This is the logo %> - <div class="navbar-brand"><%= link_to('Leaguer', root_path) %></div> - - <%# This is the search bar #%> - <div> - <%= form_tag("/search", method: "get", :class => "search") do %> - <%= text_field_tag(:query, params[:query], type: "search") %> - <%= submit_tag("Search", :name=>nil) %> - <% end %> - </div> - - <%# these are the log in buttons #%> - <div id="log-buttons"> - <% if signed_in? %> - <%= link_to current_user.user_name, current_user, :class => "user" %> - <%= link_to "Messages", pms_path, :class => "signup" %> - <% if current_user.can? :edit_server %> - <%= link_to "Server settings", edit_server_path, :class => "server" %> - <% end %> - <% if current_user.can? :create_alert %> - <%= link_to "Create Alert", new_alert_path, :class => "create-alert" %> - <% end %> - <%= link_to "Sign out", session_path("current"), method: "delete", :class => "signout" %> - <%# if there is an unread alert then I wanna be able to show the notification icon by saying :style => display:inline. This will be Done by Guntas once he figures out how to get unread alerts. Psuedo if alerts.unread > 0 then display else don't.%> - <%= link_to "", alerts_path, :class => "alerts", :id => "alerts-ajax"%> - <% else %> - <%= link_to "Log in", new_session_path, :class => "signin" %> - <%= link_to "Sign up", new_user_path, :class => "signup" %> - <% end %> - </div> + <div class="container-fluid"> + <div class="navbar-header"> + <%= link_to('Leaguer', root_path, class: "navbar-brand") %> + </div> + <div class="navbar-collapse"> + <div id="user-actions"> + <div> + <% if signed_in? %> + <%= link_to current_user.user_name, current_user, :class => "user", :role => :button %> + <%= link_to "Sign out", session_path("current"), method: "delete", :class => "signout", :role => :button %> + <% else %> + <%= link_to "Log in", new_session_path, :class => "signin", :role => :button %> + <%= link_to "Sign up", new_user_path, :class => "signup", :role => :button %> + <% end %> + </div> + <% if current_user.can? :create_alert %> + <%= link_to "Create Alert", new_alert_path, :class => "create-alert", :role => :button %> + <% end %> + </div> + <% if signed_in? %> + <ul> + <li><%= link_to "Messages", pms_path %></li> + <% if current_user.can? :edit_server %> + <li><%= link_to "Server settings", edit_server_path, :class => "server" %></li> + <% end %> + </ul> + <%# If there is an unread alert then I want to be able + to show the notification icon by saying :style => + display:inline. This will be Done by Guntas once + he figures out how to get unread alerts. Psuedo if + alerts.unread > 0 then display else don't.%> + <%= link_to "", alerts_path, :class => "alerts", :id => "alerts-ajax"%> + <% end %> + <%= form_tag("/search", method: :get, :id => "search") do %><div> + <%= text_field_tag(:query, params[:query], type: :search) %> + <button type="submit">Search</button> + </div><% end %> + </div> + </div> </nav> </header> <% if notice %><div id="notice"><p><%= notice %></p></div><% end %> -<div class="wrapper"> +<div class="container"> <%= yield %> </div> diff --git a/app/views/main/homepage.html.erb b/app/views/main/homepage.html.erb index 3ca8176..5acd4ae 100644 --- a/app/views/main/homepage.html.erb +++ b/app/views/main/homepage.html.erb @@ -1,18 +1,13 @@ -<div role="main" class="container theme-showcase"> - - <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"> - <% if !signed_in? %> - <%= link_to 'Log In', new_session_path, :class => "btn btn-warning btn-lg", :role => "button" %> - <%= link_to 'Sign Up', new_user_path, :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> +<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"> + <% if !signed_in? %> + <%= link_to 'Log In', new_session_path, :class => "signin", :role => "button" %> + <%= link_to 'Sign Up', new_user_path, :class => "signup", :role => "button" %> + <% else %> + <%= link_to 'Start a Tournament', new_tournament_path, :role => "button" %> + <% end %> + <%= link_to 'See Ongoing Tournaments', tournaments_path, :role => "button" %> + </p> +</div> diff --git a/app/views/servers/_form.html.erb b/app/views/servers/_form.html.erb index fd887f3..22e3e82 100644 --- a/app/views/servers/_form.html.erb +++ b/app/views/servers/_form.html.erb @@ -6,7 +6,7 @@ <legend>Default permissions for new users</legend> <ul> <% @server.default_user_abilities.keys.each do |ability| %> - <li><label><%= a.check_box(ability) %> <%= ability.to_s.humanize %></label></li> + <li><%= a.check_box(ability) %> <%= a.label(ability) %></li> <% end %> </ul> </fieldset> diff --git a/app/views/tournaments/_form.html.erb b/app/views/tournaments/_form.html.erb index f53927d..fe2a5c6 100644 --- a/app/views/tournaments/_form.html.erb +++ b/app/views/tournaments/_form.html.erb @@ -86,7 +86,7 @@ <fieldset> <legend>Stages</legend> <label for="num_stages">Number of Tournament Stages</label> - <input type="number" name="num_stages" min="1" value="<%= params[:num_stages].to_i %>"> + <input type="number" id="num_stages" name="num_stages" min="1" value="<%= params[:num_stages].to_i %>"> <%# stage_fields.submit("Set Stages") %> <% for i in 1..(params[:num_stages].to_i) do %> <%= stages_fields.fields_for i.to_s do |stage_fields| %> diff --git a/app/views/users/_form.html.erb b/app/views/users/_form.html.erb index 1feebf8..23f8977 100644 --- a/app/views/users/_form.html.erb +++ b/app/views/users/_form.html.erb @@ -31,7 +31,7 @@ <ul> <%= fields_for "user[abilities]", @user.abilities do |abilities_fields| %> <% @user.abilities.keys.each do |ability| %> - <li><label><%= abilities_fields.check_box(ability) %> <%= ability.to_s.humanize %></label></li> + <li><%= abilities_fields.check_box(ability) %> <%= abilities_fields.label(ability) %></li> <% end %> <% end %> </ul> |