summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-07-13 00:41:36 +0200
committererdgeist <erdgeist@erdgeist.org>2026-07-13 00:41:36 +0200
commit4faf0da3a36bfdcf354b095a2cf5b297ca09af65 (patch)
tree097483a01182ca2a5997caeb5f0424010e971b45 /app
parentbcfc2b5901caeaabdf3efa745441a339568b671a (diff)
UI cleanup pass: search overlay position, remaining table forms
The search overlay was positioned against the whole viewport (left: 50%, transform: translateX(-50%)) because it sat outside wider text nav it used to center under. Moved inside #navigation, which already has its own positioning context, so it now anchors to the icon nav itself instead of the page center. admin/search_results.html.erb was a bare, unstyled <ul> concatenating title and unique_name into one string by hand. Restyled to match the byline convention already used everywhere else (title_for_node, a separate link_to_path byline with the trailing arrow), and results now link to the node's admin show page rather than straight to edit, matching every other node list in the app instead of being the one exception. menu_items#new and sessions#new (the login page) were the last two views still using the pre-node_content/node_description table-based label/field layout -- found via a grep for the old td.description marker, not guessed at. Converting menu_items#new surfaced a real, separate gap: its input fields have never had a width rule, since the existing 690px rule only applies to a few specifically-named field IDs or anything inside #page_editor, neither of which applies here. Same likely gap probably exists on other simple CRUD forms (users/events/assets/occurrences/pages) -- not fixed here, flagged for its own pass rather than guessed at blind. nodes#new's Create button was pushed to the far right of the page by one stray class (node_content right) no sibling create form carries -- not a family-wide inconsistency, one extra class in one file.
Diffstat (limited to 'app')
-rw-r--r--app/views/admin/search_results.html.erb11
-rw-r--r--app/views/layouts/admin.html.erb17
-rw-r--r--app/views/menu_items/new.html.erb42
-rw-r--r--app/views/nodes/new.html.erb2
-rw-r--r--app/views/sessions/new.html.erb31
5 files changed, 43 insertions, 60 deletions
diff --git a/app/views/admin/search_results.html.erb b/app/views/admin/search_results.html.erb
index f8aece0..a757197 100644
--- a/app/views/admin/search_results.html.erb
+++ b/app/views/admin/search_results.html.erb
@@ -1,7 +1,10 @@
1<h1>Search Results</h1> 1<h1>Search Results</h1>
2 2
3<ul> 3<ul class="search_results_list">
4<%- @results.each do |result| %> 4 <% @results.each do |result| %>
5 <li><%= link_to "#{result.title} (#{result.unique_name})", edit_node_path(result) %></li> 5 <li>
6<% end %> 6 <%= link_to title_for_node(result), node_path(result) %>
7 <span class="field_hint"><%= link_to_path("#{result.unique_name} ↗", result.unique_name) %></span>
8 </li>
9 <% end %>
7</ul> 10</ul>
diff --git a/app/views/layouts/admin.html.erb b/app/views/layouts/admin.html.erb
index 00d7075..61bb5c3 100644
--- a/app/views/layouts/admin.html.erb
+++ b/app/views/layouts/admin.html.erb
@@ -27,6 +27,14 @@
27 <div id="main_navigation"> 27 <div id="main_navigation">
28 <%= render :partial => 'admin/menu' if current_user %> 28 <%= render :partial => 'admin/menu' if current_user %>
29 </div> 29 </div>
30 <div id="search_widget" style="display: none;">
31 <div>
32 <%= form_tag admin_search_path, method: :get do %>
33 <span>Search: </span><%= text_field_tag :search_term, nil, autocomplete: "off" %>
34 <% end %>
35 </div>
36 <div id="menu_search_results" class="search_results" style="display: none"></div>
37 </div>
30 </div> 38 </div>
31 <div class="admin_content_spacer"></div> 39 <div class="admin_content_spacer"></div>
32 <% if flash[:notice].present? || flash[:error].present? %> 40 <% if flash[:notice].present? || flash[:error].present? %>
@@ -50,14 +58,5 @@
50 58
51 <div id="results"></div> 59 <div id="results"></div>
52 </div> 60 </div>
53
54 <div id="search_widget" style="display: none;">
55 <div>
56 <%= form_tag admin_search_path, method: :get do %>
57 <span>Search: </span><%= text_field_tag :search_term, nil, autocomplete: "off" %>
58 <% end %>
59 </div>
60 <div id="menu_search_results" class="search_results" style="display: none"></div>
61 </div>
62 </body> 61 </body>
63</html> 62</html>
diff --git a/app/views/menu_items/new.html.erb b/app/views/menu_items/new.html.erb
index 223cb8e..8957293 100644
--- a/app/views/menu_items/new.html.erb
+++ b/app/views/menu_items/new.html.erb
@@ -1,30 +1,20 @@
1<h1>Add Menu Item</h1> 1<h1>Add Menu Item</h1>
2 2
3<%= form_for @menu_item do |f| %> 3<%= form_for @menu_item do |f| %>
4 <table> 4 <div class="node_description">Search</div>
5 5 <div class="node_content">
6 <tr> 6 <%= text_field_tag :menu_search_term %>
7 <td class="description">Search</td> 7 <div id="menu_item_search_results" class="search_results"></div>
8 <td> 8 </div>
9 <%= text_field_tag :menu_search_term %> 9
10 <div id="menu_item_search_results" class="search_results"></div> 10 <div class="node_description">Node Id</div>
11 </td> 11 <div class="node_content"><%= f.text_field :node_id %></div>
12 </tr> 12
13 <tr> 13 <div class="node_description">Path</div>
14 <td class="description">Node Id</td> 14 <div class="node_content"><%= f.text_field :path %></div>
15 <td><%= f.text_field :node_id %></td> 15
16 </tr> 16 <div class="node_description">Title</div>
17 <tr> 17 <div class="node_content"><%= f.text_field :title %></div>
18 <td class="description">Path</td> 18
19 <td><%= f.text_field :path %></td> 19 <div class="node_content"><%= f.submit 'Create' %></div>
20 </tr>
21 <tr>
22 <td class="description">Title</td>
23 <td><%= f.text_field :title %></td>
24 </tr>
25 <tr>
26 <td></td>
27 <td class="right"><%= f.submit 'Create' %></td>
28 </tr>
29 </table>
30<% end %> 20<% end %>
diff --git a/app/views/nodes/new.html.erb b/app/views/nodes/new.html.erb
index bb7e078..b63a606 100644
--- a/app/views/nodes/new.html.erb
+++ b/app/views/nodes/new.html.erb
@@ -46,7 +46,7 @@
46 </div> 46 </div>
47 47
48 <div class="node_description"></div> 48 <div class="node_description"></div>
49 <div class="node_content right"><%= submit_tag "Create" %></div> 49 <div class="node_content"><%= submit_tag "Create" %></div>
50 50
51</div> 51</div>
52<% end %> 52<% end %>
diff --git a/app/views/sessions/new.html.erb b/app/views/sessions/new.html.erb
index 3c10303..23952b7 100644
--- a/app/views/sessions/new.html.erb
+++ b/app/views/sessions/new.html.erb
@@ -1,24 +1,15 @@
1<div id="login_form"> 1<div id="login_form">
2 <%= form_tag session_path do -%> 2 <%= form_tag session_path do -%>
3 <table> 3 <% if flash[:error] %>
4 <tr> 4 <div class="error_messages"><%= flash[:error] %></div>
5 <td></td> 5 <% end %>
6 <td> 6
7 <%= flash[:error] %>&nbsp; 7 <div class="node_description">Login</div>
8 </td> 8 <div class="node_content"><%= text_field_tag 'login', @login %></div>
9 </tr> 9
10 <tr> 10 <div class="node_description">Password</div>
11 <td class="description">Login</td> 11 <div class="node_content"><%= password_field_tag 'password', nil %></div>
12 <td><%= text_field_tag 'login', @login %></td> 12
13 </tr> 13 <div class="node_content"><%= submit_tag 'log in' %></div>
14 <tr>
15 <td class="description">Password</td>
16 <td><%= password_field_tag 'password', nil %></td>
17 </tr>
18 <tr>
19 <td></td>
20 <td class="right"><%= submit_tag 'log in' %></td>
21 </tr>
22 </table>
23 <% end -%> 14 <% end -%>
24</div> 15</div>