From 09a43bd0984104796052ceee7fdae0581612535d Mon Sep 17 00:00:00 2001 From: Christopher Burger Date: Mon, 31 Jul 2017 09:24:50 -0400 Subject: [PATCH] RT# 73490 - added global configuration to check if RT activity alert should be displayed. --- FS/FS/Conf.pm | 7 +++++++ httemplate/elements/notify-tickets.html | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index d41cc741b..a0b9a9cde 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -5305,6 +5305,13 @@ and customer address. Include units.', }, { + 'key' => 'rt-hide_activity_notification', + 'section' => 'ticketing', + 'description' => 'Hide the notification box when there is activity on tickets', + 'type' => 'checkbox', + }, + + { 'key' => 'pkg-balances', 'section' => 'packages', 'description' => 'Enable per-package balances.', diff --git a/httemplate/elements/notify-tickets.html b/httemplate/elements/notify-tickets.html index 35917c34d..b54506338 100644 --- a/httemplate/elements/notify-tickets.html +++ b/httemplate/elements/notify-tickets.html @@ -13,8 +13,12 @@ <%init> use Class::Load 'load_class'; +use FS::Conf; +my $conf = new FS::Conf; + my $enabled = $FS::TicketSystem::system eq 'RT_Internal'; $enabled = 0 if $FS::CurrentUser::CurrentUser->option('hide_notify_tickets'); +$enabled = 0 if $conf->exists('rt-hide_activity_notification'); my $UnrepliedTickets; if ($enabled) { my $class = 'RT::Search::UnrepliedTickets'; -- 2.11.0