summaryrefslogtreecommitdiff
path: root/app/views/assets/show.html.erb
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-08-09 13:26:23 +0200
committererdgeist <erdgeist@erdgeist.org>2026-08-09 13:26:23 +0200
commit616a0d2d2ba15a7e176938ee829d60366fb6a9c2 (patch)
treefe12e0ab804948f0e3ff37636859b05cef7871cc /app/views/assets/show.html.erb
parent42b996e9197680a1955cfa5639462908677e5a94 (diff)
Attach an asset to a page from the asset's own page
The picker moves from assets/edit to assets/show, where the list of attached pages already is. A member route, POST assets/:id/attach_to_node, replaces the ride on #update. Supersedes the picker wiring in the previous commit; what remains of it is @attach_node in #create, the flash composition and the corrected hint.
Diffstat (limited to 'app/views/assets/show.html.erb')
-rw-r--r--app/views/assets/show.html.erb11
1 files changed, 11 insertions, 0 deletions
diff --git a/app/views/assets/show.html.erb b/app/views/assets/show.html.erb
index d76d312b..f31d34e1 100644
--- a/app/views/assets/show.html.erb
+++ b/app/views/assets/show.html.erb
@@ -47,6 +47,17 @@
47 <%= link_to new_node_path(:asset_id => @asset.id), :class => "action_button" do %> 47 <%= link_to new_node_path(:asset_id => @asset.id), :class => "action_button" do %>
48 <%= icon("file-plus", library: "tabler", "aria-hidden": true) %> <%= t(".new_page_with_attachment") %> 48 <%= icon("file-plus", library: "tabler", "aria-hidden": true) %> <%= t(".new_page_with_attachment") %>
49 <% end %> 49 <% end %>
50 <%= form_tag attach_to_node_asset_path(@asset), :class => "asset_attach_form" do %>
51 <div class="restore_picker">
52 <%= text_field_tag :asset_node_search_term, nil,
53 :placeholder => t("assets.form.attach_search_placeholder"), :autocomplete => "off" %>
54 <div id="asset_node_search_results" class="search_results" style="display: none"></div>
55 </div>
56 <%= hidden_field_tag :node_id, nil %>
57 <label><%= check_box_tag :headline, "1" %> <%= t("assets.form.as_headline") %></label>
58 <%= submit_tag t(".attach_button") %>
59 <span class="field_hint"><%= t("assets.form.attach_hint") %></span>
60 <% end %>
50 </div> 61 </div>
51 62
52 <div class="layout_row_label"><%= t(".public_path") %></div> 63 <div class="layout_row_label"><%= t(".public_path") %></div>