Commit 1d07289b authored by webchick's avatar webchick
Browse files

#503868 by Sutharsan: Add link to create a menu link if one does not exist.

parent 4ba822c1
......@@ -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;
}
......
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