1 <% set_title(t(".title", :id => @note.id)) %>
3 <%= render "sidebar_header", :title => t(".#{@note.status}_title", :note_name => @note.id) %>
6 <h4><%= t(".description") %></h4>
7 <div class="note-description">
8 <%= h(@note_comments.first.body.to_html) %>
11 <div class="details" data-coordinates="<%= @note.lat %>,<%= @note.lon %>" data-status="<%= @note.status %>">
12 <ul class="list-unstyled">
13 <li><%= note_event("opened", @note.created_at, @note.author) %></li>
14 <% if @note.status == "closed" %>
15 <li><%= note_event(@note.status, @note.closed_at, @note.all_comments.last.author) %></li>
18 <%= t "browse.location" %>
19 <%= link_to(t(".coordinates_html",
20 :latitude => tag.span(number_with_delimiter(@note.lat), :class => "latitude"),
21 :longitude => tag.span(number_with_delimiter(@note.lon), :class => "longitude")),
22 root_path(:anchor => "map=18/#{@note.lat}/#{@note.lon}")) %>
27 <% if @note_comments.find { |comment| comment.author.nil? } -%>
28 <p class='alert alert-warning'><%= t ".anonymous_warning" %></p>
31 <% if @note_comments.length > 1 %>
32 <div class='note-comments'>
33 <ul class="list-unstyled">
34 <% @note_comments.drop(1).each do |comment| %>
35 <li id="c<%= comment.id %>">
36 <small class='text-muted'><%= note_event(comment.event, comment.created_at, comment.author) %></small>
38 <%= comment.body.to_html %>
46 <% if @note.status == "open" %>
47 <% if current_user -%>
48 <form class="mb-3" action="#">
50 <textarea class="form-control" name="text" cols="40" rows="5" maxlength="2000"></textarea>
52 <div class="btn-wrapper">
53 <% if current_user.moderator? -%>
54 <%= submit_tag t(".hide"), :name => "hide", :class => "btn btn-light",
55 :data => { :method => "DELETE",
56 :url => api_note_url(@note, "json") } %>
58 <%= submit_tag t(".resolve"), :name => "close", :class => "btn btn-primary",
59 :data => { :method => "POST",
60 :url => close_api_note_url(@note, "json"),
61 :default_action_text => t(".resolve"),
62 :comment_action_text => t(".comment_and_resolve") } %>
63 <%= submit_tag t(".comment"), :name => "comment", :class => "btn btn-primary", :disabled => true,
64 :data => { :method => "POST",
65 :url => comment_api_note_url(@note, "json") } %>
70 <%= link_to t(".log_in_to_comment"), login_path(:referer => request.fullpath) %>
74 <form class="mb-3" action="#">
75 <input type="hidden" name="text" value="" autocomplete="off">
76 <div class="btn-wrapper">
77 <% if @note.status != "hidden" and current_user and current_user.moderator? -%>
78 <input type="submit" name="hide" value="<%= t(".hide") %>" class="btn btn-light" data-method="DELETE" data-url="<%= api_note_url(@note, "json") %>">
80 <% if current_user -%>
81 <input type="submit" name="reopen" value="<%= t(".reactivate") %>" class="btn btn-primary" data-method="POST" data-url="<%= reopen_api_note_url(@note, "json") %>">
87 <% if current_user && current_user != @note.author %>
89 <small class="text-muted">
90 <%= t ".report_link_html", :link => report_link(t(".report"), @note) %>
91 <% if @note.status == "open" %>
92 <%= t ".other_problems_resolve", :link => report_link(t(".report"), @note) %>
93 <% elsif @note.status == "closed" %>
94 <%= t ".other_problems_resolved" %>
100 <% if @note.freshly_closed? %>
101 <small class="text-muted">
102 <%= t ".disappear_date_html", :disappear_in => friendly_date(@note.freshly_closed_until) %>