summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-06-27 23:49:19 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-06-27 23:49:19 +0000
commit1d07289b039dee17fc17762635ce5872243be9b3 (patch)
tree742954a124b28c9dedd03e0343c0c618c6ade25d /modules
parent4ba822c158c54b87fe34f6b160c926e190d47573 (diff)
downloadbrdo-1d07289b039dee17fc17762635ce5872243be9b3.tar.gz
brdo-1d07289b039dee17fc17762635ce5872243be9b3.tar.bz2
#503868 by Sutharsan: Add link to create a menu link if one does not exist.
Diffstat (limited to 'modules')
-rw-r--r--modules/menu/menu.admin.inc7
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/menu/menu.admin.inc b/modules/menu/menu.admin.inc
index 481728402..2906ce2df 100644
--- a/modules/menu/menu.admin.inc
+++ b/modules/menu/menu.admin.inc
@@ -65,7 +65,7 @@ function menu_overview_form(&$form_state, $menu) {
);
}
else {
- $form['empty_menu'] = array('#markup' => t('There are no menu links yet.'));
+ $form['#empty_text'] = t('There are no menu links yet. <a href="@link">Add link</a> now.', array('@link' => url('admin/build/menu-customize/'. $form['#menu']['menu_name'] .'/add')));
}
return $form;
}
@@ -228,9 +228,10 @@ function theme_menu_overview_form($form) {
}
}
$output = '';
- if ($rows) {
- $output .= theme('table', $header, $rows, array('id' => 'menu-overview'));
+ if (empty($rows)) {
+ $rows[] = array(array('data' => $form['#empty_text'], 'colspan' => '7'));
}
+ $output .= theme('table', $header, $rows, array('id' => 'menu-overview'));
$output .= drupal_render_children($form);
return $output;
}