debian-mirror-gitlab/app/views/admin/spam_logs/_spam_log.html.haml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

42 lines
1.8 KiB
Text
Raw Normal View History

2016-04-02 18:10:28 +05:30
- user = spam_log.user
%tr
%td
= time_ago_with_tooltip(spam_log.created_at)
%td
- if user
= link_to user.name, [:admin, user]
.light.small
2021-04-29 21:17:54 +05:30
= _('Joined %{user_created_time}').html_safe % { user_created_time: time_ago_with_tooltip(user.created_at) }
2016-04-02 18:10:28 +05:30
- else
2021-04-29 21:17:54 +05:30
= _('(removed)')
2016-04-02 18:10:28 +05:30
%td
= spam_log.source_ip
%td
= spam_log.via_api? ? 'Y' : 'N'
2017-08-17 22:00:37 +05:30
%td
= spam_log.recaptcha_verified ? 'Y' : 'N'
2016-04-02 18:10:28 +05:30
%td
= spam_log.noteable_type
%td
= spam_log.title
%td
= truncate(spam_log.description, length: 100)
%td
- if user
2021-04-29 21:17:54 +05:30
= link_to _('Remove user'), admin_spam_log_path(spam_log, remove_user: true),
2022-05-07 20:08:51 +05:30
data: { confirm: _("USER %{user_name} WILL BE REMOVED! Are you sure?") % { user_name: user.name }, confirm_btn_variant: 'danger' }, aria: { label: _('Remove user') }, method: :delete, class: "gl-button btn btn-sm btn-danger"
2016-04-02 18:10:28 +05:30
%td
2022-10-11 01:57:18 +05:30
-# TODO: Remove conditonal once spamcheck supports this https://gitlab.com/gitlab-com/gl-security/engineering-and-research/automation-team/spam/spamcheck/-/issues/190
- if akismet_enabled?
- if spam_log.submitted_as_ham?
.gl-button.btn.btn-default.btn-sm.disabled.gl-mb-3
= _("Submitted as ham")
- else
= link_to _('Submit as ham'), mark_as_ham_admin_spam_log_path(spam_log), method: :post, class: 'gl-button btn btn-default btn-sm gl-mb-3'
2016-04-02 18:10:28 +05:30
- if user && !user.blocked?
2021-04-29 21:17:54 +05:30
= link_to _('Block user'), block_admin_user_path(user), data: {confirm: _('USER WILL BE BLOCKED! Are you sure?')}, method: :put, class: "gl-button btn btn-default btn-sm gl-mb-3"
2016-04-02 18:10:28 +05:30
- else
2021-04-29 21:17:54 +05:30
.gl-button.btn.btn-default.btn-sm.disabled.gl-mb-3
2017-08-17 22:00:37 +05:30
Already blocked
2021-04-29 21:17:54 +05:30
= link_to _('Remove log'), [:admin, spam_log], remote: true, method: :delete, class: "gl-button btn btn-default btn-sm btn-close js-remove-tr"