2014-10-04 14:06:44 +02:00
|
|
|
<div class="comment">
|
|
|
|
<div class="avatar">
|
2014-11-22 12:56:44 +01:00
|
|
|
<% if (comment.user.name && canViewUsers) { %>
|
2014-10-04 14:06:44 +02:00
|
|
|
<a href="#/user/<%= comment.user.name %>">
|
|
|
|
<% } %>
|
|
|
|
|
2014-10-05 11:05:34 +02:00
|
|
|
<img width="40" height="40" class="author-avatar"
|
2014-10-04 14:06:44 +02:00
|
|
|
src="/data/thumbnails/40x40/avatars/<%= comment.user.name || '!' %>"
|
|
|
|
alt="<%= comment.user.name || 'Anonymous user' %>"/>
|
|
|
|
|
2014-11-22 12:56:44 +01:00
|
|
|
<% if (comment.user.name && canViewUsers) { %>
|
2014-10-04 14:06:44 +02:00
|
|
|
</a>
|
|
|
|
<% } %>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="body">
|
|
|
|
<div class="header">
|
|
|
|
<span class="nickname">
|
2014-11-22 12:56:44 +01:00
|
|
|
<% if (comment.user.name && canViewUsers) { %>
|
2014-10-04 14:06:44 +02:00
|
|
|
<a href="#/user/<%= comment.user.name %>">
|
|
|
|
<% } %>
|
|
|
|
|
|
|
|
<%= comment.user.name || 'Anonymous user' %>
|
|
|
|
|
2014-11-22 12:56:44 +01:00
|
|
|
<% if (comment.user.name && canViewUsers) { %>
|
2014-10-04 14:06:44 +02:00
|
|
|
</a>
|
|
|
|
<% } %>
|
|
|
|
</span>
|
|
|
|
|
2014-12-20 10:30:10 +01:00
|
|
|
<span class="date" title="<%= util.formatAbsoluteTime(comment.creationTime) %>">
|
|
|
|
<%= util.formatRelativeTime(comment.creationTime) %>
|
2014-10-04 14:06:44 +02:00
|
|
|
</span>
|
|
|
|
|
2014-10-05 16:19:08 +02:00
|
|
|
<span class="score">
|
|
|
|
Score: <%= comment.score %>
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<span class="ops"><!--
|
|
|
|
--><% if (canVote) { %><!--
|
2014-10-11 23:24:03 +02:00
|
|
|
--><a href="#" class="score-up <% print(comment.ownScore === 1 ? 'active' : '') %>"><!--
|
2014-10-05 16:19:08 +02:00
|
|
|
-->vote up<!--
|
|
|
|
--></a><!--
|
2014-10-11 23:24:03 +02:00
|
|
|
--><a href="#" class="score-down <% print(comment.ownScore === -1 ? 'active' : '') %>"><!--
|
2014-10-05 16:19:08 +02:00
|
|
|
-->vote down<!--
|
|
|
|
--></a><!--
|
|
|
|
--><% } %><!--
|
|
|
|
|
|
|
|
--><% if (canEditComment) { %><!--
|
2014-10-11 23:24:03 +02:00
|
|
|
--><a href="#" class="edit"><!--
|
2014-10-04 14:06:44 +02:00
|
|
|
-->edit<!--
|
2014-10-05 16:19:08 +02:00
|
|
|
--></a><!--
|
|
|
|
--><% } %><!--
|
2014-10-04 14:06:44 +02:00
|
|
|
|
2014-10-05 16:19:08 +02:00
|
|
|
--><% if (canDeleteComment) { %><!--
|
2014-10-11 23:24:03 +02:00
|
|
|
--><a href="#" class="delete"><!--
|
2014-10-04 14:06:44 +02:00
|
|
|
-->delete<!--
|
2014-10-05 16:19:08 +02:00
|
|
|
--></a><!--
|
|
|
|
--><% } %><!--
|
|
|
|
--></span>
|
2014-10-04 14:06:44 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="content">
|
2014-12-20 10:30:10 +01:00
|
|
|
<%= util.formatMarkdown(comment.text) %>
|
2014-10-04 14:06:44 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|