From dee108fa64e6224a7a86275d9cf99b882362ae27 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 23 Apr 2014 20:38:27 -0400 Subject: touch all the javascript files to shut up warnings --- app/views/layouts/application.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index d318129..6cdb54d 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -5,7 +5,7 @@ <%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %> <%= javascript_include_tag "application", "data-turbolinks-track" => true %> <%= javascript_include_tag "#{params[:controller]}", "data-turbolinks-track" => true %> - <%= javascript_include_tag "#{params[:controller]}_#{params[:action]}", "data-turbolinks-track" => true %> + <%= javascript_include_tag "#{params[:controller]}/#{params[:action]}", "data-turbolinks-track" => true %> <%= csrf_meta_tags %> <%= yield :head %> -- cgit v1.2.3-2-g168b From cfa41fcc58acc9ae50b84eb51e3d9fa9ecb3b79e Mon Sep 17 00:00:00 2001 From: DavisLWebb Date: Wed, 23 Apr 2014 21:45:40 -0400 Subject: run ./generate.sh --- app/views/games/_form.html.erb | 4 ++++ app/views/games/index.html.erb | 2 ++ app/views/games/index.json.jbuilder | 2 +- app/views/games/show.html.erb | 5 +++++ app/views/games/show.json.jbuilder | 2 +- 5 files changed, 13 insertions(+), 2 deletions(-) (limited to 'app/views') diff --git a/app/views/games/_form.html.erb b/app/views/games/_form.html.erb index ef250ad..20cb214 100644 --- a/app/views/games/_form.html.erb +++ b/app/views/games/_form.html.erb @@ -11,6 +11,10 @@ <% end %> +
+ <%= f.label :parent_id %>
+ <%= f.text_field :parent_id %> +
<%= f.label :name %>
<%= f.text_field :name %> diff --git a/app/views/games/index.html.erb b/app/views/games/index.html.erb index 6cc7f58..b4c3950 100644 --- a/app/views/games/index.html.erb +++ b/app/views/games/index.html.erb @@ -3,6 +3,7 @@ + @@ -20,6 +21,7 @@ <% @games.each do |game| %> + diff --git a/app/views/games/index.json.jbuilder b/app/views/games/index.json.jbuilder index cc0afc9..6b20f60 100644 --- a/app/views/games/index.json.jbuilder +++ b/app/views/games/index.json.jbuilder @@ -1,4 +1,4 @@ json.array!(@games) do |game| - json.extract! game, :id, :name, :min_players_per_team, :max_players_per_team, :min_teams_per_match, :max_teams_per_match, :set_rounds, :randomized_teams, :sampling_method + json.extract! game, :id, :parent_id, :name, :min_players_per_team, :max_players_per_team, :min_teams_per_match, :max_teams_per_match, :set_rounds, :randomized_teams, :sampling_method json.url game_url(game, format: :json) end diff --git a/app/views/games/show.html.erb b/app/views/games/show.html.erb index 93bfb60..38c8ccb 100644 --- a/app/views/games/show.html.erb +++ b/app/views/games/show.html.erb @@ -1,5 +1,10 @@

<%= notice %>

+

+ Parent: + <%= @game.parent %> +

+

Name: <%= @game.name %> diff --git a/app/views/games/show.json.jbuilder b/app/views/games/show.json.jbuilder index 60d0a4a..087a156 100644 --- a/app/views/games/show.json.jbuilder +++ b/app/views/games/show.json.jbuilder @@ -1 +1 @@ -json.extract! @game, :id, :name, :min_players_per_team, :max_players_per_team, :min_teams_per_match, :max_teams_per_match, :set_rounds, :randomized_teams, :sampling_method, :created_at, :updated_at +json.extract! @game, :id, :parent_id, :name, :min_players_per_team, :max_players_per_team, :min_teams_per_match, :max_teams_per_match, :set_rounds, :randomized_teams, :sampling_method, :created_at, :updated_at -- cgit v1.2.3-2-g168b From 47be7c86ca5193ffe4331fbb9358a9171abe748b Mon Sep 17 00:00:00 2001 From: DavisLWebb Date: Wed, 23 Apr 2014 22:28:27 -0400 Subject: Luke made the remote_username stuff work --- app/views/users/show.html.erb | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'app/views') diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index 81eee6f..dfebf08 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -21,11 +21,12 @@

- <%= label :username %>
- <%= text_field %> - -

- + <%= form_for @user do |f| %> + + <%= f.submit "Add Username", :class => 'signup' %> + <% end %>

-- cgit v1.2.3-2-g168b From 19b04a49d01af1917385c166501ef086eddae437 Mon Sep 17 00:00:00 2001 From: guntasgrewal Date: Wed, 23 Apr 2014 22:50:29 -0400 Subject: The users with permissions to send alerts can now create new alerts. --- app/views/alerts/index.html.erb | 20 ++++++++++++-------- app/views/layouts/application.html.erb | 5 ++++- 2 files changed, 16 insertions(+), 9 deletions(-) (limited to 'app/views') diff --git a/app/views/alerts/index.html.erb b/app/views/alerts/index.html.erb index 458b951..1d441a2 100644 --- a/app/views/alerts/index.html.erb +++ b/app/views/alerts/index.html.erb @@ -12,14 +12,18 @@
- <% @alerts.each do |alert| %> - - - - - - - + <% if !@alerts.nil? %> + <% @alerts.each do |alert| %> + + + + + + + + <% end %> + <% else %> + <% end %>
Parent Name Min players per team Max players per team
<%= game.parent %> <%= game.name %> <%= game.min_players_per_team %> <%= game.max_players_per_team %>
<%= alert.author %><%= alert.message %><%= link_to 'Show', alert %><%= link_to 'Edit', edit_alert_path(alert) %><%= link_to 'Destroy', alert, method: :delete, data: { confirm: 'Are you sure?' } %>
<%= alert.author %><%= alert.message %><%= link_to 'Show', alert %><%= link_to 'Edit', edit_alert_path(alert) %><%= link_to 'Destroy', alert, method: :delete, data: { confirm: 'Are you sure?' } %>

There are no alerts!

diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index d318129..15eba29 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -27,11 +27,14 @@
<% if signed_in? %> <%= link_to current_user.user_name, current_user, :class => "user" %> - <%= link_to "Messages", pms_path %> + <%= link_to "Messages", pms_path, :class => "signup" %> <%= link_to "Sign out", session_path("current"), method: "delete", :class => "signout" %> <% 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 => "signin" %> + <% end %> <% else %> <%= link_to "Log in", new_session_path, :class => "signin" %> <%= link_to "Sign up", new_user_path, :class => "signup" %> -- cgit v1.2.3-2-g168b