From e93286a99f42c5c6c420def54b0cb33f80496422 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Tue, 7 Jul 2009 09:17:19 +0000 Subject: - 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. --- modules/node/node.admin.inc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'modules/node/node.admin.inc') diff --git a/modules/node/node.admin.inc b/modules/node/node.admin.inc index c3de24300..4cabdc687 100644 --- a/modules/node/node.admin.inc +++ b/modules/node/node.admin.inc @@ -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(); -- cgit v1.2.3