summaryrefslogtreecommitdiff
path: root/modules/node
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-12-02 14:56:32 +0000
committerDries Buytaert <dries@buytaert.net>2009-12-02 14:56:32 +0000
commit92760988b9decb01831ba89bcc54056a702c3836 (patch)
tree4a27865ed1737d832e82a575521940503147cd43 /modules/node
parente7dedc4330f3d7bbc4fd861a4e5619d780bcca6c (diff)
downloadbrdo-92760988b9decb01831ba89bcc54056a702c3836.tar.gz
brdo-92760988b9decb01831ba89bcc54056a702c3836.tar.bz2
- Patch #648410 by Dave Reid: standardize add 'empty' row functionality to all tables.
Diffstat (limited to 'modules/node')
-rw-r--r--modules/node/content_types.inc9
-rw-r--r--modules/node/node.admin.inc9
2 files changed, 4 insertions, 14 deletions
diff --git a/modules/node/content_types.inc b/modules/node/content_types.inc
index 0758c272e..3b21311ae 100644
--- a/modules/node/content_types.inc
+++ b/modules/node/content_types.inc
@@ -44,14 +44,11 @@ function node_overview_types() {
}
}
- if (empty($rows)) {
- $rows[] = array(array('data' => t('No content types available. <a href="@link">Add content type</a>.', array('@link' => url('admin/structure/types/add'))), 'colspan' => '5', 'class' => array('message')));
- }
-
$build['node_table'] = array(
'#theme' => 'table',
'#header' => $header,
- '#rows' => $rows
+ '#rows' => $rows,
+ '#empty' => t('No content types available.'),
);
return $build;
@@ -130,7 +127,7 @@ function node_type_form($form, &$form_state, $type = NULL) {
'#title' => t('Description'),
'#type' => 'textarea',
'#default_value' => $type->description,
- '#description' => t('Describe this content type. It will be displayed on the <em>Add new content</em> page.'),
+ '#description' => t('Describe this content type. It will be displayed on the <em>Add new content</em> page.'),
);
$form['additional_settings'] = array(
diff --git a/modules/node/node.admin.inc b/modules/node/node.admin.inc
index 53a82d350..dd4202f2a 100644
--- a/modules/node/node.admin.inc
+++ b/modules/node/node.admin.inc
@@ -554,18 +554,11 @@ function node_admin_nodes() {
}
// Otherwise, use a simple table.
else {
- // Display an empty message like in the tableselect.
- if (empty($options)) {
- $row = array(
- 'data' => t('No content available.'),
- 'colspan' => count($header),
- );
- $options = array($row);
- }
$form['nodes'] = array(
'#theme' => 'table',
'#header' => $header,
'#rows' => $options,
+ '#empty' => t('No content available.'),
);
}