[Rt-commit] [svn] r1407 - in rtir/branches/1.1/html/RTIR: . Elements Incident Report Search

leira at pallas.eruditorum.org leira at pallas.eruditorum.org
Thu Sep 2 18:53:48 EDT 2004


Author: leira
Date: Thu Sep  2 18:53:48 2004
New Revision: 1407

Modified:
   rtir/branches/1.1/html/RTIR/Elements/QueueTabs
   rtir/branches/1.1/html/RTIR/Incident/LinkToIncident.html
   rtir/branches/1.1/html/RTIR/Merge.html
   rtir/branches/1.1/html/RTIR/Report/BulkReject.html
   rtir/branches/1.1/html/RTIR/Search/LinkRefine.html
   rtir/branches/1.1/html/RTIR/Search/MergeRefine.html
Log:
Use the new RefineTabs element, rather than each component adding that submenu on its own.


Modified: rtir/branches/1.1/html/RTIR/Elements/QueueTabs
==============================================================================
--- rtir/branches/1.1/html/RTIR/Elements/QueueTabs	(original)
+++ rtir/branches/1.1/html/RTIR/Elements/QueueTabs	Thu Sep  2 18:53:48 2004
@@ -200,13 +200,6 @@
 }
 } else {
   $mytab = $current_tab;
-  foreach my $tab ( sort keys %{$tabs} ) {
-      if ( $tabs->{$tab}->{'path'} eq $current_tab ) {
-	  $tabs->{$tab}->{"subtabs"}        = $subtabs;
-	  $tabs->{'this'}->{"current_subtab"}        = 
-	      $tabs->{$tab}->{"path"};
-      }
-  }
 }
 
 $tabs->{"A"} = { path      => 'RTIR/Create.html?Queue=' . $QueueName,
@@ -237,6 +230,10 @@
     $tabs->{'h'} = { title => loc('Link [_1] #[_2]', $childtype, $ChildObj->Id),
 				  path  => "RTIR/Incident/LinkToIncident.html?child=" . $ChildObj->Id,
 				  separator => 1 };
+
+    if ( $tabs->{'h'}->{'path'} eq $current_tab ) {
+	$tabs->{'h'}->{"subtabs"}        = $subtabs;
+    }
 }
 
 </%INIT>

Modified: rtir/branches/1.1/html/RTIR/Incident/LinkToIncident.html
==============================================================================
--- rtir/branches/1.1/html/RTIR/Incident/LinkToIncident.html	(original)
+++ rtir/branches/1.1/html/RTIR/Incident/LinkToIncident.html	Thu Sep  2 18:53:48 2004
@@ -26,18 +26,18 @@
     Title => $title, 
     Refresh => $session{'tickets_refresh_interval'} &>
 
-<& '/RTIR/Incident/Elements/Tabs', 
-    ChildObj => $ChildObj, 
-    current_tab => "RTIR/Incident/LinkToIncident.html?child=$child",
-    current_subtab => "RTIR/Incident/LinkToIncident.html?child=$child",
-    subtabs => $refinetabs,
-    Title => $title,
-    Format => $Format,
-    Query => $Query,
-    Rows => $Rows,
-    OrderBy => $OrderBy,
-    Order => $Order,
-    QueryString => $QueryString,
+<& '/RTIR/Search/Elements/RefineTabs',
+   path => "RTIR/Search/LinkRefine.html?Queue=Incidents&child=$child$QueryString",
+   current_tab => "RTIR/Incident/LinkToIncident.html?child=$child",
+   ChildObj => $ChildObj, 
+   Queue => 'Incidents',
+   Title => $title,
+   Format => $Format,
+   Query => $Query,
+   Rows => $Rows,
+   OrderBy => $OrderBy,
+   Order => $Order,
+   QueryString => $QueryString,
 &>
 
 <form action='Display.html' method=get>
@@ -92,13 +92,6 @@
 $Query = "$BaseQuery AND ( $Query )";
 $ARGS{'Query'} = $Query;
 
-my $refinetabs = { };
-
-$refinetabs->{'_a'} = {
-    class => "nav",
-    path => "RTIR/Search/LinkRefine.html?Queue=Incidents&child=$child$QueryString",
-    title => loc('Refine') };
-	
 </%INIT>
 
 <%ARGS>

Modified: rtir/branches/1.1/html/RTIR/Merge.html
==============================================================================
--- rtir/branches/1.1/html/RTIR/Merge.html	(original)
+++ rtir/branches/1.1/html/RTIR/Merge.html	Thu Sep  2 18:53:48 2004
@@ -23,18 +23,22 @@
 %# 
 %# END LICENSE BLOCK
 <& /Elements/Header, Title => $title, Refresh => $session{'tickets_refresh_interval'} &>
-<& '/RTIR/'.$Type.'/Elements/Tabs', 
-    Ticket => $Ticket, 
-    current_tab => "RTIR/Merge.html?id=".$Ticket->Id. "$QueryString", 
-    subtabs => $refinetabs,
-    Title => $title,
-    Format => $Format,
-    Query => $Query,
-    Rows => $Rows,
-    OrderBy => $OrderBy,
-    Order => $Order,
-    QueryString => $QueryString,
- &>
+
+id: <%$id%><br>
+QueryString: <%$QueryString%><br>
+<& '/RTIR/Search/Elements/RefineTabs',
+   path => "RTIR/Search/MergeRefine.html?Queue=" . $Ticket->QueueObj->Name . "&id=$id$QueryString",
+   Ticket => $Ticket, 
+   current_subtab => "RTIR/Merge.html?id=".$Ticket->Id. "$QueryString", 
+   Queue => $Queue,
+   Title => $title,
+   Format => $Format,
+   Query => $Query,
+   Rows => $Rows,
+   OrderBy => $OrderBy,
+   Order => $Order,
+   QueryString => $QueryString,
+&>
 
 <& /RTIR/Elements/ListActions, actions => \@results &>
 
@@ -103,13 +107,6 @@
 $Query = "$BaseQuery AND ( $Query )";
 $ARGS{'Query'} = $Query;
 
-my $refinetabs = { };
-
-$refinetabs->{'_a'} = {
-    class => "nav",
-    path => "RTIR/Search/MergeRefine.html?Queue=" . $Ticket->QueueObj->Name . "&id=$id$QueryString",
-    title => loc('Refine') };
-	
 </%INIT>
       
 <%ARGS>

Modified: rtir/branches/1.1/html/RTIR/Report/BulkReject.html
==============================================================================
--- rtir/branches/1.1/html/RTIR/Report/BulkReject.html	(original)
+++ rtir/branches/1.1/html/RTIR/Report/BulkReject.html	Thu Sep  2 18:53:48 2004
@@ -25,15 +25,18 @@
 <& /RTIR/Elements/Header, 
     Title => $title, 
     Refresh => $session{'tickets_refresh_interval'} &>
-<& 'Elements/Tabs', 
-    current_tab => 'RTIR/Report/BulkReject.html', 
-    Title => $title,
-    Format => $Format,
-    Query => $Query,
-    Rows => $Rows,
-    OrderBy => $OrderBy,
-    Order => $Order,
-    QueryString => $QueryString,
+
+<& '/RTIR/Search/Elements/RefineTabs',
+   path => "RTIR/Search/RejectRefine.html?Queue=$Queue$QueryString",
+   Queue => $Queue,
+   current_tab => $current_tab, 
+   Title => $title,
+   Format => $Format,
+   Query => $Query,
+   Rows => $Rows,
+   OrderBy => $OrderBy,
+   Order => $Order,
+   QueryString => $QueryString,
 &>
 
 <& /RTIR/Elements/ListActions, actions => \@results &>
@@ -121,13 +124,6 @@
 $Query = "$BaseQuery AND ( $Query )";
 $ARGS{'Query'} = $Query;
 
-my $refinetabs = { };
-
-$refinetabs->{'_a'} = {
-    class => "nav",
-    path => "RTIR/Search/RejectRefine.html?Queue=$Queue$QueryString",
-    title => loc('Refine') };
-	
 </%INIT>
 
 <%ARGS>
@@ -142,4 +138,5 @@
 $OrderBy => 'id'
 $Order => 'ASC'
 $BaseURL => "/RTIR/Report/BulkReject.html"
+$current_tab => 'RTIR/Report/BulkReject.html'
 </%ARGS>

Modified: rtir/branches/1.1/html/RTIR/Search/LinkRefine.html
==============================================================================
--- rtir/branches/1.1/html/RTIR/Search/LinkRefine.html	(original)
+++ rtir/branches/1.1/html/RTIR/Search/LinkRefine.html	Thu Sep  2 18:53:48 2004
@@ -44,12 +44,22 @@
 %# 
 %# }}} END BPS TAGGED BLOCK
 <& /Elements/Header, Title => $title &>
-<& '/RTIR/Incident/Elements/Tabs', 
-    ChildObj => $Ticket, 
-    current_tab => $current_tab, 
-    current_subtab => $current_subtab, 
-    subtabs => $refinetabs,
-    Title => $title &>
+
+<& '/RTIR/Search/Elements/RefineTabs',
+   path => "RTIR/Search/LinkRefine.html?Queue=$Queue&child=".$child,
+   current_tab => "RTIR/Incident/LinkToIncident.html?child=".$child,
+   current_subtab => "RTIR/Search/LinkRefine.html?Queue=$Queue&child=".$child,
+   ChildObj => $Ticket, 
+   Queue => 'Incidents',
+   Title => $title,
+   Format => $Format,
+   Query => $Query,
+   Rows => $Rows,
+   OrderBy => $OrderBy,
+   Order => $Order,
+   QueryString => $QueryString,
+   child => $child,
+&>
 
 <& /RTIR/Search/Elements/BuildQuery, 
     queues => \%queues, 
@@ -70,13 +80,6 @@
 my $Ticket = new RT::Ticket($session{'CurrentUser'});
 $Ticket->Load($child);
 
-my $mergetabs = { } ;
-
-$mergetabs->{'_a'} = {
-    class => "nav",
-    path => $current_subtab,
-    title => loc('Refine') };
-	
 my %queues = ();
 my $results;
 my $optionlist;
@@ -84,7 +87,6 @@
 my $dirty;
 my $AvailableColumns;
 my $CurrentFormat;
-my ( $Format, $Order, $OrderBy, $RowsPerPage );
 
 my $BaseQuery = $m->comp('/RTIR/Elements/BaseQuery', Queue => $Queue);
 
@@ -99,7 +101,7 @@
     $Format = '';
     $Order = '';
     $OrderBy = '';
-    $RowsPerPage = '';
+    $Rows = '';
     # ($search hasn't been set yet; no need to clear)
 
     $m->comp('Elements/ClearQuery', %ARGS);
@@ -114,7 +116,7 @@
     $ARGS{'NewQuery'} = 0;
 }
 
-( $Query, $Format, $Order, $OrderBy, $RowsPerPage ) = 
+( $Query, $Format, $Order, $OrderBy, $Rows ) = 
     $m->comp('/RTIR/Search/Elements/ProcessQuery', 
 	     queues => \%queues, 
 	     results => \$results, 
@@ -136,28 +138,25 @@
 	    Format => $Format,
             Order => $Order,
             OrderBy => $OrderBy,
-            Rows => $RowsPerPage) if ($Query);
+            Rows => $Rows) if ($Query);
 # }}}
 
 $ARGS{'Query'} = $Query;
 
-my $refinetabs = { };
-
-$refinetabs->{'_a'} = {
-    class => "nav",
-    path => "RTIR/Search/LinkRefine.html?Queue=".$Queue."&child=$child$QueryString",
-    title => loc('Refine') };
-
 $ARGS{'id'} = $child;
 </%INIT>
 
 <%ARGS>
+$ResultPage => '/RTIR/Incident/LinkToIncident.html'
 $NewQuery => 0
 $Queue => undef
 $Query => undef
 $child => undef
-$current_tab => "RTIR/Incident/LinkToIncident.html?child=".$child
-$current_subtab => "RTIR/Search/LinkRefine.html?Queue=$Queue&child=".$child
 $FormAction => 'LinkRefine.html'
-$ResultPage => '/RTIR/Incident/LinkToIncident.html'
+$Format => undef 
+$HideResults => 0
+$Rows => 50
+$Page => 1
+$OrderBy => 'id'
+$Order => 'ASC'
 </%ARGS>

Modified: rtir/branches/1.1/html/RTIR/Search/MergeRefine.html
==============================================================================
--- rtir/branches/1.1/html/RTIR/Search/MergeRefine.html	(original)
+++ rtir/branches/1.1/html/RTIR/Search/MergeRefine.html	Thu Sep  2 18:53:48 2004
@@ -44,12 +44,20 @@
 %# 
 %# }}} END BPS TAGGED BLOCK
 <& /Elements/Header, Title => $title &>
-<& '/RTIR/'.$Type.'/Elements/Tabs', 
-    Ticket => $Ticket, 
-    current_tab => $current_tab, 
-    current_subtab => $current_subtab, 
-    subtabs => $mergetabs,
-    Title => $title &>
+
+<& '/RTIR/Search/Elements/RefineTabs',
+   path => "RTIR/Search/MergeRefine.html?Queue=$Queue&id=".$id.$QueryString,
+   current_subtab => "RTIR/Merge.html?id=".$id.$QueryString,
+   Ticket => $Ticket, 
+   Queue => 'Incidents',
+   Title => $title,
+   Format => $Format,
+   Query => $Query,
+   Rows => $Rows,
+   OrderBy => $OrderBy,
+   Order => $Order,
+   QueryString => $QueryString,
+&>
 
 <& /RTIR/Search/Elements/BuildQuery, 
     queues => \%queues, 
@@ -69,13 +77,6 @@
 my $Ticket = new RT::Ticket($session{'CurrentUser'});
 $Ticket->Load($id);
 
-my $mergetabs = { } ;
-
-$mergetabs->{'_a'} = {
-    class => "nav",
-    path => $current_subtab,
-    title => loc('Refine') };
-	
 my %queues = ();
 my $results;
 my $optionlist;
@@ -83,7 +84,6 @@
 my $dirty;
 my $AvailableColumns;
 my $CurrentFormat;
-my ( $Format, $Order, $OrderBy, $RowsPerPage );
 
 my $BaseQuery = $m->comp('/RTIR/Elements/BaseQuery', Queue => $Queue);
 
@@ -98,7 +98,7 @@
     $Format = '';
     $Order = '';
     $OrderBy = '';
-    $RowsPerPage = '';
+    $Rows = '';
     # ($search hasn't been set yet; no need to clear)
 
     $m->comp('Elements/ClearQuery', %ARGS);
@@ -113,7 +113,7 @@
     $ARGS{'NewQuery'} = 0;
 }
 
-( $Query, $Format, $Order, $OrderBy, $RowsPerPage ) = 
+( $Query, $Format, $Order, $OrderBy, $Rows ) = 
     $m->comp('/RTIR/Search/Elements/ProcessQuery', 
 	     queues => \%queues, 
 	     results => \$results, 
@@ -136,7 +136,7 @@
 	    Format => $Format,
             Order => $Order,
             OrderBy => $OrderBy,
-            Rows => $RowsPerPage) if ($Query);
+            Rows => $Rows) if ($Query);
 # }}}
 
 $ARGS{'Query'} = $Query;
@@ -148,8 +148,12 @@
 $Queue => undef
 $Query => undef
 $id => undef
-$current_tab => "RTIR/Merge.html?id=".$id
-$current_subtab => "RTIR/Search/MergeRefine.html?Queue=$Queue&id=".$id
 $FormAction => 'MergeRefine.html'
 $ResultPage => '/RTIR/Merge.html'
+$Format => undef 
+$HideResults => 0
+$Rows => 50
+$Page => 1
+$OrderBy => 'id'
+$Order => 'ASC'
 </%ARGS>


More information about the Rt-commit mailing list