function nodequeue_admin_view in Nodequeue 7.3
Same name and namespace in other branches
- 5.2 nodequeue.module \nodequeue_admin_view()
- 5 nodequeue.module \nodequeue_admin_view()
- 6.2 includes/nodequeue.admin.inc \nodequeue_admin_view()
- 7.2 includes/nodequeue.admin.inc \nodequeue_admin_view()
Page callback to view a queue.
1 string reference to 'nodequeue_admin_view'
- nodequeue_menu in ./
nodequeue.module - Implements hook_menu().
File
- includes/
nodequeue.admin.inc, line 663 - Admin page callbacks for the nodequeue module.
Code
function nodequeue_admin_view($queue, $subqueue = array()) {
drupal_set_title(t("Nodequeue '@title'", array(
'@title' => $queue->title,
)), PASS_THROUGH);
$name = $queue->name;
// If the queue has just one subqueue, it gets special treatment.
if (empty($subqueue->sqid)) {
if ($queue->subqueues == 1) {
$subqueues = nodequeue_load_subqueues_by_queue($queue->name);
$subqueue = array_shift($subqueues);
}
else {
// display subqueue list page.
return nodequeue_view_subqueues($queue);
}
}
elseif ($subqueue->sqid) {
if (!nodequeue_api_subqueue_access($subqueue, NULL, $queue)) {
return drupal_not_found();
}
// Adjust properties of the page so our subqueue is in the right
// visual place.
drupal_set_title(t("Subqueue '@title'", array(
'@title' => nodequeue_title_substitute($queue->subqueue_title, $queue, $subqueue),
)), PASS_THROUGH);
$breadcrumb = drupal_get_breadcrumb();
$breadcrumb[] = l($queue->title, "admin/structure/nodequeue/{$queue->name}");
drupal_set_breadcrumb($breadcrumb);
}
return nodequeue_arrange_subqueue($queue, $subqueue);
}