summaryrefslogtreecommitdiff
path: root/modules/comment/views/comments.html.php
diff options
context:
space:
mode:
authorNathan Kinkade <nkinkade@nkinka.de>2010-07-08 00:29:37 +0000
committerNathan Kinkade <nkinkade@nkinka.de>2010-07-08 00:29:37 +0000
commitc83650d83ad8b1f4bda30cac2ae8efa6e1c97287 (patch)
tree482cf980e87cd7c80c28a89bb9395eba6b53026f /modules/comment/views/comments.html.php
parenta0b0b415515bff5f9edd43d373e8e78f3b3f8e4d (diff)
parent9d66783f47636153bf3661d1d89e694dd5188c36 (diff)
Merge branch 'master' of git://github.com/gallery/gallery3
Diffstat (limited to 'modules/comment/views/comments.html.php')
-rw-r--r--modules/comment/views/comments.html.php16
1 files changed, 13 insertions, 3 deletions
diff --git a/modules/comment/views/comments.html.php b/modules/comment/views/comments.html.php
index e4322e08..da45f57b 100644
--- a/modules/comment/views/comments.html.php
+++ b/modules/comment/views/comments.html.php
@@ -1,17 +1,27 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
- <a href="<?= url::site("form/add/comments/{$item->id}") ?>#comment-form" id="g-add-comment"
+<? if (comment::can_comment()): ?>
+<a href="<?= url::site("form/add/comments/{$item->id}") ?>#comment-form" id="g-add-comment"
class="g-button ui-corner-all ui-icon-left ui-state-default">
<span class="ui-icon ui-icon-comment"></span>
<?= t("Add a comment") ?>
</a>
+<? endif ?>
+
<div id="g-comment-detail">
<? if (!$comments->count()): ?>
<p class="g-no-comments">
+ <? if (comment::can_comment()): ?>
<?= t("No comments yet. Be the first to <a %attrs>comment</a>!",
array("attrs" => html::mark_clean("href=\"" . url::site("form/add/comments/{$item->id}") . "\" class=\"showCommentForm\""))) ?>
- </p>
- <ul><li class="g-no-comments">&nbsp;</li></ul>
+ <? else: ?>
+ <?= t("No comments yet.") ?>
+ <? endif ?>
+ </p>
+ <ul>
+ <li class="g-no-comments">&nbsp;</li>
+ </ul>
<? endif ?>
+
<? if ($comments->count()): ?>
<ul>
<? foreach ($comments as $comment): ?>