summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'app/views')
-rw-r--r--app/views/alerts/_form.html.erb25
-rw-r--r--app/views/alerts/edit.html.erb6
-rw-r--r--app/views/alerts/index.html.erb29
-rw-r--r--app/views/alerts/index.json.jbuilder4
-rw-r--r--app/views/alerts/new.html.erb5
-rw-r--r--app/views/alerts/show.html.erb14
-rw-r--r--app/views/alerts/show.json.jbuilder1
-rw-r--r--app/views/matches/_form.html.erb4
-rw-r--r--app/views/matches/index.html.erb2
-rw-r--r--app/views/matches/index.json.jbuilder2
-rw-r--r--app/views/matches/show.html.erb5
-rw-r--r--app/views/matches/show.json.jbuilder2
-rw-r--r--app/views/pms/_form.html.erb29
-rw-r--r--app/views/pms/edit.html.erb6
-rw-r--r--app/views/pms/index.html.erb31
-rw-r--r--app/views/pms/index.json.jbuilder4
-rw-r--r--app/views/pms/new.html.erb5
-rw-r--r--app/views/pms/show.html.erb19
-rw-r--r--app/views/pms/show.json.jbuilder1
-rw-r--r--app/views/users/_form.html.erb12
-rw-r--r--app/views/users/index.html.erb6
-rw-r--r--app/views/users/index.json.jbuilder2
-rw-r--r--app/views/users/show.html.erb15
-rw-r--r--app/views/users/show.json.jbuilder2
24 files changed, 227 insertions, 4 deletions
diff --git a/app/views/alerts/_form.html.erb b/app/views/alerts/_form.html.erb
new file mode 100644
index 0000000..f0da996
--- /dev/null
+++ b/app/views/alerts/_form.html.erb
@@ -0,0 +1,25 @@
+<%= form_for(@alert) do |f| %>
+ <% if @alert.errors.any? %>
+ <div id="error_explanation">
+ <h2><%= pluralize(@alert.errors.count, "error") %> prohibited this alert from being saved:</h2>
+
+ <ul>
+ <% @alert.errors.full_messages.each do |msg| %>
+ <li><%= msg %></li>
+ <% end %>
+ </ul>
+ </div>
+ <% end %>
+
+ <div class="field">
+ <%= f.label :author %><br>
+ <%= f.text_field :author %>
+ </div>
+ <div class="field">
+ <%= f.label :message %><br>
+ <%= f.text_area :message %>
+ </div>
+ <div class="actions">
+ <%= f.submit %>
+ </div>
+<% end %>
diff --git a/app/views/alerts/edit.html.erb b/app/views/alerts/edit.html.erb
new file mode 100644
index 0000000..ad99164
--- /dev/null
+++ b/app/views/alerts/edit.html.erb
@@ -0,0 +1,6 @@
+<h1>Editing alert</h1>
+
+<%= render 'form' %>
+
+<%= link_to 'Show', @alert %> |
+<%= link_to 'Back', alerts_path %>
diff --git a/app/views/alerts/index.html.erb b/app/views/alerts/index.html.erb
new file mode 100644
index 0000000..458b951
--- /dev/null
+++ b/app/views/alerts/index.html.erb
@@ -0,0 +1,29 @@
+<h1>Listing alerts</h1>
+
+<table>
+ <thead>
+ <tr>
+ <th>Author</th>
+ <th>Message</th>
+ <th></th>
+ <th></th>
+ <th></th>
+ </tr>
+ </thead>
+
+ <tbody>
+ <% @alerts.each do |alert| %>
+ <tr>
+ <td><%= alert.author %></td>
+ <td><%= alert.message %></td>
+ <td><%= link_to 'Show', alert %></td>
+ <td><%= link_to 'Edit', edit_alert_path(alert) %></td>
+ <td><%= link_to 'Destroy', alert, method: :delete, data: { confirm: 'Are you sure?' } %></td>
+ </tr>
+ <% end %>
+ </tbody>
+</table>
+
+<br>
+
+<%= link_to 'New Alert', new_alert_path %>
diff --git a/app/views/alerts/index.json.jbuilder b/app/views/alerts/index.json.jbuilder
new file mode 100644
index 0000000..685157e
--- /dev/null
+++ b/app/views/alerts/index.json.jbuilder
@@ -0,0 +1,4 @@
+json.array!(@alerts) do |alert|
+ json.extract! alert, :id, :author, :message
+ json.url alert_url(alert, format: :json)
+end
diff --git a/app/views/alerts/new.html.erb b/app/views/alerts/new.html.erb
new file mode 100644
index 0000000..6d04589
--- /dev/null
+++ b/app/views/alerts/new.html.erb
@@ -0,0 +1,5 @@
+<h1>New alert</h1>
+
+<%= render 'form' %>
+
+<%= link_to 'Back', alerts_path %>
diff --git a/app/views/alerts/show.html.erb b/app/views/alerts/show.html.erb
new file mode 100644
index 0000000..eeab7f7
--- /dev/null
+++ b/app/views/alerts/show.html.erb
@@ -0,0 +1,14 @@
+<p id="notice"><%= notice %></p>
+
+<p>
+ <strong>Author:</strong>
+ <%= @alert.author %>
+</p>
+
+<p>
+ <strong>Message:</strong>
+ <%= @alert.message %>
+</p>
+
+<%= link_to 'Edit', edit_alert_path(@alert) %> |
+<%= link_to 'Back', alerts_path %>
diff --git a/app/views/alerts/show.json.jbuilder b/app/views/alerts/show.json.jbuilder
new file mode 100644
index 0000000..83fe24a
--- /dev/null
+++ b/app/views/alerts/show.json.jbuilder
@@ -0,0 +1 @@
+json.extract! @alert, :id, :author, :message, :created_at, :updated_at
diff --git a/app/views/matches/_form.html.erb b/app/views/matches/_form.html.erb
index c772c7f..7d0a371 100644
--- a/app/views/matches/_form.html.erb
+++ b/app/views/matches/_form.html.erb
@@ -11,6 +11,10 @@
</div>
<% end %>
+ <div class="field">
+ <%= f.label :tournament %><br>
+ <%= f.text_field :tournament %>
+ </div>
<div class="actions">
<%= f.submit %>
</div>
diff --git a/app/views/matches/index.html.erb b/app/views/matches/index.html.erb
index 22ae41e..d8122ac 100644
--- a/app/views/matches/index.html.erb
+++ b/app/views/matches/index.html.erb
@@ -3,6 +3,7 @@
<table>
<thead>
<tr>
+ <th>Tournament</th>
<th></th>
<th></th>
<th></th>
@@ -12,6 +13,7 @@
<tbody>
<% @matches.each do |match| %>
<tr>
+ <td><%= match.tournament %></td>
<td><%= link_to 'Show', match %></td>
<td><%= link_to 'Edit', edit_match_path(match) %></td>
<td><%= link_to 'Destroy', match, method: :delete, data: { confirm: 'Are you sure?' } %></td>
diff --git a/app/views/matches/index.json.jbuilder b/app/views/matches/index.json.jbuilder
index 08daa52..0839c83 100644
--- a/app/views/matches/index.json.jbuilder
+++ b/app/views/matches/index.json.jbuilder
@@ -1,4 +1,4 @@
json.array!(@matches) do |match|
- json.extract! match, :id
+ json.extract! match, :id, :tournament
json.url match_url(match, format: :json)
end
diff --git a/app/views/matches/show.html.erb b/app/views/matches/show.html.erb
index 453985b..7bab721 100644
--- a/app/views/matches/show.html.erb
+++ b/app/views/matches/show.html.erb
@@ -1,4 +1,9 @@
<p id="notice"><%= notice %></p>
+<p>
+ <strong>Tournament:</strong>
+ <%= @match.tournament %>
+</p>
+
<%= link_to 'Edit', edit_match_path(@match) %> |
<%= link_to 'Back', matches_path %>
diff --git a/app/views/matches/show.json.jbuilder b/app/views/matches/show.json.jbuilder
index 7190e4c..a381f65 100644
--- a/app/views/matches/show.json.jbuilder
+++ b/app/views/matches/show.json.jbuilder
@@ -1 +1 @@
-json.extract! @match, :id, :created_at, :updated_at
+json.extract! @match, :id, :tournament, :created_at, :updated_at
diff --git a/app/views/pms/_form.html.erb b/app/views/pms/_form.html.erb
new file mode 100644
index 0000000..bbc6aee
--- /dev/null
+++ b/app/views/pms/_form.html.erb
@@ -0,0 +1,29 @@
+<%= form_for(@pm) do |f| %>
+ <% if @pm.errors.any? %>
+ <div id="error_explanation">
+ <h2><%= pluralize(@pm.errors.count, "error") %> prohibited this pm from being saved:</h2>
+
+ <ul>
+ <% @pm.errors.full_messages.each do |msg| %>
+ <li><%= msg %></li>
+ <% end %>
+ </ul>
+ </div>
+ <% end %>
+
+ <div class="field">
+ <%= f.label :author %><br>
+ <%= f.text_field :author %>
+ </div>
+ <div class="field">
+ <%= f.label :recipient %><br>
+ <%= f.text_field :recipient %>
+ </div>
+ <div class="field">
+ <%= f.label :message %><br>
+ <%= f.text_area :message %>
+ </div>
+ <div class="actions">
+ <%= f.submit %>
+ </div>
+<% end %>
diff --git a/app/views/pms/edit.html.erb b/app/views/pms/edit.html.erb
new file mode 100644
index 0000000..074a4fd
--- /dev/null
+++ b/app/views/pms/edit.html.erb
@@ -0,0 +1,6 @@
+<h1>Editing pm</h1>
+
+<%= render 'form' %>
+
+<%= link_to 'Show', @pm %> |
+<%= link_to 'Back', pms_path %>
diff --git a/app/views/pms/index.html.erb b/app/views/pms/index.html.erb
new file mode 100644
index 0000000..cb7fe4b
--- /dev/null
+++ b/app/views/pms/index.html.erb
@@ -0,0 +1,31 @@
+<h1>Listing pms</h1>
+
+<table>
+ <thead>
+ <tr>
+ <th>Author</th>
+ <th>Recipient</th>
+ <th>Message</th>
+ <th></th>
+ <th></th>
+ <th></th>
+ </tr>
+ </thead>
+
+ <tbody>
+ <% @pms.each do |pm| %>
+ <tr>
+ <td><%= pm.author %></td>
+ <td><%= pm.recipient %></td>
+ <td><%= pm.message %></td>
+ <td><%= link_to 'Show', pm %></td>
+ <td><%= link_to 'Edit', edit_pm_path(pm) %></td>
+ <td><%= link_to 'Destroy', pm, method: :delete, data: { confirm: 'Are you sure?' } %></td>
+ </tr>
+ <% end %>
+ </tbody>
+</table>
+
+<br>
+
+<%= link_to 'New Pm', new_pm_path %>
diff --git a/app/views/pms/index.json.jbuilder b/app/views/pms/index.json.jbuilder
new file mode 100644
index 0000000..aebdc08
--- /dev/null
+++ b/app/views/pms/index.json.jbuilder
@@ -0,0 +1,4 @@
+json.array!(@pms) do |pm|
+ json.extract! pm, :id, :author, :recipient, :message
+ json.url pm_url(pm, format: :json)
+end
diff --git a/app/views/pms/new.html.erb b/app/views/pms/new.html.erb
new file mode 100644
index 0000000..29e24ec
--- /dev/null
+++ b/app/views/pms/new.html.erb
@@ -0,0 +1,5 @@
+<h1>New pm</h1>
+
+<%= render 'form' %>
+
+<%= link_to 'Back', pms_path %>
diff --git a/app/views/pms/show.html.erb b/app/views/pms/show.html.erb
new file mode 100644
index 0000000..5ee483f
--- /dev/null
+++ b/app/views/pms/show.html.erb
@@ -0,0 +1,19 @@
+<p id="notice"><%= notice %></p>
+
+<p>
+ <strong>Author:</strong>
+ <%= @pm.author %>
+</p>
+
+<p>
+ <strong>Recipient:</strong>
+ <%= @pm.recipient %>
+</p>
+
+<p>
+ <strong>Message:</strong>
+ <%= @pm.message %>
+</p>
+
+<%= link_to 'Edit', edit_pm_path(@pm) %> |
+<%= link_to 'Back', pms_path %>
diff --git a/app/views/pms/show.json.jbuilder b/app/views/pms/show.json.jbuilder
new file mode 100644
index 0000000..651e78f
--- /dev/null
+++ b/app/views/pms/show.json.jbuilder
@@ -0,0 +1 @@
+json.extract! @pm, :id, :author, :recipient, :message, :created_at, :updated_at
diff --git a/app/views/users/_form.html.erb b/app/views/users/_form.html.erb
index 4835056..a7ead1b 100644
--- a/app/views/users/_form.html.erb
+++ b/app/views/users/_form.html.erb
@@ -11,6 +11,18 @@
</div>
<% end %>
+ <div class="field">
+ <%= f.label :name %><br>
+ <%= f.text_area :name %>
+ </div>
+ <div class="field">
+ <%= f.label :pw_hash %><br>
+ <%= f.text_field :pw_hash %>
+ </div>
+ <div class="field">
+ <%= f.label :groups %><br>
+ <%= f.text_field :groups %>
+ </div>
<div class="actions">
<%= f.submit %>
</div>
diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb
index 24a2548..14739ae 100644
--- a/app/views/users/index.html.erb
+++ b/app/views/users/index.html.erb
@@ -3,6 +3,9 @@
<table>
<thead>
<tr>
+ <th>Name</th>
+ <th>Pw hash</th>
+ <th>Groups</th>
<th></th>
<th></th>
<th></th>
@@ -12,6 +15,9 @@
<tbody>
<% @users.each do |user| %>
<tr>
+ <td><%= user.name %></td>
+ <td><%= user.pw_hash %></td>
+ <td><%= user.groups %></td>
<td><%= link_to 'Show', user %></td>
<td><%= link_to 'Edit', edit_user_path(user) %></td>
<td><%= link_to 'Destroy', user, method: :delete, data: { confirm: 'Are you sure?' } %></td>
diff --git a/app/views/users/index.json.jbuilder b/app/views/users/index.json.jbuilder
index 6684a9c..58c42c1 100644
--- a/app/views/users/index.json.jbuilder
+++ b/app/views/users/index.json.jbuilder
@@ -1,4 +1,4 @@
json.array!(@users) do |user|
- json.extract! user, :id
+ json.extract! user, :id, :name, :pw_hash, :groups
json.url user_url(user, format: :json)
end
diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb
index 32abeb0..05150f5 100644
--- a/app/views/users/show.html.erb
+++ b/app/views/users/show.html.erb
@@ -1,4 +1,19 @@
<p id="notice"><%= notice %></p>
+<p>
+ <strong>Name:</strong>
+ <%= @user.name %>
+</p>
+
+<p>
+ <strong>Pw hash:</strong>
+ <%= @user.pw_hash %>
+</p>
+
+<p>
+ <strong>Groups:</strong>
+ <%= @user.groups %>
+</p>
+
<%= link_to 'Edit', edit_user_path(@user) %> |
<%= link_to 'Back', users_path %>
diff --git a/app/views/users/show.json.jbuilder b/app/views/users/show.json.jbuilder
index 80ed63e..968b383 100644
--- a/app/views/users/show.json.jbuilder
+++ b/app/views/users/show.json.jbuilder
@@ -1 +1 @@
-json.extract! @user, :id, :created_at, :updated_at
+json.extract! @user, :id, :name, :pw_hash, :groups, :created_at, :updated_at