function theme_library_admin_new_action in Library 6
Same name and namespace in other branches
- 5.2 library.theme.inc \theme_library_admin_new_action()
- 6.2 library.theme.inc \theme_library_admin_new_action()
- 7 library.theme.inc \theme_library_admin_new_action()
Menu callback: Library Actions Theme Form to create a new action
See also
library_admin_action_validate()
File
- ./
library.theme.inc, line 17 - Theming for the library module
Code
function theme_library_admin_new_action($form) {
$header = array(
t('Name'),
t('Item Status'),
t('Edit'),
);
foreach (library_actions() as $aid => $action) {
switch ($action['status_change']) {
case LIBRARY_ACTION_TYPE_UNAVAILABLE:
$status_text = 'Unavailable';
break;
case LIBRARY_ACTION_TYPE_AVAILABLE:
$status_text = 'Available';
break;
default:
$status_text = 'No Change';
}
$rows[] = array(
$action['name'],
$status_text,
l(t('edit action'), 'admin/settings/library/actions/edit/' . $aid),
);
}
$rows[] = array(
drupal_render($form['name']),
drupal_render($form['status_change']),
drupal_render($form['submit']),
);
$output = drupal_render($form);
$output .= theme('table', $header, $rows);
return $output;
}