Compiled Template grid.adp
set __adp_output {}; set __ad_conn_locale [ad_conn locale]
append __adp_output "<html>
<head>
<title>Demo: Grid</title>
<style>
h1 \{ font-family: Arial, Helvetica \}
th \{ font-family: Arial, Helvetica \}
td \{ font-family: Arial, Helvetica \}
</style>
</head>
<body bgcolor=\"#FFFFCC\">
<h1>Sample Users</h1>
<table cellpadding=\"8\" cellspacing=\"0\" border=\"1\" bgcolor=\"#CCFFCC\">
"
set rows [expr {ceil(${users:rowcount} / 3.0)}]
for { set __r 1 } { $__r <= $rows } { incr __r } {
for { set __c 1 } { $__c <= 3 } { incr __c } {
set rownum [expr {1 + int(($__r - 1) + (($__c - 1) * $rows))}]
upvar 0 users:$rownum users
set users(rownum) $rownum
set users(row) $__r
set users(col) $__c
if {"[ns_quotehtml [lang::util::localize $users(col)]]" eq "1"} {
append __adp_output "
<!-- Begin row -->
<tr>
"
}
append __adp_output "
<!-- Cell layout -->
<td>
<!-- Cells may be unoccupied at the end. -->
"
if {"[ns_quotehtml [lang::util::localize $users(rownum)]]" <= "[ns_quotehtml [lang::util::localize ${users:rowcount}]]"} {
append __adp_output "
[ns_quotehtml [lang::util::localize $users(rownum)]].
[ns_quotehtml [lang::util::localize $users(first_name)]]
[ns_quotehtml [lang::util::localize $users(last_name)]]
"
} else {
append __adp_output "
<!-- Placeholder to retain cell formatting -->
"
}
append __adp_output "
</td>
<!-- End cell layout -->
"
if {"[ns_quotehtml [lang::util::localize $users(col)]]" eq "3"} {
append __adp_output "
<!-- End row -->
</tr>
"
}
}
}
append __adp_output "
</table>
</body>
</html>
"
set __adp_output