X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/2315885586efd5c0b43311bf49e801302750e77b..ca4a2d9e9a3bdf214c6ec26ca9744aab4960a25a:/app/views/changesets/show.html.erb diff --git a/app/views/changesets/show.html.erb b/app/views/changesets/show.html.erb index 6ae0efb8b..70b1877b5 100644 --- a/app/views/changesets/show.html.erb +++ b/app/views/changesets/show.html.erb @@ -3,10 +3,12 @@ <%= render "sidebar_header", :title => t(".title", :id => @changeset.id) %>
-

+

<%= linkify(@changeset.tags["comment"].to_s.presence || t("browse.no_comment")) %>

-

<%= changeset_details(@changeset) %>

+ <%= 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,15 +42,15 @@ <% next unless comment.visible || current_user&.moderator? %>
  • - <%= 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"), :class => "btn btn-sm small btn-link link-secondary p-0 align-baseline", - :data => { :method => "POST", - :url => comment.visible ? changeset_comment_hide_url(comment) : changeset_comment_unhide_url(comment) } %> + :data => { :method => comment.visible ? "DELETE" : "POST", + :url => api_changeset_comment_visibility_path(comment) } %> <% end %>
    @@ -79,7 +81,7 @@ :name => "comment", :disabled => true, :data => { :method => "POST", - :url => changeset_comment_url(@changeset) } %> + :url => api_changeset_changeset_comments_path(@changeset) } %>
    <% else %> @@ -90,49 +92,22 @@ <% end %> <% unless @ways.empty? %> - <%= render :partial => "paging_nav", :locals => { :type => "way", :pages => @way_pages } %> - + <%= render :partial => "elements", :locals => { :type => "way", :elements => @ways, :pages => @way_pages } %> <% end %> <% unless @relations.empty? %> - <%= render :partial => "paging_nav", :locals => { :type => "relation", :pages => @relation_pages } %> - + <%= render :partial => "elements", :locals => { :type => "relation", :elements => @relations, :pages => @relation_pages } %> <% end %> <% unless @nodes.empty? %> - <%= render :partial => "paging_nav", :locals => { :type => "node", :pages => @node_pages } %> - + <%= render :partial => "elements", :locals => { :type => "node", :elements => @nodes, :pages => @node_pages } %> <% end %>
  • - <%= link_to(t(".changesetxml"), :controller => "api/changesets", :action => "show") %> + <%= link_to t(".changesetxml"), api_changeset_path(@changeset) %> · - <%= link_to(t(".osmchangexml"), :controller => "api/changesets", :action => "download") %> + <%= link_to t(".osmchangexml"), api_changeset_download_path(@changeset) %>
    <% if @next_by_user || @prev_by_user %>