mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
Add c0,c1,c2,c3,c4 classes for columns in tables
Add r0,r1,r0,r1,r0 classes for rows in tables
This commit is contained in:
parent
9fd7165aaa
commit
19505667d4
@ -2336,14 +2336,16 @@ function print_table($table) {
|
||||
if (!isset($align[$key])) {
|
||||
$align[$key] = '';
|
||||
}
|
||||
echo '<th valign="top" '. $align[$key].$size[$key] .' nowrap="nowrap" class="generaltableheader">'. $heading .'</th>';
|
||||
echo '<th valign="top" '. $align[$key].$size[$key] .' nowrap="nowrap" class="generaltableheader c'.$key.'">'. $heading .'</th>';
|
||||
}
|
||||
echo '</tr>'."\n";
|
||||
}
|
||||
|
||||
if (!empty($table->data)) {
|
||||
foreach ($table->data as $row) {
|
||||
echo '<tr valign="top">';
|
||||
$oddeven = 1;
|
||||
foreach ($table->data as $key => $row) {
|
||||
$oddeven = $oddeven ? 0 : 1;
|
||||
echo '<tr class="r'.$oddeven.'">'."\n";
|
||||
if ($row == 'hr' and $countcols) {
|
||||
echo '<td colspan="'. $countcols .'"><div class="tabledivider"></div></td>';
|
||||
} else { /// it's a normal row of data
|
||||
@ -2357,7 +2359,7 @@ function print_table($table) {
|
||||
if (!isset($wrap[$key])) {
|
||||
$wrap[$key] = '';
|
||||
}
|
||||
echo '<td '. $align[$key].$size[$key].$wrap[$key] .' class="generaltablecell">'. $item .'</td>';
|
||||
echo '<td '. $align[$key].$size[$key].$wrap[$key] .' class="generaltablecell c'.$key.'">'. $item .'</td>';
|
||||
}
|
||||
}
|
||||
echo '</tr>'."\n";
|
||||
|
Loading…
x
Reference in New Issue
Block a user