function merci_rro_admin_page in MERCI (Manage Equipment Reservations, Checkout and Inventory) 6
Menu callback; rule override administration.
1 string reference to 'merci_rro_admin_page'
- merci_rro_menu in modules/
merci_rro/ merci_rro.module - Implementation of hook_menu().
File
- modules/
merci_rro/ merci_rro.admin.inc, line 11 - Admin section functions for MERCI Role Rule Override
Code
function merci_rro_admin_page($type_name = NULL) {
if ($_GET['delete'] != '') {
$html .= drupal_get_form('merci_rro_override_delete', $type_name, $_GET['delete']);
}
else {
$html .= '<h2>Active Overrides:</h2>';
$overrides = merci_rro_content_type_overrides($type_name);
$exclude_roles = array();
if (count($overrides)) {
foreach ($overrides as $override) {
$html .= theme('merci_rro_override', $override);
$exclude_roles[] = $override->rid;
}
// foreach
}
else {
$html .= '<p><i>No active overrides.</i></p>';
}
// else
$html .= '<h2>Add New Override</h2>';
$html .= drupal_get_form('merci_rro_add_new_override', $type_name, $exclude_roles);
}
// else
return $html;
}