function hansel_ui_page in Hansel breadcrumbs 8
Same name and namespace in other branches
- 7 hansel_ui/hansel_ui.module \hansel_ui_page()
Page callback
Generates the admin page
1 string reference to 'hansel_ui_page'
- _hansel_ui_menu in hansel_ui/
hansel_ui.registry.inc - Registry function for hook_menu().
File
- hansel_ui/
hansel_ui.module, line 21 - Hansel UI module
Code
function hansel_ui_page() {
$output = '';
drupal_add_css(drupal_get_path('module', 'hansel_ui') . '/css/hansel_ui.css');
drupal_add_js(drupal_get_path('module', 'hansel_ui') . '/js/hansel_ui.js');
if ($rules = _hansel_ui_list_rules()) {
$output .= '<div id="hansel-rules">';
$output .= $rules;
$output .= '</div>';
}
else {
// No rules are defined yet.
$output .= '<p>' . t('You do not have any rules defined yet. You can create a new rule with the form below.') . '</p>';
$output .= '<p>' . t('All configurations must have a rule with the name "start", which is the first rule to be executed.') . '</p>';
}
$hansel_ui_rule_form = drupal_get_form('hansel_ui_rule_form');
$output .= '<h2 class="title">' . t('Add rule') . '</h2><div>' . drupal_render($hansel_ui_rule_form) . '</div>';
return $output;
}