[Rt-commit] r6823 - in rt/branches/3.7-EXPERIMENTAL-RTIR-2.2: .

ruz at bestpractical.com ruz at bestpractical.com
Fri Jan 26 10:49:33 EST 2007


Author: ruz
Date: Fri Jan 26 10:49:33 2007
New Revision: 6823

Modified:
   rt/branches/3.7-EXPERIMENTAL-RTIR-2.2/   (props changed)
   rt/branches/3.7-EXPERIMENTAL-RTIR-2.2/html/Elements/SelectResultsPerPage

Log:
 r4299 at cubic-pc (orig r6652):  ruz | 2006-12-19 22:49:02 +0300
 * if %ARGS has a key but value is undefefined then default values
   in the <%ARGS> section are ignored, but we want 50 rows per page
   by default


Modified: rt/branches/3.7-EXPERIMENTAL-RTIR-2.2/html/Elements/SelectResultsPerPage
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-RTIR-2.2/html/Elements/SelectResultsPerPage	(original)
+++ rt/branches/3.7-EXPERIMENTAL-RTIR-2.2/html/Elements/SelectResultsPerPage	Fri Jan 26 10:49:33 2007
@@ -2,7 +2,7 @@
 %# 
 %# COPYRIGHT:
 %#  
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC 
+%# This software is Copyright (c) 1996-2006 Best Practical Solutions, LLC 
 %#                                          <jesse at bestpractical.com>
 %# 
 %# (Except where explicitly superseded by other copyright notices)
@@ -46,8 +46,8 @@
 %# TODO: Better default handling
 
 <select name="<% $Name %>">
-% foreach my $value (@values) {
-<option value="<% $value %>" <% $value == $Default && 'SELECTED' %>>
+% foreach my $value ( @values ) {
+<option value="<% $value %>" <% $value == $Default? 'selected': '' %>>
 <% shift @labels %>
 </option>
 % }
@@ -56,6 +56,7 @@
 <%INIT>
 my @values = qw(0 10 25 50 100);
 my @labels = (loc('Unlimited'), qw(10 25 50 100));
+$Default = 50 unless defined $Default;
 </%INIT>
 <%ARGS>
 


More information about the Rt-commit mailing list