[Rt-commit] r12902 - in rt/branches/3.8-TESTING: etc share/html/Elements

kyoki at bestpractical.com kyoki at bestpractical.com
Wed Jun 4 18:07:30 EDT 2008


Author: kyoki
Date: Wed Jun  4 18:07:30 2008
New Revision: 12902

Modified:
   rt/branches/3.8-TESTING/   (props changed)
   rt/branches/3.8-TESTING/etc/RT_SiteConfig.pm
   rt/branches/3.8-TESTING/share/html/Elements/TicketList

Log:
 r22465 at nyx:  kyoki | 2008-06-04 18:07:18 -0400
 added page numbers to the bottom of the search pages.


Modified: rt/branches/3.8-TESTING/etc/RT_SiteConfig.pm
==============================================================================
--- rt/branches/3.8-TESTING/etc/RT_SiteConfig.pm	(original)
+++ rt/branches/3.8-TESTING/etc/RT_SiteConfig.pm	Wed Jun  4 18:07:30 2008
@@ -14,6 +14,25 @@
 #
 #   perl -c /path/to/your/etc/RT_SiteConfig.pm
 
-Set( $rtname, 'example.com');
 #Set(@Plugins,(qw(Extension-QuickDelete)));
+
+Set( $DatabaseUser, 'rt_user' );
+Set( $SendmailBounceArguments, '-f "<>"' );
+Set( $Timezone, '' );
+Set( $CorrespondAddress, 'kyoki+rtcorrespond at bestpractical.com' );
+Set( $rtname, 'example.com' );
+Set( $SendmailArguments, '-oi -t' );
+Set( $Organization, 'example.com' );
+Set( $MaxAttachmentSize, '10000000' );
+Set( $DatabaseType, 'mysql' );
+Set( $DatabasePassword, 'rt_pass' );
+Set( $DatabaseAdmin, 'root' );
+Set( $SendmailPath, '/usr/sbin/sendmail' );
+Set( $MailCommand, 'sendmailpipe' );
+Set( $DatabaseAdminPassword, 'arimasen' );
+Set( $CommentAddress, 'kyoki+rtcomment at bestpractical.com' );
+Set( $DatabaseHost, 'localhost' );
+Set( $MinimumPasswordLength, '5' );
+Set( $DatabaseName, 'rt3' );
+Set( $OwnerEmail, 'kyoki at bestpractical.com' );
 1;

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	Wed Jun  4 18:07:30 2008
@@ -83,7 +83,7 @@
 % my $oddRows = ($TotalFound && $TotalFound % $Rows == 0 )? 0 : 1;
 % my $pages = int($TotalFound/$Rows)+$oddRows;
 % $pages = 1 if $pages < 1;
-<&|/l, $Page, $pages &>Page [_1] of [_2]</&>
+<&|/l, $Page, $pages &>Page </&>
 
 <%perl>
 my $prev = $m->comp(
@@ -95,6 +95,35 @@
     Order   => $Order,
     Page    => ( $Page - 1 )
 );
+
+my %show;
+$show{1} = 1;
+$show{$_} = 1 for (($Page - 2)..($Page + 2));
+$show{$pages} = 1;
+my $dots;
+for my $number (1..$pages){
+  if ($show{$number}){
+    $dots = undef;
+    if ($number == $Page){
+      $number = ("<em>$number </em>");
+    }	
+    my $num = $m->comp(
+		       '/Elements/QueryString',
+		       Query   => $Query,
+		       Format  => $Format,
+		       Rows    => $Rows,
+		       OrderBy => $OrderBy,
+		       Order   => $Order,
+		       Page    => $number
+		      );
+    $m->out("<a href=\"$BaseURL$num\">$number </a>");
+  }
+  elsif (not $dots){
+    $dots = 1;
+    $m->out(" ... ");
+  }
+}
+
 my $next = $m->comp(
     '/Elements/QueryString',
     Query   => $Query,
@@ -106,10 +135,10 @@
 );
 </%perl>
 % if ($Page > 1) {
-<a href="<%$BaseURL%><%$prev%>"><&|/l&>Previous Page</&></a>
+<a href="<%$BaseURL%><%$prev%>"><&|/l&>Previous</&></a>
 % }
 % if (($Page * $Rows) < $TotalFound) {
-<a href="<%$BaseURL%><%$next%>"><&|/l&>Next Page</&></a>
+<a href="<%$BaseURL%><%$next%>"><&|/l&>Next</&></a>
 % }
 % }
 <%INIT>


More information about the Rt-commit mailing list