From 5ac2915fd99c8f0d1d7cb651515f95fcd814b6aa Mon Sep 17 00:00:00 2001 From: Torsten Brumm Date: Mon, 18 Feb 2019 13:59:01 +0100 Subject: [PATCH 1/5] Add option to let the user choose to use or not I like the idea of this addon, but i also like the idea to let the user the option to use this or not. --- lib/RT/Extension/TicketActions.pm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/RT/Extension/TicketActions.pm b/lib/RT/Extension/TicketActions.pm index 7cd909d..a24e8cf 100644 --- a/lib/RT/Extension/TicketActions.pm +++ b/lib/RT/Extension/TicketActions.pm @@ -7,6 +7,16 @@ use RT; our $VERSION='2.0.2'; +$RT::Config::META{'TicketActions'} = { + Section => 'Ticket display', + Overridable => 1, + Widget => '/Widgets/Form/Boolean', + WidgetArguments => { + Description => 'Display Ticket Actions at Metadata', # loc + Hints => '(' . __PACKAGE__ . ')', + }, +}; + if (eval { require RT::Extension::FontAwesome; }) { RT->Logger->debug('TicketActions: RT-Extension-FontAwesome is available, omit loading'); } else { From f146d67545752470f3b4fe50b00a746a1a354911 Mon Sep 17 00:00:00 2001 From: Torsten Brumm Date: Mon, 18 Feb 2019 14:01:15 +0100 Subject: [PATCH 2/5] Add option to let the user choose to use or not I like the idea of this addon, but i also like the idea to let the user the option to use this or not. --- .../Elements/RT-Extension-TicketActions-QuickAccess | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/html/Ticket/Elements/RT-Extension-TicketActions-QuickAccess b/html/Ticket/Elements/RT-Extension-TicketActions-QuickAccess index 0d2e1a5..a99d7dc 100644 --- a/html/Ticket/Elements/RT-Extension-TicketActions-QuickAccess +++ b/html/Ticket/Elements/RT-Extension-TicketActions-QuickAccess @@ -22,11 +22,12 @@ % } <%init> - my $menu = PageMenu()->child('actions'); +return unless RT->Config->Get( 'TicketActions', $session{'CurrentUser'} ); +my $menu = PageMenu()->child('actions'); - unless ($menu) { - return; - } +unless ($menu) { + return; +} <%once> use Data::Dumper; From aaf16d297da38c4873a4684fd3fec6b57ecbb099 Mon Sep 17 00:00:00 2001 From: Torsten Brumm Date: Mon, 18 Feb 2019 14:02:06 +0100 Subject: [PATCH 3/5] Add option to let the user choose to use or not I like the idea of this addon, but i also like the idea to let the user the option to use this or not. --- .../Ticket/Elements/RT-Extension-TicketActions-QuickAccessSearch | 1 + 1 file changed, 1 insertion(+) diff --git a/html/Ticket/Elements/RT-Extension-TicketActions-QuickAccessSearch b/html/Ticket/Elements/RT-Extension-TicketActions-QuickAccessSearch index e11e0ab..9d345a6 100644 --- a/html/Ticket/Elements/RT-Extension-TicketActions-QuickAccessSearch +++ b/html/Ticket/Elements/RT-Extension-TicketActions-QuickAccessSearch @@ -18,6 +18,7 @@ % } <%init> +return unless RT->Config->Get( 'TicketActions', $session{'CurrentUser'} ); my $ticket = $session{'tickets'} && $session{'tickets'}->ItemMap->{$m->request_args->{'id'}}; if (! ($ticket && $ticket->{'defined'})) { return; From 592bb296e871d322c81b485abc79f71f6fc5fad1 Mon Sep 17 00:00:00 2001 From: Torsten Brumm Date: Mon, 18 Feb 2019 14:02:50 +0100 Subject: [PATCH 4/5] Add option to let the user choose to use or not I like the idea of this addon, but i also like the idea to let the user the option to use this or not. --- .../RT-Extension-TicketActions/Elements/Tabs/Privileged | 1 + 1 file changed, 1 insertion(+) diff --git a/html/Callbacks/RT-Extension-TicketActions/Elements/Tabs/Privileged b/html/Callbacks/RT-Extension-TicketActions/Elements/Tabs/Privileged index 973fe84..b78cbd2 100644 --- a/html/Callbacks/RT-Extension-TicketActions/Elements/Tabs/Privileged +++ b/html/Callbacks/RT-Extension-TicketActions/Elements/Tabs/Privileged @@ -1,4 +1,5 @@ <%init> +return unless RT->Config->Get( 'TicketActions', $session{'CurrentUser'} ); my $request_path = $HTML::Mason::Commands::r->path_info; my $actions = PageMenu()->child('actions'); my $follow_up_time = RT->Config->Get('TicketActions_FollowUpTime') || '10:00:00'; From dc555096c36033c1bf458069c370b102b3131b98 Mon Sep 17 00:00:00 2001 From: Torsten Brumm Date: Mon, 18 Feb 2019 14:03:59 +0100 Subject: [PATCH 5/5] Add option to let the user choose to use or not I like the idea of this addon, but i also like the idea to let the user the option to use this or not. --- .../Ticket/Elements/ShowSummary/LeftColumnTop | 3 +++ 1 file changed, 3 insertions(+) diff --git a/html/Callbacks/RT-Extension-TicketActions/Ticket/Elements/ShowSummary/LeftColumnTop b/html/Callbacks/RT-Extension-TicketActions/Ticket/Elements/ShowSummary/LeftColumnTop index 5719f16..bcfcf52 100644 --- a/html/Callbacks/RT-Extension-TicketActions/Ticket/Elements/ShowSummary/LeftColumnTop +++ b/html/Callbacks/RT-Extension-TicketActions/Ticket/Elements/ShowSummary/LeftColumnTop @@ -3,3 +3,6 @@ <%args> $Ticket=>undef +<%init> +return unless RT->Config->Get( 'TicketActions', $session{'CurrentUser'} ); +