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 => "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="<%= 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="<%= changeset_subscribe_url(@changeset) %>"><%= t("javascripts.changesets.show.subscribe") %></button>
29 <% if @comments.length > 0 %>
31 <ul class="list-unstyled">
32 <% @comments.each do |comment| %>
33 <% next unless comment.visible || current_user&.moderator? %>
34 <li id="c<%= comment.id %>">
35 <small class='text-muted'>
36 <%= t(comment.visible ? ".comment_by_html" : ".hidden_comment_by_html",
37 :time_ago => friendly_date_ago(comment.created_at),
38 :user => link_to(comment.author.display_name, user_path(comment.author))) %>
39 <% if current_user&.moderator? %>
41 <%= tag.button t("javascripts.changesets.show.#{comment.visible ? 'hide' : 'unhide'}_comment"),
42 :class => "btn btn-sm small btn-link link-secondary p-0 align-baseline",
43 :data => { :method => "POST",
44 :url => comment.visible ? changeset_comment_hide_url(comment) : changeset_comment_unhide_url(comment) } %>
48 <%= comment.body.to_html %>
56 <% unless current_user %>
58 <%= link_to(t(".join_discussion"), login_path(:referer => request.fullpath)) %>
63 <% unless @changeset.open? %>
64 <form action="#" class="mb-3">
66 <textarea class="form-control" name="text" cols="40" rows="5"></textarea>
68 <div id="comment-error" class="alert alert-danger p-2 mb-3" hidden>
71 <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>
76 <%= t(".still_open") %>
81 <% unless @ways.empty? %>
82 <%= render :partial => "paging_nav", :locals => { :heading => type_and_paginated_count("way", @way_pages), :pages => @way_pages, :page_param => "way_page" } %>
83 <ul class="list-unstyled">
84 <% @ways.each do |way| %>
85 <li><%= link_to printable_name(way, :version => true), { :action => "way", :id => way.way_id.to_s }, { :class => link_class("way", way), :title => link_title(way) } %></li>
90 <% unless @relations.empty? %>
91 <%= render :partial => "paging_nav", :locals => { :heading => type_and_paginated_count("relation", @relation_pages), :pages => @relation_pages, :page_param => "relation_page" } %>
92 <ul class="list-unstyled">
93 <% @relations.each do |relation| %>
94 <li><%= link_to printable_name(relation, :version => true), { :action => "relation", :id => relation.relation_id.to_s }, { :class => link_class("relation", relation), :title => link_title(relation) } %></li>
99 <% unless @nodes.empty? %>
100 <%= render :partial => "paging_nav", :locals => { :heading => type_and_paginated_count("node", @node_pages), :pages => @node_pages, :page_param => "node_page" } %>
101 <ul class="list-unstyled">
102 <% @nodes.each do |node| %>
103 <li><%= link_to printable_name(node, :version => true), { :action => "node", :id => node.node_id.to_s }, { :class => link_class("node", node), :title => link_title(node), :rel => link_follow(node) } %></li>
109 <% if @next_by_user || @prev_by_user %>
110 <div class='secondary-actions'>
111 <% if @prev_by_user %>
112 <%= link_to({ :id => @prev_by_user.id }, :class => "icon-link") do %>
113 <%= previous_page_svg_tag :height => 11 %>
114 <%= @prev_by_user.id %>
118 <%= user = (@prev_by_user || @next_by_user).user.display_name
119 link_to tag.bdi(user), :controller => "changesets", :action => "index", :display_name => user %>
120 <% if @next_by_user %>
122 <%= link_to({ :id => @next_by_user.id }, :class => "icon-link") do %>
123 <%= @next_by_user.id %>
124 <%= next_page_svg_tag :height => 11 %>
130 <div class='secondary-actions'>
131 <%= link_to(t(".changesetxml"), :controller => "api/changesets", :action => "show") %>
133 <%= link_to(t(".osmchangexml"), :controller => "api/changesets", :action => "download") %>