summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-02-22 20:16:56 +0000
committerBharat Mediratta <bharat@menalto.com>2009-02-22 20:16:56 +0000
commitf5169dd4518b2f3691910bfeb53a5c8c480059ef (patch)
tree47328425364eeb9a13a118d3c9becaa628e5db4e
parenta83b6e9180c8ff495f23a25b9532c5fed5434824 (diff)
Leave the comments title around, but add the "Be the first to comment"
message below it.
-rw-r--r--modules/comment/helpers/comment_theme.php3
-rw-r--r--modules/comment/views/comments.html.php3
2 files changed, 4 insertions, 2 deletions
diff --git a/modules/comment/helpers/comment_theme.php b/modules/comment/helpers/comment_theme.php
index 4b9b1c4e..5618d9fc 100644
--- a/modules/comment/helpers/comment_theme.php
+++ b/modules/comment/helpers/comment_theme.php
@@ -27,6 +27,7 @@ class comment_theme_Core {
$block = new Block;
$block->css_id = "gComments";
$block->anchor = t("comments");
+ $block->title = t("Comments");
$view = new View("comments.html");
$view->comments = ORM::factory("comment")
@@ -35,8 +36,6 @@ 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;
diff --git a/modules/comment/views/comments.html.php b/modules/comment/views/comments.html.php
index b407930e..ce99cbe7 100644
--- a/modules/comment/views/comments.html.php
+++ b/modules/comment/views/comments.html.php
@@ -20,4 +20,7 @@
</li>
<? endforeach ?>
</ul>
+<? if (!$comments->count()): ?>
+<?= t("No comments yet. Be the first to comment!") ?>
+<? endif ?>
<a name="add_comment_form"></a>