Commit e6eb4899 authored by webchick's avatar webchick

#542658 follow-up by sun: Move action 'tabs' out of local tasks and into local actions.

parent a8cc3e30
...@@ -97,7 +97,7 @@ function aggregator_menu() { ...@@ -97,7 +97,7 @@ function aggregator_menu() {
'page callback' => 'drupal_get_form', 'page callback' => 'drupal_get_form',
'page arguments' => array('aggregator_form_feed'), 'page arguments' => array('aggregator_form_feed'),
'access arguments' => array('administer news feeds'), 'access arguments' => array('administer news feeds'),
'type' => MENU_LOCAL_TASK, 'type' => MENU_LOCAL_ACTION,
'parent' => 'admin/settings/aggregator', 'parent' => 'admin/settings/aggregator',
); );
$items['admin/settings/aggregator/add/category'] = array( $items['admin/settings/aggregator/add/category'] = array(
...@@ -105,7 +105,7 @@ function aggregator_menu() { ...@@ -105,7 +105,7 @@ function aggregator_menu() {
'page callback' => 'drupal_get_form', 'page callback' => 'drupal_get_form',
'page arguments' => array('aggregator_form_category'), 'page arguments' => array('aggregator_form_category'),
'access arguments' => array('administer news feeds'), 'access arguments' => array('administer news feeds'),
'type' => MENU_LOCAL_TASK, 'type' => MENU_LOCAL_ACTION,
'parent' => 'admin/settings/aggregator', 'parent' => 'admin/settings/aggregator',
); );
$items['admin/settings/aggregator/add/opml'] = array( $items['admin/settings/aggregator/add/opml'] = array(
...@@ -113,7 +113,7 @@ function aggregator_menu() { ...@@ -113,7 +113,7 @@ function aggregator_menu() {
'page callback' => 'drupal_get_form', 'page callback' => 'drupal_get_form',
'page arguments' => array('aggregator_form_opml'), 'page arguments' => array('aggregator_form_opml'),
'access arguments' => array('administer news feeds'), 'access arguments' => array('administer news feeds'),
'type' => MENU_LOCAL_TASK, 'type' => MENU_LOCAL_ACTION,
'parent' => 'admin/settings/aggregator', 'parent' => 'admin/settings/aggregator',
); );
$items['admin/settings/aggregator/remove/%aggregator_feed'] = array( $items['admin/settings/aggregator/remove/%aggregator_feed'] = array(
......
...@@ -156,7 +156,7 @@ function block_menu() { ...@@ -156,7 +156,7 @@ function block_menu() {
'page callback' => 'drupal_get_form', 'page callback' => 'drupal_get_form',
'page arguments' => array('block_add_block_form'), 'page arguments' => array('block_add_block_form'),
'access arguments' => array('administer blocks'), 'access arguments' => array('administer blocks'),
'type' => MENU_LOCAL_TASK, 'type' => MENU_LOCAL_ACTION,
); );
$default = variable_get('theme_default', 'garland'); $default = variable_get('theme_default', 'garland');
foreach (list_themes() as $key => $theme) { foreach (list_themes() as $key => $theme) {
......
...@@ -68,7 +68,7 @@ function contact_menu() { ...@@ -68,7 +68,7 @@ function contact_menu() {
'page callback' => 'drupal_get_form', 'page callback' => 'drupal_get_form',
'page arguments' => array('contact_admin_edit', 3), 'page arguments' => array('contact_admin_edit', 3),
'access arguments' => array('administer site-wide contact form'), 'access arguments' => array('administer site-wide contact form'),
'type' => MENU_LOCAL_TASK, 'type' => MENU_LOCAL_ACTION,
'weight' => 1, 'weight' => 1,
); );
$items['admin/structure/contact/edit/%contact'] = array( $items['admin/structure/contact/edit/%contact'] = array(
......
...@@ -85,7 +85,7 @@ function filter_menu() { ...@@ -85,7 +85,7 @@ function filter_menu() {
'title' => 'Add text format', 'title' => 'Add text format',
'page callback' => 'filter_admin_format_page', 'page callback' => 'filter_admin_format_page',
'access arguments' => array('administer filters'), 'access arguments' => array('administer filters'),
'type' => MENU_LOCAL_TASK, 'type' => MENU_LOCAL_ACTION,
'weight' => 1, 'weight' => 1,
); );
$items['admin/settings/formats/delete'] = array( $items['admin/settings/formats/delete'] = array(
......
...@@ -105,7 +105,7 @@ function forum_menu() { ...@@ -105,7 +105,7 @@ function forum_menu() {
'page callback' => 'forum_form_main', 'page callback' => 'forum_form_main',
'page arguments' => array('container'), 'page arguments' => array('container'),
'access arguments' => array('administer forums'), 'access arguments' => array('administer forums'),
'type' => MENU_LOCAL_TASK, 'type' => MENU_LOCAL_ACTION,
'parent' => 'admin/structure/forum', 'parent' => 'admin/structure/forum',
); );
$items['admin/structure/forum/add/forum'] = array( $items['admin/structure/forum/add/forum'] = array(
...@@ -113,7 +113,7 @@ function forum_menu() { ...@@ -113,7 +113,7 @@ function forum_menu() {
'page callback' => 'forum_form_main', 'page callback' => 'forum_form_main',
'page arguments' => array('forum'), 'page arguments' => array('forum'),
'access arguments' => array('administer forums'), 'access arguments' => array('administer forums'),
'type' => MENU_LOCAL_TASK, 'type' => MENU_LOCAL_ACTION,
'parent' => 'admin/structure/forum', 'parent' => 'admin/structure/forum',
); );
$items['admin/structure/forum/settings'] = array( $items['admin/structure/forum/settings'] = array(
......
...@@ -66,7 +66,7 @@ function image_menu() { ...@@ -66,7 +66,7 @@ function image_menu() {
'page callback' => 'drupal_get_form', 'page callback' => 'drupal_get_form',
'page arguments' => array('image_style_add_form'), 'page arguments' => array('image_style_add_form'),
'access arguments' => array('administer image styles'), 'access arguments' => array('administer image styles'),
'type' => MENU_LOCAL_TASK, 'type' => MENU_LOCAL_ACTION,
'weight' => 2, 'weight' => 2,
); );
$items['admin/config/media/image-styles/edit/%image_style'] = array( $items['admin/config/media/image-styles/edit/%image_style'] = array(
......
...@@ -87,7 +87,7 @@ function locale_menu() { ...@@ -87,7 +87,7 @@ function locale_menu() {
'page callback' => 'locale_languages_add_screen', // two forms concatenated 'page callback' => 'locale_languages_add_screen', // two forms concatenated
'access arguments' => array('administer languages'), 'access arguments' => array('administer languages'),
'weight' => 5, 'weight' => 5,
'type' => MENU_LOCAL_TASK, 'type' => MENU_LOCAL_ACTION,
); );
$items['admin/config/regional/language/configure'] = array( $items['admin/config/regional/language/configure'] = array(
'title' => 'Configure', 'title' => 'Configure',
......
...@@ -371,14 +371,11 @@ function node_admin_content($form_state) { ...@@ -371,14 +371,11 @@ function node_admin_content($form_state) {
if (isset($form_state['values']['operation']) && $form_state['values']['operation'] == 'delete') { if (isset($form_state['values']['operation']) && $form_state['values']['operation'] == 'delete') {
return node_multiple_delete_confirm($form_state, array_filter($form_state['values']['nodes'])); return node_multiple_delete_confirm($form_state, array_filter($form_state['values']['nodes']));
} }
$form = array();
// Show the 'add new content' link. // Show the 'add new content' link.
if (_node_add_access()) { $form['add_content'] = array(
$form['add_content'] = array( '#access' => _node_add_access(),
'#type' => 'markup', '#markup' => theme('links', array(array('title' => t('Add new content'), 'href' => 'node/add')), array('class' => array('action-links'))),
'#markup' => l(t('Add new content'), 'node/add', array('attributes' => array('class' => array('node-admin-add-content')))), );
);
}
$form[] = node_filter_form(); $form[] = node_filter_form();
$form['#theme'] = 'node_filter_form'; $form['#theme'] = 'node_filter_form';
......
...@@ -1729,7 +1729,7 @@ function node_menu() { ...@@ -1729,7 +1729,7 @@ function node_menu() {
'page callback' => 'drupal_get_form', 'page callback' => 'drupal_get_form',
'page arguments' => array('node_type_form'), 'page arguments' => array('node_type_form'),
'access arguments' => array('administer content types'), 'access arguments' => array('administer content types'),
'type' => MENU_LOCAL_TASK, 'type' => MENU_LOCAL_ACTION,
); );
$items['node'] = array( $items['node'] = array(
'title' => 'Content', 'title' => 'Content',
......
...@@ -61,7 +61,7 @@ function path_menu() { ...@@ -61,7 +61,7 @@ function path_menu() {
'title' => 'Add alias', 'title' => 'Add alias',
'page callback' => 'path_admin_edit', 'page callback' => 'path_admin_edit',
'access arguments' => array('administer url aliases'), 'access arguments' => array('administer url aliases'),
'type' => MENU_LOCAL_TASK, 'type' => MENU_LOCAL_ACTION,
); );
return $items; return $items;
......
...@@ -28,7 +28,7 @@ function taxonomy_overview_vocabularies() { ...@@ -28,7 +28,7 @@ function taxonomy_overview_vocabularies() {
$form[$vocabulary->vid]['weight'] = array('#type' => 'weight', '#delta' => 10, '#default_value' => $vocabulary->weight); $form[$vocabulary->vid]['weight'] = array('#type' => 'weight', '#delta' => 10, '#default_value' => $vocabulary->weight);
$form[$vocabulary->vid]['edit'] = array('#markup' => l(t('edit vocabulary'), "admin/structure/taxonomy/$vocabulary->vid")); $form[$vocabulary->vid]['edit'] = array('#markup' => l(t('edit vocabulary'), "admin/structure/taxonomy/$vocabulary->vid"));
$form[$vocabulary->vid]['list'] = array('#markup' => l(t('list terms'), "admin/structure/taxonomy/$vocabulary->vid/list")); $form[$vocabulary->vid]['list'] = array('#markup' => l(t('list terms'), "admin/structure/taxonomy/$vocabulary->vid/list"));
$form[$vocabulary->vid]['add'] = array('#markup' => l(t('add terms'), "admin/structure/taxonomy/$vocabulary->vid/add")); $form[$vocabulary->vid]['add'] = array('#markup' => l(t('add terms'), "admin/structure/taxonomy/$vocabulary->vid/list/add"));
} }
// Only make this form include a submit button and weight if more than one // Only make this form include a submit button and weight if more than one
...@@ -445,7 +445,7 @@ function taxonomy_overview_terms(&$form_state, $vocabulary) { ...@@ -445,7 +445,7 @@ function taxonomy_overview_terms(&$form_state, $vocabulary) {
$form['#page_entries'] = $page_entries; $form['#page_entries'] = $page_entries;
$form['#back_peddle'] = $back_peddle; $form['#back_peddle'] = $back_peddle;
$form['#forward_peddle'] = $forward_peddle; $form['#forward_peddle'] = $forward_peddle;
$form['#empty_text'] = t('No terms available. <a href="@link">Add term</a>.', array('@link' => url('admin/structure/taxonomy/' . $vocabulary->vid . '/add'))); $form['#empty_text'] = t('No terms available. <a href="@link">Add term</a>.', array('@link' => url('admin/structure/taxonomy/' . $vocabulary->vid . '/list/add')));
if (!$vocabulary->tags && $vocabulary->hierarchy < 2 && count($tree) > 1) { if (!$vocabulary->tags && $vocabulary->hierarchy < 2 && count($tree) > 1) {
$form['submit'] = array( $form['submit'] = array(
......
...@@ -209,7 +209,7 @@ function taxonomy_menu() { ...@@ -209,7 +209,7 @@ function taxonomy_menu() {
'page callback' => 'drupal_get_form', 'page callback' => 'drupal_get_form',
'page arguments' => array('taxonomy_form_vocabulary'), 'page arguments' => array('taxonomy_form_vocabulary'),
'access arguments' => array('administer taxonomy'), 'access arguments' => array('administer taxonomy'),
'type' => MENU_LOCAL_TASK, 'type' => MENU_LOCAL_ACTION,
); );
$items['taxonomy/term/%taxonomy_term'] = array( $items['taxonomy/term/%taxonomy_term'] = array(
...@@ -283,12 +283,12 @@ function taxonomy_menu() { ...@@ -283,12 +283,12 @@ function taxonomy_menu() {
'weight' => -10, 'weight' => -10,
); );
$items['admin/structure/taxonomy/%taxonomy_vocabulary/add'] = array( $items['admin/structure/taxonomy/%taxonomy_vocabulary/list/add'] = array(
'title' => 'Add term', 'title' => 'Add term',
'page callback' => 'drupal_get_form', 'page callback' => 'drupal_get_form',
'page arguments' => array('taxonomy_form_term', 3), 'page arguments' => array('taxonomy_form_term', 3),
'access arguments' => array('administer taxonomy'), 'access arguments' => array('administer taxonomy'),
'type' => MENU_LOCAL_TASK, 'type' => MENU_LOCAL_ACTION,
); );
return $items; return $items;
......
...@@ -518,7 +518,7 @@ class TaxonomyTermTestCase extends TaxonomyWebTestCase { ...@@ -518,7 +518,7 @@ class TaxonomyTermTestCase extends TaxonomyWebTestCase {
$edit['parent[]'] = 0; $edit['parent[]'] = 0;
// Create the term to edit. // Create the term to edit.
$this->drupalPost('admin/structure/taxonomy/' . $this->vocabulary->vid . '/add', $edit, t('Save')); $this->drupalPost('admin/structure/taxonomy/' . $this->vocabulary->vid . '/list/add', $edit, t('Save'));
$term = reset(taxonomy_get_term_by_name($edit['name'])); $term = reset(taxonomy_get_term_by_name($edit['name']));
$this->assertNotNull($term, t('Term found in database')); $this->assertNotNull($term, t('Term found in database'));
...@@ -685,7 +685,7 @@ class TaxonomyHooksTestCase extends TaxonomyWebTestCase { ...@@ -685,7 +685,7 @@ class TaxonomyHooksTestCase extends TaxonomyWebTestCase {
'name' => $this->randomName(), 'name' => $this->randomName(),
'antonym' => 'Long', 'antonym' => 'Long',
); );
$this->drupalPost('admin/structure/taxonomy/' . $vocabulary->vid . '/add', $edit, t('Save')); $this->drupalPost('admin/structure/taxonomy/' . $vocabulary->vid . '/list/add', $edit, t('Save'));
$term = reset(taxonomy_get_term_by_name($edit['name'])); $term = reset(taxonomy_get_term_by_name($edit['name']));
$this->assertEqual($term->antonym, $edit['antonym'], t('Antonym was loaded into the term object')); $this->assertEqual($term->antonym, $edit['antonym'], t('Antonym was loaded into the term object'));
......
...@@ -1364,7 +1364,7 @@ function user_menu() { ...@@ -1364,7 +1364,7 @@ function user_menu() {
'title' => 'Add user', 'title' => 'Add user',
'page arguments' => array('create'), 'page arguments' => array('create'),
'access arguments' => array('administer users'), 'access arguments' => array('administer users'),
'type' => MENU_LOCAL_TASK, 'type' => MENU_LOCAL_ACTION,
); );
// Administration pages. // Administration pages.
......
...@@ -618,6 +618,12 @@ ul.action-links li { ...@@ -618,6 +618,12 @@ ul.action-links li {
margin: 0 1em 0 0; margin: 0 1em 0 0;
} }
ul.action-links a {
padding-left: 15px;
background: transparent url(images/add.png) no-repeat 0 center;
line-height: 30px;
}
/* Exceptions */ /* Exceptions */
#diff-inline-form select, #diff-inline-form select,
#block-system-main div.filter-options select { #block-system-main div.filter-options select {
...@@ -696,12 +702,6 @@ div.admin-options div.form-item { ...@@ -696,12 +702,6 @@ div.admin-options div.form-item {
border: 0; border: 0;
} }
a.node-admin-add-content {
padding-left: 15px;
background: url(images/add.png) no-repeat 0 center;
line-height: 30px;
}
/* Update status */ /* Update status */
.versions table.version { .versions table.version {
border: none; border: none;
......
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