diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-07-22 20:04:46 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-07-22 20:04:46 +0200 |
| commit | b8a97d1dc567921906bb750bc0529484bf820975 (patch) | |
| tree | 00a4ab039786692a13fa91b394a2ecb22b2d4ac4 | |
| parent | 558ea7764757cfe324bdba72fc5279fa78efd1ea (diff) | |
Make nodes#show's add event/child buttons look consistent
| -rw-r--r-- | app/views/nodes/show.html.erb | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/app/views/nodes/show.html.erb b/app/views/nodes/show.html.erb index b981e4b..b3987c6 100644 --- a/app/views/nodes/show.html.erb +++ b/app/views/nodes/show.html.erb | |||
| @@ -290,7 +290,11 @@ | |||
| 290 | <% end %> | 290 | <% end %> |
| 291 | </ul> | 291 | </ul> |
| 292 | <% mapping = default_event_tag_mapping(@page) %> | 292 | <% mapping = default_event_tag_mapping(@page) %> |
| 293 | <%= link_to 'add event', new_event_path(node_id: @node.id, tag_list: mapping&.last, auto_tag_source: mapping&.first, return_to: request.path) %> | 293 | <p class="add_events"> |
| 294 | <%= link_to new_event_path(node_id: @node.id, tag_list: mapping&.last, auto_tag_source: mapping&.first, return_to: request.path), class: 'action_button' do %> | ||
| 295 | <%= icon("calendar-plus", library: "tabler", "aria-hidden": true) %> Add event | ||
| 296 | <% end %> | ||
| 297 | </p> | ||
| 294 | </div> | 298 | </div> |
| 295 | 299 | ||
| 296 | <% matches = matching_node_kinds(@node) %> | 300 | <% matches = matching_node_kinds(@node) %> |
| @@ -310,10 +314,11 @@ | |||
| 310 | <% if matches.any? %> | 314 | <% if matches.any? %> |
| 311 | <p class="add_child_links"> | 315 | <p class="add_child_links"> |
| 312 | <% matches.each_with_index do |(kind, config), index| %> | 316 | <% matches.each_with_index do |(kind, config), index| %> |
| 313 | <%= " · ".html_safe if index > 0 %> | ||
| 314 | <% link_params = { kind: kind } %> | 317 | <% link_params = { kind: kind } %> |
| 315 | <% link_params[:parent_id] = @node.id if kind == "generic" %> | 318 | <% link_params[:parent_id] = @node.id if kind == "generic" %> |
| 316 | <%= link_to "add '#{resolve_kind_text(config[:label])}' child", new_node_path(link_params) %> | 319 | <%= link_to new_node_path(link_params), class: 'action_button' do %> |
| 320 | <%= icon("text-plus", library: "tabler", "aria-hidden": true) %> Add child type <%= resolve_kind_text(config[:label]) %> | ||
| 321 | <% end %> | ||
| 317 | <% end %> | 322 | <% end %> |
| 318 | </p> | 323 | </p> |
| 319 | <% end %> | 324 | <% end %> |
