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="overflow-hidden ms-2">
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>
33 <h4><%= t(".discussion") %></h4>
37 <div class="col-auto">
38 <% if @note.subscribers.exists?(current_user.id) %>
39 <%= tag.button t(".unsubscribe"),
41 :class => "btn btn-sm btn-primary",
42 :name => "unsubscribe",
43 :data => { :method => "DELETE",
44 :url => api_note_subscription_path(@note) } %>
46 <%= tag.button t(".subscribe"),
48 :class => "btn btn-sm btn-primary",
50 :data => { :method => "POST",
51 :url => api_note_subscription_path(@note) } %>
57 <% if @note_comments.length > 1 %>
58 <div class='note-comments'>
59 <ul class="list-unstyled">
60 <% @note_comments.drop(1).each do |comment| %>
61 <li id="c<%= comment.id %>">
62 <small class='text-body-secondary'><%= note_event(comment.event, comment.created_at, comment.author) %></small>
64 <%= comment.body.to_html %>
72 <% if @note.status == "open" %>
73 <% if current_user -%>
74 <form class="mb-3" action="#">
76 <textarea class="form-control" name="text" cols="40" rows="5" maxlength="2000"></textarea>
78 <div id="comment-error" class="alert alert-danger p-2 mb-3" hidden>
80 <div class="d-flex flex-wrap gap-1">
81 <% if current_user.moderator? -%>
82 <%= button_tag t(".hide"), :name => "hide", :class => "btn btn-light",
83 :data => { :method => "DELETE",
84 :url => api_note_url(@note, "json") } %>
86 <%= button_tag t(".resolve"), :name => "close", :class => "btn btn-primary",
87 :data => { :method => "POST",
88 :url => close_api_note_url(@note, "json"),
89 :default_action_text => t(".resolve"),
90 :comment_action_text => t(".comment_and_resolve") } %>
91 <%= button_tag t(".comment"), :name => "comment", :class => "btn btn-primary", :disabled => true,
92 :data => { :method => "POST",
93 :url => comment_api_note_url(@note, "json") } %>
98 <%= link_to t(".log_in_to_comment"), login_path(:referer => request.fullpath) %>
102 <form class="mb-3" action="#">
103 <input type="hidden" name="text" value="" autocomplete="off">
104 <div id="comment-error" class="alert alert-danger p-2 mb-3" hidden>
106 <div class="d-flex flex-wrap gap-1">
107 <% if @note.status != "hidden" and current_user and current_user.moderator? -%>
108 <%= button_tag t(".hide"), :name => "hide", :class => "btn btn-light",
109 :data => { :method => "DELETE",
110 :url => api_note_url(@note, "json") } %>
112 <% if current_user -%>
113 <%= button_tag t(".reactivate"), :name => "reopen", :class => "btn btn-primary",
114 :data => { :method => "POST",
115 :url => reopen_api_note_url(@note, "json") } %>
121 <% if current_user && current_user != @note.author %>
123 <small class="text-body-secondary">
124 <%= t ".report_link_html", :link => report_link(t(".report"), @note) %>
125 <% if @note.status == "open" %>
126 <%= t ".other_problems_resolve", :link => report_link(t(".report"), @note) %>
127 <% elsif @note.status == "closed" %>
128 <%= t ".other_problems_resolved" %>
134 <% if @note.freshly_closed? %>
135 <small class="text-body-secondary">
136 <%= t ".disappear_date_html", :disappear_in => friendly_date(@note.freshly_closed_until) %>