[Rt-commit] r4382 - in rtir/branches/1.9-EXPERIMENTAL: html/RTIR/Report

ruz at bestpractical.com ruz at bestpractical.com
Thu Jan 12 00:26:11 EST 2006


Author: ruz
Date: Thu Jan 12 00:26:10 2006
New Revision: 4382

Modified:
   rtir/branches/1.9-EXPERIMENTAL/   (props changed)
   rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Report/BulkReject.html

Log:
 r604 at cubic-pc:  cubic | 2006-01-12 08:18:52 +0300
 * Implement 'Reject and return' button (D.9.1.12).


Modified: rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Report/BulkReject.html
==============================================================================
--- rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Report/BulkReject.html	(original)
+++ rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Report/BulkReject.html	Thu Jan 12 00:26:10 2006
@@ -57,11 +57,16 @@
 % if( $session{'tickets'}->Count ) {
 <& /Elements/Submit,
     Name => "BulkReject",
-    Caption => $SubmitCaption,
+    Caption => loc("Reject selected incident reports"),
     Label => loc("Reject"),
     CheckAll => 1, ClearAll => 1,
     CheckboxName => 'SelectedTickets',
 &>
+<& /Elements/Submit,
+    Name => "BulkRejectAndReturn",
+    Caption => loc("Reject selected incident reports and return to reports list"),
+    Label => loc("Reject and return"),
+&>
 % }
 
 </form>
@@ -73,7 +78,7 @@
 $Format = "___RTIR_Check__,$Format" unless $Format =~ /__RTIR_Check__/;
 
 my ( @results );
-if ( $ARGS{'BulkReject'} ) {
+if ( $BulkReject ) {
     my @tempresults;
 
     #Iterate through each ticket we've been handed
@@ -127,6 +132,21 @@
                    @tempresults;
     # force redo search if we changed state
     $session{'tickets'}->RedoSearch;
+
+    if( $BulkRejectAndReturn ) {
+        $m->comp(
+            '/RTIR/Search/Results.html',
+            Queue     => $Queue,
+            Query     => $Query,
+            Format    => $Format,
+            Rows      => $Rows,
+            OrderBy   => $OrderBy,
+            Order     => $Order,
+            Page      => $Page,
+            results   => \@results,
+        );
+        return;
+    }
 }
 
 my $QueryString = $m->comp(
@@ -148,16 +168,18 @@
 
 </%INIT>
 <%ARGS>
-$Queue           => 'Incident Reports'
-$BaseQuery       => $m->comp( '/RTIR/Elements/BaseQuery', Queue => $Queue )
-$Query           => $m->comp( '/RTIR/Elements/NewQuery',  Queue => $Queue )
-$Status          => 'rejected'
-$Format          => $RT::RTIRSearchResultFormats->{'RejectReports'};
-$Rows            => 50
-$Page            => 1
-$OrderBy         => 'id'
-$Order           => 'ASC'
-$BaseURL         => $RT::WebPath . "/RTIR/Report/BulkReject.html?"
-$current_tab     => 'RTIR/Report/BulkReject.html'
- at SelectedTickets => ()
+$Queue               => 'Incident Reports'
+$BaseQuery           => $m->comp( '/RTIR/Elements/BaseQuery', Queue => $Queue )
+$Query               => $m->comp( '/RTIR/Elements/NewQuery',  Queue => $Queue )
+$Status              => 'rejected'
+$Format              => $RT::RTIRSearchResultFormats->{'RejectReports'};
+$Rows                => 50
+$Page                => 1
+$OrderBy             => 'id'
+$Order               => 'ASC'
+$BaseURL             => $RT::WebPath . "/RTIR/Report/BulkReject.html?"
+$current_tab         => 'RTIR/Report/BulkReject.html'
+ at SelectedTickets     => ()
+$BulkRejectAndReturn => 0
+$BulkReject          => $BulkRejectAndReturn
 </%ARGS>


More information about the Rt-commit mailing list