[Rt-commit] r12729 - in rt/branches/3.8-TESTING: . share/html/Search/Elements share/html/User/Elements

jesse at bestpractical.com jesse at bestpractical.com
Thu May 29 10:13:12 EDT 2008


Author: jesse
Date: Thu May 29 10:13:11 2008
New Revision: 12729

Modified:
   rt/branches/3.8-TESTING/   (props changed)
   rt/branches/3.8-TESTING/share/html/Search/Elements/ResultViews
   rt/branches/3.8-TESTING/share/html/Ticket/Elements/Tabs
   rt/branches/3.8-TESTING/share/html/User/Elements/Tabs

Log:
 r32006 at 124:  jesse | 2008-05-29 10:12:09 -0400
 * move shredder out of the 'tools' and into the menu


Modified: rt/branches/3.8-TESTING/share/html/Search/Elements/ResultViews
==============================================================================
--- rt/branches/3.8-TESTING/share/html/Search/Elements/ResultViews	(original)
+++ rt/branches/3.8-TESTING/share/html/Search/Elements/ResultViews	Thu May 29 10:13:11 2008
@@ -61,10 +61,6 @@
 <li><a href="<%$RSSFeedURL%>"><&|/l&>RSS</&></a></li>
 <li><a href="<% $RT::WebURL %>NoAuth/iCal/<% $ical_path %>"><% loc('iCal') %></a></li>
 <li><a href="<%RT->Config->Get('WebPath')%>/Tools/Offline.html<%$ShortQueryString%>"><&|/l&>Editable text</&></a></li>
-%if ( $session{'CurrentUser'}->HasRight( Right => 'SuperUser', Object => $RT::System ) ) {
-%    my $query_string = $m->comp('/Elements/QueryString', Search => 1, Plugin => 'Tickets', 'Tickets:query' => $Query, 'Tickets:limit' => $Rows || '',);
-<li><a href="<% RT->Config->Get('WebPath') %>/Admin/Tools/Shredder/?<% $query_string |n %>"><&|/l&>Delete tickets</&></a></li>
-% }
 </ul>
 <form method="get" action="<%RT->Config->Get('WebPath')%>/Search/Chart.html">
 % my %hiddens = (Query => $Query, Format => $Format, Rows => $Rows, OrderBy => $OrderBy, Order => $Order);

Modified: rt/branches/3.8-TESTING/share/html/Ticket/Elements/Tabs
==============================================================================
--- rt/branches/3.8-TESTING/share/html/Ticket/Elements/Tabs	(original)
+++ rt/branches/3.8-TESTING/share/html/Ticket/Elements/Tabs	Thu May 29 10:13:11 2008
@@ -200,18 +200,23 @@
     elsif (defined $actions->{A}) { $actions->{A}->{separator} = 1 }
 }
 
-my $args;
-$args= "?" . $m->comp(
-    '/Elements/QueryString',
-    SavedSearchId => $ARGS{'SavedSearchId'} || $session{'CurrentSearchHash'}->{'SearchId'},
-    Query         => $ARGS{'Query'}         || $session{'CurrentSearchHash'}->{'Query'},
-    Format        => $ARGS{'Format'}        || $session{'CurrentSearchHash'}->{'Format'},
-    OrderBy       => $ARGS{'OrderBy'}       || $session{'CurrentSearchHash'}->{'OrderBy'},
-    Order         => $ARGS{'Order'}         || $session{'CurrentSearchHash'}->{'Order'},
-    Page          => $ARGS{'Page'}          || $session{'CurrentSearchHash'}->{'Page'},
-    Rows          => $ARGS{'Rows'},
-  ) if ($ARGS{'Query'} or $session{'CurrentSearchHash'}->{'Query'});
-$args ||= '';
+my $args ='';
+my %query_args;
+
+if ( $ARGS{'Query'} or $session{'CurrentSearchHash'}->{'Query'} ) {
+    $args = "?" . $m->comp( '/Elements/QueryString', %query_args );
+    %query_args = {
+
+        SavedSearchId => $ARGS{'SavedSearchId'} || $session{'CurrentSearchHash'}->{'SearchId'},
+        Query  => $ARGS{'Query'}  || $session{'CurrentSearchHash'}->{'Query'},
+        Format => $ARGS{'Format'} || $session{'CurrentSearchHash'}->{'Format'},
+        OrderBy => $ARGS{'OrderBy'} || $session{'CurrentSearchHash'}->{'OrderBy'},
+        Order => $ARGS{'Order'} || $session{'CurrentSearchHash'}->{'Order'},
+        Page  => $ARGS{'Page'}  || $session{'CurrentSearchHash'}->{'Page'},
+        Rows  => $ARGS{'Rows'} 
+    };
+
+}
 
 $tabs->{"f"} = { path      => "Search/Build.html?NewQuery=1",
                  title     => loc('New Search')};
@@ -233,9 +238,26 @@
   if ($current_tab =~  m{Search/Bulk.html}) {
     $current_tab = "Search/Bulk.html$args";
   }
-  foreach my $searchtab (keys %{$searchtabs}) {
+
+if ( $session{'CurrentUser'} ->HasRight( Right => 'SuperUser', Object => $RT::System ) ) {
+    my $shred_args = $m->comp( '/Elements/QueryString',
+        Search          => 1,
+        Plugin          => 'Tickets',
+        'Tickets:query' => $query_args{'Query'},
+        'Tickets:limit' => $query_args{'Rows'}
+    );
+
+    $tabs->{"shredder"} = {
+        path  => 'Admin/Tools/Shredder/' . $shred_args,
+        title => loc('Shredder')
+    };
+
+}
+
+}
+
+foreach my $searchtab (keys %{$searchtabs}) {
     ($searchtab =~ /^_/) ? $tabs->{"s".$searchtab} = $searchtabs->{$searchtab} : $tabs->{"z_".$searchtab} = $searchtabs->{$searchtab};
-  }
 }
 </%INIT>
 

Modified: rt/branches/3.8-TESTING/share/html/User/Elements/Tabs
==============================================================================
--- rt/branches/3.8-TESTING/share/html/User/Elements/Tabs	(original)
+++ rt/branches/3.8-TESTING/share/html/User/Elements/Tabs	Thu May 29 10:13:11 2008
@@ -70,7 +70,7 @@
 	       s => { title => loc('Dashboards'),
 			   path => 'Dashboards/index.html',
 			 },
-	       t => { title => loc('Other'),
+	       t => { title => loc('Settings'),
 			   path => 'Prefs/Other.html',
 			 },
 	     };


More information about the Rt-commit mailing list