Vulcan/packages/telescope-comments/lib/client/templates/comment_item.html
2015-09-17 14:51:14 +09:00

47 lines
1.9 KiB
HTML

<template name="comment_item">
<li class="comment module comment-displayed {{commentClass}}" id="{{_id}}">
<div class="comment-body">
{{#if isDeleted}}
<div class="comment-deleted">This comment has been deleted.</div>
{{else}}
<div class="comment-content">
<div class="comment-actions comment-vote {{#if upvoted}}upvoted{{else}}not-upvoted{{/if}} {{#if downvoted}}downvoted{{else}}not-downvoted{{/if}}">
<a class="upvote" href="#">
{{{icon "upvote"}}}
<span>{{_ "upvote"}}</span>
</a>
<a class="downvote" href="#">
{{{icon "downvote"}}}
<span>{{_ "downvote"}}</span>
</a>
</div>
<div class="comment-meta">
<div class="user-avatar avatar-medium" aria-hidden="true" aria-live="off">{{> avatar userId=userId shape="circle"}}</div>
<a class="comment-username" href="{{getProfileUrl userId}}">{{authorName}}</a>
<a href="{{pathFor 'commentPage' _id=_id}}" class="comment-permalink comment-time">{{timeAgo ago}},</a>
<span class="points">{{upvotes}}</span> <span class="unit">{{pointsUnitDisplayText}} </span>
{{#if canEdit this}}
| <a class="edit-link" href="{{pathFor 'commentEdit' _id=_id}}">{{_ "edit"}}</a>
{{/if}}
{{#if isAdmin}}
| <span>{{full_date}}</span>
{{/if}}
</div>
<div class="comment-main">
<div class="comment-text markdown">{{{htmlBody}}}</div>
<a href="{{pathFor 'commentPage' _id=_id}}" class="comment-reply">{{_ "reply"}}</a>
</div>
</div>
{{/if}}
{{#if showChildComments}}
<ul class="comment-children comment-list">
{{#each childComments}}
{{#with this}}
{{> comment_item}}
{{/with}}
{{/each}}
</ul>
{{/if}}
</div>
</li>
</template>