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

merge-requests/26/head
Angie Byron 2009-08-23 01:05:12 +00:00
parent a8cc3e30c3
commit e6eb489918
15 changed files with 30 additions and 33 deletions

View File

@ -97,7 +97,7 @@ function aggregator_menu() {
'page callback' => 'drupal_get_form',
'page arguments' => array('aggregator_form_feed'),
'access arguments' => array('administer news feeds'),
'type' => MENU_LOCAL_TASK,
'type' => MENU_LOCAL_ACTION,
'parent' => 'admin/settings/aggregator',
);
$items['admin/settings/aggregator/add/category'] = array(
@ -105,7 +105,7 @@ function aggregator_menu() {
'page callback' => 'drupal_get_form',
'page arguments' => array('aggregator_form_category'),
'access arguments' => array('administer news feeds'),
'type' => MENU_LOCAL_TASK,
'type' => MENU_LOCAL_ACTION,
'parent' => 'admin/settings/aggregator',
);
$items['admin/settings/aggregator/add/opml'] = array(
@ -113,7 +113,7 @@ function aggregator_menu() {
'page callback' => 'drupal_get_form',
'page arguments' => array('aggregator_form_opml'),
'access arguments' => array('administer news feeds'),
'type' => MENU_LOCAL_TASK,
'type' => MENU_LOCAL_ACTION,
'parent' => 'admin/settings/aggregator',
);
$items['admin/settings/aggregator/remove/%aggregator_feed'] = array(

View File

@ -156,7 +156,7 @@ function block_menu() {
'page callback' => 'drupal_get_form',
'page arguments' => array('block_add_block_form'),
'access arguments' => array('administer blocks'),
'type' => MENU_LOCAL_TASK,
'type' => MENU_LOCAL_ACTION,
);
$default = variable_get('theme_default', 'garland');
foreach (list_themes() as $key => $theme) {

View File

@ -68,7 +68,7 @@ function contact_menu() {
'page callback' => 'drupal_get_form',
'page arguments' => array('contact_admin_edit', 3),
'access arguments' => array('administer site-wide contact form'),
'type' => MENU_LOCAL_TASK,
'type' => MENU_LOCAL_ACTION,
'weight' => 1,
);
$items['admin/structure/contact/edit/%contact'] = array(

View File

@ -85,7 +85,7 @@ function filter_menu() {
'title' => 'Add text format',
'page callback' => 'filter_admin_format_page',
'access arguments' => array('administer filters'),
'type' => MENU_LOCAL_TASK,
'type' => MENU_LOCAL_ACTION,
'weight' => 1,
);
$items['admin/settings/formats/delete'] = array(

View File

@ -105,7 +105,7 @@ function forum_menu() {
'page callback' => 'forum_form_main',
'page arguments' => array('container'),
'access arguments' => array('administer forums'),
'type' => MENU_LOCAL_TASK,
'type' => MENU_LOCAL_ACTION,
'parent' => 'admin/structure/forum',
);
$items['admin/structure/forum/add/forum'] = array(
@ -113,7 +113,7 @@ function forum_menu() {
'page callback' => 'forum_form_main',
'page arguments' => array('forum'),
'access arguments' => array('administer forums'),
'type' => MENU_LOCAL_TASK,
'type' => MENU_LOCAL_ACTION,
'parent' => 'admin/structure/forum',
);
$items['admin/structure/forum/settings'] = array(

View File

@ -66,7 +66,7 @@ function image_menu() {
'page callback' => 'drupal_get_form',
'page arguments' => array('image_style_add_form'),
'access arguments' => array('administer image styles'),
'type' => MENU_LOCAL_TASK,
'type' => MENU_LOCAL_ACTION,
'weight' => 2,
);
$items['admin/config/media/image-styles/edit/%image_style'] = array(

View File

@ -87,7 +87,7 @@ function locale_menu() {
'page callback' => 'locale_languages_add_screen', // two forms concatenated
'access arguments' => array('administer languages'),
'weight' => 5,
'type' => MENU_LOCAL_TASK,
'type' => MENU_LOCAL_ACTION,
);
$items['admin/config/regional/language/configure'] = array(
'title' => 'Configure',

View File

@ -371,14 +371,11 @@ function node_admin_content($form_state) {
if (isset($form_state['values']['operation']) && $form_state['values']['operation'] == 'delete') {
return node_multiple_delete_confirm($form_state, array_filter($form_state['values']['nodes']));
}
$form = array();
// Show the 'add new content' link.
if (_node_add_access()) {
$form['add_content'] = array(
'#type' => 'markup',
'#markup' => l(t('Add new content'), 'node/add', array('attributes' => array('class' => array('node-admin-add-content')))),
);
}
$form['add_content'] = array(
'#access' => _node_add_access(),
'#markup' => theme('links', array(array('title' => t('Add new content'), 'href' => 'node/add')), array('class' => array('action-links'))),
);
$form[] = node_filter_form();
$form['#theme'] = 'node_filter_form';

View File

@ -1729,7 +1729,7 @@ function node_menu() {
'page callback' => 'drupal_get_form',
'page arguments' => array('node_type_form'),
'access arguments' => array('administer content types'),
'type' => MENU_LOCAL_TASK,
'type' => MENU_LOCAL_ACTION,
);
$items['node'] = array(
'title' => 'Content',

View File

@ -61,7 +61,7 @@ function path_menu() {
'title' => 'Add alias',
'page callback' => 'path_admin_edit',
'access arguments' => array('administer url aliases'),
'type' => MENU_LOCAL_TASK,
'type' => MENU_LOCAL_ACTION,
);
return $items;

View File

@ -28,7 +28,7 @@ function taxonomy_overview_vocabularies() {
$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]['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
@ -445,7 +445,7 @@ function taxonomy_overview_terms(&$form_state, $vocabulary) {
$form['#page_entries'] = $page_entries;
$form['#back_peddle'] = $back_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) {
$form['submit'] = array(

View File

@ -209,7 +209,7 @@ function taxonomy_menu() {
'page callback' => 'drupal_get_form',
'page arguments' => array('taxonomy_form_vocabulary'),
'access arguments' => array('administer taxonomy'),
'type' => MENU_LOCAL_TASK,
'type' => MENU_LOCAL_ACTION,
);
$items['taxonomy/term/%taxonomy_term'] = array(
@ -283,12 +283,12 @@ function taxonomy_menu() {
'weight' => -10,
);
$items['admin/structure/taxonomy/%taxonomy_vocabulary/add'] = array(
$items['admin/structure/taxonomy/%taxonomy_vocabulary/list/add'] = array(
'title' => 'Add term',
'page callback' => 'drupal_get_form',
'page arguments' => array('taxonomy_form_term', 3),
'access arguments' => array('administer taxonomy'),
'type' => MENU_LOCAL_TASK,
'type' => MENU_LOCAL_ACTION,
);
return $items;

View File

@ -518,7 +518,7 @@ class TaxonomyTermTestCase extends TaxonomyWebTestCase {
$edit['parent[]'] = 0;
// 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']));
$this->assertNotNull($term, t('Term found in database'));
@ -685,7 +685,7 @@ class TaxonomyHooksTestCase extends TaxonomyWebTestCase {
'name' => $this->randomName(),
'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']));
$this->assertEqual($term->antonym, $edit['antonym'], t('Antonym was loaded into the term object'));

View File

@ -1364,7 +1364,7 @@ function user_menu() {
'title' => 'Add user',
'page arguments' => array('create'),
'access arguments' => array('administer users'),
'type' => MENU_LOCAL_TASK,
'type' => MENU_LOCAL_ACTION,
);
// Administration pages.

View File

@ -618,6 +618,12 @@ ul.action-links li {
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 */
#diff-inline-form select,
#block-system-main div.filter-options select {
@ -696,12 +702,6 @@ div.admin-options div.form-item {
border: 0;
}
a.node-admin-add-content {
padding-left: 15px;
background: url(images/add.png) no-repeat 0 center;
line-height: 30px;
}
/* Update status */
.versions table.version {
border: none;