1 <% set_title(t(".title", :id => @changeset.id)) %>
 
   3 <%= render "sidebar_header", :title => t(".title", :id => @changeset.id) %>
 
   5 <div class="mb-3 border-bottom border-secondary-subtle pb-3">
 
   6   <p class="fs-6 overflow-x-auto" dir="auto">
 
   7     <%= linkify(@changeset.tags["comment"].to_s.presence || t("browse.no_comment")) %>
 
   9   <%= tag.p :class => "details", :data => { :changeset => changeset_data(@changeset) } do %>
 
  10     <%= changeset_details(@changeset) %>
 
  13   <%= render :partial => "browse/tag_details", :object => @changeset.tags.except("comment") %>
 
  17       <h4><%= t(".discussion") %></h4>
 
  21       <div class="col-auto">
 
  22         <% if @changeset.subscribers.exists?(current_user.id) %>
 
  23           <%= tag.button t(".unsubscribe"),
 
  24                          :class => "btn btn-sm btn-primary",
 
  25                          :name => "unsubscribe",
 
  26                          :data => { :method => "DELETE",
 
  27                                     :url => api_changeset_subscription_path(@changeset) } %>
 
  29           <%= tag.button t(".subscribe"),
 
  30                          :class => "btn btn-sm btn-primary",
 
  32                          :data => { :method => "POST",
 
  33                                     :url => api_changeset_subscription_path(@changeset) } %>
 
  39   <% @comments.each do |comment| %>
 
  40     <% next unless comment.visible || current_user&.moderator? %>
 
  41     <article id="c<%= comment.id %>">
 
  42       <small class='text-body-secondary'>
 
  43         <%= comment_by_options = { :time_ago => friendly_date_ago(comment.created_at),
 
  44                                    :user => link_to(comment.author.display_name, comment.author) }
 
  45             comment.visible ? t(".comment_by_html", **comment_by_options) : t(".hidden_comment_by_html", **comment_by_options) %>
 
  46         <% if current_user&.moderator? %>
 
  48           <%= tag.button t(".#{comment.visible ? 'hide' : 'unhide'}_comment"),
 
  49                          :class => "btn btn-sm small btn-link link-secondary p-0 align-baseline",
 
  50                          :data => { :method => comment.visible ? "DELETE" : "POST",
 
  51                                     :url => api_changeset_comment_visibility_path(comment) } %>
 
  53         <%= link_to inline_svg_tag("icons/link.svg"), "#c#{comment.id}" %>
 
  56         <%= comment.body.to_html %>
 
  61   <% unless current_user %>
 
  63       <%= link_to(t(".join_discussion"), login_path(:referer => request.fullpath)) %>
 
  68     <% unless @changeset.open? %>
 
  69       <form action="#" class="mb-3">
 
  71           <textarea class="form-control" name="text" cols="40" rows="5"></textarea>
 
  73         <div id="comment-error" class="alert alert-danger p-2 mb-3" hidden>
 
  76           <%= tag.button t(".comment"),
 
  77                          :class => "btn btn-primary",
 
  80                          :data => { :method => "POST",
 
  81                                     :url => api_changeset_changeset_comments_path(@changeset) } %>
 
  86         <%= t(".still_open") %>
 
  91   <% unless @ways.empty? %>
 
  92     <%= render :partial => "elements", :locals => { :type => "way", :elements => @ways, :elements_count => @ways_count, :current_page => @current_way_page } %>
 
  95   <% unless @relations.empty? %>
 
  96     <%= render :partial => "elements", :locals => { :type => "relation", :elements => @relations, :elements_count => @relations_count, :current_page => @current_relation_page } %>
 
  99   <% unless @nodes.empty? %>
 
 100     <%= render :partial => "elements", :locals => { :type => "node", :elements => @nodes, :elements_count => @nodes_count, :current_page => @current_node_page } %>
 
 104 <div class='secondary-actions'>
 
 105   <%= link_to t(".changesetxml"), api_changeset_path(@changeset) %>
 
 107   <%= link_to t(".osmchangexml"), api_changeset_download_path(@changeset) %>
 
 110 <% if @next_by_user || @prev_by_user %>
 
 111   <div class='secondary-actions'>
 
 112     <% if @prev_by_user %>
 
 113       <%= link_to @prev_by_user, :class => "icon-link" do %>
 
 114         <%= previous_page_svg_tag :height => 11 %>
 
 115         <%= @prev_by_user.id %>
 
 119     <%= user = (@prev_by_user || @next_by_user).user.display_name
 
 120         link_to tag.bdi(user), :controller => "changesets", :action => "index", :display_name => user %>
 
 121     <% if @next_by_user %>
 
 123       <%= link_to @next_by_user, :class => "icon-link" do %>
 
 124         <%= @next_by_user.id %>
 
 125         <%= next_page_svg_tag :height => 11 %>