SpeedNavBar. Use ListBox for jump to Queue

Moderator: tto

ULiX
OTRS newbie
Posts: 16
Joined: 07 Jul 2010, 23:04
OTRS Version?: 2.4.7

SpeedNavBar. Use ListBox for jump to Queue

Postby ULiX » 08 Jul 2010, 03:06

This patch added ListBox with list of queue in NavigationBar.
Use this listbox allow speed go to other Queue.

Diff:

Code: Select all

diff -ruN /opt/Paths/ORIGIN/AgentTicketOverviewNavBar.dtl /opt/otrs/Kernel/Output/HTML/Standard/AgentTicketOverviewNavBar.dtl
--- /opt/Paths/ORIGIN/AgentTicketOverviewNavBar.dtl     2010-02-06 09:42:17.000000000 +1000
+++ /opt/otrs/Kernel/Output/HTML/Standard/AgentTicketOverviewNavBar.dtl 2010-06-28 10:45:59.000000000 +1100
@@ -13,8 +13,20 @@
 <table border="0" width="100%" cellspacing="0" cellpadding="3">
     <tr>
         <td class="mainhead">
+        <table border="0" width="100%" cellspacing="0" cellpadding="3">
+         <tr>
+           <td class="mainhead">
             $Env{"Box0"}$Text{"$QData{"TitleName"}"}: $Text{"$QData{"TitleValue"}"}$Env{"Box1"}
-        </td>
+           </td>
+           <td align="right" width="10" class="mainhead">
+               <form action="$Env{"CGIHandle"}" method="get">
+               <input type="hidden" name="Action" value="AgentTicketQueue"/>
+               $Data{"MoveQueuesSpeed"}
+               </form>
+           </td>
+         </tr>
+        </table>
+       </td>
     </tr>
 <!-- dtl:block:OverviewNavBarMain -->
     <tr>
diff -ruN /opt/otrs/Kernel/Output/HTML/LayoutTicket.pm.orig /opt/otrs/Kernel/Output/HTML/LayoutTicket.pm
--- /opt/otrs/Kernel/Output/HTML/LayoutTicket.pm.orig   2010-02-06 09:42:17.000000000 +1000
+++ /opt/otrs/Kernel/Output/HTML/LayoutTicket.pm        2010-06-28 11:22:15.000000000 +1100
@@ -985,7 +985,17 @@
         Action    => 'Action=' . $Env->{LayoutObject}->{Action},
         Link      => $Param{LinkPage},
     );
-
+#    ULiX: Start add block for SpeedNav
+    my $CustomQueue = $Self->{LayoutObject}->{LanguageObject}->Get($Self->{ConfigObject}->Get('Ticket::CustomQueue') || '???');
+    #my %AllQueues = $Self->{QueueObject}->GetAllQueues(UserID => $Self->{UserID}, Type => 'ro');
+    my %AllQueues = $Self->{TicketObject}->MoveList(UserID => $Self->{UserID},Type => 'ro',Action  => $Env->{Action},);
+    $Self->{QueueObject}->{"QG::GetAllQueues::UserID::$Self->{UserID}"} = undef;
+    $AllQueues{0}=$CustomQueue;
+    $Param{'MoveQueuesSpeed'} = $Self->{LayoutObject}->AgentQueueListOption(
+        Name       => 'QueueID',
+        Data       => \%AllQueues,
+        SelectedID => $Env->{QueueID},
+        OnChangeSubmit => 'submit()',
+    );
+# ULiX: Stop add block for SpeedNav
     $Env->{LayoutObject}->Block(
         Name => 'OverviewNavBar',
         Data => \%Param,
You do not have the required permissions to view the files attached to this post.

ULiX
OTRS newbie
Posts: 16
Joined: 07 Jul 2010, 23:04
OTRS Version?: 2.4.7

Re: SpeedNavBar. Use ListBox for jump to Queue

Postby ULiX » 04 Oct 2010, 04:33

04.10.2010
Update patch.

============
Change Line:
my %AllQueues = $Self->{QueueObject}->GetAllQueues();
on
#my %AllQueues = $Self->{QueueObject}->GetAllQueues(UserID => $Self->{UserID}, Type => 'ro');
or (better)
my %AllQueues = $Self->{TicketObject}->MoveList(UserID => $Self->{UserID},Type => 'ro',Action => $Env->{Action},);

Allows to limit visibility of the queues according to groups permits.
============
Add line
+ $Self->{QueueObject}->{"QG::GetAllQueues::UserID::$Self->{UserID}"} = undef;
Clear cashe after read Queue list for SpeedNavBar.
Else next call function GetAllQueues() return saved value, and ListBox for MovedQueues contain group with permission "ro" and not contain group with permission "move_into".


Return to “Patches / Modules”

Who is online

Users browsing this forum: No registered users and 1 guest