From 08d02a8591ee8047cb708646092cd4bdb7492c33 Mon Sep 17 00:00:00 2001 From: erdgeist Date: Sun, 19 Jul 2026 22:19:22 +0200 Subject: Add copy-url button to assets; unified the mechanism across views --- app/views/assets/show.html.erb | 10 +++++++++- app/views/nodes/new.html.erb | 5 ++++- 2 files changed, 13 insertions(+), 2 deletions(-) (limited to 'app/views') diff --git a/app/views/assets/show.html.erb b/app/views/assets/show.html.erb index 5717dd9..ff00883 100644 --- a/app/views/assets/show.html.erb +++ b/app/views/assets/show.html.erb @@ -20,7 +20,15 @@
<%= image_tag @asset.upload.url(:medium), style: "max-width: 300px; max-height: 300px;" %>
Public Path
-
<%= @asset.upload.url.sub(/\?\d+$/, "") %>
+
+ <% public_path = @asset.upload.url.sub(/\?\d+$/, "") %> + <%= link_to public_path, public_path, target: "_blank", rel: "noopener" %> + +
Content Type
<%= @asset.upload.content_type %>
diff --git a/app/views/nodes/new.html.erb b/app/views/nodes/new.html.erb index 890d46e..805fbc9 100644 --- a/app/views/nodes/new.html.erb +++ b/app/views/nodes/new.html.erb @@ -41,7 +41,10 @@
Resulting path
- + + This preview updates as you type. The final path can still be changed afterward by editing the title (for the last segment) or moving the node to a different parent (for everything before it).
-- cgit v1.3