Hide the link for spam logs if the Askimet is disabled
This commit is contained in:
parent
07384aa00d
commit
0ea5d764f2
|
@ -23,6 +23,10 @@ module ApplicationSettingsHelper
|
|||
current_application_settings.user_oauth_applications
|
||||
end
|
||||
|
||||
def askimet_enabled?
|
||||
current_application_settings.akismet_enabled?
|
||||
end
|
||||
|
||||
# Return a group of checkboxes that use Bootstrap's button plugin for a
|
||||
# toggle button effect.
|
||||
def restricted_level_checkboxes(help_block_id)
|
||||
|
|
|
@ -82,12 +82,13 @@
|
|||
Abuse Reports
|
||||
%span.count= number_with_delimiter(AbuseReport.count(:all))
|
||||
|
||||
= nav_link(controller: :spam_logs) do
|
||||
= link_to admin_spam_logs_path, title: "Spam Logs" do
|
||||
= icon('exclamation-triangle fw')
|
||||
%span
|
||||
Spam Logs
|
||||
%span.count= number_with_delimiter(SpamLog.count(:all))
|
||||
- if askimet_enabled?
|
||||
= nav_link(controller: :spam_logs) do
|
||||
= link_to admin_spam_logs_path, title: "Spam Logs" do
|
||||
= icon('exclamation-triangle fw')
|
||||
%span
|
||||
Spam Logs
|
||||
%span.count= number_with_delimiter(SpamLog.count(:all))
|
||||
|
||||
= nav_link(controller: :application_settings, html_options: { class: 'separate-item'}) do
|
||||
= link_to admin_application_settings_path, title: 'Settings' do
|
||||
|
|
Loading…
Reference in New Issue