szurubooru/public_html/templates/comment-list-item.tpl

67 lines
1.6 KiB
Smarty
Raw Normal View History

2014-10-04 14:06:44 +02:00
<div class="comment">
<div class="avatar">
<% 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' %>"/>
<% if (comment.user.name && canViewUsers) { %>
2014-10-04 14:06:44 +02:00
</a>
<% } %>
</div>
<div class="body">
<div class="header">
<span class="nickname">
<% if (comment.user.name && canViewUsers) { %>
2014-10-04 14:06:44 +02:00
<a href="#/user/<%= comment.user.name %>">
<% } %>
<%= comment.user.name || 'Anonymous user' %>
<% 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) { %><!--
--><a href="#" class="score-up <% print(comment.ownScore === 1 ? 'active' : '') %>"><!--
2014-10-05 16:19:08 +02:00
-->vote up<!--
--></a><!--
--><a href="#" class="score-down <% print(comment.ownScore === -1 ? 'active' : '') %>"><!--
2014-10-05 16:19:08 +02:00
-->vote down<!--
--></a><!--
--><% } %><!--
--><% if (canEditComment) { %><!--
--><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) { %><!--
--><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>