1 <% set_title(t(".title", :id => @changeset.id)) %>
 
   3 <%= render "sidebar_header", :title => t(".title", :id => @changeset.id) %>
 
   5 <div class="browse-section">
 
   6   <p class="fs-6 overflow-x-auto">
 
   7     <%= linkify(@changeset.tags["comment"].to_s.presence || t("browse.no_comment")) %>
 
   9   <p class="details"><%= changeset_details(@changeset) %></p>
 
  11   <%= render :partial => "browse/tag_details", :object => @changeset.tags.except("comment") %>
 
  15       <h4><%= t(".discussion") %></h4>
 
  19       <div class="col-auto">
 
  20         <% if @changeset.subscribers.exists?(current_user.id) %>
 
  21           <%= tag.button t(".unsubscribe"),
 
  22                          :class => "btn btn-sm btn-primary",
 
  23                          :name => "unsubscribe",
 
  24                          :data => { :method => "POST",
 
  25                                     :url => api_changeset_unsubscribe_url(@changeset) } %>
 
  27           <%= tag.button t(".subscribe"),
 
  28                          :class => "btn btn-sm btn-primary",
 
  30                          :data => { :method => "POST",
 
  31                                     :url => api_changeset_subscribe_url(@changeset) } %>
 
  37   <% if @comments.length > 0 %>
 
  38     <ul class="list-unstyled">
 
  39       <% @comments.each do |comment| %>
 
  40         <% next unless comment.visible || current_user&.moderator? %>
 
  41         <li 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 => "POST",
 
  51                                         :url => comment.visible ? changeset_comment_hide_url(comment) : changeset_comment_unhide_url(comment) } %>
 
  55             <%= comment.body.to_html %>
 
  62   <% unless current_user %>
 
  64       <%= link_to(t(".join_discussion"), login_path(:referer => request.fullpath)) %>
 
  69     <% unless @changeset.open? %>
 
  70       <form action="#" class="mb-3">
 
  72           <textarea class="form-control" name="text" cols="40" rows="5"></textarea>
 
  74         <div id="comment-error" class="alert alert-danger p-2 mb-3" hidden>
 
  77           <%= tag.button t(".comment"),
 
  78                          :class => "btn btn-primary",
 
  81                          :data => { :method => "POST",
 
  82                                     :url => changeset_comment_url(@changeset) } %>
 
  87         <%= t(".still_open") %>
 
  92   <% unless @ways.empty? %>
 
  93     <%= render :partial => "elements", :locals => { :type => "way", :elements => @ways, :pages => @way_pages } %>
 
  96   <% unless @relations.empty? %>
 
  97     <%= render :partial => "elements", :locals => { :type => "relation", :elements => @relations, :pages => @relation_pages } %>
 
 100   <% unless @nodes.empty? %>
 
 101     <%= render :partial => "elements", :locals => { :type => "node", :elements => @nodes, :pages => @node_pages } %>
 
 105 <div class='secondary-actions'>
 
 106   <%= link_to(t(".changesetxml"), :controller => "api/changesets", :action => "show") %>
 
 108   <%= link_to(t(".osmchangexml"), :controller => "api/changesets", :action => "download") %>
 
 111 <% if @next_by_user || @prev_by_user %>
 
 112   <div class='secondary-actions'>
 
 113     <% if @prev_by_user %>
 
 114       <%= link_to @prev_by_user, :class => "icon-link" do %>
 
 115         <%= previous_page_svg_tag :height => 11 %>
 
 116         <%= @prev_by_user.id %>
 
 120     <%= user = (@prev_by_user || @next_by_user).user.display_name
 
 121         link_to tag.bdi(user), :controller => "changesets", :action => "index", :display_name => user %>
 
 122     <% if @next_by_user %>
 
 124       <%= link_to @next_by_user, :class => "icon-link" do %>
 
 125         <%= @next_by_user.id %>
 
 126         <%= next_page_svg_tag :height => 11 %>