1 <% set_title(t('browse.changeset.title', :id => @changeset.id)) %>
 
   4   <a class="geolink" href="<%= root_path %>"><span class="icon close"></span></a>
 
   5   <%= t('browse.changeset.title', :id => @changeset.id) %>
 
   6   <% if @user and @user.id != @changeset.user.id %>
 
   7     <%= link_to new_issue_url(reportable_id: @changeset.id, reportable_type: @changeset.class.name, reported_user_id: @changeset.user.id,referer: request.fullpath), :title => t('browse.changeset.report') do %>
 
  15 <div class="browse-section">
 
  16   <h4><%= linkify(h(@changeset.tags['comment'].to_s.presence || t('browse.no_comment'))) %></h4>
 
  17   <div class="details"><%= changeset_details(@changeset) %></div>
 
  20   <%= render :partial => "tag_details", :object => @changeset.tags.except('comment') %>
 
  22   <h4 class="comments-header"><%= t('browse.changeset.discussion') %></h4>
 
  24   <div class="buttons clearfix subscribe-buttons">
 
  25     <form action="#" class="hide_unless_logged_in">
 
  26       <% if @user and @changeset.subscribers.exists?(@user.id) %>
 
  27         <input class="action-button" type="submit" name="unsubscribe" value="<%= t('javascripts.changesets.show.unsubscribe') %>" data-method="POST" data-url="<%= changeset_unsubscribe_url(@changeset) %>" />
 
  29         <input class="action-button" type="submit" name="subscribe" value="<%= t('javascripts.changesets.show.subscribe') %>" data-method="POST" data-url="<%= changeset_subscribe_url(@changeset) %>" />
 
  34   <div class="clearfix"></div>
 
  36   <% if @comments.length > 0 %>
 
  37     <div class='changeset-comments'>
 
  40           <% @comments.each do |comment| %>
 
  41             <% if comment.visible %>
 
  42               <li id="c<%= comment.id %>">
 
  43                 <small class='deemphasize'>
 
  44                   <%= t("browse.changeset.commented_by",
 
  45                     :when => friendly_date(comment.created_at), :exact_time => l(comment.created_at),
 
  46                     :user => link_to(h(comment.author.display_name), {:controller => "user", :action => "view",
 
  47                     :display_name => comment.author.display_name})).html_safe %>
 
  48                   <% if @user and @user.moderator? %>
 
  49                     — <span class="action-button deemphasize" data-comment-id="<%= comment.id %>" data-method="POST" data-url="<%= changeset_comment_hide_url(comment.id) %>"><%= t('javascripts.changesets.show.hide_comment') %></span>
 
  52                 <%= comment.body.to_html %>
 
  54             <% elsif @user and @user.moderator? %>
 
  55               <li id="c<%= comment.id %>">
 
  56                 <small class='deemphasize'>
 
  57                   <%= t("browse.changeset.hidden_commented_by",
 
  58                     :when => friendly_date(comment.created_at), :exact_time => l(comment.created_at),
 
  59                     :user => link_to(h(comment.author.display_name), {:controller => "user", :action => "view",
 
  60                     :display_name => comment.author.display_name})).html_safe %>
 
  61                   — <span class="action-button deemphasize" data-comment-id="<%= comment.id %>" data-method="POST" data-url="<%= changeset_comment_unhide_url(comment.id) %>"><%= t('javascripts.changesets.show.unhide_comment') %></span>
 
  63                 <%= comment.body.to_html %>
 
  72   <div class="notice hide_if_logged_in">
 
  73     <%= link_to(t("browse.changeset.join_discussion"), :controller => 'user', :action => 'login', :referer => request.fullpath) %>
 
  76   <% unless @changeset.is_open? %>
 
  77     <form action="#" class="hide_unless_logged_in">
 
  78       <textarea class="comment" name="text" cols="40" rows="5"></textarea>
 
  79       <div class="buttons clearfix">
 
  80         <input type="submit" name="comment" value="<%= t('javascripts.changesets.show.comment') %>" data-changeset-id="<%= @changeset.id %>" data-method="POST" data-url="<%= changeset_comment_url(@changeset) %>" disabled="1"/>
 
  85   <% unless @ways.empty? %>
 
  87       <%= type_and_paginated_count('way', @way_pages) %>
 
  88       <%= render :partial => 'paging_nav', :locals => { :pages => @way_pages, :page_param => "way_page" } %>
 
  91       <% @ways.each do |way| %>
 
  92         <li><%= link_to printable_name(way, true), { :action => "way", :id => way.way_id.to_s }, :class => link_class('way', way), :title => link_title(way) %></li>
 
  97   <% unless @relations.empty? %>
 
  99       <%= type_and_paginated_count('relation', @relation_pages) %>
 
 100       <%= render :partial => 'paging_nav', :locals => { :pages => @relation_pages, :page_param => "relation_page" } %>
 
 103       <% @relations.each do |relation| %>
 
 104         <li><%= link_to printable_name(relation, true), { :action => "relation", :id => relation.relation_id.to_s }, :class => link_class('relation', relation), :title => link_title(relation) %></li>
 
 109   <% unless @nodes.empty? %>
 
 111       <%= type_and_paginated_count('node', @node_pages) %>
 
 112       <%= render :partial => 'paging_nav', :locals => { :pages => @node_pages, :page_param => "node_page"} %>
 
 115       <% @nodes.each do |node| %>
 
 116         <li><%= link_to printable_name(node, true), { :action => "node", :id => node.node_id.to_s }, :class => link_class('node', node), :title => link_title(node), :rel => link_follow(node) %></li>
 
 122 <% if @next_by_user || @prev_by_user %>
 
 123   <div class='secondary-actions'>
 
 124     <% if @prev_by_user %>
 
 125       <%= link_to "<< #{@prev_by_user.id}", :id => @prev_by_user.id %>
 
 129         user = (@prev_by_user || @next_by_user).user.display_name
 
 130         link_to content_tag(:bdi, user), :controller => "changeset", :action => "list", :display_name => user
 
 132     <% if @next_by_user %>
 
 134       <%= link_to "#{@next_by_user.id} >>", :id => @next_by_user.id %>
 
 139 <div class='secondary-actions'>
 
 140   <%= link_to(t('browse.changeset.changesetxml'), :controller => "changeset", :action => "read") %>
 
 142   <%= link_to(t('browse.changeset.osmchangexml'), :controller => "changeset", :action => "download") %>