summaryrefslogtreecommitdiff
path: root/includes/theme.inc
diff options
context:
space:
mode:
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;
}