Skip to content
Snippets Groups Projects
Commit ffd448b5 authored by Dries Buytaert's avatar Dries Buytaert
Browse files

Issue #1785006 by beltofte: Standardize capitalization on actions for menu...

Issue #1785006 by beltofte: Standardize capitalization on actions for menu operations: 'add link', 'edit menu', 'delete menu', 'edit', 'delete', 'reset'.
parent 4ebb5fd3
Branches
Tags
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -47,10 +47,10 @@ public function getOperations(EntityInterface $entity) { ...@@ -47,10 +47,10 @@ public function getOperations(EntityInterface $entity) {
$operations = parent::getOperations($entity); $operations = parent::getOperations($entity);
$uri = $entity->uri(); $uri = $entity->uri();
$operations['edit']['title'] = t('edit menu'); $operations['edit']['title'] = t('Edit menu');
$operatuins['edit']['href'] = $uri['path']; $operatuins['edit']['href'] = $uri['path'];
$operations['add'] = array( $operations['add'] = array(
'title' => t('add link'), 'title' => t('Add link'),
'href' => $uri['path'] . '/add', 'href' => $uri['path'] . '/add',
'options' => $uri['options'], 'options' => $uri['options'],
'weight' => 20, 'weight' => 20,
...@@ -61,7 +61,7 @@ public function getOperations(EntityInterface $entity) { ...@@ -61,7 +61,7 @@ public function getOperations(EntityInterface $entity) {
unset($operations['delete']); unset($operations['delete']);
} }
else { else {
$operations['delete']['title'] = t('delete menu'); $operations['delete']['title'] = t('Delete menu');
} }
return $operations; return $operations;
} }
......
...@@ -164,25 +164,25 @@ function _menu_overview_tree_form($tree, $delta = 50) { ...@@ -164,25 +164,25 @@ function _menu_overview_tree_form($tree, $delta = 50) {
$operations = array(); $operations = array();
$links = array(); $links = array();
$links['edit'] = array( $links['edit'] = array(
'title' => t('edit'), 'title' => t('Edit'),
'href' => 'admin/structure/menu/item/' . $item['mlid'] . '/edit', 'href' => 'admin/structure/menu/item/' . $item['mlid'] . '/edit',
); );
$operations['edit'] = array('#type' => 'link', '#title' => t('edit'), '#href' => 'admin/structure/menu/item/' . $item['mlid'] . '/edit'); $operations['edit'] = array('#type' => 'link', '#title' => t('Edit'), '#href' => 'admin/structure/menu/item/' . $item['mlid'] . '/edit');
// Only items created by the menu module can be deleted. // Only items created by the menu module can be deleted.
if ($item['module'] == 'menu' || $item['updated'] == 1) { if ($item['module'] == 'menu' || $item['updated'] == 1) {
$links['delete'] = array( $links['delete'] = array(
'title' => t('delete'), 'title' => t('Delete'),
'href' => 'admin/structure/menu/item/' . $item['mlid'] . '/delete', 'href' => 'admin/structure/menu/item/' . $item['mlid'] . '/delete',
); );
$operations['delete'] = array('#type' => 'link', '#title' => t('delete'), '#href' => 'admin/structure/menu/item/' . $item['mlid'] . '/delete'); $operations['delete'] = array('#type' => 'link', '#title' => t('Delete'), '#href' => 'admin/structure/menu/item/' . $item['mlid'] . '/delete');
} }
// Set the reset column. // Set the reset column.
elseif ($item['module'] == 'system' && $item['customized']) { elseif ($item['module'] == 'system' && $item['customized']) {
$links['reset'] = array( $links['reset'] = array(
'title' => t('reset'), 'title' => t('Reset'),
'href' => 'admin/structure/menu/item/' . $item['mlid'] . '/reset', 'href' => 'admin/structure/menu/item/' . $item['mlid'] . '/reset',
); );
$operations['reset'] = array('#type' => 'link', '#title' => t('reset'), '#href' => 'admin/structure/menu/item/' . $item['mlid'] . '/reset'); $operations['reset'] = array('#type' => 'link', '#title' => t('Reset'), '#href' => 'admin/structure/menu/item/' . $item['mlid'] . '/reset');
} }
$form[$mlid]['operations'] = array( $form[$mlid]['operations'] = array(
'#type' => 'operations', '#type' => 'operations',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment