diff options
author | Steven Wittens <steven@10.no-reply.drupal.org> | 2006-04-15 04:07:18 +0000 |
---|---|---|
committer | Steven Wittens <steven@10.no-reply.drupal.org> | 2006-04-15 04:07:18 +0000 |
commit | 8b04c7f0db4a7a483049635f961d1dcba7e568f1 (patch) | |
tree | 74f297d5b8609bf9fe4318dc912d1efad2051d4d /includes | |
parent | 361c7c7ed89ed340e348ed73310819bda8b23ff0 (diff) | |
download | brdo-8b04c7f0db4a7a483049635f961d1dcba7e568f1.tar.gz brdo-8b04c7f0db4a7a483049635f961d1dcba7e568f1.tar.bz2 |
#51002: Admins could not see unpublished comments (plus minor usability enhancements for previewing/unpublished)
Diffstat (limited to 'includes')
-rw-r--r-- | includes/theme.inc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/includes/theme.inc b/includes/theme.inc index 610865a60..0baed0463 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -569,15 +569,19 @@ function theme_help() { * A string containing the node output. */ function theme_node($node, $teaser = FALSE, $page = FALSE) { + if (!$node->status) { + $output = '<div class="node-unpublished">'; + } + if (module_exist('taxonomy')) { $terms = taxonomy_link('taxonomy terms', $node); } if ($page == 0) { - $output = t('%title by %name', array('%title' => '<h2 class="title">'. check_plain($node->title) .'</h2>', '%name' => theme('username', $node))); + $output .= t('%title by %name', array('%title' => '<h2 class="title">'. check_plain($node->title) .'</h2>', '%name' => theme('username', $node))); } else { - $output = t('by %name', array('%name' => theme('username', $node))); + $output .= t('by %name', array('%name' => theme('username', $node))); } if (count($terms)) { @@ -595,6 +599,10 @@ function theme_node($node, $teaser = FALSE, $page = FALSE) { $output .= '<div class="links">'. theme('links', $node->links) .'</div>'; } + if (!$node->status) { + $output .= '</div>'; + } + return $output; } |