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 => comment.visible ? "DELETE" : "POST",
53 :url => api_changeset_comment_visibility_path(comment) } %>
55 <a href="#c<%= comment.id %>">
56 <svg width="16" height="16" fill="currentColor">
57 <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" />
58 <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" />
63 <%= comment.body.to_html %>
70 <% unless current_user %>
72 <%= link_to(t(".join_discussion"), login_path(:referer => request.fullpath)) %>
77 <% unless @changeset.open? %>
78 <form action="#" class="mb-3">
80 <textarea class="form-control" name="text" cols="40" rows="5"></textarea>
82 <div id="comment-error" class="alert alert-danger p-2 mb-3" hidden>
85 <%= tag.button t(".comment"),
86 :class => "btn btn-primary",
89 :data => { :method => "POST",
90 :url => api_changeset_changeset_comments_path(@changeset) } %>
95 <%= t(".still_open") %>
100 <% unless @ways.empty? %>
101 <%= render :partial => "elements", :locals => { :type => "way", :elements => @ways, :pages => @way_pages } %>
104 <% unless @relations.empty? %>
105 <%= render :partial => "elements", :locals => { :type => "relation", :elements => @relations, :pages => @relation_pages } %>
108 <% unless @nodes.empty? %>
109 <%= render :partial => "elements", :locals => { :type => "node", :elements => @nodes, :pages => @node_pages } %>
113 <div class='secondary-actions'>
114 <%= link_to t(".changesetxml"), api_changeset_path(@changeset) %>
116 <%= link_to t(".osmchangexml"), api_changeset_download_path(@changeset) %>
119 <% if @next_by_user || @prev_by_user %>
120 <div class='secondary-actions'>
121 <% if @prev_by_user %>
122 <%= link_to @prev_by_user, :class => "icon-link" do %>
123 <%= previous_page_svg_tag :height => 11 %>
124 <%= @prev_by_user.id %>
128 <%= user = (@prev_by_user || @next_by_user).user.display_name
129 link_to tag.bdi(user), :controller => "changesets", :action => "index", :display_name => user %>
130 <% if @next_by_user %>
132 <%= link_to @next_by_user, :class => "icon-link" do %>
133 <%= @next_by_user.id %>
134 <%= next_page_svg_tag :height => 11 %>