Commit b1a6f1d6 authored by drumm's avatar drumm
Browse files

#91089 by Steven. Reshuffle the order of menus on their administration page.

parent f56dd878
...@@ -613,7 +613,8 @@ function menu_overview_tree() { ...@@ -613,7 +613,8 @@ function menu_overview_tree() {
$header = array(t('Menu item'), t('Expanded'), array('data' => t('Operations'), 'colspan' => '3')); $header = array(t('Menu item'), t('Expanded'), array('data' => t('Operations'), 'colspan' => '3'));
$output = ''; $output = '';
foreach ($root_menus as $mid => $title) { // We reverse the root menu to show user created menus first.
foreach (array_reverse($root_menus, true) as $mid => $title) {
$operations = array(); $operations = array();
if ($menu['items'][$mid]['type'] & MENU_MODIFIABLE_BY_ADMIN) { if ($menu['items'][$mid]['type'] & MENU_MODIFIABLE_BY_ADMIN) {
$operations[] = l(t('Edit'), 'admin/build/menu/menu/edit/'. $mid); $operations[] = l(t('Edit'), 'admin/build/menu/menu/edit/'. $mid);
...@@ -623,7 +624,10 @@ function menu_overview_tree() { ...@@ -623,7 +624,10 @@ function menu_overview_tree() {
} }
$operations[] = l(t('Add item'), 'admin/build/menu/item/add/'. $mid); $operations[] = l(t('Add item'), 'admin/build/menu/item/add/'. $mid);
$table = theme('item_list', $operations); $table = theme('item_list', $operations);
$table .= theme('table', $header, menu_overview_tree_rows($mid));
$rows = menu_overview_tree_rows($mid);
$table .= theme('table', $header, $rows ? $rows : array(array(array('data' => t('No menu items defined.'), 'colspan' => 5))));
$output .= theme('box', check_plain($title), $table); $output .= theme('box', check_plain($title), $table);
} }
return $output; return $output;
......
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