function oa_export_preprocess_table in Open Atrium Export 7.2
Implements hook_preprocess_table().
Adds an export header and download links for blueprints.
Parameters
array $vars:
File
- ./
oa_export.module, line 131
Code
function oa_export_preprocess_table(&$vars) {
if ($_GET['q'] == 'admin/structure/taxonomy/space_type') {
$rows =& $vars['rows'];
// Add an export link for each term.
foreach ($rows as $key => &$row) {
list(, $tid) = explode(':', $key);
// Add the download link to the last element in the data array.
$last_key = array_keys($row['data']);
$end = end($last_key);
$row['data'][$end] .= ' ' . l(t('download'), 'blueprint/download/' . $tid);
$row['data'][$end] .= ' ' . l(t('export'), 'blueprint/export/' . $tid);
}
}
}