1 <% set_title(t(".title", :id => @changeset.id)) %>
3 <%= render "sidebar_header", :title => t(".title", :id => @changeset.id) %>
5 <div class="browse-section">
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 <button class="btn btn-sm btn-primary" name="unsubscribe" data-method="POST" data-url="<%= api_changeset_unsubscribe_url(@changeset) %>"><%= t("javascripts.changesets.show.unsubscribe") %></button>
23 <button class="btn btn-sm btn-primary" name="subscribe" data-method="POST" data-url="<%= api_changeset_subscribe_url(@changeset) %>"><%= t("javascripts.changesets.show.subscribe") %></button>
29 <% if @comments.length > 0 %>
30 <ul class="list-unstyled">
31 <% @comments.each do |comment| %>
32 <% next unless comment.visible || current_user&.moderator? %>
33 <li id="c<%= comment.id %>">
34 <small class='text-body-secondary'>
35 <%= t comment.visible ? ".comment_by_html" : ".hidden_comment_by_html",
36 :time_ago => friendly_date_ago(comment.created_at),
37 :user => link_to(comment.author.display_name, comment.author) %>
38 <% if current_user&.moderator? %>
40 <%= tag.button t("javascripts.changesets.show.#{comment.visible ? 'hide' : 'unhide'}_comment"),
41 :class => "btn btn-sm small btn-link link-secondary p-0 align-baseline",
42 :data => { :method => "POST",
43 :url => comment.visible ? changeset_comment_hide_url(comment) : changeset_comment_unhide_url(comment) } %>
47 <%= comment.body.to_html %>
54 <% unless current_user %>
56 <%= link_to(t(".join_discussion"), login_path(:referer => request.fullpath)) %>
61 <% unless @changeset.open? %>
62 <form action="#" class="mb-3">
64 <textarea class="form-control" name="text" cols="40" rows="5"></textarea>
66 <div id="comment-error" class="alert alert-danger p-2 mb-3" hidden>
69 <button name="comment" data-method="POST" data-url="<%= changeset_comment_url(@changeset) %>" disabled class="btn btn-sm btn-primary"><%= t("javascripts.changesets.show.comment") %></button>
74 <%= t(".still_open") %>
79 <% unless @ways.empty? %>
80 <%= render :partial => "elements", :locals => { :type => "way", :elements => @ways, :pages => @way_pages } %>
83 <% unless @relations.empty? %>
84 <%= render :partial => "elements", :locals => { :type => "relation", :elements => @relations, :pages => @relation_pages } %>
87 <% unless @nodes.empty? %>
88 <%= render :partial => "elements", :locals => { :type => "node", :elements => @nodes, :pages => @node_pages } %>
92 <div class='secondary-actions'>
93 <%= link_to(t(".changesetxml"), :controller => "api/changesets", :action => "show") %>
95 <%= link_to(t(".osmchangexml"), :controller => "api/changesets", :action => "download") %>
98 <% if @next_by_user || @prev_by_user %>
99 <div class='secondary-actions'>
100 <% if @prev_by_user %>
101 <%= link_to @prev_by_user, :class => "icon-link" do %>
102 <%= previous_page_svg_tag :height => 11 %>
103 <%= @prev_by_user.id %>
107 <%= user = (@prev_by_user || @next_by_user).user.display_name
108 link_to tag.bdi(user), :controller => "changesets", :action => "index", :display_name => user %>
109 <% if @next_by_user %>
111 <%= link_to @next_by_user, :class => "icon-link" do %>
112 <%= @next_by_user.id %>
113 <%= next_page_svg_tag :height => 11 %>