diff options
Diffstat (limited to 'modules/comment/views/comments.html.php')
-rw-r--r-- | modules/comment/views/comments.html.php | 16 |
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"> </li></ul> + <? else: ?> + <?= t("No comments yet.") ?> + <? endif ?> + </p> + <ul> + <li class="g-no-comments"> </li> + </ul> <? endif ?> + <? if ($comments->count()): ?> <ul> <? foreach ($comments as $comment): ?> |