- url_namespace = admin_signed_in? ? :admin : :assessor
li.form_answer_attachment
  = link_to [url_namespace, form_answer_attachment.form_answer, form_answer_attachment],
            target: "_blank",
            class: "ellipsis"
    span.action-title
      span.glyphicon.glyphicon-file
      = form_answer_attachment.decorate.display_name
  - if form_answer_attachment.uploaded_not_by_user? && policy(form_answer_attachment).destroy?
    small.pull-right
      = form_for(form_answer_attachment, url: admin_form_answer_form_answer_attachment_path(form_answer_attachment.form_answer, form_answer_attachment), html: {method: :delete, style: 'display:inline-block;'}) do |f|
        = f.submit 'Remove', class: 'if-js-hide'

        = link_to "#", class: "text-danger if-no-js-hide"
          span.glyphicon.glyphicon-remove
          span.visible-lg.visible-md
            ' Remove

- url_namespace = admin_signed_in? ? :admin : :assessor
li.form_answer_attachment
  = link_to [url_namespace, form_answer_attachment.form_answer, form_answer_attachment],
            target: "_blank",
            class: "ellipsis"
    span.action-title
      span.glyphicon.glyphicon-file
      = form_answer_attachment.decorate.display_name
  - if form_answer_attachment.uploaded_not_by_user? && policy(form_answer_attachment).destroy?
    small.pull-right
      = form_for(form_answer_attachment, url: admin_form_answer_form_answer_attachment_path(form_answer_attachment.form_answer, form_answer_attachment), html: {method: :delete, style: 'display:inline-block;'}) do |f|
        = f.submit 'Remove', class: 'if-js-hide'

        = link_to "#", class: "text-danger if-no-js-hide", data: {confirm: "Are you sure?"}
          span.glyphicon.glyphicon-remove
          span.visible-lg.visible-md
            ' Remove

Add confirmation on removing admin attachments
Add confirmation on removing admin attachments

bitzesty/qae,bitzesty/qae,bitzesty/qae,bitzesty/qae