diff --git a/app/views/_tailwind/comments/_actions.html.erb b/app/views/_tailwind/comments/_actions.html.erb new file mode 100644 index 000000000..c3abd9c80 --- /dev/null +++ b/app/views/_tailwind/comments/_actions.html.erb @@ -0,0 +1,17 @@ +<%# TODO: Link to correct place %> +<%= link_to "Report this comment", "#", class: "text-fuchsia text-xl hover:underline" %> + +<% +=begin +%> + +<% if current_user&.admin? %> + <%= link_to "admin", admin_comment_path(comment), class: "comment-action" %> +<% end %> +<% unless current_page?(new_comment_report_path(comment.id)) %> + <%= link_to "report comment", new_comment_report_path(comment), title: "Report this comment by #{comment.name} for removal", class: "comment-action" %> +<% end %> + +<% +=end +%> \ No newline at end of file diff --git a/app/views/_tailwind/comments/_comment.html.erb b/app/views/_tailwind/comments/_comment.html.erb index 5a6159085..0b680a5b3 100644 --- a/app/views/_tailwind/comments/_comment.html.erb +++ b/app/views/_tailwind/comments/_comment.html.erb @@ -32,8 +32,7 @@ <%# TODO: Make this show the correct thing %>
Delivered to the planning authority
- <%# TODO: Link to correct place %> - <%= link_to "Report this comment", "#", class: "text-fuchsia text-xl hover:underline" %> + <%= render "comments/actions", comment: %>
<% end %>