Commit 6f376669 authored by Steven Jones's avatar Steven Jones

Issue #610040 by Steven Jones: Added Add X links on listing pages.

parent 9d381265
......@@ -30,11 +30,29 @@ define('HOSTING_PLATFORM_ENABLED', 1);
*/
function hosting_platform_menu() {
$items = array();
$items['hosting/platforms'] = array(
'title' => 'Platforms',
'description' => 'List of platforms',
'page callback' => 'hosting_platform_listing',
'access arguments' => array('view platform'));
'access arguments' => array('view platform'),
'type' => MENU_NORMAL_ITEM,
);
$items['hosting/platforms/list'] = array(
'title' => 'List',
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -10,
);
$items['hosting/platforms/add'] = array(
'title' => 'Add platform',
'type' => MENU_LOCAL_TASK,
'page callback' => 'drupal_goto',
'page arguments' => array('node/add/platform'),
'access callback' => 'node_access',
'access arguments' => array('create', 'platform'),
);
return $items;
}
......
......@@ -21,11 +21,28 @@ function hosting_server_node_info() {
*/
function hosting_server_menu() {
$items = array();
$items['hosting/servers'] = array(
'title' => 'Servers',
'description' => 'List of servers',
'page callback' => 'hosting_server_listing',
'access arguments' => array('view server'),
'type' => MENU_NORMAL_ITEM,
);
$items['hosting/servers/list'] = array(
'title' => 'List',
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -10,
);
$items['hosting/servers/add'] = array(
'title' => 'Add server',
'type' => MENU_LOCAL_TASK,
'page callback' => 'drupal_goto',
'page arguments' => array('node/add/server'),
'access callback' => 'node_access',
'access arguments' => array('create', 'server'),
);
return $items;
......
......@@ -40,6 +40,22 @@ function hosting_site_menu() {
'description' => 'Display a list of sites',
'page callback' => 'hosting_sites',
'access arguments' => array('view site'),
'type' => MENU_NORMAL_ITEM,
);
$items['hosting/sites/list'] = array(
'title' => 'List',
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -10,
);
$items['hosting/sites/add'] = array(
'title' => 'Add site',
'type' => MENU_LOCAL_TASK,
'page callback' => 'drupal_goto',
'page arguments' => array('node/add/site'),
'access callback' => 'node_access',
'access arguments' => array('create', 'site'),
);
$items['hosting/hosting_site_form_check'] = array(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment