mirror of
https://github.com/vale981/Vulcan
synced 2025-03-10 04:26:41 -04:00

Switched everything over to use can.* functions from telescope-lib instead of using can* functions from lib/permissions.js, deleted lib/permissions.js, added some tests for permissions, and some other random cleanup like deleting unused code. Conflicts: client/views/comments/comment_form.js
48 lines
1.9 KiB
HTML
48 lines
1.9 KiB
HTML
<template name="comment_item">
|
|
<li class="comment module comment-displayed" 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 {{#if upvoted}}upvoted{{else}}not-upvoted{{/if}} {{#if downvoted}}downvoted{{else}}not-downvoted{{/if}}">
|
|
<a class="upvote" href="#">
|
|
<i class="icon-up"></i>
|
|
<span>{{_ "upvote"}}</span>
|
|
</a>
|
|
<a class="downvote" href="#">
|
|
<i class="icon-down"></i>
|
|
<span>{{_ "downvote"}}</span>
|
|
</a>
|
|
</div>
|
|
<div class="user-avatar">{{> avatar userId=userId shape="circle"}}</div>
|
|
<div class="comment-main">
|
|
<div class="comment-meta">
|
|
<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-text markdown">{{{htmlBody}}}</div>
|
|
<a href="{{pathFor route='comment_reply' _id=_id}}" class="comment-reply goto-comment">{{_ "reply"}}</a>
|
|
</div>
|
|
</div>
|
|
{{/if}}
|
|
{{#if showChildComments}}
|
|
<ul class="comment-children comment-list">
|
|
{{#each child_comments}}
|
|
{{#with this}}
|
|
{{> UI.dynamic template=comment_item}}
|
|
{{/with}}
|
|
{{/each}}
|
|
</ul>
|
|
{{/if}}
|
|
</div>
|
|
</li>
|
|
</template>
|