summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorJehan-Guillaume de Rorthais2014-01-02 12:21:09 +0000
committerJehan-Guillaume de Rorthais2014-01-02 12:21:09 +0000
commit3e1604e7bf337911bc7646724a9a82b9effc61c7 (patch)
treee5744a7ace2bd784bfd1e0cda7794657a207b8b3 /classes
parent67c331f1acb2b2131be516480514fb0b3d78683a (diff)
parenta95052482c56e365348c73b33945b80986588695 (diff)
Merge branch 'master' into dyn_themes
Diffstat (limited to 'classes')
-rw-r--r--classes/Misc.php17
1 files changed, 14 insertions, 3 deletions
diff --git a/classes/Misc.php b/classes/Misc.php
index b40d02c0..b0b5a74c 100644
--- a/classes/Misc.php
+++ b/classes/Misc.php
@@ -1847,6 +1847,7 @@
* $columns = array(
* column_id => array(
* 'title' => Column heading,
+ * 'class' => The class to apply on the column cells,
* 'field' => Field name for $tabledata->fields[...],
* 'help' => Help page for this column,
* ), ...
@@ -1928,7 +1929,7 @@
if (sizeof($actions) > 0) echo "<th class=\"data\" colspan=\"", count($actions), "\">{$column['title']}</th>\n";
break;
default:
- echo "<th class=\"data\">";
+ echo "<th class=\"data {$column['class']}\">";
if (isset($column['help']))
$this->printHelp($column['title'], $column['help']);
else
@@ -1959,6 +1960,8 @@
foreach ($columns as $column_id => $column) {
+ $class = $column['class'] !== '' ? " class=\"{$column['class']}\"":'';
+
// Apply default values for missing parameters
if (isset($column['url']) && !isset($column['vars'])) $column['vars'] = array();
@@ -1968,15 +1971,23 @@
if (isset($action['disable']) && $action['disable'] === true) {
echo "<td></td>\n";
} else {
- echo "<td class=\"opbutton{$id}\">";
+ echo "<td class=\"opbutton{$id} {$column['class']}\">";
$action['fields'] = $tabledata->fields;
$this->printLink($action);
echo "</td>\n";
}
}
break;
+ case 'comment':
+ echo "<td class='comment_cell'>";
+ $val = value($column['field'], $tabledata->fields);
+ if (!is_null($val)) {
+ echo $val;
+ }
+ echo "</td>";
+ break;
default:
- echo "<td>";
+ echo "<td{$class}>";
$val = value($column['field'], $tabledata->fields);
if (!is_null($val)) {
if (isset($column['url'])) {