2507917fb43fb3e9f1c553b9ebf01db602bb3d2d
[Sone.git] / src / main / resources / templates / include / viewReply.html
1 <div id="<% reply.id|html>" class="reply<%if reply.new> new<%/if>">
2         <a name="reply-<% reply.id|html>"></a>
3         <div class="reply-time hidden"><% reply.time|html></div>
4         <div class="reply-author hidden"><% reply.sone.id|html></div>
5         <div class="reply-author-local hidden"><% reply.sone.local></div>
6         <div class="avatar">
7                 <img src="/WebOfTrust/GetIdenticon?identity=<% reply.sone.id|html>&amp;width=36&height=36" width="36" height="36" alt="Avatar Image" />
8         </div>
9         <div class="inner-part">
10                 <div>
11                         <div class="author profile-link"><a href="viewSone.html?sone=<% reply.sone.id|html>"><% reply.sone.niceName|html></a></div>
12                         <% reply.text|html|store key=originalText text=true>
13                         <% reply.text|parse sone=reply.sone|store key=parsedText text=true>
14                         <div class="reply-text raw-text<%if !raw> hidden<%/if>"><% originalText></div>
15                         <div class="reply-text text<%if raw> hidden<%/if>"><% parsedText></div>
16                 </div>
17                 <div class="reply-status-line status-line">
18                         <div class="time"><% reply.time|date format="MMM d, yyyy, HH:mm:ss"></div>
19                         <span class='separator'>·</span>
20                         <div class="permalink permalink-author"><a href="sone://<%reply.sone.id|html>">[<%= View.Post.PermalinkAuthor|l10n|html>]</a></div>
21                         <%if ! originalText|match key=parsedText>
22                                 <span class='separator'>·</span>
23                                 <div class="show-reply-source"><a href="viewPost.html?post=<% post.id|html>&amp;raw=<%if raw>false<%else>true<%/if>"><%= View.Post.ShowSource|l10n|html></a></div>
24                         <%/if>
25                         <div class="likes<%if reply.likes.size|match value=0> hidden<%/if>">
26                                 <span class='separator'>·</span>
27                                 <span title="<% reply.likes.soneNames|html>">↑<span class="like-count"><% reply.likes.size></span></span>
28                         </div>
29                         <%ifnull ! currentSone>
30                                 <span class='separator'>·</span>
31                                 <form class="like like-reply<%if reply.liked> hidden<%/if>" action="like.html" method="post">
32                                         <input type="hidden" name="formPassword" value="<% formPassword|html>" />
33                                         <input type="hidden" name="returnPage" value="<% request.uri|html>" />
34                                         <input type="hidden" name="type" value="reply" />
35                                         <input type="hidden" name="reply" value="<% reply.id|html>" />
36                                         <button type="submit" value="1"><%= View.Post.LikeLink|l10n|html></button>
37                                 </form>
38                                 <form class="unlike unlike-reply<%if ! reply.liked> hidden<%/if>" action="unlike.html" method="post">
39                                         <input type="hidden" name="formPassword" value="<% formPassword|html>" />
40                                         <input type="hidden" name="returnPage" value="<% request.uri|html>" />
41                                         <input type="hidden" name="type" value="reply" />
42                                         <input type="hidden" name="reply" value="<% reply.id|html>" />
43                                         <button type="submit" value="1"><%= View.Post.UnlikeLink|l10n|html></button>
44                                 </form>
45                                 <%if !reply.sone.current>
46                                         <span class='separator'>·</span>
47                                         <form class="trust reply-trust<%if reply.sone.trust.assigned> hidden<%/if>" action="trust.html" method="post">
48                                                 <input type="hidden" name="formPassword" value="<% formPassword|html>" />
49                                                 <input type="hidden" name="returnPage" value="<% request.uri|html>" />
50                                                 <input type="hidden" name="sone" value="<% reply.sone.id|html>" />
51                                                 <button type="submit" title="<%= View.Trust.Tooltip.Trust|l10n|html>">✓</button>
52                                         </form>
53                                         <form class="distrust reply-distrust<%if reply.sone.trust.assigned> hidden<%/if>" action="distrust.html" method="post">
54                                                 <input type="hidden" name="formPassword" value="<% formPassword|html>" />
55                                                 <input type="hidden" name="returnPage" value="<% request.uri|html>" />
56                                                 <input type="hidden" name="sone" value="<% reply.sone.id|html>" />
57                                                 <button type="submit" title="<%= View.Trust.Tooltip.Distrust|l10n|html>">✗</button>
58                                         </form>
59                                         <form class="untrust reply-untrust<%if !reply.sone.trust.assigned> hidden<%/if>" action="untrust.html" method="post">
60                                                 <input type="hidden" name="formPassword" value="<% formPassword|html>" />
61                                                 <input type="hidden" name="returnPage" value="<% request.uri|html>" />
62                                                 <input type="hidden" name="sone" value="<% reply.sone.id|html>" />
63                                                 <button type="submit" title="<%= View.Trust.Tooltip.Untrust|l10n|html>">↶</button>
64                                         </form>
65                                 <%/if>
66                         <%/if>
67                         <%if reply.sone.local>
68                                 <span class='separator'>·</span>
69                                 <form class="delete delete-reply" action="deleteReply.html" method="post">
70                                         <input type="hidden" name="formPassword" value="<% formPassword|html>" />
71                                         <input type="hidden" name="returnPage" value="<% request.uri|html>" />
72                                         <input type="hidden" name="reply" value="<% reply.id|html>" />
73                                         <button type="submit"><%= View.Post.Reply.DeleteLink|l10n|html></button>
74                                 </form>
75                         <%/if>
76                 </div>
77         </div>
78 </div>