delete unnecessary comments

This commit is contained in:
Luna D 2019-12-10 15:35:04 -05:00
parent b9a4a104c1
commit 53183d70f0
No known key found for this signature in database
GPG key ID: D0F46C94720BAA4B

View file

@ -25,7 +25,6 @@ article.block.communication id="comment_#{@comment.id}"
= render PhilomenaWeb.CommentView, "_comment_options.html", comment: @comment, conn: @conn
= if can?(@conn, :hide, @comment) do
.js-staff-action
/ todo: make delete button work
= case @comment.destroyed_content do
- true ->
- _false ->
@ -50,25 +49,3 @@ article.block.communication id="comment_#{@comment.id}"
= form_for :comment, Routes.image_comment_hide_path(@conn, :create, @comment.image_id, @comment), [class: "togglable-delete-form hidden flex", id: "inline-del-form-comment-#{@comment.id}"], fn f ->
= text_input f, :deletion_reason, class: "input input--wide", placeholder: "Deletion Reason", id: "inline-del-reason-comment-#{@comment.id}", required: true
= submit "Delete", class: "button"
/- if can?(:hide, Comment)
/ .js-staff-action
/ - if !comment.hidden_from_users && !comment.destroyed_content
/ =<> link_to '#', class: 'communication__interaction togglable-delete-form-link', 'data-click-toggle': "#inline-del-form-comment-#{comment.id}" do
/ i.fa.fa-times
/ =<> 'Delete'
/ - elsif comment.hidden_from_users && !comment.destroyed_content
/ =<> link_to image_comment_hide_path(comment.image, comment), data: { confirm: t('are_you_sure') }, method: :delete, class: 'communication__interaction' do
/ i.fa.fa-check
/ =<> 'Restore'
/ - if can?(:manage, Comment)
/ =<> link_to image_comment_path(comment.image, comment), method: :delete, data: { confirm: t('are_you_sure') }, class: 'communication__interaction' do
/ i.fa.fa-times
/ =<> 'Delete Contents'
/ - if can?(:manage, Comment)
/ .communication__info
/ =<> link_to_ip(comment.ip)
/ .communication__info
/ =<> link_to_fingerprint(comment.fingerprint, comment.user_agent)
/ = form_tag image_comment_hide_path(comment.image, comment), class: 'togglable-delete-form hidden flex', id: "inline-del-form-comment-#{comment.id}"
/ = text_field_tag :deletion_reason, nil, class: 'input input--wide', placeholder: 'Deletion Reason', id: "inline-del-reason-comment-#{comment.id}", required: true
/ = submit_tag 'Delete', class: 'button'