]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/changesets/show.html.erb
Merge remote-tracking branch 'upstream/pull/5721'
[rails.git] / app / views / changesets / show.html.erb
index 13f40ce500d016dee39537330586f908b8287828..2de744a9383d4c5bc0f63a1b45b25c6baba65721 100644 (file)
@@ -6,7 +6,9 @@
   <p class="fs-6 overflow-x-auto">
     <%= linkify(@changeset.tags["comment"].to_s.presence || t("browse.no_comment")) %>
   </p>
-  <p class="details"><%= changeset_details(@changeset) %></p>
+  <%= tag.p :class => "details", :data => { :changeset => changeset_data(@changeset) } do %>
+    <%= changeset_details(@changeset) %>
+  <% end %>
 
   <%= render :partial => "browse/tag_details", :object => @changeset.tags.except("comment") %>
 
@@ -40,9 +42,9 @@
         <% next unless comment.visible || current_user&.moderator? %>
         <li id="c<%= comment.id %>">
           <small class='text-body-secondary'>
-            <%= t comment.visible ? ".comment_by_html" : ".hidden_comment_by_html",
-                  :time_ago => friendly_date_ago(comment.created_at),
-                  :user => link_to(comment.author.display_name, comment.author) %>
+            <%= comment_by_options = { :time_ago => friendly_date_ago(comment.created_at),
+                                       :user => link_to(comment.author.display_name, comment.author) }
+                comment.visible ? t(".comment_by_html", **comment_by_options) : t(".hidden_comment_by_html", **comment_by_options) %>
             <% if current_user&.moderator? %>
               —
               <%= tag.button t(".#{comment.visible ? 'hide' : 'unhide'}_comment"),
 </div>
 
 <div class='secondary-actions'>
-  <%= link_to(t(".changesetxml"), :controller => "api/changesets", :action => "show") %>
+  <%= link_to t(".changesetxml"), api_changeset_path(@changeset) %>
   &middot;
-  <%= link_to(t(".osmchangexml"), :controller => "api/changesets", :action => "download") %>
+  <%= link_to t(".osmchangexml"), api_changeset_download_path(@changeset) %>
 </div>
 
 <% if @next_by_user || @prev_by_user %>