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 <%= 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 <%= t comment.visible ? ".comment_by_html" : ".hidden_comment_by_html",
44 :time_ago => friendly_date_ago(comment.created_at),
45 :user => link_to(comment.author.display_name, comment.author) %>
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 => "paging_nav", :locals => { :type => "way", :pages => @way_pages } %>
94 <ul class="list-unstyled">
95 <% @ways.each do |way| %>
96 <%= element_list_item "way", way do
97 t "printable_name.current_and_old_links_html",
98 :current_link => link_to(printable_element_name(way), way_path(way.way_id)),
99 :old_link => link_to(printable_element_version(way), old_way_path(way.way_id, way.version))
105 <% unless @relations.empty? %>
106 <%= render :partial => "paging_nav", :locals => { :type => "relation", :pages => @relation_pages } %>
107 <ul class="list-unstyled">
108 <% @relations.each do |relation| %>
109 <%= element_list_item "relation", relation do
110 t "printable_name.current_and_old_links_html",
111 :current_link => link_to(printable_element_name(relation), relation_path(relation.relation_id)),
112 :old_link => link_to(printable_element_version(relation), old_relation_path(relation.relation_id, relation.version))
118 <% unless @nodes.empty? %>
119 <%= render :partial => "paging_nav", :locals => { :type => "node", :pages => @node_pages } %>
120 <ul class="list-unstyled">
121 <% @nodes.each do |node| %>
122 <%= element_list_item "node", node do
123 t "printable_name.current_and_old_links_html",
124 :current_link => link_to(printable_element_name(node), node_path(node.node_id), { :rel => link_follow(node) }),
125 :old_link => link_to(printable_element_version(node), old_node_path(node.node_id, node.version), { :rel => link_follow(node) })
132 <div class='secondary-actions'>
133 <%= link_to(t(".changesetxml"), :controller => "api/changesets", :action => "show") %>
135 <%= link_to(t(".osmchangexml"), :controller => "api/changesets", :action => "download") %>
138 <% if @next_by_user || @prev_by_user %>
139 <div class='secondary-actions'>
140 <% if @prev_by_user %>
141 <%= link_to @prev_by_user, :class => "icon-link" do %>
142 <%= previous_page_svg_tag :height => 11 %>
143 <%= @prev_by_user.id %>
147 <%= user = (@prev_by_user || @next_by_user).user.display_name
148 link_to tag.bdi(user), :controller => "changesets", :action => "index", :display_name => user %>
149 <% if @next_by_user %>
151 <%= link_to @next_by_user, :class => "icon-link" do %>
152 <%= @next_by_user.id %>
153 <%= next_page_svg_tag :height => 11 %>