summaryrefslogtreecommitdiff
path: root/modules/comment/views/comments.html.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2010-06-05 23:35:32 -0700
committerBharat Mediratta <bharat@menalto.com>2010-06-05 23:35:32 -0700
commit87fde3f360d557d48241d09cae4f25949e748d4f (patch)
treef832951bc829847a5d5298ce05792c4a0b3e91ff /modules/comment/views/comments.html.php
parent10895ca5298dc71410cfd87fe8a28c4f976c2234 (diff)
Create a UI under Admin > Settings > Comments where you can limit
comments only to registered users. It's simplistic, but is better than adding a permission since generally this setting will be used Gallery-wide. Fixes ticket #1002
Diffstat (limited to 'modules/comment/views/comments.html.php')
-rw-r--r--modules/comment/views/comments.html.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/comment/views/comments.html.php b/modules/comment/views/comments.html.php
index e4322e08..9a608a43 100644
--- a/modules/comment/views/comments.html.php
+++ b/modules/comment/views/comments.html.php
@@ -1,9 +1,12 @@
<?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">