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

- Patch #394702 by Jody Lynn: add a 'add new content' link to the content admin overview page.

  We can work on creating a generic framework for adding tasks later, if that is deemed necessary. I'm still not sure it is, and in the mean time, this patch addresses an important usability issue.
parent a86654f8
No related branches found
No related tags found
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
......@@ -377,7 +377,15 @@ function node_admin_content($form_state) {
if (isset($form_state['values']['operation']) && $form_state['values']['operation'] == 'delete') {
return node_multiple_delete_confirm($form_state, array_filter($form_state['values']['nodes']));
}
$form = node_filter_form();
$form = array();
// Show the 'add new content' link.
if (_node_add_access()) {
$form['add_content'] = array(
'#type' => 'markup',
'#markup' => l(t('Add new content'), 'node/add', array('attributes' => array('class' => 'node-admin-add-content'))),
);
}
$form[] = node_filter_form();
$form['#theme'] = 'node_filter_form';
$form['admin'] = node_admin_nodes();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment