[Rt-commit] r4354 - in rtir/branches/1.9-EXPERIMENTAL:
html/RTIR/Incident html/RTIR/Report html/RTIR/Search/Elements
ruz at bestpractical.com
ruz at bestpractical.com
Sun Dec 25 04:11:51 EST 2005
Author: ruz
Date: Sun Dec 25 02:53:13 2005
New Revision: 4354
Modified:
rtir/branches/1.9-EXPERIMENTAL/ (props changed)
rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Incident/BulkAbandon.html
rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Report/BulkReject.html
rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Search/Elements/ShowResults
Log:
r595 at cubic-pc: cubic | 2005-12-25 10:56:30 +0300
* switch to the new checkbox .js routines
Modified: rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Incident/BulkAbandon.html
==============================================================================
--- rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Incident/BulkAbandon.html (original)
+++ rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Incident/BulkAbandon.html Sun Dec 25 02:53:13 2005
@@ -45,21 +45,20 @@
# XXX: cache result set to check if get empty results
my $result_set = $m->scomp(
'/RTIR/Search/Elements/ShowResults',
+ Queue => $Queue,
+ BaseQuery => $BaseQuery,
Query => $Query,
- QueryString => $QueryString,
- BaseURL => $BaseURL,
Format => $Format,
- RTIRCheck => $RTIRCheck,
+ Rows => $Rows,
+ OrderBy => $OrderBy,
+ Order => $Order,
+ Page => $Page,
+ BaseURL => $BaseURL,
);
</%perl>
% if( $session{'tickets'}->Count ) {
-<a href="BulkAbandon.html?RTIRCheck=All">[Select All]</a>
-<a href="BulkAbandon.html?RTIRCheck=None">[Unselect All]</a>
% $m->out( $result_set );
-<a href="BulkAbandon.html?RTIRCheck=All">[Select All]</a>
-<a href="BulkAbandon.html?RTIRCheck=None">[Unselect All]</a>
-<br />
<& /Widgets/TitleBoxStart, title => loc("Select recipients") &>
% foreach my $box( @CheckBox ) {
@@ -72,7 +71,13 @@
<& Elements/ReplyForm &>
-<& /Elements/Submit, Name => "BulkAbandon", Caption => $SubmitCaption, Label => loc("Reject") &>
+<& /Elements/Submit,
+ Name => "BulkAbandon",
+ Caption => $SubmitCaption,
+ Label => loc("Reject"),
+ CheckAll => 1, ClearAll => 1,
+ CheckboxName => 'SelectedTickets',
+&>
% } else {
<i><% loc("no incidents") %></i>
% }
@@ -80,8 +85,8 @@
<%INIT>
my @CheckBox = (
- { Value => 'Incident Reports', Title => loc("Reply to all reports") },
- { Value => 'Investigations', Title => loc("Reply to all investigations") },
+ { Value => 'Incident Reports', Title => loc("Reply to all reports") },
+ { Value => 'Investigations', Title => loc("Reply to all investigations") },
);
my $title = loc('Abandon Incidents');
my $SubmitCaption = loc("Reject selected incident reports");
@@ -157,9 +162,6 @@
# own? and can it be refined at all?
# We can only reject new tickets, so set the states.
-$Query ||= $m->comp('/RTIR/Elements/NewQuery', Queue => $Queue, Inactive => 1 );
-$BaseQuery ||= $m->comp( '/RTIR/Elements/BaseQuery', Queue => $Queue );
-
my $QueryString = $m->comp(
'/Elements/QueryString',
Query => $Query,
@@ -171,7 +173,6 @@
);
-$Query = "$BaseQuery AND ( $Query )";
my $path = "RTIR/Search/Refine.html?$QueryString&";
$path .= $m->comp( '/Elements/QueryString',
ResultPage => $BaseURL,
@@ -181,17 +182,16 @@
</%INIT>
<%ARGS>
-$Status => 'rejected'
-$RTIRCheck => 'None'
-$Query => undef
-$BaseQuery => undef
-$Queue => 'Incidents'
-$Format => $RT::RTIRSearchResultFormats->{'RejectReports'};
-$Rows => 50
-$Page => 1
-$OrderBy => 'id'
-$Order => 'ASC'
-$BaseURL => $RT::WebPath . "/RTIR/Report/BulkAbandon.html"
+$Status => 'rejected'
+$Queue => 'Incidents'
+$BaseQuery => $m->comp( '/RTIR/Elements/BaseQuery', Queue => $Queue );
+$Query => $m->comp( '/RTIR/Elements/NewQuery', Queue => $Queue, Inactive => 1 );
+$Format => $RT::RTIRSearchResultFormats->{'RejectReports'};
+$Rows => 50
+$Page => 1
+$OrderBy => 'id'
+$Order => 'ASC'
+$BaseURL => $RT::WebPath . "/RTIR/Report/BulkAbandon.html"
$current_tab => 'RTIR/Incident/BulkAbandon.html'
@SelectedTickets => ()
@ReplyToAll => ()
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 Sun Dec 25 02:53:13 2005
@@ -41,23 +41,27 @@
<form action="<%$RT::WebPath%>/RTIR/Report/BulkReject.html" method="POST">
<input type="hidden" name="Status" value="<% $Status %>">
-% if( $session{'tickets'}->Count ) {
-<a href="BulkReject.html?RTIRCheck=All">[Select All]</a>
-<a href="BulkReject.html?RTIRCheck=None">[Unselect All]</a>
-% }
-
<& /RTIR/Search/Elements/ShowResults,
- Query => $Query,
- QueryString => $QueryString,
- BaseURL => $BaseURL,
- Format => $Format,
- RTIRCheck => $RTIRCheck,
+ Queue => $Queue,
+ BaseQuery => $BaseQuery,
+ Query => $Query,
+ Format => $Format,
+ Rows => $Rows,
+ OrderBy => $OrderBy,
+ Order => $Order,
+ Page => $Page,
+ BaseURL => $BaseURL,
+ Format => $Format,
&>
% if( $session{'tickets'}->Count ) {
-<a href="BulkReject.html?RTIRCheck=All">[Select All]</a>
-<a href="BulkReject.html?RTIRCheck=None">[Unselect All]</a>
-<& /Elements/Submit, Name => "BulkReject", Caption => $SubmitCaption, Label => loc("Reject") &>
+<& /Elements/Submit,
+ Name => "BulkReject",
+ Caption => $SubmitCaption,
+ Label => loc("Reject"),
+ CheckAll => 1, ClearAll => 1,
+ CheckboxName => 'SelectedTickets',
+&>
% }
</form>
@@ -66,10 +70,7 @@
my $title = loc("Reject Incident Reports");
my $SubmitCaption = loc("Reject selected incident reports");
-$Format ||= $RT::RTIRSearchResultFormats->{'RejectReports'};
-unless( $Format =~ /__RTIR_Check__/ ) {
- $Format = "___RTIR_Check__,$Format";
-}
+$Format = "___RTIR_Check__,$Format" unless $Format =~ /__RTIR_Check__/;
my ( @results );
if ( $ARGS{'BulkReject'} ) {
@@ -130,7 +131,6 @@
my $QueryString = $m->comp(
'/Elements/QueryString',
- BaseQuery => $BaseQuery,
Query => $Query,
Format => $Format,
Rows => $Rows,
@@ -139,7 +139,6 @@
Page => $Page
);
-$Query = "$BaseQuery AND ( $Query )";
my $path = "RTIR/Search/Refine.html?$QueryString&";
$path .= $m->comp( '/Elements/QueryString',
ResultPage => $BaseURL,
@@ -150,16 +149,10 @@
</%INIT>
<%ARGS>
$Queue => 'Incident Reports'
-
-# FIXME: Doesn't work as expected with refined search.
-# also is not clear should it use Query from
-# /RTIR/Search/Results.html?Queue=Incident%20Reports or
-# own? and can it be refined at all?
$BaseQuery => $m->comp( '/RTIR/Elements/BaseQuery', Queue => $Queue )
$Query => $m->comp( '/RTIR/Elements/NewQuery', Queue => $Queue )
$Status => 'rejected'
-$RTIRCheck => 'None'
-$Format => undef
+$Format => $RT::RTIRSearchResultFormats->{'RejectReports'};
$Rows => 50
$Page => 1
$OrderBy => 'id'
Modified: rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Search/Elements/ShowResults
==============================================================================
--- rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Search/Elements/ShowResults (original)
+++ rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Search/Elements/ShowResults Sun Dec 25 02:53:13 2005
@@ -1,7 +1,6 @@
<& /Elements/TicketList,
%ARGS,
Collection => $collection,
- RTIRCheck => $RTIRCheck,
OrderBy => $OrderBy,
Order => $Order,
Rows => $Rows,
@@ -48,7 +47,6 @@
$OrderBy => $session{'CurrentSearchHash'}->{'OrderBy'} || 'id'
$Order => $session{'CurrentSearchHash'}->{'Order'} || 'ASC'
$BaseURL => $RT::WebPath."/Search/Results.html?"
-$RTIRCheck => undef
$ShowNavigation => 0
$AllowSorting => 1
$ShowEmpty => 0
More information about the Rt-commit
mailing list