2023-05-27 22:25:52 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Sidebars
|
2023-06-20 00:43:36 +05:30
|
|
|
module Admin
|
2023-05-27 22:25:52 +05:30
|
|
|
module Menus
|
2023-06-20 00:43:36 +05:30
|
|
|
class SpamLogsMenu < ::Sidebars::Menu
|
2023-05-27 22:25:52 +05:30
|
|
|
override :link
|
|
|
|
def link
|
2023-06-20 00:43:36 +05:30
|
|
|
admin_spam_logs_path
|
2023-05-27 22:25:52 +05:30
|
|
|
end
|
|
|
|
|
|
|
|
override :title
|
|
|
|
def title
|
2023-06-20 00:43:36 +05:30
|
|
|
s_('Admin|Spam Logs')
|
2023-05-27 22:25:52 +05:30
|
|
|
end
|
|
|
|
|
|
|
|
override :sprite_icon
|
|
|
|
def sprite_icon
|
2023-06-20 00:43:36 +05:30
|
|
|
'spam'
|
2023-05-27 22:25:52 +05:30
|
|
|
end
|
|
|
|
|
|
|
|
override :render?
|
|
|
|
def render?
|
2023-06-20 00:43:36 +05:30
|
|
|
current_user && current_user.can_admin_all_resources? && anti_spam_service_enabled?
|
2023-05-27 22:25:52 +05:30
|
|
|
end
|
|
|
|
|
|
|
|
override :active_routes
|
|
|
|
def active_routes
|
2023-06-20 00:43:36 +05:30
|
|
|
{ controller: :spam_logs }
|
2023-05-27 22:25:52 +05:30
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|