From a83b6e9180c8ff495f23a25b9532c5fed5434824 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 22 Feb 2009 20:09:17 +0000 Subject: Adjust the title based on whether or not there are comments. --- modules/comment/helpers/comment_theme.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'modules/comment/helpers') diff --git a/modules/comment/helpers/comment_theme.php b/modules/comment/helpers/comment_theme.php index b7e64e38..4b9b1c4e 100644 --- a/modules/comment/helpers/comment_theme.php +++ b/modules/comment/helpers/comment_theme.php @@ -26,7 +26,6 @@ class comment_theme_Core { static function photo_bottom($theme) { $block = new Block; $block->css_id = "gComments"; - $block->title = t("Comments"); $block->anchor = t("comments"); $view = new View("comments.html"); @@ -36,6 +35,8 @@ class comment_theme_Core { ->orderby("created", "ASC") ->find_all(); + $block->title = $view->comments->count() ? + t("Comments") : t("No comments yet. Be the first to comment!"); $block->content = $view; $block->content .= comment::get_add_form($theme->item())->render("form.html"); return $block; -- cgit v1.2.3