[Rt-commit] r4733 - in rtir/branches/1.9-EXPERIMENTAL:
html/RTIR/Elements
ruz at bestpractical.com
ruz at bestpractical.com
Mon Mar 13 14:56:20 EST 2006
Author: ruz
Date: Mon Mar 13 14:56:19 2006
New Revision: 4733
Modified:
rtir/branches/1.9-EXPERIMENTAL/ (props changed)
rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Elements/DueIncidents
rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Elements/UserDueIncidents
Log:
r933 at cubic-pc: cubic | 2006-03-13 23:02:00 +0300
r925 at cubic-pc: cubic | 2006-03-13 05:52:16 +0300
* use DefaultSummaryRows config option
* don't allow to change sorting in portlets
* use Query and BaseQuery args as in all other RTIR's components
* add link to title in portlets that leads to results page
Modified: rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Elements/DueIncidents
==============================================================================
--- rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Elements/DueIncidents (original)
+++ rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Elements/DueIncidents Mon Mar 13 14:56:19 2006
@@ -22,24 +22,48 @@
%#
%#
%# END LICENSE BLOCK
+<%ATTR>
+Description => loc('Due Incidents')
+</%ATTR>
<&| /Widgets/TitleBox,
- title => $ARGS{'Title'} || loc("Most due incidents"),
+ title_href => RT->Config->Get('WebPath') ."/RTIR/Search/Results.html?Queue=Incidents&$QueryString",
+ title_class => 'inverse',
+ title => $Title,
bodyclass=> '',
&>
-<& /RTIR/Search/Elements/ShowResults, %ARGS, Query => $Query &>
+<& /RTIR/Search/Elements/ShowResults,
+ Queue => 'Incidents',
+ BaseQuery => $BaseQuery,
+ Query => $Query,
+ Format => $Format,
+ Rows => $Rows,
+ Page => $Page,
+ OrderBy => $OrderBy,
+ Order => $Order,
+ AllowSorting => 0,
+&>
</&>
<%INIT>
-$ARGS{'Format'} ||= RT->Config->Get('RTIRSearchResultFormats')->{'DueIncidents'};
-$ARGS{'Rows'} ||= 10;
-
-my $Query = "Queue = 'Incidents'";
-$Query .= " AND ". $m->comp( '/RTIR/Elements/NewQuery', Queue => 'Incidents' );
-$Query .= " AND $ARGS{Query}" if $ARGS{'Query'};
+my $QueryString = $m->comp('/Elements/QueryString',
+ Query => $Query,
+ Format => $Format,
+ Rows => $Rows,
+ Page => $Page,
+ OrderBy => $OrderBy,
+ Order => $Order,
+);
</%INIT>
-<%ATTR>
-Description => loc('Due Incidents')
-</%ATTR>
+<%ARGS>
+$Title => loc("Most due incidents")
+$BaseQuery => $m->comp( '/RTIR/Elements/BaseQuery', Queue => 'Incidents' )
+$Query => $m->comp( '/RTIR/Elements/NewQuery', Queue => 'Incidents' )
+$Format => RT->Config->Get('RTIRSearchResultFormats')->{'DueIncidents'}
+$Rows => RT->Config->Get('DefaultSummaryRows', $session{'CurrentUser'})
+$Page => 1
+$OrderBy => 'Due'
+$Order => 'ASC'
+</%ARGS>
Modified: rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Elements/UserDueIncidents
==============================================================================
--- rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Elements/UserDueIncidents (original)
+++ rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Elements/UserDueIncidents Mon Mar 13 14:56:19 2006
@@ -1,13 +1,8 @@
-<& /RTIR/Elements/DueIncidents,
- %ARGS,
- Title => $Title,
- Query => $Query,
-&>
+<& /RTIR/Elements/DueIncidents, %ARGS, Title => $Title, Query => $Query &>
<%INIT>
-my $Owner = delete $ARGS{'Owner'} || $session{'CurrentUser'};
-
-my $Query = "(Owner = " . $Owner->id . " OR Owner = 'Nobody')";
-$Query .= " AND $ARGS{Query}" if $ARGS{'Query'};
-
my $Title = loc( "Most due incidents owned by [_1] (and unowned)", $Owner->Name );
</%INIT>
+<%ARGS>
+$Owner => $session{'CurrentUser'}
+$Query => '( Owner = '. $Owner->id .' OR Owner = '. $RT::Nobody->id .' )'
+</%ARGS>
More information about the Rt-commit
mailing list