mirror of
https://github.com/vale981/Vulcan
synced 2025-03-09 12:16:37 -04:00

Using {{pathFor}}, path(), and url() where possible. Passing in path to Meteor.absoluteUrl() where the IronRouter functions didn't make sense. Also deleting some random unused code.
50 lines
2 KiB
HTML
50 lines
2 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 can_edit}}
|
|
| <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>
|
|
{{#if getSetting "nestedComments" true}}
|
|
<a href="{{pathFor route='comment_reply' _id=_id}}" class="comment-reply goto-comment">{{_ "reply"}}</a>
|
|
{{/if}}
|
|
</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>
|