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(".#{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 <%= tag.button t(".comment"),
70 :class => "btn btn-primary",
73 :data => { :method => "POST",
74 :url => changeset_comment_url(@changeset) } %>
79 <%= t(".still_open") %>
84 <% unless @ways.empty? %>
85 <%= render :partial => "paging_nav", :locals => { :type => "way", :pages => @way_pages } %>
86 <ul class="list-unstyled">
87 <% @ways.each do |way| %>
88 <%= element_list_item "way", way do
89 t "printable_name.current_and_old_links_html",
90 :current_link => link_to(printable_element_name(way), way_path(way.way_id)),
91 :old_link => link_to(printable_element_version(way), old_way_path(way.way_id, way.version))
97 <% unless @relations.empty? %>
98 <%= render :partial => "paging_nav", :locals => { :type => "relation", :pages => @relation_pages } %>
99 <ul class="list-unstyled">
100 <% @relations.each do |relation| %>
101 <%= element_list_item "relation", relation do
102 t "printable_name.current_and_old_links_html",
103 :current_link => link_to(printable_element_name(relation), relation_path(relation.relation_id)),
104 :old_link => link_to(printable_element_version(relation), old_relation_path(relation.relation_id, relation.version))
110 <% unless @nodes.empty? %>
111 <%= render :partial => "paging_nav", :locals => { :type => "node", :pages => @node_pages } %>
112 <ul class="list-unstyled">
113 <% @nodes.each do |node| %>
114 <%= element_list_item "node", node do
115 t "printable_name.current_and_old_links_html",
116 :current_link => link_to(printable_element_name(node), node_path(node.node_id), { :rel => link_follow(node) }),
117 :old_link => link_to(printable_element_version(node), old_node_path(node.node_id, node.version), { :rel => link_follow(node) })
124 <div class='secondary-actions'>
125 <%= link_to(t(".changesetxml"), :controller => "api/changesets", :action => "show") %>
127 <%= link_to(t(".osmchangexml"), :controller => "api/changesets", :action => "download") %>
130 <% if @next_by_user || @prev_by_user %>
131 <div class='secondary-actions'>
132 <% if @prev_by_user %>
133 <%= link_to @prev_by_user, :class => "icon-link" do %>
134 <%= previous_page_svg_tag :height => 11 %>
135 <%= @prev_by_user.id %>
139 <%= user = (@prev_by_user || @next_by_user).user.display_name
140 link_to tag.bdi(user), :controller => "changesets", :action => "index", :display_name => user %>
141 <% if @next_by_user %>
143 <%= link_to @next_by_user, :class => "icon-link" do %>
144 <%= @next_by_user.id %>
145 <%= next_page_svg_tag :height => 11 %>