Commit 0ea5d764 authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre
Browse files

Hide the link for spam logs if the Askimet is disabled

parent 07384aa0
...@@ -23,6 +23,10 @@ def user_oauth_applications? ...@@ -23,6 +23,10 @@ def user_oauth_applications?
current_application_settings.user_oauth_applications current_application_settings.user_oauth_applications
end end
def askimet_enabled?
current_application_settings.akismet_enabled?
end
# Return a group of checkboxes that use Bootstrap's button plugin for a # Return a group of checkboxes that use Bootstrap's button plugin for a
# toggle button effect. # toggle button effect.
def restricted_level_checkboxes(help_block_id) def restricted_level_checkboxes(help_block_id)
......
...@@ -82,12 +82,13 @@ ...@@ -82,12 +82,13 @@
Abuse Reports Abuse Reports
%span.count= number_with_delimiter(AbuseReport.count(:all)) %span.count= number_with_delimiter(AbuseReport.count(:all))
= nav_link(controller: :spam_logs) do - if askimet_enabled?
= link_to admin_spam_logs_path, title: "Spam Logs" do = nav_link(controller: :spam_logs) do
= icon('exclamation-triangle fw') = link_to admin_spam_logs_path, title: "Spam Logs" do
%span = icon('exclamation-triangle fw')
Spam Logs %span
%span.count= number_with_delimiter(SpamLog.count(:all)) Spam Logs
%span.count= number_with_delimiter(SpamLog.count(:all))
= nav_link(controller: :application_settings, html_options: { class: 'separate-item'}) do = nav_link(controller: :application_settings, html_options: { class: 'separate-item'}) do
= link_to admin_application_settings_path, title: 'Settings' do = link_to admin_application_settings_path, title: 'Settings' do
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment