BigW Consortium Gitlab

_spam_log.html.haml 1.23 KB
Newer Older
1 2 3
- user = spam_log.user
%tr
  %td
4
    = time_ago_with_tooltip(spam_log.created_at)
5 6
  %td
    - if user
7 8 9
      = link_to user.name, [:admin, user]
      .light.small
        Joined #{time_ago_with_tooltip(user.created_at)}
10 11 12 13 14
    - else
      (removed)
  %td
    = spam_log.source_ip
  %td
15
    = spam_log.via_api? ? 'Y' : 'N'
16 17 18 19 20
  %td
    = spam_log.noteable_type
  %td
    = spam_log.title
  %td
21
    = truncate(spam_log.description, length: 100)
22 23 24 25 26
  %td
    - if user
      = link_to 'Remove user', admin_spam_log_path(spam_log, remove_user: true),
        data: { confirm: "USER #{user.name} WILL BE REMOVED! Are you sure?" }, method: :delete, class: "btn btn-xs btn-remove"
  %td
27 28
    - if spam_log.submitted_as_ham?
      .btn.btn-xs.disabled
29
        Submitted as ham
30 31
    - else
      = link_to 'Submit as ham', mark_as_ham_admin_spam_log_path(spam_log), method: :post, class: 'btn btn-xs btn-warning'
32 33 34 35 36
    - if user && !user.blocked?
      = link_to 'Block user', block_admin_user_path(user), data: {confirm: 'USER WILL BE BLOCKED! Are you sure?'}, method: :put, class: "btn btn-xs"
    - else
      .btn.btn-xs.disabled
        Already Blocked
37
    = link_to 'Remove log', [:admin, spam_log], remote: true, method: :delete, class: "btn btn-xs btn-close js-remove-tr"