summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorguntasgrewal <guntasgrewal@gmail.com>2014-04-23 22:50:48 -0400
committerguntasgrewal <guntasgrewal@gmail.com>2014-04-23 22:50:48 -0400
commit41a93fad32677e3f351c0e16f0c704cbfbc5404e (patch)
treeaa46c550dbd15a1f0bb0faf4e8eebb92c4970bdd /app/views
parent19b04a49d01af1917385c166501ef086eddae437 (diff)
parent47be7c86ca5193ffe4331fbb9358a9171abe748b (diff)
Merge branch 'master' of https://github.com/LukeShu/leaguer
Diffstat (limited to 'app/views')
-rw-r--r--app/views/games/_form.html.erb4
-rw-r--r--app/views/games/index.html.erb2
-rw-r--r--app/views/games/index.json.jbuilder2
-rw-r--r--app/views/games/show.html.erb5
-rw-r--r--app/views/games/show.json.jbuilder2
-rw-r--r--app/views/layouts/application.html.erb2
-rw-r--r--app/views/main/homepage.html.erb (renamed from app/views/static/homepage.html.erb)0
-rw-r--r--app/views/users/show.html.erb11
8 files changed, 20 insertions, 8 deletions
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
@@ -12,6 +12,10 @@
<% end %>
<div class="field">
+ <%= f.label :parent_id %><br>
+ <%= f.text_field :parent_id %>
+ </div>
+ <div class="field">
<%= f.label :name %><br>
<%= f.text_field :name %>
</div>
diff --git a/app/views/games/index.html.erb b/app/views/games/index.html.erb
index abb0d8a..bcd10dd 100644
--- a/app/views/games/index.html.erb
+++ b/app/views/games/index.html.erb
@@ -3,6 +3,7 @@
<table class="table table-hover">
<thead>
<tr>
+ <th>Parent</th>
<th>Name</th>
<th>Min players per team</th>
<th>Max players per team</th>
@@ -20,6 +21,7 @@
<tbody>
<% @games.each do |game| %>
<tr>
+ <td><%= game.parent %></td>
<td><%= game.name %></td>
<td><%= game.min_players_per_team %></td>
<td><%= game.max_players_per_team %></td>
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 d731e3d..1250cbd 100644
--- a/app/views/games/show.html.erb
+++ b/app/views/games/show.html.erb
@@ -1,4 +1,9 @@
<p>
+ <strong>Parent:</strong>
+ <%= @game.parent %>
+</p>
+
+<p>
<strong>Name:</strong>
<%= @game.name %>
</p>
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
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb
index 15eba29..dd0ea91 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 %>
</head>
diff --git a/app/views/static/homepage.html.erb b/app/views/main/homepage.html.erb
index 3ca8176..3ca8176 100644
--- a/app/views/static/homepage.html.erb
+++ b/app/views/main/homepage.html.erb
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 @@
</p>
<p>
- <%= label :username %><br>
- <%= text_field %>
-
- <br><input type="submit" value="Submit"><br>
-
+ <%= form_for @user do |f| %>
+ <label>Have a League of Legends Account?
+ <input type=text name="user[remote_usernames][League of Legends]">
+ </label>
+ <%= f.submit "Add Username", :class => 'signup' %>
+ <% end %>
</p>
<div class="row">