diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-02-22 20:09:17 +0000 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-02-22 20:09:17 +0000 |
commit | a83b6e9180c8ff495f23a25b9532c5fed5434824 (patch) | |
tree | b120f6e5e252cfff2ef986a7f1c2f4c4be564331 | |
parent | 95fc61c9a8495e9fd4e1ea5e4fd3426886c70f0b (diff) |
Adjust the title based on whether or not there are comments.
-rw-r--r-- | modules/comment/helpers/comment_theme.php | 3 |
1 files changed, 2 insertions, 1 deletions
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; |