From 718b1dddfe8d7422e8de8b2fbbd8357fc1c3b5e4 Mon Sep 17 00:00:00 2001 From: Douglas Barbosa Alexandre Date: Tue, 26 Jan 2016 19:20:01 -0200 Subject: Refactor Admin::SpamLogsController to block user before destroying --- app/views/admin/spam_logs/_spam_log.html.haml | 8 +++++--- app/views/admin/spam_logs/index.html.haml | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'app/views/admin/spam_logs') diff --git a/app/views/admin/spam_logs/_spam_log.html.haml b/app/views/admin/spam_logs/_spam_log.html.haml index 51e94acce22..8aea67f4497 100644 --- a/app/views/admin/spam_logs/_spam_log.html.haml +++ b/app/views/admin/spam_logs/_spam_log.html.haml @@ -4,13 +4,15 @@ = time_ago_with_tooltip(spam_log.created_at) %td - if user - = link_to user.name, user + = link_to user.name, [:admin, user] + .light.small + Joined #{time_ago_with_tooltip(user.created_at)} - else (removed) %td = spam_log.source_ip %td - = spam_log.via_api ? 'Y' : 'N' + = spam_log.via_api? ? 'Y' : 'N' %td = spam_log.noteable_type %td @@ -27,4 +29,4 @@ - else .btn.btn-xs.disabled Already Blocked - = link_to 'Remove log', [:admin, spam_log, format: :json], remote: true, method: :delete, class: "btn btn-xs btn-close js-remove-tr" + = link_to 'Remove log', [:admin, spam_log], remote: true, method: :delete, class: "btn btn-xs btn-close js-remove-tr" diff --git a/app/views/admin/spam_logs/index.html.haml b/app/views/admin/spam_logs/index.html.haml index 439468e572b..0fdd5bd9960 100644 --- a/app/views/admin/spam_logs/index.html.haml +++ b/app/views/admin/spam_logs/index.html.haml @@ -9,7 +9,7 @@ %th Date %th User %th Source IP - %th Via API? + %th API? %th Type %th Title %th Description -- cgit v1.2.3