summaryrefslogtreecommitdiff
path: root/templates/display_comment.tpl
blob: 70c554c79e55f4af21a4ee2a14d2c59bf1c851d7 (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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
{strip}
{if $comments_style eq 'threaded' && $comment.level}
	<div class="threaded">
{else}
	<div class="">
{/if}
	<div class="post" id="comment_{$comment.content_id}">
		<div class="floaticon">
			{if $gBitUser->hasPermission( 'p_liberty_post_comments' )}
				{if $gBitSystem->isFeatureActive('comments_ajax') }
					<a href="javascript:void(0);" onclick="LibertyComment.attachForm('comment_{$comment.content_id}', '{$comment.content_id}', '{$comment.root_id}')">{booticon iname="icon-comment-alt"  ipackage="icons"  iexplain="Reply to this comment"}</a>
				{else}
					<a href="#">{booticon iname="icon-comment-alt"  class="icon" onclick="window.location='`$comments_return_url`&amp;post_comment_reply_id=`$comment.content_id`&amp;post_comment_request=1#editcomments';" iexplain="Reply to this comment" }</a>
				{/if}
			{/if}
			{if $comment.is_editable}
				<a href="{$comments_return_url}&amp;post_comment_id={$comment.comment_id}&amp;post_comment_request=1#editcomments" rel="nofollow">{booticon iname="icon-edit" ipackage="icons" iexplain="Edit"}</a>
			{/if}
			{if $gBitUser->hasPermission('p_liberty_admin_comments')}
				<a href="{$comments_return_url}&amp;delete_comment_id={$comment.comment_id}" rel="nofollow">{booticon iname="icon-trash" ipackage="icons" iexplain="Remove"}</a>
			{/if}
		</div>

		<div class="header">
			<h3>{$comment.title|escape}</h3>
			<div class="date">
				{tr}by{/tr} {if $comment.user_id < 0}{$comment.anon_name|escape}{else}{displayname hash=$comment}{/if}, {$comment.last_modified|reltime}
			</div>
		</div>
		<div class="content">
			{include file="bitpackage:liberty/services_inc.tpl" serviceLocation='comment' serviceHash=$comment}
			{$comment.parsed_data}
			{if $gBitSystem->isFeatureActive( 'comments_allow_attachments' )}
				{include file="bitpackage:liberty/list_comment_files_inc.tpl" storageHash=$comment.storage}
			{/if}
		</div>
	</div><!-- end .post -->

	{if $comment.children}
		<div id="comment_{$comment.content_id}_children">
			{foreach key=key item=item from=$comment.children}
				{include file="bitpackage:liberty/display_comment.tpl" comment=$item}
			{/foreach}
		</div>
	{/if}
	<div id="comment_{$comment.content_id}_footer"></div>
</div><!-- end .left margin -->
{/strip}