summaryrefslogtreecommitdiff
path: root/includes/theme.inc
diff options
context:
space:
mode:
authorSteven Wittens <steven@10.no-reply.drupal.org>2006-04-15 04:07:18 +0000
committerSteven Wittens <steven@10.no-reply.drupal.org>2006-04-15 04:07:18 +0000
commit8b04c7f0db4a7a483049635f961d1dcba7e568f1 (patch)
tree74f297d5b8609bf9fe4318dc912d1efad2051d4d /includes/theme.inc
parent361c7c7ed89ed340e348ed73310819bda8b23ff0 (diff)
downloadbrdo-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/theme.inc')
-rw-r--r--includes/theme.inc12
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;
}