summaryrefslogtreecommitdiff
path: root/templates/comments.tpl
blob: d0b78fc38416994e0ac00cb110f77fa395429dc3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{if $gBitUser->hasPermission( 'p_liberty_post_comments' ) || $gBitUser->hasPermission( 'p_liberty_read_comments' ) }
	{strip}
	<div class="display comment">
		<div class="header">
			<h2>{tr}Notes{/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:contact/comments_post_inc.tpl" post_title="Post Comment"}
			</div>

			{include file="bitpackage:liberty/comments_display_option_bar.tpl"}

			{if $comments_ajax && $gBitUser->hasPermission( 'p_liberty_post_comments' )}
				<div class="form-group">
					<input type="submit" name="post_comment_request" value="{tr}Add Note{/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}