[Rt-commit] r4263 - in rtir/branches/1.9-EXPERIMENTAL: . html/RTIR/Elements html/RTIR/Search html/RTIR/Search/Elements

ruz at bestpractical.com ruz at bestpractical.com
Wed Dec 7 08:00:17 EST 2005


Author: ruz
Date: Wed Dec  7 08:00:03 2005
New Revision: 4263

Modified:
   rtir/branches/1.9-EXPERIMENTAL/   (props changed)
   rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Elements/QueueTabs
   rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Elements/Tabs
   rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Search/Elements/RefineTabs
   rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Search/Refine.html
Log:
 r465 at cubic-pc:  cubic | 2005-12-07 16:01:20 +0300
  r457 at cubic-pc:  cubic | 2005-12-07 16:00:45 +0300
  * fix Refine tabs
 


Modified: rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Elements/QueueTabs
==============================================================================
--- rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Elements/QueueTabs	(original)
+++ rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Elements/QueueTabs	Wed Dec  7 08:00:03 2005
@@ -34,18 +34,16 @@
 &> 
 
 <%INIT>
-
 if( $QueryString =~ s/^&// ) {
-    require Carp;
-    Carp::cluck("queue string had leading &");
+    $RT::Logger->warning("queue string has leading &");
 }
 
 my ($Type) = $m->comp('/RTIR/Elements/Type', Queue => $QueueName);
 
 my $EscapedQueueName = $m->comp('/Elements/QueryString', Queue => $QueueName );
+my $current_toptab = 'RTIR/Search/Results.html?'. $EscapedQueueName;
 
 my $tabs = {};
-my $current_toptab = 'RTIR/Search/Results.html?'. $EscapedQueueName;
 
 my ($actions, $mytab);
 my $searchtabs = { } ;
@@ -207,7 +205,10 @@
 my $refinetabs = { };
 $refinetabs->{'_a'} = {
     class => "nav",
-    path => "RTIR/Search/Refine.html?ResultPage=/RTIR/Search/Results.html&$EscapedQueueName&$QueryString",
+    path => "RTIR/Search/Refine.html?$EscapedQueueName&$QueryString&".
+        $m->comp( '/Elements/QueryString',
+                  ResultPage => "/RTIR/Search/Results.html?$EscapedQueueName",
+                ),
     title => loc('Refine'),
 };
 
@@ -240,14 +241,14 @@
 
 foreach ( keys %{$tabs} ) {
     if ( $tabs->{ $_ }->{'path'} eq $current_tab ) {
-        $tabs->{ $_ }->{'subtabs'} = $subtabs;
+        $tabs->{ $_ }->{'subtabs'} = { %{$tabs->{ $_ }->{'subtabs'} || {}}, %$subtabs };
     }
 }
 
 </%INIT>
 <%ARGS>
 $Ticket => undef
-$subtabs => undef
+$subtabs => {}
 $appendtabs => undef
 $current_tab => undef
 $current_subtab => undef

Modified: rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Elements/Tabs
==============================================================================
--- rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Elements/Tabs	(original)
+++ rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Elements/Tabs	Wed Dec  7 08:00:03 2005
@@ -23,15 +23,18 @@
 %# 
 %# END LICENSE BLOCK
 <& /Elements/PageLayout, 
-    toptabs => $toptabs,
     topactions => $topactions,
-    tabs => $tabs,
     actions => $actions,
+
+    toptabs => $toptabs,
+    current_toptab => $current_toptab,
+
+    tabs => $tabs,
     current_tab => $current_tab,
     current_subtab => $current_subtab,
-    current_toptab => $current_toptab,
     title => $Title,
-    AppName => $RT::rtirname &>
+    AppName => $RT::rtirname,
+&>
 
 <%INIT>
 

Modified: rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Search/Elements/RefineTabs
==============================================================================
--- rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Search/Elements/RefineTabs	(original)
+++ rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Search/Elements/RefineTabs	Wed Dec  7 08:00:03 2005
@@ -6,15 +6,15 @@
 <%INIT>
 my ($Type) = $m->comp("/RTIR/Elements/Type", Queue => $Queue);
 
-my $refinetabs = { };
-$refinetabs->{'_a'} = {
-    class => "nav",
-    path  => $path,
-    title => loc('Refine'),
+my $refinetabs = {
+    _a => {
+        class => "nav",
+        path  => delete $ARGS{'path'},
+        title => loc('Refine'),
+    },
 };
 </%INIT>
-	
+
 <%ARGS>
-$path => undef
-$Queue => undef
+$Queue => ''
 </%ARGS>

Modified: rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Search/Refine.html
==============================================================================
--- rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Search/Refine.html	(original)
+++ rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Search/Refine.html	Wed Dec  7 08:00:03 2005
@@ -99,7 +99,7 @@
 my $AvailableColumns;
 my $CurrentFormat;
 
-my $BaseQuery = $m->comp('/RTIR/Elements/BaseQuery', Queue => $Queue);
+$BaseQuery ||= $m->comp('/RTIR/Elements/BaseQuery', Queue => $Queue);
 
 if ($NewQuery) {
     # If it's a new query, wipe it ourselves...
@@ -163,15 +163,17 @@
 <%ARGS>
 $id => undef
 $Ticket => undef
+
 $title => loc("Refine Search")
 $ResultPage => undef
 $BaseURL => 'RTIR/Search/Refine.html'
 $NewQuery => 0
-$Queue => undef
-$Query => undef
+
+$Queue => ''
+$BaseQuery => ''
+$Query => ''
 $QueryString => undef
-$Format => undef 
-$HideResults => 0
+$Format => undef
 $Rows => 50
 $Page => 1
 $OrderBy => 'id'


More information about the Rt-commit mailing list