[Rt-commit] r6652 - rt/branches/3.6-RELEASE/html/Elements

ruz at bestpractical.com ruz at bestpractical.com
Tue Dec 19 14:49:03 EST 2006


Author: ruz
Date: Tue Dec 19 14:49:02 2006
New Revision: 6652

Modified:
   rt/branches/3.6-RELEASE/html/Elements/SelectResultsPerPage

Log:
* 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.6-RELEASE/html/Elements/SelectResultsPerPage
==============================================================================
--- rt/branches/3.6-RELEASE/html/Elements/SelectResultsPerPage	(original)
+++ rt/branches/3.6-RELEASE/html/Elements/SelectResultsPerPage	Tue Dec 19 14:49:02 2006
@@ -45,9 +45,9 @@
 %# END BPS TAGGED BLOCK }}}
 %# TODO: Better default handling
 
-<select NAME ="<%$Name%>">
-% foreach my $value (@values) {
-<option value="<%$value%>" <% $value == $Default && 'SELECTED' %>>
+<select name="<% $Name %>">
+% 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