diff options
author | Dries Buytaert <dries@buytaert.net> | 2009-12-03 20:21:50 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2009-12-03 20:21:50 +0000 |
commit | ca8416e03637b99cf5846e6e3116ce4d2fcee5a0 (patch) | |
tree | c3017e25fa39d3f6caa46bc23fa2e7dd011412f3 /modules/node | |
parent | d1a2de607e23da467c1366aca04ac5f61328a37a (diff) | |
download | brdo-ca8416e03637b99cf5846e6e3116ce4d2fcee5a0.tar.gz brdo-ca8416e03637b99cf5846e6e3116ce4d2fcee5a0.tar.bz2 |
- Patch #542658 by sun: follow-up on move action 'tabs' out of local tasks.
Diffstat (limited to 'modules/node')
-rw-r--r-- | modules/node/node.admin.inc | 5 | ||||
-rw-r--r-- | modules/node/node.module | 16 |
2 files changed, 16 insertions, 5 deletions
diff --git a/modules/node/node.admin.inc b/modules/node/node.admin.inc index e70ab1224..ebdac0610 100644 --- a/modules/node/node.admin.inc +++ b/modules/node/node.admin.inc @@ -391,11 +391,6 @@ function node_admin_content($form, $form_state) { if (isset($form_state['values']['operation']) && $form_state['values']['operation'] == 'delete') { return node_multiple_delete_confirm($form, $form_state, array_filter($form_state['values']['nodes'])); } - // Show the 'add new content' link. - $form['add_content'] = array( - '#access' => _node_add_access(), - '#markup' => theme('links', array('links' => array(array('title' => t('Add new content'), 'href' => 'node/add')), 'attributes' => array('class' => array('action-links')))), - ); $form['filter'] = node_filter_form(); $form['#submit'][] = 'node_filter_form_submit'; $form['#theme'] = 'node_filter_form'; diff --git a/modules/node/node.module b/modules/node/node.module index ffaa3a0f7..71e7512ff 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -1953,6 +1953,22 @@ function node_menu() { } /** + * Implements hook_menu_local_tasks_alter(). + */ +function node_menu_local_tasks_alter(&$data, $router_item, $root_path) { + // Add action link to 'node/add' on 'admin/content' page. + if ($root_path == 'admin/content') { + $item = menu_get_item('node/add'); + if ($item['access']) { + $data['actions']['output'][] = array( + '#theme' => 'menu_local_action', + '#link' => $item, + ); + } + } +} + +/** * Title callback for a node type. */ function node_type_page_title($type) { |