X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/9bb8dd739a4342441e97254bbf5073f9df022672..c47a40c1db59f0d0f836fbcd1b876390befe796e:/app/views/notes/show.html.erb
diff --git a/app/views/notes/show.html.erb b/app/views/notes/show.html.erb
index 980b5062c..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,27 +75,44 @@+ <%= link_to t(".log_in_to_comment"), login_path(:referer => request.fullpath) %> +
<% end -%> <% else %>