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         <a href="#c<%= comment.id %>">
 
  54           <svg width="16" height="16" fill="currentColor">
 
  55             <path d="M4.715 6.542 3.343 7.914a3 3 0 1 0 4.243 4.243l1.828-1.829A3 3 0 0 0 8.586 5.5L8 6.086a1 1 0 0 0-.154.199 2 2 0 0 1 .861 3.337L6.88 11.45a2 2 0 1 1-2.83-2.83l.793-.792a4 4 0 0 1-.128-1.287z" />
 
  56             <path d="M6.586 4.672A3 3 0 0 0 7.414 9.5l.775-.776a2 2 0 0 1-.896-3.346L9.12 3.55a2 2 0 1 1 2.83 2.83l-.793.792c.112.42.155.855.128 1.287l1.372-1.372a3 3 0 1 0-4.243-4.243z" />
 
  61         <%= comment.body.to_html %>
 
  66   <% unless current_user %>
 
  68       <%= link_to(t(".join_discussion"), login_path(:referer => request.fullpath)) %>
 
  73     <% unless @changeset.open? %>
 
  74       <form action="#" class="mb-3">
 
  76           <textarea class="form-control" name="text" cols="40" rows="5"></textarea>
 
  78         <div id="comment-error" class="alert alert-danger p-2 mb-3" hidden>
 
  81           <%= tag.button t(".comment"),
 
  82                          :class => "btn btn-primary",
 
  85                          :data => { :method => "POST",
 
  86                                     :url => api_changeset_changeset_comments_path(@changeset) } %>
 
  91         <%= t(".still_open") %>
 
  96   <% unless @ways.empty? %>
 
  97     <%= render :partial => "elements", :locals => { :type => "way", :elements => @ways, :pages => @way_pages } %>
 
 100   <% unless @relations.empty? %>
 
 101     <%= render :partial => "elements", :locals => { :type => "relation", :elements => @relations, :pages => @relation_pages } %>
 
 104   <% unless @nodes.empty? %>
 
 105     <%= render :partial => "elements", :locals => { :type => "node", :elements => @nodes, :pages => @node_pages } %>
 
 109 <div class='secondary-actions'>
 
 110   <%= link_to t(".changesetxml"), api_changeset_path(@changeset) %>
 
 112   <%= link_to t(".osmchangexml"), api_changeset_download_path(@changeset) %>
 
 115 <% if @next_by_user || @prev_by_user %>
 
 116   <div class='secondary-actions'>
 
 117     <% if @prev_by_user %>
 
 118       <%= link_to @prev_by_user, :class => "icon-link" do %>
 
 119         <%= previous_page_svg_tag :height => 11 %>
 
 120         <%= @prev_by_user.id %>
 
 124     <%= user = (@prev_by_user || @next_by_user).user.display_name
 
 125         link_to tag.bdi(user), :controller => "changesets", :action => "index", :display_name => user %>
 
 126     <% if @next_by_user %>
 
 128       <%= link_to @next_by_user, :class => "icon-link" do %>
 
 129         <%= @next_by_user.id %>
 
 130         <%= next_page_svg_tag :height => 11 %>