From 116ecd72e8dfc5a17b54054cbcb13da47644ba67 Mon Sep 17 00:00:00 2001 From: Rodrigo Goncalves Date: Wed, 24 Jan 2018 09:12:52 -0200 Subject: [PATCH] Ajustes para OTRS 6 --- .gitignore | 1 + CreateOpm.sh | 2 +- CreateOpmUFSC.sh | 5 ----- Kernel/Config/Files/QueuesPanel.xml | 154 ---------------------------------------------------------------------------------------------------------------------------------------------------------- Kernel/Language/pt_BR_QueuesPanel.pm | 38 -------------------------------------- Kernel/Language/pt_BR_QueuesPanelPublic.pm | 27 --------------------------- Kernel/Modules/QueuesPanel.pm | 71 ----------------------------------------------------------------------- Kernel/Modules/QueuesPanelPublic.pm | 91 ------------------------------------------------------------------------------------------- Kernel/Output/HTML/Templates/Standard/CustomerFooterQPUFSC.tt | 33 --------------------------------- Kernel/Output/HTML/Templates/Standard/CustomerHTMLHeadQPUFSC.tt | 159 --------------------------------------------------------------------------------------------------------------------------------------------------------------- Kernel/Output/HTML/Templates/Standard/CustomerHeaderQPUFSC.tt | 40 ---------------------------------------- Kernel/Output/HTML/Templates/Standard/QueuesPanel.tt | 39 --------------------------------------- Kernel/System/QueuesPanel.pm | 212 -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- QueuePanelUFSC.sopm | 23 ----------------------- QueuesPanel.sopm | 40 ---------------------------------------- README.md | 42 ++++++++++++++++++++++++++++++++++++++++++ src/Kernel/Config/Files/XML/QueuesPanel.xml | 250 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/Kernel/Language/pt_BR_QueuesPanel.pm | 41 +++++++++++++++++++++++++++++++++++++++++ src/Kernel/Language/pt_BR_QueuesPanelPublic.pm | 30 ++++++++++++++++++++++++++++++ src/Kernel/Modules/QueuesPanel.pm | 99 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/Kernel/Modules/QueuesPanelPublic.pm | 115 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/Kernel/Output/HTML/Templates/Standard/CustomerFooterQP.tt | 19 +++++++++++++++++++ src/Kernel/Output/HTML/Templates/Standard/CustomerHTMLHeadQP.tt | 164 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/Kernel/Output/HTML/Templates/Standard/CustomerHeaderQP.tt | 25 +++++++++++++++++++++++++ src/Kernel/Output/HTML/Templates/Standard/QueuesPanel.tt | 30 ++++++++++++++++++++++++++++++ src/Kernel/System/QueuesPanel.pm | 206 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/QueuesPanel.sopm | 47 +++++++++++++++++++++++++++++++++++++++++++++++ src/var/httpd/htdocs/js/QueuesPanel.js | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ src/var/httpd/htdocs/js/thirdparty/hColumns/jquery.hcolumns.min.js | 8 ++++++++ src/var/httpd/htdocs/skins/Customer/default/css/hColumns/hcolumns-intro.css | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/var/httpd/htdocs/skins/Customer/default/css/hColumns/hcolumns.css | 163 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/var/httpd/htdocs/skins/Customer/default/css/hColumns/reset.css | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ src/var/httpd/htdocs/skins/Customer/default/images/hColumns/glyphicons-halflings.png | Bin 0 -> 12799 bytes var/httpd/htdocs/js/thirdparty/hColumns/jquery.hcolumns.min.js | 8 -------- var/httpd/htdocs/skins/Customer/default/css/hColumns/hcolumns-intro.css | 82 ---------------------------------------------------------------------------------- var/httpd/htdocs/skins/Customer/default/css/hColumns/hcolumns.css | 163 ------------------------------------------------------------------------------------------------------------------------------------------------------------------- var/httpd/htdocs/skins/Customer/default/css/hColumns/reset.css | 48 ------------------------------------------------ var/httpd/htdocs/skins/Customer/default/images/hColumns/glyphicons-halflings.png | Bin 12799 -> 0 bytes 38 files changed, 1423 insertions(+), 1234 deletions(-) create mode 100644 .gitignore delete mode 100755 CreateOpmUFSC.sh delete mode 100755 Kernel/Config/Files/QueuesPanel.xml delete mode 100755 Kernel/Language/pt_BR_QueuesPanel.pm delete mode 100755 Kernel/Language/pt_BR_QueuesPanelPublic.pm delete mode 100755 Kernel/Modules/QueuesPanel.pm delete mode 100755 Kernel/Modules/QueuesPanelPublic.pm delete mode 100755 Kernel/Output/HTML/Templates/Standard/CustomerFooterQPUFSC.tt delete mode 100755 Kernel/Output/HTML/Templates/Standard/CustomerHTMLHeadQPUFSC.tt delete mode 100755 Kernel/Output/HTML/Templates/Standard/CustomerHeaderQPUFSC.tt delete mode 100755 Kernel/Output/HTML/Templates/Standard/QueuesPanel.tt delete mode 100755 Kernel/System/QueuesPanel.pm delete mode 100755 QueuePanelUFSC.sopm delete mode 100755 QueuesPanel.sopm create mode 100644 README.md create mode 100644 src/Kernel/Config/Files/XML/QueuesPanel.xml create mode 100755 src/Kernel/Language/pt_BR_QueuesPanel.pm create mode 100755 src/Kernel/Language/pt_BR_QueuesPanelPublic.pm create mode 100755 src/Kernel/Modules/QueuesPanel.pm create mode 100755 src/Kernel/Modules/QueuesPanelPublic.pm create mode 100755 src/Kernel/Output/HTML/Templates/Standard/CustomerFooterQP.tt create mode 100755 src/Kernel/Output/HTML/Templates/Standard/CustomerHTMLHeadQP.tt create mode 100755 src/Kernel/Output/HTML/Templates/Standard/CustomerHeaderQP.tt create mode 100755 src/Kernel/Output/HTML/Templates/Standard/QueuesPanel.tt create mode 100755 src/Kernel/System/QueuesPanel.pm create mode 100755 src/QueuesPanel.sopm create mode 100644 src/var/httpd/htdocs/js/QueuesPanel.js create mode 100755 src/var/httpd/htdocs/js/thirdparty/hColumns/jquery.hcolumns.min.js create mode 100755 src/var/httpd/htdocs/skins/Customer/default/css/hColumns/hcolumns-intro.css create mode 100755 src/var/httpd/htdocs/skins/Customer/default/css/hColumns/hcolumns.css create mode 100755 src/var/httpd/htdocs/skins/Customer/default/css/hColumns/reset.css create mode 100755 src/var/httpd/htdocs/skins/Customer/default/images/hColumns/glyphicons-halflings.png delete mode 100755 var/httpd/htdocs/js/thirdparty/hColumns/jquery.hcolumns.min.js delete mode 100755 var/httpd/htdocs/skins/Customer/default/css/hColumns/hcolumns-intro.css delete mode 100755 var/httpd/htdocs/skins/Customer/default/css/hColumns/hcolumns.css delete mode 100755 var/httpd/htdocs/skins/Customer/default/css/hColumns/reset.css delete mode 100755 var/httpd/htdocs/skins/Customer/default/images/hColumns/glyphicons-halflings.png diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a261f29 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +dist/* diff --git a/CreateOpm.sh b/CreateOpm.sh index 2061e94..2aa36cb 100755 --- a/CreateOpm.sh +++ b/CreateOpm.sh @@ -1,5 +1,5 @@ #!/bin/bash LOCAL="$PWD" cd /opt/otrs -bin/otrs.Console.pl Dev::Package::Build "$LOCAL"/QueuesPanel.sopm "$LOCAL"/ +bin/otrs.Console.pl Dev::Package::Build "$LOCAL"/src/QueuesPanel.sopm "$LOCAL"/dist/ cd $LOCAL diff --git a/CreateOpmUFSC.sh b/CreateOpmUFSC.sh deleted file mode 100755 index 5a8e52e..0000000 --- a/CreateOpmUFSC.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -LOCAL="$PWD" -cd /opt/otrs -bin/otrs.Console.pl Dev::Package::Build "$LOCAL"/QueuePanelUFSC.sopm "$LOCAL"/ -cd $LOCAL diff --git a/Kernel/Config/Files/QueuesPanel.xml b/Kernel/Config/Files/QueuesPanel.xml deleted file mode 100755 index 3d69cc1..0000000 --- a/Kernel/Config/Files/QueuesPanel.xml +++ /dev/null @@ -1,154 +0,0 @@ - - - - FrontendModuleRegistration for QueuesPanel module. - Ticket - Frontend::Customer::ModuleRegistration - - - Module for choosing main queues to open tickets - QueuesPanel - - Queues panel - Queues panel - Action=QueuesPanel - QueuesPanel - Menu - 8400 - - - - - thirdparty/hColumns/jquery.hcolumns.min.js - QueuesPanel.css - hColumns/hcolumns.css - hColumns/hcolumns-intro.css - hColumns/reset.css - - - - - - - FrontendModuleRegistration for QueuesPanelPublic module. - Framework - Frontend::Public::ModuleRegistration - - - Module for choosing main queues to open tickets - QueuesPanel - - Queues panel - Queues panel - Action=QueuesPanelPublic - QueuesPanel - Menu - 8400 - - - - thirdparty/hColumns/jquery.hcolumns.min.js - QueuesPanel.css - hColumns/hcolumns.css - hColumns/hcolumns-intro.css - hColumns/reset.css - - - - - - - - Message to let the user choose a queue. - Ticket - Frontend::Customer::QueuesPanel - - Escolha o local para o qual deseja atendimento - - - - - Message to let the user choose a queue. - Ticket - Frontend::Customer::QueuesPanel - - Escolha o local para o qual deseja atendimento - - - - - Queues IDs to not show in panel (comma separated). - Ticket - Frontend::Customer::QueuesPanel - - - - - - - Customer footer/header suffix, if used. - Ticket - Frontend::Customer::QueuesPanel - - - - - - - Extra queues to show in panel. Format: One per Line, Name|URL - Ticket - Frontend::Customer::QueuesPanel - - - - - - - Extra queues to show in panel, for public access. Format: One per Line, Name|URL - Ticket - Frontend::Customer::QueuesPanel - - - - - - - Extra JS if necessary - Ticket - Frontend::Customer::QueuesPanel - - - - - - - - - Base URL to call to create ticket, queue ID added to the end - Ticket - Frontend::Customer::QueuesPanel - - /otrs/customer.pl?Action=NewTicketWizard;QueueID= - - - - - Base URL to call to create ticket, queue ID added to the end - Ticket - Frontend::Customer::QueuesPanel - - /otrs/public.pl?Action=NewTicketWizardPublic;QueueID= - - - - - \ No newline at end of file diff --git a/Kernel/Language/pt_BR_QueuesPanel.pm b/Kernel/Language/pt_BR_QueuesPanel.pm deleted file mode 100755 index dd19d66..0000000 --- a/Kernel/Language/pt_BR_QueuesPanel.pm +++ /dev/null @@ -1,38 +0,0 @@ -# Kernel/Modules/pt_BR_QueuesPanel.pm - translations for QueuesPanel -# -# Copyright (C) 2014 SeTIC - UFSC - http://setic.ufsc.br/ -# Version 01/08/2015 - Adjustments for OTRS 4 -# -# -- -# This software comes with ABSOLUTELY NO WARRANTY. For details, see -# the enclosed file COPYING for license information (AGPL). If you -# did not receive this file, see http://www.gnu.org/licenses/agpl.txt. -# -- -package Kernel::Language::pt_BR_QueuesPanel; - -use strict; -use warnings; -use utf8; - -sub Data { - my $Self = shift; - - $Self->{Translation}->{'The following maintenances are in progress'} = 'As seguintes manutenções estão ocorrendo'; - $Self->{Translation}->{'Started at: '} = 'Iniciada em:'; - $Self->{Translation}->{'Queues panel'} = 'Novo chamado'; - $Self->{Translation}->{'Choose the service to ask for support'} = 'Escolha o serviço para o qual deseja suporte'; - $Self->{Translation}->{'Message to let the user choose a queue.'} = 'Mensagem para o usuário escolher a fila'; - $Self->{Translation}->{'Queues IDs to not show in panel (comma separated).'} = 'IDs das filas que não devem aparecer no painel (separados por vírgula)'; - $Self->{Translation}->{'Customer footer/header suffix, if used.'} = 'Sufixo personalizado de cabeçalho/rodapé, se usado'; - $Self->{Translation}->{'Base URL to call to create ticket, queue ID added to the end'} = 'URl para criar ticket - id da fila adicionado ao final'; - $Self->{Translation}->{'Extra queues to show in panel. Format: One per Line, Name|URL'} = 'Filas extra, com URLs especiais. Formato: Nome|URL'; - $Self->{Translation}->{'Extra queues to show in panel, for public access. Format: One per Line, Name|URL'} = 'Filas extra no modo público, com URLs especiais. Formato: Nome|URL'; - - - - - - - return 1; -} -1; \ No newline at end of file diff --git a/Kernel/Language/pt_BR_QueuesPanelPublic.pm b/Kernel/Language/pt_BR_QueuesPanelPublic.pm deleted file mode 100755 index 3e6fc0f..0000000 --- a/Kernel/Language/pt_BR_QueuesPanelPublic.pm +++ /dev/null @@ -1,27 +0,0 @@ -# Kernel/Modules/pt_BR_QueuesPanelPublic.pm - translations for QueuesPanelPublic -# -# Copyright (C) 2014 SeTIC - UFSC - http://setic.ufsc.br/ -# Version 01/08/2015 - Adjustments for OTRS 4 -# -# -- -# -- -# This software comes with ABSOLUTELY NO WARRANTY. For details, see -# the enclosed file COPYING for license information (AGPL). If you -# did not receive this file, see http://www.gnu.org/licenses/agpl.txt. -# -- -package Kernel::Language::pt_BR_QueuesPanelPublic; - -use strict; -use warnings; -use utf8; - -sub Data { - my $Self = shift; - - $Self->{Translation}->{'The following maintenances are in progress'} = 'As seguintes manutenções estão ocorrendo'; - $Self->{Translation}->{'Started at: '} = 'Iniciada em:'; - $Self->{Translation}->{'Queues panel'} = 'Novo chamado'; - $Self->{Translation}->{'Choose the service to ask for support'} = 'Escolha o serviço para o qual deseja suporte'; - return 1; -} -1; \ No newline at end of file diff --git a/Kernel/Modules/QueuesPanel.pm b/Kernel/Modules/QueuesPanel.pm deleted file mode 100755 index cdbbdcc..0000000 --- a/Kernel/Modules/QueuesPanel.pm +++ /dev/null @@ -1,71 +0,0 @@ -# -- -# Kernel/Modules/QueuesPanel.pm - frontend module for choosing top queues -# -# Copyright (C) SeTIC - UFSC - http://setic.ufsc.br/ -# Version 01/08/2015 - Support for OTRS 4.0.3 -# -# -- -# This software comes with ABSOLUTELY NO WARRANTY. For details, see -# the enclosed file COPYING for license information (AGPL). If you -# did not receive this file, see http://www.gnu.org/licenses/agpl.txt. -# -- -package Kernel::Modules::QueuesPanel; - -use strict; -use warnings; - -use Kernel::System::VariableCheck qw(:all); - -our @ObjectDependencies = ( -"Kernel::System::Web::Request", -"Kernel::System::DB", -"Kernel::Output::HTML::Layout", -"KerneL::System::Log", -"Kernel::Config", -"Kernel::System::Queue", -"Kernel::System::QueuesPanel"); - -sub new { - my ( $Type, %Param ) = @_; - - # allocate new hash for object - my $Self = {%Param}; - bless( $Self, $Type ); - - return $Self; -} - -sub Run { - my ( $Self, %Param ) = @_; - my %Data = (); - - my $ConfigObject = $Kernel::OM->Get("Kernel::Config"); - my $LayoutObject = $Kernel::OM->Get("Kernel::Output::HTML::Layout"); - - $Self->{Config} = $ConfigObject->Get("Ticket::Frontend::Customer::QueuesPanel"); - my $msgChooseService = $Self->{Config}->{"MessageChooseQueue"}; - my $ignoreQueuesIDs = $Self->{Config}->{"IgnoreQueuesIDs"}; - my $customHeaderFooterID = $Self->{Config}->{"CustomHeaderFooterID"}; - my $extraQueues = $Self->{Config}->{"ExtraQueues"}; - my $URL = $Self->{Config}->{"NewTicketURL"}; - my $customJS = $Self->{Config}->{"CustomJS"}; - - my $queuesPanelBuilder = $Kernel::OM->Get("Kernel::System::QueuesPanel"); - - $Data{"CustomJS"} = $customJS; - $Data{"QueueJS"} = $queuesPanelBuilder->BuildQueuesJS(IgnoreQueuesIDs => $ignoreQueuesIDs, ExtraQueues => $extraQueues, URL => $URL); - - $Data{MsgChooseQueue} = $msgChooseService; - - # build output - my $Output = $LayoutObject->CustomerHeader( Type => $customHeaderFooterID, Title => $LayoutObject->{LanguageObject}->Translate("Queues panel") ); - - $Output .= $LayoutObject->Output( - Data => \%Data, - TemplateFile => 'QueuesPanel', - ); - $Output .= $LayoutObject->CustomerFooter(Type => $customHeaderFooterID); - return $Output; -} - -1; diff --git a/Kernel/Modules/QueuesPanelPublic.pm b/Kernel/Modules/QueuesPanelPublic.pm deleted file mode 100755 index 7cd6a09..0000000 --- a/Kernel/Modules/QueuesPanelPublic.pm +++ /dev/null @@ -1,91 +0,0 @@ -# -- -# Kernel/Modules/QueuesPanelPublic.pm - frontend module for choosing top queues -# -# Copyright (C) SeTIC - UFSC - http://setic.ufsc.br/ -# Version 01/12/2015 - Support for OTRS 4.0.3 -# -# -- -# This software comes with ABSOLUTELY NO WARRANTY. For details, see -# the enclosed file COPYING for license information (AGPL). If you -# did not receive this file, see http://www.gnu.org/licenses/agpl.txt. -# -- -package Kernel::Modules::QueuesPanelPublic; - -use strict; -use warnings; - -use Kernel::System::VariableCheck qw(:all); - -our @ObjectDependencies = ( -"Kernel::System::Web::Request", # OLD ParamObject -"Kernel::System::DB", -"Kernel::Output::HTML::Layout", -"KerneL::System::Log", -"Kernel::Config", -"Kernel::System::Queue", -"Kernel::System::QueuesPanel"); - -sub new { - my ( $Type, %Param ) = @_; - - # allocate new hash for object - my $Self = {%Param}; - bless( $Self, $Type ); - - return $Self; -} - -sub Run { - my ( $Self, %Param ) = @_; - my %Data = (); - - my $ParamObject = $Kernel::OM->Get("Kernel::System::Web::Request"); - my $LayoutObject = $Kernel::OM->Get("Kernel::Output::HTML::Layout"); - my $ConfigObject = $Kernel::OM->Get("Kernel::Config"); - - ## Se recebeu o ticket, significa que usuario já está autenticado - if ( $ParamObject->GetParam( Param => "ticket" ) ) { - my $retorno = $LayoutObject->Redirect( OP => "Action=QueuesPanel", ); - $retorno =~ s/public/customer/g; - return $retorno; - } - - ## Se tiver parametro para tentar autenticar, repassa ao CAS com gateway - if ( $ParamObject->GetParam( Param => "autenticar" ) ) { - my $url = - $ConfigObject->Get('Customer::AuthModule::CAS::CASUrl') - . "/login?gateway=true&service=" - . "https://" - . $ENV{SERVER_NAME} - . $ENV{SCRIPT_NAME} - . "?Action=QueuesPanelPublic"; - return $LayoutObject->Redirect( ExtURL => $url, ); - } - - $Self->{Config} = $Self->{ConfigObject}->Get("Ticket::Frontend::Customer::QueuesPanel"); - my $msgChooseService = $Self->{Config}->{"MessageChooseQueuePublic"}; - my $ignoreQueuesIDs = $Self->{Config}->{"IgnoreQueuesIDs"}; - my $customHeaderFooterID = $Self->{Config}->{"CustomHeaderFooterID"}; - my $extraQueues = $Self->{Config}->{"ExtraQueuesPublic"}; - my $URL = $Self->{Config}->{"NewTicketURLPublic"}; - my $customJS = $Self->{Config}->{"CustomJS"}; - - my $queuesPanelBuilder = $Kernel::OM->Get("Kernel::System::QueuesPanel"); - - $Data{"CustomJS"} = $customJS; - $Data{"QueueJS"} = $queuesPanelBuilder->BuildQueuesJS(IgnoreQueuesIDs => $ignoreQueuesIDs, ExtraQueues => $extraQueues, URL => $URL); - $Data{MsgChooseQueue} = $msgChooseService; - - # build output - my $Output = - $LayoutObject->CustomerHeader( Type => $customHeaderFooterID, Title => $LayoutObject->{LanguageObject}->Translate("New ticket") ); - - $Output .= $LayoutObject->Output( - Data => \%Data, - TemplateFile => 'QueuesPanel', - ); - $Output .= $LayoutObject->CustomerFooter(Type => $customHeaderFooterID); - return $Output; -} - -1; diff --git a/Kernel/Output/HTML/Templates/Standard/CustomerFooterQPUFSC.tt b/Kernel/Output/HTML/Templates/Standard/CustomerFooterQPUFSC.tt deleted file mode 100755 index cff9cf1..0000000 --- a/Kernel/Output/HTML/Templates/Standard/CustomerFooterQPUFSC.tt +++ /dev/null @@ -1,33 +0,0 @@ -# -- -# CustomerFooterQPUFSC.tt - Footer para Queues Panel na UFSC -# Copyright (C) 2001-2014 OTRS AG, http://otrs.com/ -# -- -# This software comes with ABSOLUTELY NO WARRANTY. For details, see -# the enclosed file COPYING for license information (AGPL). If you -# did not receive this file, see http://www.gnu.org/licenses/agpl.txt. -# -- - -
- -
-
-
-
-
-
© SeTIC - Superintendência de Governança Eletrônica e Tecnologia da Informação e Comunicação -
- -
- - - - -[% InsertTemplate("CustomerFooterJS.tt") %] - - - diff --git a/Kernel/Output/HTML/Templates/Standard/CustomerHTMLHeadQPUFSC.tt b/Kernel/Output/HTML/Templates/Standard/CustomerHTMLHeadQPUFSC.tt deleted file mode 100755 index 6fc4761..0000000 --- a/Kernel/Output/HTML/Templates/Standard/CustomerHTMLHeadQPUFSC.tt +++ /dev/null @@ -1,159 +0,0 @@ -# -- -# CustomerHTMLHeadUFSC.tt - provides FSC global HTML header -# Copyright (C) 2015, SeTIC - UFSC - http://setic.ufsc.br/ -# -- -# This software comes with ABSOLUTELY NO WARRANTY. For details, see -# the enclosed file COPYING for license information (AGPL). If you -# did not receive this file, see http://www.gnu.org/licenses/agpl.txt. -# -- - - -[% RenderBlockStart("MetaHttpEquivRefresh") %] -[% INCLUDE "HTMLHeadRefresh.tt" %] -[% RenderBlockEnd("MetaHttpEquivRefresh") %] -[% RenderBlockStart("MetaLink") %] - -[% RenderBlockEnd("MetaLink") %] - - -[% RenderBlockStart("CommonCSS") %] - -[% RenderBlockEnd("CommonCSS") %] - -[% RenderBlockStart("CommonCSS_IE8") %] - -[% RenderBlockEnd("CommonCSS_IE8") %] - -[% RenderBlockStart("ModuleCSS") %] - -[% RenderBlockEnd("ModuleCSS") %] - -[% RenderBlockStart("ModuleCSS_IE8") %] - -[% RenderBlockEnd("ModuleCSS_IE8") %] - - - - -[% RenderBlockStart("HeaderLogoCSS") %] - -[% RenderBlockEnd("HeaderLogoCSS") %] - - - - - - - - - [% Data.TitleArea | html %] [% Config("ProductName") %] - - - - -[% INCLUDE "HTMLHeadBlockEvents.tt" %] - - diff --git a/Kernel/Output/HTML/Templates/Standard/CustomerHeaderQPUFSC.tt b/Kernel/Output/HTML/Templates/Standard/CustomerHeaderQPUFSC.tt deleted file mode 100755 index a3f3706..0000000 --- a/Kernel/Output/HTML/Templates/Standard/CustomerHeaderQPUFSC.tt +++ /dev/null @@ -1,40 +0,0 @@ -# -- -# CustomerHeaderQPUFSC.tt - provides global HTML header for UFSC -# Copyright (C) 2015, SeTIC - UFSC - http://setic.ufsc.br/ -# -- -# This software comes with ABSOLUTELY NO WARRANTY. For details, see -# the enclosed file COPYING for license information (AGPL). If you -# did not receive this file, see http://www.gnu.org/licenses/agpl.txt. -# -- -[%- INCLUDE "HTTPHeaders.tt" -%] - - - -[% InsertTemplate("Copyright.tt") %] -[% InsertTemplate("CustomerHTMLHeadQPUFSC.tt") %] - - - - - - - - - - -
PAI - Portal de Atendimento Institucional
-
-
-
- - diff --git a/Kernel/Output/HTML/Templates/Standard/QueuesPanel.tt b/Kernel/Output/HTML/Templates/Standard/QueuesPanel.tt deleted file mode 100755 index 2f5c2c8..0000000 --- a/Kernel/Output/HTML/Templates/Standard/QueuesPanel.tt +++ /dev/null @@ -1,39 +0,0 @@ -# -- -# Kernel/Output/HTML/Standard/QueuesPanel.tt - overview -# -# Copyright (C) SeTIC - UFSC - http://setic.ufsc.br/ -# Version 01/12/2015 - Support for OTRS 4.0.3 -# -# -- -# $Id: writing-otrs-application.xml,v 1.1 2010/08/13 08:59:28 mg Exp $ -# -- -# This software comes with ABSOLUTELY NO WARRANTY. For details, see -# the enclosed file COPYING for license information (AGPL). If you -# did not receive this file, see http://www.gnu.org/licenses/agpl.txt. -# -- -
-
[% Data.MsgChooseQueue %]
- -
- - [% RenderBlockStart("ListQueue") %] -
- -
[% Data.QueueComments %]
-
- -[% RenderBlockEnd("ListQueue") %] - -
- -[% WRAPPER JSOnDocumentComplete %] - -[% END %] - - \ No newline at end of file diff --git a/Kernel/System/QueuesPanel.pm b/Kernel/System/QueuesPanel.pm deleted file mode 100755 index 95efbe4..0000000 --- a/Kernel/System/QueuesPanel.pm +++ /dev/null @@ -1,212 +0,0 @@ -# -- -# Kernel/System/QueuesPanel.pm - logic for queues panel module -# -# Copyright (C) SeTIC - UFSC - http://setic.ufsc.br/ -# Version 29/10/2015 - First version -# -# -- -# This software comes with ABSOLUTELY NO WARRANTY. For details, see -# the enclosed file COPYING for license information (AGPL). If you -# did not receive this file, see http://www.gnu.org/licenses/agpl.txt. -# -- -package Kernel::System::QueuesPanel; - -use strict; -use warnings; - -use Kernel::System::VariableCheck qw(:all); -use Data::Dumper; - -our @ObjectDependencies = ( -"Kernel::System::DB", -"KerneL::System::Log", -"Kernel::System::Queue"); - -sub new { - my ( $Type, %Param ) = @_; - - # allocate new hash for object - my $Self = {%Param}; - bless( $Self, $Type ); - - return $Self; -} - - -=head - -Builds the JavaScript for the Queues Panel component (jQuery hColumns) - -Params: IgnoreQueuesID - comma-separated list of queues to ignore - ExtraQueues - line-break separated list of extra queues to include. Each line has a name for the queue and a link, separated by "||" - example: - SeTIC||http://setic.ufsc.br - -=cut -sub BuildQueuesJS { - my ( $Self, %Param ) = @_; - - # Get queues - my %Queues = (); - my %ExtraQueuesLinks = (); - - my $DBObject = $Kernel::OM->Get("Kernel::System::DB"); - - if ($Param{IgnoreQueuesIDs}) { - $DBObject->Prepare( SQL => "SELECT id, name FROM queue WHERE valid_id = 1 AND id NOT IN (" . $Param{IgnoreQueuesIDs} . ") ORDER BY name ASC", ); - } else { - $DBObject->Prepare( SQL => "SELECT id, name FROM queue WHERE valid_id = 1 ORDER BY name ASC", ); - } - - while ( my @Row = $DBObject->FetchrowArray() ) { - $Queues{ $Row[0] } = $Row[1]; - } - - - if ($Param{ExtraQueues}) { - my @extraQueues = split('\n', $Param{ExtraQueues}); - my $id = -1; - foreach my $extraQueue (@extraQueues) { - my @data = split('\|', $extraQueue); - $Queues{$id} = $data[0]; - $ExtraQueuesLinks{$id} = $data[1]; - $id = $id - 1; - } - } - - my $result = - '$(document).ready(function() {' . "\n\t" - . ' $("#columns").hColumns({' - . "\n\t\t" - . ' nodeSource: function(node_id, callback) {' . "\n"; - - for my $queue ( keys %Queues ) { - $result = $result . $Self->BuildQueueJS( Queues => \%Queues, Queue => $Queues{$queue}, QueueID => $queue, ExtraQueuesLinks => \%ExtraQueuesLinks, URL => - $Param{URL} ); - } - - $result = $result . $Self->BuildTopQueuesJS( Queues => \%Queues, ExtraQueuesLinks => \%ExtraQueuesLinks, URL => - $Param{URL} ); - - $result = $result . "\n\t}});\n});"; - - return $result; -} - -=head - -Builds the top level queues JavaScript - -Params: Queues - queues list - ExtraQueuesLinks - links for custom (id < 0) queues - -=cut -sub BuildTopQueuesJS { - my ( $Self, %Param ) = @_; - my %Queues = %{ $Param{"Queues"} }; - my %ExtraQueuesLinks = %{ $Param{"ExtraQueuesLinks"} }; - - my @topQueues = grep { index( $Queues{$_}, '::' ) == -1 } keys %Queues; - - my $result = "\t\tif (node_id === null) { \n\t\t\treturn callback(null, [\n"; - for my $queue (sort {$Queues{$a} cmp $Queues{$b}} @topQueues) { - - if ( grep { index( $Queues{$_}, $Queues{$queue} . "::" ) >= 0 } keys %Queues ) { - $result = $result - . "\t\t\t\t" - . '{ id: ' - . $queue - . ', label: "' - . $Self->LastQueue( $Queues{$queue} ) - . '", type: "folder" },' . "\n"; - } - else { - $result = $result - . "\t\t\t\t" - . '{ id: ' - . $queue - . ', label: "' - . $Self->LastQueue( $Queues{$queue} ) - . '", type: "link", url: "' - . ($queue < 0 ? $ExtraQueuesLinks{$queue} : $Param{"URL"} . $queue) - . '" },' . "\n"; - } - } - - $result = $result . "\t\t\t]);\n\t\t}\n"; - - return $result; -} - -=head - -Builds sub-queues JavaScript - -Params: Queues - queues list - ExtraQueuesLinks - links for custom (id < 0) queues - BaseQueue / BaseQueueID - which upper queue to generate subqueues - -=cut -sub BuildQueueJS { - my ( $Self, %Param ) = @_; - my %Queues = %{ $Param{"Queues"} }; - my $BaseQueue = $Param{"Queue"}; - my $BaseQueueID = $Param{"QueueID"}; - my %ExtraQueuesLinks = %{ $Param{"ExtraQueuesLinks"} }; - - # Get subqueues - my @subqueues = grep { index( $Queues{$_}, $BaseQueue . "::" ) >= 0 } keys %Queues; - my $level = () = $BaseQueue =~ /::/g; - $level = $level + 1; - - # Remove subsubqueues - @subqueues = grep { ( () = $Queues{$_} =~ /::/g ) == $level } @subqueues; - - # When there are no subqueues, there is no need to create a JS - if ( !@subqueues ) { - return ""; - } - - my $result = "\t\tif (node_id === " . $BaseQueueID . ") { \n\t\t\treturn callback(null, [\n"; - - for my $queue (sort {$Queues{$a} cmp $Queues{$b}} @subqueues) { - if ( grep { index( $Queues{$_}, $Queues{$queue} . "::" ) >= 0 } keys %Queues ) { - $result = $result - . "\t\t\t\t" - . '{ id: ' - . $queue - . ', label: "' - . $Self->LastQueue( $Queues{$queue} ) - . '", type: "folder" }, ' . "\n"; - } - else { - $result = $result - . "\t\t\t\t" - . '{ id: ' - . $queue - . ', label: "' - . $Self->LastQueue( $Queues{$queue} ) - . '", type: "link", url: "' - . ($queue < 0 ? $ExtraQueuesLinks{$queue} : $Param{"URL"} . $queue) . '" }, ' . "\n"; - } - } - - $result = $result . "\t\t\t]);\n\t\t}\n"; - - return $result; -} - -=head - -Returns last part of the queue name (strips parent queues) - -Params: QueueName - -=cut -sub LastQueue { - my $Self = shift; - my $queue = shift; - my @parts = split( "::", $queue ); - return $parts[-1]; -} - -1; diff --git a/QueuePanelUFSC.sopm b/QueuePanelUFSC.sopm deleted file mode 100755 index 00491f1..0000000 --- a/QueuePanelUFSC.sopm +++ /dev/null @@ -1,23 +0,0 @@ - - - QueuesPanelUFSC - 1.1.0 - 5.0.x - SeTIC - Support for OTRS 5.0.x - http://www.setic.ufsc.br - GPLv2 - Customer header/footer for QueuesPanel module for UFSC - Module installed successfully! - New Ticket Wizard - ? - ? - - - - - - - - - \ No newline at end of file diff --git a/QueuesPanel.sopm b/QueuesPanel.sopm deleted file mode 100755 index f4a56ac..0000000 --- a/QueuesPanel.sopm +++ /dev/null @@ -1,40 +0,0 @@ - - - QueuesPanel - 1.2.0 - 5.0.x - SeTIC - Support for custom queues, layout fixes, support for custom layouts for header and footer - Support for OTRS 5.0.x - http://www.setic.ufsc.br - GPLv2 - Queue choosing panel - Module installed successfully! - Queues Panel - ? - ? - CASAuthentication - NewTicketWizard - - - - - - - - - - - - - - - - - - - - - - - diff --git a/README.md b/README.md new file mode 100644 index 0000000..4f0dac4 --- /dev/null +++ b/README.md @@ -0,0 +1,42 @@ +Queues Panel +================== + +Navigational menu to choose the queue where a ticket should be open to. + + +Required PERL Packages: +----------------------- + + +Required OTRS Packages: +----------------------- + +otrs-bootstrap (https://softwarepublico.gov.br/gitlab/setic-ufsc/otrs-bootstrap) + + +Config required: +---------------- + + + If you want to customize the header or footer, use the following setting to define the templates. Files names + CustomerFooterQP{CustomTemplate} and CustomerHeaderQP{CustomTemplate} should be made available in OTRS: + + $Self->{'Ticket::Frontend::Customer::QueuesPanel###CustomHeaderFooterID'} + + + +Package building: +----------------- + +To build the package, do the following: + + cd dist + ./CreateOpm.sh + +The generated package will be on the same `dist` directory + + +Issues: +------- + +This module was developed in-house and thus is provided without warranty or support. If you have a problem, please open an issue at https://softwarepublico.gov.br/gitlab/setic-ufsc/otrs-cas/ \ No newline at end of file diff --git a/src/Kernel/Config/Files/XML/QueuesPanel.xml b/src/Kernel/Config/Files/XML/QueuesPanel.xml new file mode 100644 index 0000000..dcefef1 --- /dev/null +++ b/src/Kernel/Config/Files/XML/QueuesPanel.xml @@ -0,0 +1,250 @@ + + + + FrontendModuleRegistration for QueuesPanel module. + Frontend::Customer::ModuleRegistration + + + + + + + + + + + + Module for choosing main queues to open tickets + QueuesPanel + + + + + + + Loader module registration for the agent interface. + Frontend::Customer::ModuleRegistration::Loader + + + + + QueuesPanel.css + hColumns/hcolumns.css + hColumns/hcolumns-intro.css + hColumns/reset.css + bootstrap/bootstrap-theme.min.css + bootstrap/bootstrap.min.css + + + + + thirdparty/hColumns/jquery.hcolumns.min.js + thirdparty/bootstrap/bootstrap.min.js + QueuesPanel.js + + + + + + + Main menu item registration. + Frontend::Customer::ModuleRegistration::MainMenu + + + + + + + + + + + + + + + + + Painel de filas + Painel de filas + Queues panel + Queues panel + Action=QueuesPanel + + QueuesPanel + Menu + + + 8400 + + + + + + + + FrontendModuleRegistration for QueuesPanelPublic module. + Frontend::Public::ModuleRegistration + + + + + + + + + + + + Module for choosing main queues to open tickets + Módulo para escolher as filas principais para abrir tickets + QueuesPanel + + + + + + + Loader module registration for the agent interface. + Frontend::Public::ModuleRegistration + + + + + QueuesPanel.css + hColumns/hcolumns.css + hColumns/hcolumns-intro.css + hColumns/reset.css + bootstrap/bootstrap-theme.min.css + bootstrap/bootstrap.min.css + + + + + thirdparty/hColumns/jquery.hcolumns.min.js + thirdparty/bootstrap/bootstrap.min.js + QueuesPanel.js + + + + + + + Main menu item registration. + Frontend::Public::ModuleRegistration + + + + + + + + + + + + + + + + + Painel de filas + Painel de filas + Queues panel + Queues panel + Action=QueuesPanelPublic + + QueuesPanel + Menu + + + 8400 + + + + + + + + + Message to let the user choose a queue in public mode (non-authenticated). + Mensagem ao usuário para que escolha uma fila em modo público (não-autenticado). + Frontend::Customer::QueuesPanel + + Please choose the queue to send the ticket to + + + + + Message to let the user choose a queue. + Mensagem ao usuário para que escolha uma fila. + Frontend::Customer::QueuesPanel + + Please choose the queue to send the ticket to + + + + + Queues IDs to not show in panel (comma separated). + IDs de filas que não devem ser exibidas no painel (separados por vírgula) + Frontend::Customer::QueuesPanel + + + + + + + Customer footer/header suffix, if used. + Sufixo para cabeçalhos personalizados, se usado. + Frontend::Customer::QueuesPanel + + + + + + + Extra queues to show in panel in public mode (non-authenticated). Format: One per Line, Name|URL + Filas adicionais (simuladas) para exibir no painel em modo público (não autenticado). Formato: Uma por linha, Nome|URL + Frontend::Customer::QueuesPanel + + + + + + + Extra queues to show in panel in public mode (non-authenticated). Format: One per Line, Name|URL + Filas adicionais (simuladas) para exibir no painel em modo público (não autenticado). Formato: Uma por linha, Nome|URL + Frontend::Customer::QueuesPanel + + + + + + + Base URL to call to create ticket, queue ID added to the end + URL base para chamar quando for criar um ticket, o Id da fila é adicionado ao final + Frontend::Customer::QueuesPanel + + /otrs/customer.pl?Action=NewTicketWizard;QueueID= + + + + + Base URL to call to create ticket, queue ID added to the end + URL base para chamar quando for criar um ticket em modo público (não autenticado), o Id da fila é adicionado ao final + Frontend::Customer::QueuesPanel + + /otrs/public.pl?Action=NewTicketWizardPublic;QueueID= + + + + + diff --git a/src/Kernel/Language/pt_BR_QueuesPanel.pm b/src/Kernel/Language/pt_BR_QueuesPanel.pm new file mode 100755 index 0000000..82353d6 --- /dev/null +++ b/src/Kernel/Language/pt_BR_QueuesPanel.pm @@ -0,0 +1,41 @@ +# Kernel/Modules/pt_BR_QueuesPanel.pm - translations for QueuesPanel +# +# Copyright (C) 2014-2018 SeTIC - UFSC - http://setic.ufsc.br/ +# Rodrigo Goncalves (rodrigo.g@ufsc.br) +# +# Version 01/08/2015 - Adjustments for OTRS 4 +# Version 2018-01-22 - Adjustments for OTRS 6 +# +# -- +# This software comes with ABSOLUTELY NO WARRANTY. For details, see +# the enclosed file COPYING for license information (AGPL). If you +# did not receive this file, see http://www.gnu.org/licenses/agpl.txt. +# -- +package Kernel::Language::pt_BR_QueuesPanel; + +use strict; +use warnings; +use utf8; + +sub Data { + my $Self = shift; + + $Self->{Translation}->{'The following maintenances are in progress'} = 'As seguintes manutenções estão ocorrendo'; + $Self->{Translation}->{'Started at: '} = 'Iniciada em:'; + $Self->{Translation}->{'Queues panel'} = 'Novo chamado'; + $Self->{Translation}->{'Choose the service to ask for support'} = 'Escolha o serviço para o qual deseja suporte'; + $Self->{Translation}->{'Message to let the user choose a queue.'} = 'Mensagem para o usuário escolher a fila'; + $Self->{Translation}->{'Queues IDs to not show in panel (comma separated).'} = 'IDs das filas que não devem aparecer no painel (separados por vírgula)'; + $Self->{Translation}->{'Customer footer/header suffix, if used.'} = 'Sufixo personalizado de cabeçalho/rodapé, se usado'; + $Self->{Translation}->{'Base URL to call to create ticket, queue ID added to the end'} = 'URl para criar ticket - id da fila adicionado ao final'; + $Self->{Translation}->{'Extra queues to show in panel. Format: One per Line, Name|URL'} = 'Filas extra, com URLs especiais. Formato: Nome|URL'; + $Self->{Translation}->{'Extra queues to show in panel, for public access. Format: One per Line, Name|URL'} = 'Filas extra no modo público, com URLs especiais. Formato: Nome|URL'; + + + + + + + return 1; +} +1; \ No newline at end of file diff --git a/src/Kernel/Language/pt_BR_QueuesPanelPublic.pm b/src/Kernel/Language/pt_BR_QueuesPanelPublic.pm new file mode 100755 index 0000000..1dba24d --- /dev/null +++ b/src/Kernel/Language/pt_BR_QueuesPanelPublic.pm @@ -0,0 +1,30 @@ +# Kernel/Modules/pt_BR_QueuesPanelPublic.pm - translations for QueuesPanelPublic +# +# Copyright (C) 2014-2018 SeTIC - UFSC - http://setic.ufsc.br/ +# Rodrigo Goncalves (rodrigo.g@ufsc.br) +# +# Version 01/08/2015 - Adjustments for OTRS 4 +# Version 2018-01-22 - Adjustments for OTRS 6 +# +# -- +# -- +# This software comes with ABSOLUTELY NO WARRANTY. For details, see +# the enclosed file COPYING for license information (AGPL). If you +# did not receive this file, see http://www.gnu.org/licenses/agpl.txt. +# -- +package Kernel::Language::pt_BR_QueuesPanelPublic; + +use strict; +use warnings; +use utf8; + +sub Data { + my $Self = shift; + + $Self->{Translation}->{'The following maintenances are in progress'} = 'As seguintes manutenções estão ocorrendo'; + $Self->{Translation}->{'Started at: '} = 'Iniciada em:'; + $Self->{Translation}->{'Queues panel'} = 'Novo chamado'; + $Self->{Translation}->{'Choose the service to ask for support'} = 'Escolha o serviço para o qual deseja suporte'; + return 1; +} +1; \ No newline at end of file diff --git a/src/Kernel/Modules/QueuesPanel.pm b/src/Kernel/Modules/QueuesPanel.pm new file mode 100755 index 0000000..ab291b8 --- /dev/null +++ b/src/Kernel/Modules/QueuesPanel.pm @@ -0,0 +1,99 @@ +# -- +# Kernel/Modules/QueuesPanel.pm - frontend module for choosing top queues +# +# Copyright (C) 2014-2018 SeTIC - UFSC - http://setic.ufsc.br/ +# Rodrigo Goncalves (rodrigo.g@ufsc.br) +# +# Version 01/08/2015 - Support for OTRS 4.0.3 +# Version 2018-01-22 - Support for OTRS 6 +# +# -- +# This software comes with ABSOLUTELY NO WARRANTY. For details, see +# the enclosed file COPYING for license information (AGPL). If you +# did not receive this file, see http://www.gnu.org/licenses/agpl.txt. +# -- +package Kernel::Modules::QueuesPanel; + +use strict; +use warnings; + +use Kernel::System::VariableCheck qw(:all); + +our @ObjectDependencies = ( + "Kernel::System::Web::Request", "Kernel::System::DB", + "Kernel::Output::HTML::Layout", "KerneL::System::Log", + "Kernel::Config", "Kernel::System::Queue", + "Kernel::System::QueuesPanel" +); + +sub new { + my ( $Type, %Param ) = @_; + + # allocate new hash for object + my $Self = {%Param}; + bless( $Self, $Type ); + + return $Self; +} + +sub Run { + my ( $Self, %Param ) = @_; + my %Data = (); + + my $ParamObject = $Kernel::OM->Get("Kernel::System::Web::Request"); + my $ConfigObject = $Kernel::OM->Get("Kernel::Config"); + my $LayoutObject = $Kernel::OM->Get("Kernel::Output::HTML::Layout"); + my $LanguageObject = $Kernel::OM->Get("Kernel::Language"); + + $Self->{Config} = + $ConfigObject->Get("Ticket::Frontend::Customer::QueuesPanel"); + my $msgChooseService = $Self->{Config}->{"MessageChooseQueue"}; + my $ignoreQueuesIDs = $Self->{Config}->{"IgnoreQueuesIDs"}; + my $customHeaderFooterID = "QP" . $Self->{Config}->{"CustomHeaderFooterID"}; + my $extraQueues = $Self->{Config}->{"ExtraQueues"}; + my $URL = $Self->{Config}->{"NewTicketURL"}; + + if ( $ParamObject->GetParam( Param => "Subaction" ) eq "QueueData" ) { + my $queuesPanelBuilder = + $Kernel::OM->Get("Kernel::System::QueuesPanel"); + my $queueData = $queuesPanelBuilder->BuildQueuesJS( + IgnoreQueuesIDs => $ignoreQueuesIDs, + ExtraQueues => $extraQueues, + URL => $URL + ); + return $LayoutObject->Attachment( + ContentType => 'application/json; charset=' + . $LayoutObject->{Charset}, + Content => $queueData, + Type => 'inline', + NoCache => 1, + ); + } + else { + $LayoutObject->AddJSData( + Key => 'QueuesPanel.Mode', + Value => "Authenticated", + ); + + my $queuesPanelBuilder = + $Kernel::OM->Get("Kernel::System::QueuesPanel"); + + $Data{MsgChooseQueue} = $msgChooseService; + + # build output + my $Output = $LayoutObject->CustomerHeader( + Type => $customHeaderFooterID, + Title => $LanguageObject->Translate("Queues panel") + ); + + $Output .= $LayoutObject->Output( + Data => \%Data, + TemplateFile => 'QueuesPanel', + ); + $Output .= + $LayoutObject->CustomerFooter( Type => $customHeaderFooterID ); + return $Output; + } +} + +1; diff --git a/src/Kernel/Modules/QueuesPanelPublic.pm b/src/Kernel/Modules/QueuesPanelPublic.pm new file mode 100755 index 0000000..8547723 --- /dev/null +++ b/src/Kernel/Modules/QueuesPanelPublic.pm @@ -0,0 +1,115 @@ +# -- +# Kernel/Modules/QueuesPanelPublic.pm - frontend module for choosing top queues +# +# Copyright (C) 2014-2018 SeTIC - UFSC - http://setic.ufsc.br/ +# Rodrigo Goncalves (rodrigo.g@ufsc.br) +# +# Version 01/12/2015 - Support for OTRS 4.0.3 +# Version 2018-01-22 - Support for OTRS 6 +# +# -- +# This software comes with ABSOLUTELY NO WARRANTY. For details, see +# the enclosed file COPYING for license information (AGPL). If you +# did not receive this file, see http://www.gnu.org/licenses/agpl.txt. +# -- +package Kernel::Modules::QueuesPanelPublic; + +use strict; +use warnings; + +use Kernel::System::VariableCheck qw(:all); + +our @ObjectDependencies = ( + "Kernel::System::Web::Request", "Kernel::System::DB", + "Kernel::Output::HTML::Layout", "KerneL::System::Log", + "Kernel::Config", "Kernel::System::Queue", + "Kernel::System::QueuesPanel" +); + +sub new { + my ( $Type, %Param ) = @_; + + # allocate new hash for object + my $Self = {%Param}; + bless( $Self, $Type ); + + return $Self; +} + +sub Run { + my ( $Self, %Param ) = @_; + my %Data = (); + + my $ParamObject = $Kernel::OM->Get("Kernel::System::Web::Request"); + my $LayoutObject = $Kernel::OM->Get("Kernel::Output::HTML::Layout"); + my $ConfigObject = $Kernel::OM->Get("Kernel::Config"); + my $LanguageObject = $Kernel::OM->Get("Kernel::Language"); + + ## If a ticket was received (CAS), meand the user is authenticated + if ( $ParamObject->GetParam( Param => "ticket" ) ) { + my $retorno = $LayoutObject->Redirect( OP => "Action=QueuesPanel", ); + $retorno =~ s/public/customer/g; + return $retorno; + } + + ## If trying to authenticate, forwards to CAS gateway + if ( $ParamObject->GetParam( Param => "autenticar" ) ) { + my $url = + $ConfigObject->Get('Customer::AuthModule::CAS::CASUrl') + . "/login?gateway=true&service=" + . "https://" + . $ENV{SERVER_NAME} + . $ENV{SCRIPT_NAME} + . "?Action=QueuesPanelPublic"; + return $LayoutObject->Redirect( ExtURL => $url, ); + } + + $Self->{Config} = $ConfigObject->Get("Ticket::Frontend::Customer::QueuesPanel"); + my $msgChooseService = $Self->{Config}->{"MessageChooseQueuePublic"}; + my $ignoreQueuesIDs = $Self->{Config}->{"IgnoreQueuesIDs"}; + my $customHeaderFooterID = "QP" . $Self->{Config}->{"CustomHeaderFooterID"}; + my $extraQueues = $Self->{Config}->{"ExtraQueuesPublic"}; + my $URL = $Self->{Config}->{"NewTicketURLPublic"}; + + if ( $ParamObject->GetParam(Param => "Subaction") eq "QueueData" ) { + my $queuesPanelBuilder = $Kernel::OM->Get("Kernel::System::QueuesPanel"); + my $queueData = $queuesPanelBuilder->BuildQueuesJS( + IgnoreQueuesIDs => $ignoreQueuesIDs, + ExtraQueues => $extraQueues, + URL => $URL + ); + return $LayoutObject->Attachment( + ContentType => 'application/json; charset=' + . $LayoutObject->{Charset}, + Content => $queueData, + Type => 'inline', + NoCache => 1, + ); + } + else { + $LayoutObject->AddJSData( + Key => 'QueuesPanel.Mode', + Value => "Public", + ); + $Data{MsgChooseQueue} = $msgChooseService; + + # build output + my $Output = $LayoutObject->CustomerHeader( + Type => $customHeaderFooterID, + Title => $LanguageObject->Translate("New ticket") + ); + + $Output .= $LayoutObject->Output( + Data => \%Data, + TemplateFile => 'QueuesPanel', + ); + + $Output .= + $LayoutObject->CustomerFooter( Type => $customHeaderFooterID ); + + return $Output; + } + +} + +1; diff --git a/src/Kernel/Output/HTML/Templates/Standard/CustomerFooterQP.tt b/src/Kernel/Output/HTML/Templates/Standard/CustomerFooterQP.tt new file mode 100755 index 0000000..162e811 --- /dev/null +++ b/src/Kernel/Output/HTML/Templates/Standard/CustomerFooterQP.tt @@ -0,0 +1,19 @@ +# -- +# CustomerFooterNTW.tt - Footer for QueuesPanel - SeTIC - UFSC - http://setic.ufsc.br/ +# +# Copyright (C) 2014-2018 SeTIC - UFSC - http://setic.ufsc.br/ +# Rodrigo Gonçalves - rodrigo.g@ufsc.br +# +# +# Version 2018-01-16 - Support for customizations +# -- +# This software comes with ABSOLUTELY NO WARRANTY. For details, see +# the enclosed file COPYING for license information (AGPL). If you +# did not receive this file, see http://www.gnu.org/licenses/agpl.txt. +# -- + + +[% InsertTemplate("CustomerFooterJS.tt") %] + + + diff --git a/src/Kernel/Output/HTML/Templates/Standard/CustomerHTMLHeadQP.tt b/src/Kernel/Output/HTML/Templates/Standard/CustomerHTMLHeadQP.tt new file mode 100755 index 0000000..1f37904 --- /dev/null +++ b/src/Kernel/Output/HTML/Templates/Standard/CustomerHTMLHeadQP.tt @@ -0,0 +1,164 @@ +# -- +# CustomerHTMLHeadUFSC.tt - provides FSC global HTML header +# +# Copyright (C) 2015, SeTIC - UFSC - http://setic.ufsc.br/ +# Rodrigo Goncalves (rodrigo.g@ufsc.br) +# +# Version 2018-01-22 - Support for OTRS 6 +# +# -- +# This software comes with ABSOLUTELY NO WARRANTY. For details, see +# the enclosed file COPYING for license information (AGPL). If you +# did not receive this file, see http://www.gnu.org/licenses/agpl.txt. +# -- + + +[% RenderBlockStart("MetaHttpEquivRefresh") %] +[% INCLUDE "HTMLHeadRefresh.tt" %] +[% RenderBlockEnd("MetaHttpEquivRefresh") %] +[% RenderBlockStart("MetaLink") %] + +[% RenderBlockEnd("MetaLink") %] + + +[% RenderBlockStart("CommonCSS") %] + +[% RenderBlockEnd("CommonCSS") %] + +[% RenderBlockStart("CommonCSS_IE8") %] + +[% RenderBlockEnd("CommonCSS_IE8") %] + +[% RenderBlockStart("ModuleCSS") %] + +[% RenderBlockEnd("ModuleCSS") %] + +[% RenderBlockStart("ModuleCSS_IE8") %] + +[% RenderBlockEnd("ModuleCSS_IE8") %] + + + + +[% RenderBlockStart("HeaderLogoCSS") %] + +[% RenderBlockEnd("HeaderLogoCSS") %] + + + + + + + + + [% Data.TitleArea | html %] [% Config("ProductName") %] + + + + +[% INCLUDE "HTMLHeadBlockEvents.tt" %] + + diff --git a/src/Kernel/Output/HTML/Templates/Standard/CustomerHeaderQP.tt b/src/Kernel/Output/HTML/Templates/Standard/CustomerHeaderQP.tt new file mode 100755 index 0000000..4e9afc4 --- /dev/null +++ b/src/Kernel/Output/HTML/Templates/Standard/CustomerHeaderQP.tt @@ -0,0 +1,25 @@ +# -- +# CustomerHeaderQPUFSC.tt - provides header for Queues Panel +# +# Copyright (C) 2014-2018 SeTIC - UFSC - http://setic.ufsc.br/ +# Rodrigo Goncalves (rodrigo.g@ufsc.br) +# +# Version 2018-01-22 - Support for OTRS 6 +# +# -- +# This software comes with ABSOLUTELY NO WARRANTY. For details, see +# the enclosed file COPYING for license information (AGPL). If you +# did not receive this file, see http://www.gnu.org/licenses/agpl.txt. +# -- +[%- INCLUDE "HTTPHeaders.tt" -%] + + + +[% InsertTemplate("Copyright.tt") %] +[% InsertTemplate("CustomerHTMLHeadQP.tt") %] + + + + +
+ \ No newline at end of file diff --git a/src/Kernel/Output/HTML/Templates/Standard/QueuesPanel.tt b/src/Kernel/Output/HTML/Templates/Standard/QueuesPanel.tt new file mode 100755 index 0000000..6b66207 --- /dev/null +++ b/src/Kernel/Output/HTML/Templates/Standard/QueuesPanel.tt @@ -0,0 +1,30 @@ +# -- +# Kernel/Output/HTML/Standard/QueuesPanel.tt - overview +# +# Copyright (C) SeTIC - UFSC - http://setic.ufsc.br/ +# Rodrigo Gonçalves - rodrigo.g@ufsc.br +# +# Version 01/12/2015 - Support for OTRS 4.0.3 +# Version 2018-01-22 - Suuport for OTRS 6 +# +# -- +# $Id: writing-otrs-application.xml,v 1.1 2010/08/13 08:59:28 mg Exp $ +# -- +# This software comes with ABSOLUTELY NO WARRANTY. For details, see +# the enclosed file COPYING for license information (AGPL). If you +# did not receive this file, see http://www.gnu.org/licenses/agpl.txt. +# -- + +
+
+

[% Translate("Tickets") | html %]

+
+
+ + +
+
[% Data.MsgChooseQueue %]
+ +
+ +
\ No newline at end of file diff --git a/src/Kernel/System/QueuesPanel.pm b/src/Kernel/System/QueuesPanel.pm new file mode 100755 index 0000000..e819be8 --- /dev/null +++ b/src/Kernel/System/QueuesPanel.pm @@ -0,0 +1,206 @@ +# -- +# Kernel/System/QueuesPanel.pm - logic for queues panel module +# +# Copyright (C) SeTIC - UFSC - http://setic.ufsc.br/ +# Version 29/10/2015 - First version +# +# -- +# This software comes with ABSOLUTELY NO WARRANTY. For details, see +# the enclosed file COPYING for license information (AGPL). If you +# did not receive this file, see http://www.gnu.org/licenses/agpl.txt. +# -- +package Kernel::System::QueuesPanel; + +use strict; +use warnings; + +use Kernel::System::VariableCheck qw(:all); +use Data::Dumper; +use JSON; + +our @ObjectDependencies = ( +"Kernel::System::DB", +"KerneL::System::Log", +"Kernel::System::Queue"); + +sub new { + my ( $Type, %Param ) = @_; + + # allocate new hash for object + my $Self = {%Param}; + bless( $Self, $Type ); + + return $Self; +} + + +=head + +Builds the JavaScript for the Queues Panel component (jQuery hColumns) + +Params: IgnoreQueuesID - comma-separated list of queues to ignore + ExtraQueues - line-break separated list of extra queues to include. Each line has a name for the queue and a link, separated by "||" - example: + SeTIC|http://setic.ufsc.br + +=cut +sub BuildQueuesJS { + my ( $Self, %Param ) = @_; + + # Get queues + my %Queues = (); + my %ExtraQueuesLinks = (); + + my $DBObject = $Kernel::OM->Get("Kernel::System::DB"); + + if ($Param{IgnoreQueuesIDs}) { + $DBObject->Prepare( SQL => "SELECT id, name FROM queue WHERE valid_id = 1 AND id NOT IN (" . $Param{IgnoreQueuesIDs} . ") ORDER BY name ASC", ); + } else { + $DBObject->Prepare( SQL => "SELECT id, name FROM queue WHERE valid_id = 1 ORDER BY name ASC", ); + } + + while ( my @Row = $DBObject->FetchrowArray() ) { + $Queues{ $Row[0] } = $Row[1]; + } + + if ($Param{ExtraQueues}) { + my @extraQueues = split('\n', $Param{ExtraQueues}); + my $id = -1; + foreach my $extraQueue (@extraQueues) { + my @data = split('\|', $extraQueue); + $Queues{$id} = $data[0]; + $ExtraQueuesLinks{$id} = $data[1]; + $id = $id - 1; + } + } + + my %result = (); + + for my $queue ( keys %Queues ) { + $result{$queue} = $Self->BuildQueueJS( Queues => \%Queues, Queue => $Queues{$queue}, QueueID => $queue, ExtraQueuesLinks => \%ExtraQueuesLinks, URL => + $Param{URL} ); + } + + $result{-1} = $Self->BuildTopQueuesJS( Queues => \%Queues, ExtraQueuesLinks => \%ExtraQueuesLinks, URL => + $Param{URL} ); + + my $json = encode_json \%result; + + $Self->Debug("Queue data: " . $json); + + return $json; +} + +=head + +Builds the top level queues JavaScript + +Params: Queues - queues list + ExtraQueuesLinks - links for custom (id < 0) queues + +=cut +sub BuildTopQueuesJS { + my ( $Self, %Param ) = @_; + my %Queues = %{ $Param{"Queues"} }; + my %ExtraQueuesLinks = %{ $Param{"ExtraQueuesLinks"} }; + + my @topQueues = grep { index( $Queues{$_}, '::' ) == -1 } keys %Queues; + + my @result = (); + + + for my $queue (sort {$Queues{$a} cmp $Queues{$b}} @topQueues) { + my %data = (); + + if ( grep { index( $Queues{$_}, $Queues{$queue} . "::" ) >= 0 } keys %Queues ) { + $data{id} = $queue; + $data{label} = $Self->LastQueue( $Queues{$queue} ); + $data{type} = "folder"; + } else { + $data{id} = $queue; + $data{label} = $Self->LastQueue( $Queues{$queue} ); + $data{type} = "link"; + $data{url} = ($queue < 0 ? $ExtraQueuesLinks{$queue} : $Param{"URL"} . $queue); + } + push @result, \%data; + } + + return \@result; +} + +=head + +Builds sub-queues JavaScript + +Params: Queues - queues list + ExtraQueuesLinks - links for custom (id < 0) queues + BaseQueue / BaseQueueID - which upper queue to generate subqueues + +=cut +sub BuildQueueJS { + my ( $Self, %Param ) = @_; + my %Queues = %{ $Param{"Queues"} }; + my $BaseQueue = $Param{"Queue"}; + my $BaseQueueID = $Param{"QueueID"}; + my %ExtraQueuesLinks = %{ $Param{"ExtraQueuesLinks"} }; + + # Get subqueues + my @subqueues = grep { index( $Queues{$_}, $BaseQueue . "::" ) >= 0 } keys %Queues; + my $level = () = $BaseQueue =~ /::/g; + $level = $level + 1; + + # Remove subsubqueues + @subqueues = grep { ( () = $Queues{$_} =~ /::/g ) == $level } @subqueues; + + # When there are no subqueues, there is no need to create a JS + if ( !@subqueues ) { + return ""; + } + + my @result = (); + + for my $queue (sort {$Queues{$a} cmp $Queues{$b}} @subqueues) { + my %data = (); + + + if ( grep { index( $Queues{$_}, $Queues{$queue} . "::" ) >= 0 } keys %Queues ) { + $data{id} = $queue; + $data{label} = $Self->LastQueue( $Queues{$queue} ); + $data{type} = "folder"; + } + else { + $data{id} = $queue; + $data{label} = $Self->LastQueue( $Queues{$queue} ); + $data{type} = "link"; + $data{url} = ($queue < 0 ? $ExtraQueuesLinks{$queue} : $Param{"URL"} . $queue); + } + + push @result, \%data; + } + + return \@result; + +} + +=head + +Returns last part of the queue name (strips parent queues) + +Params: QueueName + +=cut +sub LastQueue { + my $Self = shift; + my $queue = shift; + my @parts = split( "::", $queue ); + return $parts[-1]; +} + +sub Debug { + my $Self = shift; + my $msg = shift; + $Kernel::OM->Get("Kernel::System::Log")->Log( Priority => 'debug', Message => $msg ); +} + + +1; + diff --git a/src/QueuesPanel.sopm b/src/QueuesPanel.sopm new file mode 100755 index 0000000..84f6fe1 --- /dev/null +++ b/src/QueuesPanel.sopm @@ -0,0 +1,47 @@ + + + QueuesPanel + 1.3.0 + 6.0.x + SeTIC + Support for custom queues, layout fixes, support for custom layouts for header and footer + Support for OTRS 5.0.x + Support for OTRS 6.0.x + http://www.setic.ufsc.br + AGPL + Queue choosing panel + Painel para escolha de fila na abertura de chamados + Module installed successfully! + Módulo instalado com sucesso! + Queues Panel + ? + ? + BootstrapSuport + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/var/httpd/htdocs/js/QueuesPanel.js b/src/var/httpd/htdocs/js/QueuesPanel.js new file mode 100644 index 0000000..4e7816e --- /dev/null +++ b/src/var/httpd/htdocs/js/QueuesPanel.js @@ -0,0 +1,52 @@ +/** + * QueuesPanel module - SeTIC - UFSC - http://setic.ufsc.br/ + * Rodrigo Gonçalves - rodrigo.g@ufsc.br + * + * Version 2018-01-22 - Support for OTRS 6 + * + * + */ +var Core = Core || {}; +Core.Customer = Core.Customer || {}; + + +Core.Customer.QueuesPanel = (function (TargetNS) { + + TargetNS.Init = function() { + TargetNS.loadQueueData(); + } + + TargetNS.loadQueueData = function() { + var url; + + if (Core.Config.Get("QueuesPanel.Mode") === "Public") { + url = "/otrs/public.pl?Action=QueuesPanelPublic;Subaction=QueueData"; + } else { + url = "/otrs/customer.pl?Action=QueuesPanel;Subaction=QueueData"; + } + + $.getJSON(url, function(data) { + Core.Config.Set("QueuesPanel.QueueData", data); + TargetNS.InitQueues(); + }).fail(function(jqXHR, textStatus, errorThrown) { + alert("Erro ao recuperar: " + url + " => " + textStatus); + }); + } + + TargetNS.InitQueues = function() { + $("#columns").hColumns({ + nodeSource: function(node_id, callback) { + return callback(null, Core.Customer.QueuesPanel.buildQueue(node_id)); + } + }); + } + + TargetNS.buildQueue = function(node_id) { + var data = Core.Config.Get("QueuesPanel.QueueData")[node_id === null ? -1 : node_id]; + return data; + } + + Core.Init.RegisterNamespace(TargetNS, 'APP_MODULE'); + return TargetNS; + +}(Core.Customer.QueuesPanel || {})); \ No newline at end of file diff --git a/src/var/httpd/htdocs/js/thirdparty/hColumns/jquery.hcolumns.min.js b/src/var/httpd/htdocs/js/thirdparty/hColumns/jquery.hcolumns.min.js new file mode 100755 index 0000000..3638cc9 --- /dev/null +++ b/src/var/httpd/htdocs/js/thirdparty/hColumns/jquery.hcolumns.min.js @@ -0,0 +1,8 @@ +// hColumns by bu , BSD License + +(function(b){var k={nodeSource:function(){return window.alert("dummy source, you need to create a node source")},noContentString:"There is no node here",searchPlaceholderString:"Search...",searchable:!1,customNodeTypeIndicator:{},customNodeTypeHandler:{}},l={folder:function(a,d,c){a.nodeSource(c.id,function(d,c){return d?b.error(d):a.columnView._addColumnList(c,a.columnView)})},link:function(b,d,c){return window.open(c.url)}},m={folder:"icon-chevron-right",link:"icon-globe"},h={init:function(a){var d= +b.extend(k,a),c=b.extend(l,d.customNodeTypeHandler),f=b.extend(m,d.customNodeTypeIndicator);return this.each(function(){var a=b(this),g=a.data("columnView");h.settings=d;d.columnView=h;d.handlers=c;d.indicators=f;d.container_node=this;g||(a.data("hColumn",d),a.addClass("column-view-container"),b("
").addClass("column-view-composition").appendTo(a),a.on("click",".column ul li:not('.search')",d.columnView._entryClick),d.nodeSource(null,function(a,c){return a?b.error(a):d.columnView._addColumnList(c)}))})}, +_entryClick:function(){var a=b(this).parents(".column-view-container").data("hColumn"),d=b(this).parents(".column-view-container"),c=b(this).parents(".column"),f=b(this).parents(".column").index(),e=b(this).data("node-type"),g=b(this).data("node-data");b(d).find(".column-view-composition .column:gt("+f+")").remove();c.find(".active").removeClass("active");b(this).addClass("active");return a.handlers[e](a,this,g)},_addColumnList:function(a,d){var c=d?d:this,f=b("
    ");if(0===a.length)return f= +b("

    ").text(d.settings.noContentString),c._addColumn(f,c);c.settings.searchable&&c._addColumnSearch(f);for(var e=0;e').on("keyup","input",function(a){var c=b(this).val();2<=c.length?b(this).closest("li").siblings().each(function(){""!==c&&-1===b(this).data("node-data").label.toLowerCase().indexOf(c.toLowerCase())?b(this).hide():b(this).show()}):b(this).closest("li").siblings().show()}).appendTo(a)},_addColumn:function(a,d){var c=b("
    ").addClass("column");c.append(a);b(d.settings.container_node).find(".column-view-composition").append(c);b(d.settings.container_node).scrollLeft(b(".column-view-composition").width())}}; +b.fn.hColumns=function(a){if(h[a])return h[a].apply(this,Array.prototype.slice.call(arguments,1));if("object"!==typeof a&&a)b.error("Method "+a+" does not exist on jQuery.hColumns");else return h.init.apply(this,arguments)}})(jQuery); diff --git a/src/var/httpd/htdocs/skins/Customer/default/css/hColumns/hcolumns-intro.css b/src/var/httpd/htdocs/skins/Customer/default/css/hColumns/hcolumns-intro.css new file mode 100755 index 0000000..cbb3ac3 --- /dev/null +++ b/src/var/httpd/htdocs/skins/Customer/default/css/hColumns/hcolumns-intro.css @@ -0,0 +1,82 @@ +body { + background: #f5f5f5; + font-family: "Arial", sans-serif; +} + +.container { + padding: 2em; +} + +h1 { + color: #000; + font-size: 2em; + + margin: 0.75em 0; +} + +h1 small { + color: #ccc; + font-size: 0.5em; +} + +img { + margin: 20px; +} + +h2 { + margin: 1em 0; + + font-size: 1.25em; + color: #999; +} + +ol { + margin-left: 2em; + + list-style: upper-roman; +} + +ol li { + margin: 20px; +} + +.code-block { + border: 1px solid #ccc; + background: #fff; + + margin: 1em; + padding: 1em; +} + +.code-block strong { + display: block; + + margin: 1em; + font-weight: 700; +} + +.code-block strong.minor { + font-weight: 400; + color: #666; +} + +.code-block pre { + padding: 10px; + + font-family: monospace; +} + +.code-block p { + padding: 0 30px; + + margin: 10px 0; + + font-size: 13px; +} + +.code-block ol li { + font-size: 13px; + margin: 5px; + line-height: 20px; +} + diff --git a/src/var/httpd/htdocs/skins/Customer/default/css/hColumns/hcolumns.css b/src/var/httpd/htdocs/skins/Customer/default/css/hColumns/hcolumns.css new file mode 100755 index 0000000..ab9d4f5 --- /dev/null +++ b/src/var/httpd/htdocs/skins/Customer/default/css/hColumns/hcolumns.css @@ -0,0 +1,163 @@ +/*.ChooseQueue { + border-bottom-style: solid; + border-width: 1px; + padding: 5px; + margin-top: 5px; + margin-left: 10px; +}*/ + +.ChooseQueue { + background-color: rgb(198, 222, 255); +background-image: none; +background-position: 0px 0px; +background-repeat: repeat-x; +border-bottom-color: rgb(255, 255, 255); +border-bottom-style: solid; +border-bottom-width: 0px; +border-collapse: separate; +border-left-color: rgb(255, 255, 255); +border-left-style: solid; +border-left-width: 1px; +border-right-color: rgb(255, 255, 255); +border-right-style: solid; +border-right-width: 1px; +border-top-color: rgb(255, 255, 255); +border-top-style: solid; +border-top-width: 1px; +color: rgb(0, 0, 0); +cursor: default; +display: table-cell; +font-family: Arial, Verdana, sans-serif; +font-size: 14px; +font-weight: bold; +height: 12px; +margin-bottom: 0px; +margin-left: 0px; +margin-right: 0px; +margin-top: 0px; +padding-bottom: 5px; +padding-left: 15px; +padding-right: 15px; +padding-top: 5px; +text-align: center; +vertical-align: middle; +} + +.Queues { + width: 80%; + margin: 0 auto; + padding-top: 10px; +} + +/* column view container */ +.column-view-container { + width: 100%; + margin: 0px; + padding: 0px; + border: 1px solid #ccc; + background: #FFF; + display: block; + overflow-x: auto; + overflow-y: scroll; +} + +/* the composition div for colums */ +.column-view-composition { + display: table; + white-space: nowrap; +} + +/**/ +.column { + display: table-cell; + border-right: 1px solid #999; +} + +.column:last-child { +/* border-right: 0;*/ +} + +.column:only-child { + border-right: 1px solid #999; +} + +/* for error messages */ +.column > p { + margin: 10px; + color: #666; +} + +/* for column listing */ +.column ul { + margin: 0; + padding: 0; + width: 250px; + overflow-y: auto; + list-style: none; +} + +.column ul li { + position: relative; + margin: 0; + padding: 10px 20px 10px 10px; + overflow: hidden; + -o-text-overflow: ellipsis; /* pour Opera 9 */ + text-overflow: ellipsis; /* pour le reste du monde */ +} + +.column ul li:hover { + cursor: pointer; +} + +.column ul li i { + position: absolute; + top: 9px; + right: 5px; +} + +.column ul li:hover, .column ul li.active { + background: #999999; + color: #FFFFFF; +} + +.column ul li:hover a, .column ul li.active a { + color: #FFFFFF; +} + +.column ul li.search { + margin: 0; + padding: 5px; +} + +.column ul li.search input { + width: 100%; + margin: 0; +} + + +/* icon type, could be replace with FontAwesome */ +[class^="icon-"], [class*=" icon-"] { + display: inline-block; + width: 14px; + height: 14px; + margin-top: 1px; + *margin-right: .3em; + line-height: 14px; + vertical-align: text-top; + background-image: url("/otrs-web/skins/Customer/default/images/hColumns/glyphicons-halflings.png"); + background-position: 14px 14px; + background-repeat: no-repeat; +} + +.icon-chevron-right { + background-position: -456px -72px; +} + +.icon-globe { + #background-position: -336px -144px; + background-position: -800px -800px; +} + +.icon-file { + background-position: -23px -24px; +} diff --git a/src/var/httpd/htdocs/skins/Customer/default/css/hColumns/reset.css b/src/var/httpd/htdocs/skins/Customer/default/css/hColumns/reset.css new file mode 100755 index 0000000..af94440 --- /dev/null +++ b/src/var/httpd/htdocs/skins/Customer/default/css/hColumns/reset.css @@ -0,0 +1,48 @@ +/* http://meyerweb.com/eric/tools/css/reset/ + v2.0 | 20110126 + License: none (public domain) +*/ + +html, body, div, span, applet, object, iframe, +h1, h2, h3, h4, h5, h6, p, blockquote, pre, +a, abbr, acronym, address, big, cite, code, +del, dfn, em, img, ins, kbd, q, s, samp, +small, strike, strong, sub, sup, tt, var, +b, u, i, center, +dl, dt, dd, ol, ul, li, +fieldset, form, label, legend, +table, caption, tbody, tfoot, thead, tr, th, td, +article, aside, canvas, details, embed, +figure, figcaption, footer, header, hgroup, +menu, nav, output, ruby, section, summary, +time, mark, audio, video { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline; +} +/* HTML5 display-role reset for older browsers */ +article, aside, details, figcaption, figure, +footer, header, hgroup, menu, nav, section { + display: block; +} +body { + line-height: 1; +} +ol, ul { + list-style: none; +} +blockquote, q { + quotes: none; +} +blockquote:before, blockquote:after, +q:before, q:after { + content: ''; + content: none; +} +table { + border-collapse: collapse; + border-spacing: 0; +} \ No newline at end of file diff --git a/src/var/httpd/htdocs/skins/Customer/default/images/hColumns/glyphicons-halflings.png b/src/var/httpd/htdocs/skins/Customer/default/images/hColumns/glyphicons-halflings.png new file mode 100755 index 0000000..a996999 Binary files /dev/null and b/src/var/httpd/htdocs/skins/Customer/default/images/hColumns/glyphicons-halflings.png differ diff --git a/var/httpd/htdocs/js/thirdparty/hColumns/jquery.hcolumns.min.js b/var/httpd/htdocs/js/thirdparty/hColumns/jquery.hcolumns.min.js deleted file mode 100755 index 3638cc9..0000000 --- a/var/httpd/htdocs/js/thirdparty/hColumns/jquery.hcolumns.min.js +++ /dev/null @@ -1,8 +0,0 @@ -// hColumns by bu , BSD License - -(function(b){var k={nodeSource:function(){return window.alert("dummy source, you need to create a node source")},noContentString:"There is no node here",searchPlaceholderString:"Search...",searchable:!1,customNodeTypeIndicator:{},customNodeTypeHandler:{}},l={folder:function(a,d,c){a.nodeSource(c.id,function(d,c){return d?b.error(d):a.columnView._addColumnList(c,a.columnView)})},link:function(b,d,c){return window.open(c.url)}},m={folder:"icon-chevron-right",link:"icon-globe"},h={init:function(a){var d= -b.extend(k,a),c=b.extend(l,d.customNodeTypeHandler),f=b.extend(m,d.customNodeTypeIndicator);return this.each(function(){var a=b(this),g=a.data("columnView");h.settings=d;d.columnView=h;d.handlers=c;d.indicators=f;d.container_node=this;g||(a.data("hColumn",d),a.addClass("column-view-container"),b("
    ").addClass("column-view-composition").appendTo(a),a.on("click",".column ul li:not('.search')",d.columnView._entryClick),d.nodeSource(null,function(a,c){return a?b.error(a):d.columnView._addColumnList(c)}))})}, -_entryClick:function(){var a=b(this).parents(".column-view-container").data("hColumn"),d=b(this).parents(".column-view-container"),c=b(this).parents(".column"),f=b(this).parents(".column").index(),e=b(this).data("node-type"),g=b(this).data("node-data");b(d).find(".column-view-composition .column:gt("+f+")").remove();c.find(".active").removeClass("active");b(this).addClass("active");return a.handlers[e](a,this,g)},_addColumnList:function(a,d){var c=d?d:this,f=b("
      ");if(0===a.length)return f= -b("

      ").text(d.settings.noContentString),c._addColumn(f,c);c.settings.searchable&&c._addColumnSearch(f);for(var e=0;e').on("keyup","input",function(a){var c=b(this).val();2<=c.length?b(this).closest("li").siblings().each(function(){""!==c&&-1===b(this).data("node-data").label.toLowerCase().indexOf(c.toLowerCase())?b(this).hide():b(this).show()}):b(this).closest("li").siblings().show()}).appendTo(a)},_addColumn:function(a,d){var c=b("
      ").addClass("column");c.append(a);b(d.settings.container_node).find(".column-view-composition").append(c);b(d.settings.container_node).scrollLeft(b(".column-view-composition").width())}}; -b.fn.hColumns=function(a){if(h[a])return h[a].apply(this,Array.prototype.slice.call(arguments,1));if("object"!==typeof a&&a)b.error("Method "+a+" does not exist on jQuery.hColumns");else return h.init.apply(this,arguments)}})(jQuery); diff --git a/var/httpd/htdocs/skins/Customer/default/css/hColumns/hcolumns-intro.css b/var/httpd/htdocs/skins/Customer/default/css/hColumns/hcolumns-intro.css deleted file mode 100755 index cbb3ac3..0000000 --- a/var/httpd/htdocs/skins/Customer/default/css/hColumns/hcolumns-intro.css +++ /dev/null @@ -1,82 +0,0 @@ -body { - background: #f5f5f5; - font-family: "Arial", sans-serif; -} - -.container { - padding: 2em; -} - -h1 { - color: #000; - font-size: 2em; - - margin: 0.75em 0; -} - -h1 small { - color: #ccc; - font-size: 0.5em; -} - -img { - margin: 20px; -} - -h2 { - margin: 1em 0; - - font-size: 1.25em; - color: #999; -} - -ol { - margin-left: 2em; - - list-style: upper-roman; -} - -ol li { - margin: 20px; -} - -.code-block { - border: 1px solid #ccc; - background: #fff; - - margin: 1em; - padding: 1em; -} - -.code-block strong { - display: block; - - margin: 1em; - font-weight: 700; -} - -.code-block strong.minor { - font-weight: 400; - color: #666; -} - -.code-block pre { - padding: 10px; - - font-family: monospace; -} - -.code-block p { - padding: 0 30px; - - margin: 10px 0; - - font-size: 13px; -} - -.code-block ol li { - font-size: 13px; - margin: 5px; - line-height: 20px; -} - diff --git a/var/httpd/htdocs/skins/Customer/default/css/hColumns/hcolumns.css b/var/httpd/htdocs/skins/Customer/default/css/hColumns/hcolumns.css deleted file mode 100755 index 2bccc28..0000000 --- a/var/httpd/htdocs/skins/Customer/default/css/hColumns/hcolumns.css +++ /dev/null @@ -1,163 +0,0 @@ -/*.ChooseQueue { - border-bottom-style: solid; - border-width: 1px; - padding: 5px; - margin-top: 5px; - margin-left: 10px; -}*/ - -.ChooseQueue { - background-color: rgb(198, 222, 255); -background-image: none; -background-position: 0px 0px; -background-repeat: repeat-x; -border-bottom-color: rgb(255, 255, 255); -border-bottom-style: solid; -border-bottom-width: 0px; -border-collapse: separate; -border-left-color: rgb(255, 255, 255); -border-left-style: solid; -border-left-width: 1px; -border-right-color: rgb(255, 255, 255); -border-right-style: solid; -border-right-width: 1px; -border-top-color: rgb(255, 255, 255); -border-top-style: solid; -border-top-width: 1px; -color: rgb(0, 0, 0); -cursor: default; -display: table-cell; -font-family: Arial, Verdana, sans-serif; -font-size: 14px; -font-weight: bold; -height: 12px; -margin-bottom: 0px; -margin-left: 0px; -margin-right: 0px; -margin-top: 0px; -padding-bottom: 5px; -padding-left: 15px; -padding-right: 15px; -padding-top: 5px; -text-align: center; -vertical-align: middle; -} - -.Queues { - width: 80%; - margin: 0 auto; - padding-top: 10px; -} - -/* column view container */ -.column-view-container { - width: 100%; - margin: 0px; - padding: 0px; - border: 1px solid #ccc; - background: #FFF; - display: block; - overflow-x: auto; - overflow-y: hidden; -} - -/* the composition div for colums */ -.column-view-composition { - display: table; - white-space: nowrap; -} - -/**/ -.column { - display: table-cell; - border-right: 1px solid #999; -} - -.column:last-child { -/* border-right: 0;*/ -} - -.column:only-child { - border-right: 1px solid #999; -} - -/* for error messages */ -.column > p { - margin: 10px; - color: #666; -} - -/* for column listing */ -.column ul { - margin: 0; - padding: 0; - width: 250px; - overflow-y: auto; - list-style: none; -} - -.column ul li { - position: relative; - margin: 0; - padding: 10px 20px 10px 10px; - overflow: hidden; - -o-text-overflow: ellipsis; /* pour Opera 9 */ - text-overflow: ellipsis; /* pour le reste du monde */ -} - -.column ul li:hover { - cursor: pointer; -} - -.column ul li i { - position: absolute; - top: 9px; - right: 5px; -} - -.column ul li:hover, .column ul li.active { - background: #999999; - color: #FFFFFF; -} - -.column ul li:hover a, .column ul li.active a { - color: #FFFFFF; -} - -.column ul li.search { - margin: 0; - padding: 5px; -} - -.column ul li.search input { - width: 100%; - margin: 0; -} - - -/* icon type, could be replace with FontAwesome */ -[class^="icon-"], [class*=" icon-"] { - display: inline-block; - width: 14px; - height: 14px; - margin-top: 1px; - *margin-right: .3em; - line-height: 14px; - vertical-align: text-top; - background-image: url("/otrs-web/skins/Customer/default/images/hColumns/glyphicons-halflings.png"); - background-position: 14px 14px; - background-repeat: no-repeat; -} - -.icon-chevron-right { - background-position: -456px -72px; -} - -.icon-globe { - #background-position: -336px -144px; - background-position: -800px -800px; -} - -.icon-file { - background-position: -23px -24px; -} diff --git a/var/httpd/htdocs/skins/Customer/default/css/hColumns/reset.css b/var/httpd/htdocs/skins/Customer/default/css/hColumns/reset.css deleted file mode 100755 index af94440..0000000 --- a/var/httpd/htdocs/skins/Customer/default/css/hColumns/reset.css +++ /dev/null @@ -1,48 +0,0 @@ -/* http://meyerweb.com/eric/tools/css/reset/ - v2.0 | 20110126 - License: none (public domain) -*/ - -html, body, div, span, applet, object, iframe, -h1, h2, h3, h4, h5, h6, p, blockquote, pre, -a, abbr, acronym, address, big, cite, code, -del, dfn, em, img, ins, kbd, q, s, samp, -small, strike, strong, sub, sup, tt, var, -b, u, i, center, -dl, dt, dd, ol, ul, li, -fieldset, form, label, legend, -table, caption, tbody, tfoot, thead, tr, th, td, -article, aside, canvas, details, embed, -figure, figcaption, footer, header, hgroup, -menu, nav, output, ruby, section, summary, -time, mark, audio, video { - margin: 0; - padding: 0; - border: 0; - font-size: 100%; - font: inherit; - vertical-align: baseline; -} -/* HTML5 display-role reset for older browsers */ -article, aside, details, figcaption, figure, -footer, header, hgroup, menu, nav, section { - display: block; -} -body { - line-height: 1; -} -ol, ul { - list-style: none; -} -blockquote, q { - quotes: none; -} -blockquote:before, blockquote:after, -q:before, q:after { - content: ''; - content: none; -} -table { - border-collapse: collapse; - border-spacing: 0; -} \ No newline at end of file diff --git a/var/httpd/htdocs/skins/Customer/default/images/hColumns/glyphicons-halflings.png b/var/httpd/htdocs/skins/Customer/default/images/hColumns/glyphicons-halflings.png deleted file mode 100755 index a996999..0000000 Binary files a/var/httpd/htdocs/skins/Customer/default/images/hColumns/glyphicons-halflings.png and /dev/null differ -- libgit2 0.21.2