2016-01-09 14:30:34 -05:00
|
|
|
- user = spam_log.user
|
|
|
|
%tr
|
|
|
|
%td
|
2016-01-26 15:03:01 -05:00
|
|
|
= time_ago_with_tooltip(spam_log.created_at)
|
2016-01-09 14:30:34 -05:00
|
|
|
%td
|
|
|
|
- if user
|
2016-01-26 16:20:01 -05:00
|
|
|
= link_to user.name, [:admin, user]
|
|
|
|
.light.small
|
|
|
|
Joined #{time_ago_with_tooltip(user.created_at)}
|
2016-01-09 14:30:34 -05:00
|
|
|
- else
|
|
|
|
(removed)
|
|
|
|
%td
|
|
|
|
= spam_log.source_ip
|
|
|
|
%td
|
2016-01-26 16:20:01 -05:00
|
|
|
= spam_log.via_api? ? 'Y' : 'N'
|
2017-01-27 11:25:39 -05:00
|
|
|
%td
|
|
|
|
= spam_log.recaptcha_verified ? 'Y' : 'N'
|
2016-01-09 14:30:34 -05:00
|
|
|
%td
|
|
|
|
= spam_log.noteable_type
|
|
|
|
%td
|
|
|
|
= spam_log.title
|
|
|
|
%td
|
2016-01-26 13:59:23 -05:00
|
|
|
= truncate(spam_log.description, length: 100)
|
2016-01-09 14:30:34 -05:00
|
|
|
%td
|
|
|
|
- if user
|
|
|
|
= link_to 'Remove user', admin_spam_log_path(spam_log, remove_user: true),
|
2018-04-12 17:13:36 -04:00
|
|
|
data: { confirm: "USER #{user.name} WILL BE REMOVED! Are you sure?" }, method: :delete, class: "btn btn-sm btn-remove"
|
2016-01-09 14:30:34 -05:00
|
|
|
%td
|
2016-08-01 13:14:03 -04:00
|
|
|
- if spam_log.submitted_as_ham?
|
2018-04-12 17:13:36 -04:00
|
|
|
.btn.btn-sm.disabled
|
2016-08-02 17:21:57 -04:00
|
|
|
Submitted as ham
|
2016-08-01 13:14:03 -04:00
|
|
|
- else
|
2018-04-12 17:13:36 -04:00
|
|
|
= link_to 'Submit as ham', mark_as_ham_admin_spam_log_path(spam_log), method: :post, class: 'btn btn-sm btn-warning'
|
2016-01-09 14:30:34 -05:00
|
|
|
- if user && !user.blocked?
|
2018-04-12 17:13:36 -04:00
|
|
|
= link_to 'Block user', block_admin_user_path(user), data: {confirm: 'USER WILL BE BLOCKED! Are you sure?'}, method: :put, class: "btn btn-sm"
|
2016-01-09 14:30:34 -05:00
|
|
|
- else
|
2018-04-12 17:13:36 -04:00
|
|
|
.btn.btn-sm.disabled
|
2017-04-04 18:36:19 -04:00
|
|
|
Already blocked
|
2018-04-12 17:13:36 -04:00
|
|
|
= link_to 'Remove log', [:admin, spam_log], remote: true, method: :delete, class: "btn btn-sm btn-close js-remove-tr"
|