X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/9748ce301c9488b9cd32439448770c3d4a38ebd6..aca9bd205e78ac5f5d37489b2583817c178a6f8e:/app/views/notes/show.html.erb
diff --git a/app/views/notes/show.html.erb b/app/views/notes/show.html.erb
index 3373b0b6d..8dda65c25 100644
--- a/app/views/notes/show.html.erb
+++ b/app/views/notes/show.html.erb
@@ -4,7 +4,7 @@
<%= t(".description") %>
-
+
<%= h(@note_comments.first.body.to_html) %>
@@ -25,16 +25,44 @@
<% if @note_comments.find { |comment| comment.author.nil? } -%>
-
<%= t "javascripts.notes.show.anonymous_warning" %>
+
<%= t ".anonymous_warning" %>
<% end -%>
+
+
+
<%= t(".discussion") %>
+
+
+ <% if current_user %>
+
+ <% if @note.subscribers.exists?(current_user.id) %>
+ <%= tag.button t(".unsubscribe"),
+ :type => "button",
+ :class => "btn btn-sm btn-primary",
+ :name => "unsubscribe",
+ :data => { :method => "DELETE",
+ :url => api_note_subscription_path(@note) } %>
+ <% else %>
+ <%= tag.button t(".subscribe"),
+ :type => "button",
+ :class => "btn btn-sm btn-primary",
+ :name => "subscribe",
+ :data => { :method => "POST",
+ :url => api_note_subscription_path(@note) } %>
+ <% end %>
+
+ <% end %>
+
+
<% if @note_comments.length > 1 %>
<% @note_comments.drop(1).each do |comment| %>-
- <%= note_event(comment.event, comment.created_at, comment.author) %>
- <%= comment.body.to_html %>
+ <%= note_event(comment.event, comment.created_at, comment.author) %>
+
+ <%= comment.body.to_html %>
+
<% end %>
@@ -47,24 +75,44 @@+ <%= link_to t(".log_in_to_comment"), login_path(:referer => request.fullpath) %> +
<% end -%> <% else %>