Commit 3a2e692c authored by metzlerd's avatar metzlerd
Browse files

Fixing columns.

parent 5a557d84
......@@ -57,6 +57,35 @@ class FrxFieldTable extends FrxRenderer {
$th = $this->addNode($tr, 10, 'th', $col['label']);
$td = $this->addNode($tr, 10, 'td', $col['contents']);
}
// Decide to inlcude columns
$found_columns = $this->columns($xml);
if (!$found_columns) {
$found_columns = $this->columns($xml, '/*');
$attrs = array();
}
$include_column = 0;
$weight = 0;
if (!@$config['columns']) {
$include_column = 1;
}
else {
$weight = count($config['columns']);
}
foreach ($found_columns as $column => $label) {
$token = '{' . $column . '}';
if (!isset($config['columns'][$column])) {
$weight++;
$config['columns'][$column] = array(
'contents' => $token,
'include' => $include_column,
'label' => $label,
'weight' => $weight,
);
}
}
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment