[Rt-commit] r13064 - in rt/branches/3.8-TESTING: share/html/Elements
kyoki at bestpractical.com
kyoki at bestpractical.com
Mon Jun 9 15:18:00 EDT 2008
Author: kyoki
Date: Mon Jun 9 15:18:00 2008
New Revision: 13064
Modified:
rt/branches/3.8-TESTING/ (props changed)
rt/branches/3.8-TESTING/share/html/Elements/CollectionList
rt/branches/3.8-TESTING/share/html/Elements/TicketList
Log:
r22582 at nyx: kyoki | 2008-06-07 13:25:36 -0400
Moved most of the code to CollectionList - TicketList is now just a wrapper. Still needs some work - the front display still isn't working
Modified: rt/branches/3.8-TESTING/share/html/Elements/CollectionList
==============================================================================
--- rt/branches/3.8-TESTING/share/html/Elements/CollectionList (original)
+++ rt/branches/3.8-TESTING/share/html/Elements/CollectionList Mon Jun 9 15:18:00 2008
@@ -148,16 +148,14 @@
</%INIT>
<%ARGS>
$Collection => undef
-
+$Query => undef
$Format => undef
$DisplayFormat => undef
-
@Order => ()
@OrderBy => ()
$Rows => 1
$Page => 1
-
$Title => loc('Ticket Search')
$BaseURL => RT->Config->Get('WebPath') . $m->request_comp->path .'?'
@PassArguments => qw( Query Format Rows Page Order OrderBy)
Modified: rt/branches/3.8-TESTING/share/html/Elements/TicketList
==============================================================================
--- rt/branches/3.8-TESTING/share/html/Elements/TicketList (original)
+++ rt/branches/3.8-TESTING/share/html/Elements/TicketList Mon Jun 9 15:18:00 2008
@@ -45,38 +45,19 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<table border="0" cellspacing="0" cellpadding="1" width="100%" class="ticket-list">
-
-% if ($ShowHeader) {
-<& /Elements/CollectionAsTable/Header,
- Format => \@Format,
- FormatString => $Format,
- AllowSorting => $AllowSorting,
- Order => $Order,
- Query => $Query,
- Rows => $Rows,
- Page => $Page,
- OrderBy => $OrderBy ,
- BaseURL => $BaseURL,
- maxitems => $maxitems &>
-% }
-<%PERL>
-my ($i, $column_map) = (0, {});
-while ( my $record = $Collection->Next ) {
- $i++;
- # Every ten rows, flush the buffer and put something on the page.
- $m->flush_buffer unless $i % 10;
- $m->comp('/Elements/CollectionAsTable/Row',
- i => $i,
- Format => \@Format,
- record => $record,
- maxitems => $maxitems,
- ColumnMap => $column_map,
- );
-}
-</%PERL>
-
-</table>
+<%INIT>
+# unless ($Collection) {
+# $Collection = RT::Tickets->new( $session{'CurrentUser'} );
+# $Collection->FromSQL($Query);
+# }
+
+# my $TotalFound = $Collection->CountAll();
+# return '' if !$TotalFound && !$ShowEmpty;
+
+# $Collection->RowsPerPage($Rows) if $Rows;
+# $Page = 1
+# unless $Page && $Page > 0; # workaround problems with Page = '' or undef
+# $Collection->GotoPage( $Page - 1 ); # SB uses page 0 as the first page
%if ($Rows && $ShowNavigation) {
<hr />
@@ -129,7 +110,7 @@
# still using our original format for next/prev page links.
# bulk update uses this feature to add checkboxes
-$DisplayFormat ||= $Format;
+# $m->out('</table>');
# Scrub the html of the format string to remove any potential nasties.
$Format = $m->comp( '/Elements/ScrubHTML', Content => $Format );
@@ -221,7 +202,7 @@
@OrderBy => ()
$Rows => 50
$Page => 1
-$Title => 'Ticket Search'
+$Title => loc('Ticket Search')
$BaseURL => undef
$AllowSorting => undef
$ShowNavigation => 1
More information about the Rt-commit
mailing list