summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorDaniel Sutcliffe <dansut@users.sourceforge.net>2010-03-18 17:59:42 +0000
committerDaniel Sutcliffe <dansut@users.sourceforge.net>2010-03-18 17:59:42 +0000
commit80ed578b268bfa3458bf8b32e8dd0f9bcf460db9 (patch)
tree3f8281550cdad255dd87c9a3a6f78e41cbfbb927 /templates
parent239683bfba0b69dee0caa33f95c66c5eed38c7b6 (diff)
downloadliberty-80ed578b268bfa3458bf8b32e8dd0f9bcf460db9.tar.gz
liberty-80ed578b268bfa3458bf8b32e8dd0f9bcf460db9.tar.bz2
liberty-80ed578b268bfa3458bf8b32e8dd0f9bcf460db9.zip
Make the p_liberty_read_comments permission actually be required to see comments
Diffstat (limited to 'templates')
-rw-r--r--templates/comments.tpl52
1 files changed, 27 insertions, 25 deletions
diff --git a/templates/comments.tpl b/templates/comments.tpl
index 3fa8a13..a3026bb 100644
--- a/templates/comments.tpl
+++ b/templates/comments.tpl
@@ -1,29 +1,31 @@
-{strip}
-<div class="display comment">
- <div class="header">
- <h2>{tr}Comments{/tr}</h2>
- </div>
-
- <div class="body"{if !( $post_comment_request || $post_comment_preview )} id="editcomments"{/if}>
- <div id="edit_comments" {if $comments_ajax}style="display:none"{/if}>
- {include file="bitpackage:liberty/comments_post_inc.tpl" post_title="Post Comment"}
+{if $gBitUser->hasPermission( 'p_liberty_post_comments' ) || $gBitUser->hasPermission( 'p_liberty_read_comments' ) }
+ {strip}
+ <div class="display comment">
+ <div class="header">
+ <h2>{tr}Comments{/tr}</h2>
</div>
- {include file="bitpackage:liberty/comments_display_option_bar.tpl"}
-
- {if $comments_ajax && $gBitUser->hasPermission( 'p_liberty_post_comments' )}
- <div class="row">
- <input type="submit" name="post_comment_request" value="{tr}Add Comment{/tr}" onclick="LibertyComment.attachForm('comment_{$gContent->mContentId}', '{$gContent->mContentId}', {if $gContent->mContentId}{$gContent->mContentId}{elseif $commentsParentId}{$commentsParentId}{else}null{/if})"/>
+ <div class="body"{if !( $post_comment_request || $post_comment_preview )} id="editcomments"{/if}>
+ <div id="edit_comments" {if $comments_ajax}style="display:none"{/if}>
+ {include file="bitpackage:liberty/comments_post_inc.tpl" post_title="Post Comment"}
</div>
- {/if}
-
- <div id="comment_{$gContent->mContentId}"></div>
- {foreach name=comments_loop key=key item=item from=$comments}
- {displaycomment comment="$item"}
- {/foreach}
- <div id="comment_{$gContent->mContentId}_footer"></div>
- {libertypagination ihash=$commentsPgnHash}
- </div><!-- end .body -->
-</div><!-- end .comment -->
-{/strip}
+ {include file="bitpackage:liberty/comments_display_option_bar.tpl"}
+
+ {if $comments_ajax && $gBitUser->hasPermission( 'p_liberty_post_comments' )}
+ <div class="row">
+ <input type="submit" name="post_comment_request" value="{tr}Add Comment{/tr}" onclick="LibertyComment.attachForm('comment_{$gContent->mContentId}', '{$gContent->mContentId}', {if $gContent->mContentId}{$gContent->mContentId}{elseif $commentsParentId}{$commentsParentId}{else}null{/if})"/>
+ </div>
+ {/if}
+
+ <div id="comment_{$gContent->mContentId}"></div>
+ {foreach name=comments_loop key=key item=item from=$comments}
+ {displaycomment comment="$item"}
+ {/foreach}
+ <div id="comment_{$gContent->mContentId}_footer"></div>
+
+ {libertypagination ihash=$commentsPgnHash}
+ </div><!-- end .body -->
+ </div><!-- end .comment -->
+ {/strip}
+{/if}