summaryrefslogtreecommitdiff
path: root/app/views/menu_items
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/menu_items
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/menu_items')
-rw-r--r--app/views/menu_items/edit.html.erb51
-rw-r--r--app/views/menu_items/index.html.erb9
2 files changed, 25 insertions, 35 deletions
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 %>