Merge commit '0.3.1-RC2' into next
[Sone.git] / src / main / resources / templates / include / viewPost.html
1 <a name="post-<% post.id|html>"></a>
2 <div id="<% post.id|html>" class="post<%if loop.last> last<%/if><%if post.new> new<%/if>">
3         <div class="post-time hidden"><% post.time|html></div>
4         <div class="avatar">
5                 <img src="/WoT/GetIdenticon?identity=<% post.sone.id|html>&amp;width=48&height=48" width="48" height="48" alt="Avatar Image" />
6         </div>
7         <div class="inner-part">
8                 <div>
9                         <div class="author profile-link"><a href="viewSone.html?sone=<% post.sone.id|html>"><% post.sone.niceName|html></a></div>
10                         <div class="text"><% post.text></div>
11                 </div>
12                 <div class="post-status-line status-line">
13                         <div class="time"><a href="viewPost.html?post=<% post.id|html>"><% post.time|date format="MMM d, yyyy, HH:mm:ss"></a></div>
14                         <div class="likes<%if post.likes.size|match value=0> hidden<%/if>"><span title="<% post.likes.soneNames|html>">⬆<span class="like-count"><% post.likes.size></span></span></div>
15                         <%ifnull ! currentSone>
16                                 <form class="like like-post<%if post.liked> hidden<%/if>" action="like.html" method="post">
17                                         <input type="hidden" name="formPassword" value="<% formPassword|html>" />
18                                         <input type="hidden" name="returnPage" value="<% request.uri|html>" />
19                                         <input type="hidden" name="type" value="post" />
20                                         <input type="hidden" name="post" value="<% post.id|html>" />
21                                         <button type="submit" value="1"><%= View.Post.LikeLink|l10n|html></button>
22                                 </form>
23                                 <form class="unlike unlike-post<%if ! post.liked> hidden<%/if>" action="unlike.html" method="post">
24                                         <input type="hidden" name="formPassword" value="<% formPassword|html>" />
25                                         <input type="hidden" name="returnPage" value="<% request.uri|html>" />
26                                         <input type="hidden" name="type" value="post" />
27                                         <input type="hidden" name="post" value="<% post.id|html>" />
28                                         <button type="submit" value="1"><%= View.Post.UnlikeLink|l10n|html></button>
29                                 </form>
30                         <%/if>
31                         <%if post.sone.current>
32                                 <form class="delete delete-post" action="deletePost.html" method="post">
33                                         <input type="hidden" name="formPassword" value="<% formPassword|html>" />
34                                         <input type="hidden" name="returnPage" value="<% request.uri|html>" />
35                                         <input type="hidden" name="post" value="<% post.id|html>" />
36                                         <button type="submit"><%= View.Post.DeleteLink|l10n|html></button>
37                                 </form>
38                         <%/if>
39                 </div>
40                 <div class="replies">
41                         <%foreach post.replies reply>
42                                 <%include include/viewReply.html>
43                         <%/foreach>
44                         <%ifnull ! currentSone>
45                                 <div class="create-reply">
46                                         <form method="post" action="createReply.html">
47                                                 <input type="hidden" name="formPassword" value="<% formPassword|html>" />
48                                                 <input type="hidden" name="returnPage" value="<% request.uri|html>" />
49                                                 <input type="hidden" name="post" value="<% post.id|html>" />
50                                                 <input type="text" class="reply-input" name="text" value="" />
51                                                 <button type="submit"><%= View.Post.SendReply|l10n|html></button>
52                                         </form>
53                                 </div>
54                         <%/if>
55                 </div>
56         </div>
57 </div>