Vulcan/client/views/comments/comment_item.html

49 lines
2 KiB
HTML
Raw Normal View History

2012-09-06 10:18:26 +09:00
<template name="comment_item">
<li class="comment module comment-displayed" id="{{_id}}">
<div class="comment-body">
2014-09-16 12:12:48 +09:00
{{#if isDeleted}}
<div class="comment-deleted">This comment has been deleted.</div>
{{else}}
<div class="comment-content">
<div class="comment-actions {{#if upvoted}}upvoted{{else}}not-upvoted{{/if}} {{#if downvoted}}downvoted{{else}}not-downvoted{{/if}}">
2012-09-20 13:43:06 +09:00
<a class="upvote" href="#">
<i class="icon-up" aria-hidden="true"></i>
<span>{{_ "upvote"}}</span>
</a>
2012-09-20 13:43:06 +09:00
<a class="downvote" href="#">
<i class="icon-down" aria-hidden="true"></i>
<span>{{_ "downvote"}}</span>
</a>
</div>
2015-01-14 09:45:18 +09:00
<div class="comment-meta">
<div class="user-avatar avatar-medium" aria-hidden="true">{{> avatar userId=userId shape="circle"}}</div>
2015-01-14 09:45:18 +09:00
<a class="comment-username" href="{{profileUrl}}">{{authorName}}</a>
<span class="comment-time">{{timeAgo ago}},</span>
<span class="points">{{upvotes}}</span> <span class="unit">points </span>
<a href="{{pathFor route='comment_reply' _id=_id}}" class="comment-permalink icon-link goto-comment">{{_ "link"}}</a>
{{#if canEdit this}}
| <a class="edit-link" href="{{pathFor route='comment_edit' _id=_id}}">{{_ "edit"}}</a>
{{/if}}
{{#if isAdmin}}
| <span>{{full_date}}</span>
{{/if}}
</div>
<div class="comment-main">
<div class="comment-text markdown">{{{htmlBody}}}</div>
2015-01-05 16:18:26 +09:00
<a href="{{pathFor route='comment_reply' _id=_id}}" class="comment-reply goto-comment">{{_ "reply"}}</a>
</div>
2012-08-22 23:40:09 -04:00
</div>
2014-09-16 12:12:48 +09:00
{{/if}}
2012-11-21 13:41:27 +09:00
{{#if showChildComments}}
2014-09-16 12:12:48 +09:00
<ul class="comment-children comment-list">
2015-01-20 16:18:27 +09:00
{{#each childComments}}
2014-09-16 12:12:48 +09:00
{{#with this}}
{{> UI.dynamic template=comment_item}}
{{/with}}
{{/each}}
</ul>
2012-11-21 13:41:27 +09:00
{{/if}}
2012-08-22 23:40:09 -04:00
</div>
</li>
</template>