]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/browse/changeset.html.erb
Show api error message if failed to (un)subscribe
[rails.git] / app / views / browse / changeset.html.erb
index 4fe82d12084218effdb21cb366c9ba94a95700f3..88d90d0f79ea252eb82dc8bf6a971c5d6bfb1bd2 100644 (file)
   </div>
 
   <% if @comments.length > 0 %>
-    <form action="#">
-      <ul class="list-unstyled">
-        <% @comments.each do |comment| %>
-          <% next unless comment.visible || current_user&.moderator? %>
-          <li id="c<%= comment.id %>">
-            <small class='text-muted'>
-              <%= t(comment.visible ? ".comment_by_html" : ".hidden_comment_by_html",
-                    :time_ago => friendly_date_ago(comment.created_at),
-                    :user => link_to(comment.author.display_name, user_path(comment.author))) %>
-              <% if current_user&.moderator? %>
-                —
-                <%= tag.button t("javascripts.changesets.show.#{comment.visible ? 'hide' : 'unhide'}_comment"),
-                               :class => "btn btn-sm small btn-link link-secondary p-0 align-baseline",
-                               :data => { :method => "POST",
-                                          :url => comment.visible ? changeset_comment_hide_url(comment) : changeset_comment_unhide_url(comment) } %>
-              <% end %>
-            </small>
-            <div class="mx-2">
-              <%= comment.body.to_html %>
-            </div>
-          </li>
-        <% end %>
-      </ul>
-    </form>
+    <ul class="list-unstyled">
+      <% @comments.each do |comment| %>
+        <% next unless comment.visible || current_user&.moderator? %>
+        <li id="c<%= comment.id %>">
+          <small class='text-muted'>
+            <%= t comment.visible ? ".comment_by_html" : ".hidden_comment_by_html",
+                  :time_ago => friendly_date_ago(comment.created_at),
+                  :user => link_to(comment.author.display_name, user_path(comment.author)) %>
+            <% if current_user&.moderator? %>
+              —
+              <%= tag.button t("javascripts.changesets.show.#{comment.visible ? 'hide' : 'unhide'}_comment"),
+                             :class => "btn btn-sm small btn-link link-secondary p-0 align-baseline",
+                             :data => { :method => "POST",
+                                        :url => comment.visible ? changeset_comment_hide_url(comment) : changeset_comment_unhide_url(comment) } %>
+            <% end %>
+          </small>
+          <div class="mx-2">
+            <%= comment.body.to_html %>
+          </div>
+        </li>
+      <% end %>
+    </ul>
   <% end %>
 
   <% unless current_user %>