summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-07-09 14:19:36 +0200
committererdgeist <erdgeist@erdgeist.org>2026-07-09 14:19:36 +0200
commit8310751d4db2854597d6379b24e346c65622972d (patch)
treedd00ae2f671ab81cf292caf41b09c6da90fbc383 /app/views
parent3ae22916cd5fd0f63ffacc7a9e1aa97d311b83e6 (diff)
Major resource view cleanup
Remove dead pages#index and occurrences resource; fix menu_items#new menu_items#new called menu_item_params, which requires a submitted menu_item key that can never be present on a fresh GET -- new only ever needs a blank record to render against. pages#index and the entire occurrences resource were unmodified Rails scaffold generator output, unlinked from any nav and unreachable except by direct URL. pages#index had no controller action at all (@pages was never assigned); occurrences#index queried every row with no scoping or pagination and its layout referenced a scaffold.css asset that no longer exists in the pipeline. Neither is a real editorial surface -- occurrences are auto-generated from an event's RRULE and were never meant to be browsed as a flat list. Removed rather than repaired. pages#preview and pages#sort_images remain, now as explicit routes rather than under a full resources :pages block.
Diffstat (limited to 'app/views')
-rw-r--r--app/views/assets/index.html.erb6
-rw-r--r--app/views/assets/show.html.erb50
-rw-r--r--app/views/events/index.html.erb4
-rw-r--r--app/views/menu_items/edit.html.erb51
-rw-r--r--app/views/menu_items/index.html.erb9
-rw-r--r--app/views/nodes/index.html.erb5
-rw-r--r--app/views/occurrences/index.html.erb2
-rw-r--r--app/views/pages/index.html.erb2
-rw-r--r--app/views/users/edit.html.erb54
-rw-r--r--app/views/users/index.html.erb17
-rw-r--r--app/views/users/new.html.erb52
-rw-r--r--app/views/users/show.html.erb39
12 files changed, 141 insertions, 150 deletions
diff --git a/app/views/assets/index.html.erb b/app/views/assets/index.html.erb
index 4301fee..6591091 100644
--- a/app/views/assets/index.html.erb
+++ b/app/views/assets/index.html.erb
@@ -1,6 +1,6 @@
1<% content_for :subnavigation do %> 1<h1>Assets</h1>
2 <%= link_to 'New asset', new_asset_path %> 2
3<% end %> 3<%= link_to 'New asset', new_asset_path, class: 'action_button' %>
4 4
5<%= will_paginate @assets %> 5<%= will_paginate @assets %>
6 6
diff --git a/app/views/assets/show.html.erb b/app/views/assets/show.html.erb
index 694be5a..0286678 100644
--- a/app/views/assets/show.html.erb
+++ b/app/views/assets/show.html.erb
@@ -1,23 +1,29 @@
1<% content_for :subnavigation do %> 1<div id="page_editor">
2 <%= link_to 'Edit', edit_asset_path(@asset) %> 2 <h1><%= @asset.name %></h1>
3 <%= link_to 'Back', assets_path %>
4<% end %>
5 3
6<table> 4 <div id="content">
7 <tr> 5 <div class="node_description">Actions</div>
8 <td>Thumbnail</td> 6 <div class="node_content node_info_group">
9 <td><%= image_tag @asset.upload.url(:medium), style: "max-width: 300px; max-height: 300px;" %></td> 7 <div class="node_info_group_items">
10 </tr> 8 <div class="node_info_item">
11 <tr> 9 <%= link_to 'Edit', edit_asset_path(@asset), class: 'action_button' %>
12 <td>Public Path</td> 10 </div>
13 <td><%= @asset.upload.url.sub(/\?\d+$/, "") %></td> 11 <div class="node_info_item">
14 </tr> 12 <%= link_to 'Back', assets_path %>
15 <tr> 13 </div>
16 <td>Content Type</td> 14 </div>
17 <td><%= @asset.upload.content_type %></td> 15 </div>
18 </tr> 16
19 <tr> 17 <div class="node_description">Thumbnail</div>
20 <td>Size</td> 18 <div class="node_content"><%= image_tag @asset.upload.url(:medium), style: "max-width: 300px; max-height: 300px;" %></div>
21 <td><%= "#{@asset.upload.size/1024} KB" %></td> 19
22 </tr> 20 <div class="node_description">Public Path</div>
23</table> 21 <div class="node_content"><%= @asset.upload.url.sub(/\?\d+$/, "") %></div>
22
23 <div class="node_description">Content Type</div>
24 <div class="node_content"><%= @asset.upload.content_type %></div>
25
26 <div class="node_description">Size</div>
27 <div class="node_content"><%= "#{@asset.upload.size/1024} KB" %></div>
28 </div>
29</div>
diff --git a/app/views/events/index.html.erb b/app/views/events/index.html.erb
index c3e0e5a..b6a5b1f 100644
--- a/app/views/events/index.html.erb
+++ b/app/views/events/index.html.erb
@@ -1,4 +1,6 @@
1<h1>Listing events</h1> 1<h1>Events</h1>
2
3<%= link_to 'New event', new_event_path, class: 'action_button' %>
2 4
3<table class="events_table"> 5<table class="events_table">
4 <tr class="header"> 6 <tr class="header">
diff --git a/app/views/menu_items/edit.html.erb b/app/views/menu_items/edit.html.erb
index 9891708..dc5e8f9 100644
--- a/app/views/menu_items/edit.html.erb
+++ b/app/views/menu_items/edit.html.erb
@@ -1,32 +1,25 @@
1<h1>Edit Menu Item</h1> 1<h1>Edit Menu Item</h1>
2 2
3<%= form_for @menu_item do |f| %> 3<div id="page_editor">
4 <table> 4 <%= form_for @menu_item do |f| %>
5 5 <div id="content">
6 <tr> 6 <div class="node_description">Search</div>
7 <td class="description">Search</td> 7 <div class="node_content">
8 <td> 8 <%= text_field_tag :menu_search_term %>
9 <%= text_field_tag :menu_search_term %> 9 <div id="search_results"></div>
10 <div id="search_results"> 10 </div>
11 11
12 </div> 12 <div class="node_description">Node Id</div>
13 </td> 13 <div class="node_content"><%= f.text_field :node_id %></div>
14 </tr> 14
15 <tr> 15 <div class="node_description">Path</div>
16 <td class="description">Node Id</td> 16 <div class="node_content"><%= f.text_field :path %></div>
17 <td><%= f.text_field :node_id %></td> 17
18 </tr> 18 <div class="node_description">Title</div>
19 <tr> 19 <div class="node_content"><%= f.text_field :title %></div>
20 <td class="description">Path</td> 20
21 <td><%= f.text_field :path %></td> 21 <div class="node_description"></div>
22 </tr> 22 <div class="node_content"><%= f.submit 'Update' %></div>
23 <tr> 23 <% end %>
24 <td class="description">Title</td> 24 </div>
25 <td><%= f.text_field :title %></td> 25</div>
26 </tr>
27 <tr>
28 <td></td>
29 <td class="right"><%= f.submit 'Update' %></td>
30 </tr>
31 </table>
32<% end %>
diff --git a/app/views/menu_items/index.html.erb b/app/views/menu_items/index.html.erb
index c52c150..e84199b 100644
--- a/app/views/menu_items/index.html.erb
+++ b/app/views/menu_items/index.html.erb
@@ -1,10 +1,7 @@
1<% content_for :subnavigation do %>
2 <%= link_to "new", new_menu_item_path %>
3<% end %>
4
5
6<h1>Menu Items</h1> 1<h1>Menu Items</h1>
7 2
3<%= link_to 'New menu item', new_menu_item_path, class: 'action_button' %>
4
8<table id="menu_item_list"> 5<table id="menu_item_list">
9 <% @menu_items.each do |menu_item| %> 6 <% @menu_items.each do |menu_item| %>
10 <tr id="menu_items-<%= menu_item.id %>"> 7 <tr id="menu_items-<%= menu_item.id %>">
@@ -16,7 +13,7 @@
16 <td> 13 <td>
17 <%= button_to "Delete", menu_item_path(menu_item), 14 <%= button_to "Delete", menu_item_path(menu_item),
18 method: :delete, 15 method: :delete,
19 form: { data: { confirm: "Are you sure?" } } %> 16 form: { data: { confirm: "Are you sure?" }, class: 'button_to destructive' } %>
20 </td> 17 </td>
21 </tr> 18 </tr>
22 <% end %> 19 <% end %>
diff --git a/app/views/nodes/index.html.erb b/app/views/nodes/index.html.erb
index 2399105..903e80b 100644
--- a/app/views/nodes/index.html.erb
+++ b/app/views/nodes/index.html.erb
@@ -3,6 +3,11 @@
3<% end %> 3<% end %>
4<h1>Nodes</h1> 4<h1>Nodes</h1>
5 5
6<div>
7 <%= link_to 'New node', new_node_path, class: 'action_button' %>
8 <span class="field_hint">Creates a node with no parent or kind set — for a specific page, use the wizard's create flow or "add child" from an existing node instead.</span>
9</div>
10
6<%= will_paginate @nodes %> 11<%= will_paginate @nodes %>
7 <table class="node_table"> 12 <table class="node_table">
8 <tr class="header"> 13 <tr class="header">
diff --git a/app/views/occurrences/index.html.erb b/app/views/occurrences/index.html.erb
index 0e99857..82818d0 100644
--- a/app/views/occurrences/index.html.erb
+++ b/app/views/occurrences/index.html.erb
@@ -1,4 +1,4 @@
1<h1>Listing occurrences</h1> 1<h1>Occurrences</h1>
2 2
3<table> 3<table>
4 <tr> 4 <tr>
diff --git a/app/views/pages/index.html.erb b/app/views/pages/index.html.erb
index 91e5359..05c7311 100644
--- a/app/views/pages/index.html.erb
+++ b/app/views/pages/index.html.erb
@@ -1,4 +1,4 @@
1<h1>Listing pages</h1> 1<h1>Pages</h1>
2 2
3<table> 3<table>
4 <tr> 4 <tr>
diff --git a/app/views/users/edit.html.erb b/app/views/users/edit.html.erb
index df1005b..77b33c6 100644
--- a/app/views/users/edit.html.erb
+++ b/app/views/users/edit.html.erb
@@ -2,38 +2,32 @@
2 2
3<% if @user.errors.any? %> 3<% if @user.errors.any? %>
4 <div class="error_messages"> 4 <div class="error_messages">
5 <ul><% @user.errors.full_messages.each do |msg| %><li><%= msg.gsub("Slug", "Title") %></li><% end %></ul> 5 <ul><% @user.errors.full_messages.each do |msg| %><li><%= msg %></li><% end %></ul>
6 </div> 6 </div>
7<% end %> 7<% end %>
8 8
9<div id="page_editor">
10 <%= form_for @user do |f| %>
11 <div id="content">
12 <div class="node_description">Login</div>
13 <div class="node_content"><%= f.text_field :login %></div>
9 14
10<%= form_for @user do |f| %> 15 <div class="node_description">E-Mail</div>
11<table id="new_node"> 16 <div class="node_content"><%= f.text_field :email %></div>
12 <tr> 17
13 <td class="description">Login</td> 18 <div class="node_description">Password</div>
14 <td><%= f.text_field :login %></td> 19 <div class="node_content"><%= f.password_field :password %></div>
15 </tr> 20
16 <tr> 21 <div class="node_description">Confirm</div>
17 <td class="description">E-Mail</td> 22 <div class="node_content"><%= f.password_field :password_confirmation %></div>
18 <td><%= f.text_field :email %></td> 23
19 </tr> 24 <% if current_user.admin? %>
20 <tr> 25 <div class="node_description">Admin?</div>
21 <td class="description">Password</td> 26 <div class="node_content"><%= f.check_box :admin %></div>
22 <td><%= f.password_field :password %></td> 27 <% end %>
23 </tr> 28
24 <tr> 29 <div class="node_description"></div>
25 <td class="description">Confirm</td> 30 <div class="node_content"><%= f.submit "Update" %></div>
26 <td><%= f.password_field :password_confirmation %></td>
27 </tr>
28 <% if current_user.admin? %>
29 <tr>
30 <td class="description">Admin?</td>
31 <td><%= f.check_box :admin %></td>
32 </tr>
33 <% end %> 31 <% end %>
34 <tr> 32 </div>
35 <td class="description"></td> 33</div>
36 <td class="right"><%= f.submit "Update" %></td>
37 </tr>
38</table>
39<% end %>
diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb
index 88868f5..46e958b 100644
--- a/app/views/users/index.html.erb
+++ b/app/views/users/index.html.erb
@@ -1,7 +1,6 @@
1<h1>Admins</h1>
2<%= link_to 'New admin user', new_user_path(admin: true), class: 'action_button' %>
1<table class="user_table"> 3<table class="user_table">
2 <tr>
3 <td><h1>Admins</h1></td>
4 </tr>
5 <tr class="header"> 4 <tr class="header">
6 <th>Login</th> 5 <th>Login</th>
7 <th></th> 6 <th></th>
@@ -9,9 +8,11 @@
9 <th></th> 8 <th></th>
10 </tr> 9 </tr>
11 <%= render :partial => "user", :locals => {:users => @users[:admin] ||= []} %> 10 <%= render :partial => "user", :locals => {:users => @users[:admin] ||= []} %>
12 <tr> 11</table>
13 <td><h1>Users</h1></td> 12
14 </tr> 13<h1>Users</h1>
14<%= link_to 'New user', new_user_path, class: 'action_button' %>
15<table class="user_table">
15 <tr class="header"> 16 <tr class="header">
16 <th>Login</th> 17 <th>Login</th>
17 <th></th> 18 <th></th>
@@ -20,7 +21,3 @@
20 </tr> 21 </tr>
21 <%= render :partial => "user", :locals => {:users => @users[:user] ||= []} %> 22 <%= render :partial => "user", :locals => {:users => @users[:user] ||= []} %>
22</table> 23</table>
23
24<% content_for :subnavigation do %>
25 <%= link_to "create", new_user_path %>
26<% end %>
diff --git a/app/views/users/new.html.erb b/app/views/users/new.html.erb
index 6beda4f..ce38fdf 100644
--- a/app/views/users/new.html.erb
+++ b/app/views/users/new.html.erb
@@ -2,36 +2,30 @@
2 2
3<% if @user.errors.any? %> 3<% if @user.errors.any? %>
4 <div class="error_messages"> 4 <div class="error_messages">
5 <ul><% @user.errors.full_messages.each do |msg| %><li><%= msg.gsub("Slug", "Title") %></li><% end %></ul> 5 <ul><% @user.errors.full_messages.each do |msg| %><li><%= msg %></li><% end %></ul>
6 </div> 6 </div>
7<% end %> 7<% end %>
8 8
9<div id="page_editor">
10 <%= form_for @user do |f| %>
11 <div id="content">
12 <div class="node_description">Login</div>
13 <div class="node_content"><%= f.text_field :login %></div>
9 14
10<%= form_for @user do |f| %> 15 <div class="node_description">E-Mail</div>
11<table id="new_node"> 16 <div class="node_content"><%= f.text_field :email %></div>
12 <tr> 17
13 <td class="description">Login</td> 18 <div class="node_description">Password</div>
14 <td><%= f.text_field :login %></td> 19 <div class="node_content"><%= f.password_field :password %></div>
15 </tr> 20
16 <tr> 21 <div class="node_description">Confirm</div>
17 <td class="description">E-Mail</td> 22 <div class="node_content"><%= f.password_field :password_confirmation %></div>
18 <td><%= f.text_field :email %></td> 23
19 </tr> 24 <div class="node_description">Admin?</div>
20 <tr> 25 <div class="node_content"><%= f.check_box :admin %></div>
21 <td class="description">Password</td> 26
22 <td><%= f.password_field :password %></td> 27 <div class="node_description"></div>
23 </tr> 28 <div class="node_content"><%= f.submit "Create" %></div>
24 <tr> 29 <% end %>
25 <td class="description">Confirm</td> 30 </div>
26 <td><%= f.password_field :password_confirmation %></td> 31</div>
27 </tr>
28 <tr>
29 <td class="description">Admin?</td>
30 <td><%= f.check_box :admin %></td>
31 </tr>
32 <tr>
33 <td class="description"></td>
34 <td class="right"><%= f.submit "Create" %></td>
35 </tr>
36</table>
37<% end %>
diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb
index 80483d3..e744efe 100644
--- a/app/views/users/show.html.erb
+++ b/app/views/users/show.html.erb
@@ -1,20 +1,23 @@
1<% content_for :subnavigation do %> 1<div id="page_editor">
2 <%= link_to 'Edit', edit_user_path(@user) %> 2 <h1><%= @user.login %></h1>
3<% end %>
4 3
5<h1>User: <%= @user.login %></h1> 4 <div id="content">
5 <div class="node_description">Actions</div>
6 <div class="node_content node_info_group">
7 <div class="node_info_group_items">
8 <div class="node_info_item">
9 <%= link_to 'Edit', edit_user_path(@user), class: 'action_button' %>
10 </div>
11 </div>
12 </div>
6 13
7<table id="new_node"> 14 <div class="node_description">Login</div>
8 <tr> 15 <div class="node_content"><%= @user.login %></div>
9 <td class="description">Login</td> 16
10 <td><%= @user.login %></td> 17 <div class="node_description">E-Mail</div>
11 </tr> 18 <div class="node_content"><%= @user.email %></div>
12 <tr> 19
13 <td class="description">E-Mail</td> 20 <div class="node_description">Admin?</div>
14 <td><%= @user.email %></td> 21 <div class="node_content"><%= @user.admin ? "yes" : "no" %></div>
15 </tr> 22 </div>
16 <tr> 23</div>
17 <td class="description">Admin?</td>
18 <td><%= @user.admin ? "yes" : "no" %></td>
19 </tr>
20</table> \ No newline at end of file