function mediafront_presets_overview in MediaFront 7.2
Same name and namespace in other branches
- 6.2 includes/mediafront.preset.inc \mediafront_presets_overview()
- 6 includes/mediafront.preset.inc \mediafront_presets_overview()
- 7 includes/mediafront.preset.inc \mediafront_presets_overview()
Menu callback: MediaFront Module administration.
1 string reference to 'mediafront_presets_overview'
- mediafront_preset_menu in includes/
mediafront.preset.inc - Implement the menu system for the preset.
File
- includes/
mediafront.preset.inc, line 104
Code
function mediafront_presets_overview() {
$presets = mediafront_preset_get_presets();
$presets_path = mediafront_get_presets_path();
if (count($presets) > 0) {
$header = array(
t('Preset Name'),
t('Description'),
array(
'data' => t('Operations'),
'colspan' => '3',
),
);
$rows = array();
foreach ($presets as $pid => $preset) {
$row = array();
$row[] = check_plain($preset['name']);
$row[] = array(
'data' => filter_xss_admin($preset['description']),
'class' => 'description',
);
$row[] = array(
'data' => l(t('edit'), $presets_path . '/preset/' . $preset['name']),
);
$row[] = array(
'data' => isset($preset['pid']) && is_numeric($preset['pid']) ? l(t('delete'), $presets_path . '/preset/' . $preset['name'] . '/delete') : '',
);
$row[] = array(
'data' => l(t('export'), $presets_path . '/preset/' . $preset['name'] . '/export'),
);
$rows[] = $row;
}
return theme('table', array(
'header' => $header,
'rows' => $rows,
));
}
else {
return 'No presets. To add a new preset, click on the <strong>Add Preset</strong> button.';
}
}