-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathcomment-body.tpl
121 lines (112 loc) · 5.19 KB
/
comment-body.tpl
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
{* $Id: comment-body.tpl 45021 2013-03-01 11:25:10Z chibaguy $ *}
<div class="clearfix content">
<div class="clearfix author">
{if $thread_style != 'commentStyle_headers'}
{if $forum_info.ui_avatar eq 'y' and isset($comment.userName) and $comment.userName|avatarize}
<span class="avatar">
{$comment.userName|avatarize}
</span>
{/if}
{/if}
<span class="author_info">
<span class="author_post_info">
{if isset($comment.anonymous_name) and $comment.anonymous_name}
{tr}Posted by{/tr} <span class="author_post_info_by">{if $comment.website}<a href="{$comment.website}" target="_blank">{/if}{$comment.anonymous_name}{if $comment.website}</a>{/if}</span>
{elseif isset($comment.userName)}
{tr}Posted by{/tr} <span class="author_post_info_by">{$comment.userName|userlink}</span>
{/if}
{if $comment.commentDate > 0}
<span class="author_post_info_on">{$comment.commentDate|tiki_short_datetime:on}</span>
{/if}
</span>
{if $thread_style != 'commentStyle_headers'}
{if $forum_info.ui_posts eq 'y' and $comment.user_posts}
<span class="author_posts">
{tr}posts:{/tr} {$comment.user_posts}
</span>
{/if}
{if $forum_info.ui_level eq 'y' and $comment.user_level}
<span class="author_stars">
<img src="img/icons/{$comment.user_level}stars.gif" alt="{$comment.user_level} {tr}stars{/tr}" title="{tr}User Level{/tr}">
</span>
{/if}
{if isset($comment.userName)}
<span class="icons">
<span class="actions">
{if $prefs.feature_messages eq 'y' and $tiki_p_messages eq 'y'}
<a class="admlink" href="messu-compose.php?to={$comment.userName}&subject={tr}Re:{/tr}%20{$comment.title|escape:"htmlall"}">{icon _id='user_go' alt="{tr}private message{/tr}"}</a>
{/if}
{if $forum_info.ui_email eq 'y' and strlen($comment.user_email) > 0 and $display eq ''}
<a href="mailto:{$comment.user_email|escape:'hex'}">{icon _id='email' alt="{tr}Send eMail to User{/tr}"}</a>
{/if}
</span>
<span class="infos">
{if $forum_info.ui_online eq 'y'}
{if $comment.user_online eq 'y'}
{icon _id='user_red' alt="{tr}user online{/tr}"}
{elseif $comment.user_online eq 'n'}
{icon _id='user_gray' alt="{tr}user offline{/tr}"}
{/if}
{/if}
{if $forum_info.ui_flag eq 'y' and $comment.userName|countryflag}
{$comment.userName|countryflag}
{/if}
</span>
</span>
{/if}
{/if}
</span>
</div>
{if $thread_style != 'commentStyle_headers'}
<div class="postbody-content">
{$comment.parsed}
{* <span class="signature"><!-- SIGNATURE --></span> *}
</div>
{/if}
</div>
{if $thread_style != 'commentStyle_headers' and isset($comment.attachments) and count($comment.attachments) > 0}
<div class="attachments">
{section name=ix loop=$comment.attachments}
<a class="link" href="tiki-download_forum_attachment.php?attId={$comment.attachments[ix].attId}">
{icon _id='attach' alt="{tr}Attachment{/tr}"}
{$comment.attachments[ix].filename} ({$comment.attachments[ix].filesize|kbsize})</a>
{if $tiki_p_admin_forum eq 'y'}
<a class="link"
{if $first eq 'y'}
href="tiki-view_forum_thread.php?topics_offset={$smarty.request.topics_offset}{$topics_sort_mode_param}{$topics_find_param}{$topics_threshold_param}&comments_offset={$smarty.request.topics_offset}{$thread_sort_mode_param}&comments_threshold={$smarty.request.topics_threshold}{$comments_find_param}&forumId={$forum_info.forumId}{$comments_per_page_param}&comments_parentId={$comments_parentId}&remove_attachment={$comment.attachments[ix].attId}"
{else}
href="tiki-view_forum_thread.php?topics_offset={$smarty.request.topics_offset}&topics_sort_mode={$smarty.request.topics_sort_mode}&topics_find={$smarty.request.topics_find}&topics_threshold={$smarty.request.topics_threshold}&comments_offset={$smarty.request.topics_offset}&thread_sort_mode={$thread_sort_mode}&comments_threshold={$smarty.request.topics_threshold}&comments_find={$smarty.request.topics_find}&forumId={$forum_info.forumId}&comments_per_page={$comments_per_page}&comments_parentId={$comments_parentId}&remove_attachment={$comment.attachments[ix].attId}"
{/if}
>{icon _id='cross' alt="{tr}Remove{/tr}"}</a>
{/if}
<br>
{/section}
</div>
{/if}
{if !empty($comment.deliberations) and $tiki_p_forum_vote eq 'y' and $comment.type eq 'd'}
<div>
<div class="ui-widget-header">{tr}Deliberation Items{/tr}</div>
{foreach from=$comment.deliberations item=deliberation}
<div class="ui-widget-content">
{$deliberation.data}
<form class="forumDeliberationRatingForm" method="post" action="" style="float: right;">
{rating type="comment" id=$deliberation.threadId}
<input type="hidden" name="id" value="{$deliberation.threadId}">
<input type="hidden" name="type" value="comment">
</form>
</div>
{/foreach}
{jq}
var crf = $('form.forumDeliberationRatingForm').submit(function() {
var vals = $(this).serialize();
$.modal(tr('Loading...'));
$.get('tiki-ajax_services.php?controller=rating&action=vote&' + vals, function() {
$.modal();
$.notify(tr('Thanks for deliberating!'));
if ($('div.ratingDeliberationResultTable').length) document.location = document.location + '';
});
return false;
});
{/jq}
</div>
{/if}