Commit 1f9a488b authored by alexpott's avatar alexpott

Issue #1834002 by Gábor Hojtsy: Fixed Delete operations are all over the...

Issue #1834002 by Gábor Hojtsy: Fixed Delete operations are all over the place. Remove tabs, provide title in routing.
parent d793cca5
......@@ -117,12 +117,6 @@ function block_menu() {
'type' => MENU_DEFAULT_LOCAL_TASK,
'context' => MENU_CONTEXT_INLINE,
);
$items['admin/structure/block/manage/%block/delete'] = array(
'title' => 'Delete block',
'type' => MENU_LOCAL_TASK,
'context' => MENU_CONTEXT_NONE,
'route_name' => 'block.admin_block_delete',
);
$items['admin/structure/block/add/%/%'] = array(
'title' => 'Place block',
'type' => MENU_VISIBLE_IN_BREADCRUMB,
......
......@@ -2,6 +2,7 @@ block.admin_block_delete:
path: '/admin/structure/block/manage/{block}/delete'
defaults:
_entity_form: 'block.delete'
_title: 'Delete block'
requirements:
_permission: 'administer blocks'
......
......@@ -98,12 +98,6 @@ function custom_block_menu() {
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -10,
);
$items['admin/structure/block/custom-blocks/manage/%custom_block_type/delete'] = array(
'title' => 'Delete',
'type' => MENU_LOCAL_TASK,
'weight' => 10,
'route_name' => 'custom_block.type_delete',
);
$items['block/add'] = array(
'title' => 'Add custom block',
'route_name' => 'custom_block.add_page',
......
......@@ -23,6 +23,7 @@ custom_block.type_delete:
path: '/admin/structure/block/custom-blocks/manage/{custom_block_type}/delete'
defaults:
_entity_form: 'custom_block_type.delete'
_title: 'Delete'
requirements:
_entity_access: 'custom_block_type.delete'
......
......@@ -77,12 +77,6 @@ function contact_menu() {
'title' => 'Edit',
'type' => MENU_DEFAULT_LOCAL_TASK,
);
$items['admin/structure/contact/manage/%contact_category/delete'] = array(
'title' => 'Delete',
'route_name' => 'contact.category_delete',
'type' => MENU_LOCAL_TASK,
'weight' => 10,
);
$items['contact'] = array(
'title' => 'Contact',
......
......@@ -2,6 +2,7 @@ contact.category_delete:
path: 'admin/structure/contact/manage/{contact_category}/delete'
defaults:
_entity_form: contact_category.delete
_title: 'Delete'
requirements:
_entity_access: contact_category.delete
......
......@@ -116,13 +116,6 @@ function image_menu() {
'title' => 'Edit',
'type' => MENU_DEFAULT_LOCAL_TASK,
);
$items['admin/config/media/image-styles/manage/%image_style/delete'] = array(
'title' => 'Delete',
'description' => 'Delete an image style.',
'type' => MENU_LOCAL_TASK,
'weight' => 10,
'route_name' => 'image.style_delete',
);
$items['admin/config/media/image-styles/manage/%/effects/%'] = array(
'title' => 'Edit image effect',
'description' => 'Edit an existing effect within a style.',
......
......@@ -16,6 +16,7 @@ image.style_delete:
path: 'admin/config/media/image-styles/manage/{image_style}/delete'
defaults:
_entity_form: 'image_style.delete'
_title: 'Delete'
requirements:
_permission: 'administer image styles'
......
......@@ -73,13 +73,4 @@ public function save(array $form, array &$form_state) {
return $this->entity->save();
}
/**
* {@inheritdoc}
*/
public function actions(array $form, array &$form_state) {
$actions = parent::actions($form, $form_state);
unset($actions['delete']);
return $actions;
}
}
......@@ -85,9 +85,6 @@ function language_menu() {
'title' => 'Edit language',
'route_name' => 'language.edit',
);
$items['admin/config/regional/language/delete/%language'] = array(
'route_name' => 'language.delete',
);
// Language negotiation.
$items['admin/config/regional/language/detection'] = array(
......
......@@ -101,10 +101,6 @@ function menu_menu() {
'type' => MENU_DEFAULT_LOCAL_TASK,
'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,
);
$items['admin/structure/menu/manage/%menu/delete'] = array(
'title' => 'Delete menu',
'route_name' => 'menu.delete_menu',
);
$items['admin/structure/menu/item/%menu_link/edit'] = array(
'title' => 'Edit menu link',
'route_name' => 'menu.link_edit',
......
......@@ -65,5 +65,6 @@ menu.delete_menu:
path: 'admin/structure/menu/manage/{menu}/delete'
defaults:
_entity_form: 'menu.delete'
_title: 'Delete menu'
requirements:
_entity_access: 'menu.delete'
......@@ -999,10 +999,6 @@ function node_menu() {
'title' => 'Edit',
'type' => MENU_DEFAULT_LOCAL_TASK,
);
$items['admin/structure/types/manage/%node_type/delete'] = array(
'title' => 'Delete',
'route_name' => 'node.type_delete_confirm',
);
$items['node/add'] = array(
'title' => 'Add content',
'page callback' => 'node_add_page',
......
......@@ -59,6 +59,7 @@ node.type_delete_confirm:
path: '/admin/structure/types/manage/{node_type}/delete'
defaults:
_entity_form: 'node_type.delete'
_title: 'Delete'
requirements:
_entity_access: 'node_type.delete'
......
......@@ -72,10 +72,6 @@ function picture_menu() {
'title' => 'Duplicate picture mapping',
'route_name' => 'picture.mapping_page_duplicate',
);
$items['admin/config/media/picturemapping/%picture_mapping/delete'] = array(
'title' => 'Delete',
'route_name' => 'picture.mapping_action_confirm',
);
return $items;
}
......
......@@ -30,5 +30,6 @@ picture.mapping_action_confirm:
path: '/admin/config/media/picturemapping/{picture_mapping}/delete'
defaults:
_entity_form: 'picture_mapping.delete'
_title: 'Delete'
requirements:
_permission: 'administer pictures'
......@@ -111,10 +111,6 @@ function shortcut_menu() {
'type' => MENU_LOCAL_TASK,
'weight' => 10,
);
$items['admin/config/user-interface/shortcut/manage/%shortcut_set/delete'] = array(
'title' => 'Delete shortcut set',
'route_name' => 'shortcut.set_delete',
);
$items['admin/config/user-interface/shortcut/manage/%shortcut_set/add-link'] = array(
'title' => 'Add shortcut',
'page callback' => 'drupal_get_form',
......
......@@ -9,6 +9,7 @@ shortcut.set_delete:
path: '/admin/config/user-interface/shortcut/manage/{shortcut_set}/delete'
defaults:
_entity_form: 'shortcut_set.delete'
_title: 'Delete shortcut set'
requirements:
_entity_access: 'shortcut_set.delete'
......
......@@ -819,11 +819,6 @@ function system_menu() {
'description' => 'Allow users to edit a configured date format.',
'route_name' => 'system.date_format_edit',
);
$items['admin/config/regional/date-time/formats/manage/%/delete'] = array(
'title' => 'Delete date format',
'description' => 'Allow users to delete a configured date format.',
'route_name' => 'system.date_format_delete',
);
// Search settings.
$items['admin/config/search'] = array(
......
......@@ -213,6 +213,7 @@ system.date_format_delete:
path: 'admin/config/regional/date-time/formats/manage/{date_format}/delete'
defaults:
_entity_form: 'date_format.delete'
_title: 'Delete date format'
requirements:
_entity_access: 'date_format.delete'
......
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