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   <%= 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 => "POST",
 
  27                                     :url => api_changeset_unsubscribe_url(@changeset) } %>
 
  29           <%= tag.button t(".subscribe"),
 
  30                          :class => "btn btn-sm btn-primary",
 
  32                          :data => { :method => "POST",
 
  33                                     :url => api_changeset_subscribe_url(@changeset) } %>
 
  39   <% if @comments.length > 0 %>
 
  40     <ul class="list-unstyled">
 
  41       <% @comments.each do |comment| %>
 
  42         <% next unless comment.visible || current_user&.moderator? %>
 
  43         <li id="c<%= comment.id %>">
 
  44           <small class='text-body-secondary'>
 
  45             <%= comment_by_options = { :time_ago => friendly_date_ago(comment.created_at),
 
  46                                        :user => link_to(comment.author.display_name, comment.author) }
 
  47                 comment.visible ? t(".comment_by_html", **comment_by_options) : t(".hidden_comment_by_html", **comment_by_options) %>
 
  48             <% if current_user&.moderator? %>
 
  50               <%= tag.button t(".#{comment.visible ? 'hide' : 'unhide'}_comment"),
 
  51                              :class => "btn btn-sm small btn-link link-secondary p-0 align-baseline",
 
  52                              :data => { :method => "POST",
 
  53                                         :url => comment.visible ? changeset_comment_hide_url(comment) : changeset_comment_unhide_url(comment) } %>
 
  57             <%= comment.body.to_html %>
 
  64   <% unless current_user %>
 
  66       <%= link_to(t(".join_discussion"), login_path(:referer => request.fullpath)) %>
 
  71     <% unless @changeset.open? %>
 
  72       <form action="#" class="mb-3">
 
  74           <textarea class="form-control" name="text" cols="40" rows="5"></textarea>
 
  76         <div id="comment-error" class="alert alert-danger p-2 mb-3" hidden>
 
  79           <%= tag.button t(".comment"),
 
  80                          :class => "btn btn-primary",
 
  83                          :data => { :method => "POST",
 
  84                                     :url => changeset_comment_url(@changeset) } %>
 
  89         <%= t(".still_open") %>
 
  94   <% unless @ways.empty? %>
 
  95     <%= render :partial => "elements", :locals => { :type => "way", :elements => @ways, :pages => @way_pages } %>
 
  98   <% unless @relations.empty? %>
 
  99     <%= render :partial => "elements", :locals => { :type => "relation", :elements => @relations, :pages => @relation_pages } %>
 
 102   <% unless @nodes.empty? %>
 
 103     <%= render :partial => "elements", :locals => { :type => "node", :elements => @nodes, :pages => @node_pages } %>
 
 107 <div class='secondary-actions'>
 
 108   <%= link_to(t(".changesetxml"), :controller => "api/changesets", :action => "show") %>
 
 110   <%= link_to(t(".osmchangexml"), :controller => "api/changesets", :action => "download") %>
 
 113 <% if @next_by_user || @prev_by_user %>
 
 114   <div class='secondary-actions'>
 
 115     <% if @prev_by_user %>
 
 116       <%= link_to @prev_by_user, :class => "icon-link" do %>
 
 117         <%= previous_page_svg_tag :height => 11 %>
 
 118         <%= @prev_by_user.id %>
 
 122     <%= user = (@prev_by_user || @next_by_user).user.display_name
 
 123         link_to tag.bdi(user), :controller => "changesets", :action => "index", :display_name => user %>
 
 124     <% if @next_by_user %>
 
 126       <%= link_to @next_by_user, :class => "icon-link" do %>
 
 127         <%= @next_by_user.id %>
 
 128         <%= next_page_svg_tag :height => 11 %>