Hide 0 likes.
[Sone.git] / src / main / resources / templates / include / viewPost.html
index 1f0020c..991ccec 100644 (file)
@@ -5,7 +5,7 @@
        </div>
        <div class="status-line">
                <div class="time"><a href="viewPost.html?post=<% post.id|html>"><% post.time|date format="MMM d, yyyy, HH:mm:ss"></a></div>
-               <div class="likes"><span>⬆<span class="like-count"><% post.likes.size></span></span></div>
+               <div class="likes<%if post.likes.size|match value=0> hidden<%/if>"><span>⬆<span class="like-count"><% post.likes.size></span></span></div>
                <%ifnull ! currentSone>
                        <form class="like<%if post.liked> hidden<%/if>" action="likePost.html" method="post">
                                <input type="hidden" name="formPassword" value="<% formPassword|html>" />
                                </div>
                        </div>
                <%/foreach>
-               <div class="create-reply">
-                       <form method="post" action="createReply.html">
-                               <input type="hidden" name="formPassword" value="<% formPassword|html>" />
-                               <input type="hidden" name="returnPage" value="<% request.uri|html>" />
-                               <input type="hidden" name="post" value="<% post.id|html>" />
-                               <input type="text" class="reply-input" name="text" value="" />
-                               <button type="submit"><%= View.Post.SendReply|l10n|html></button>
-                       </form>
-               </div>
+               <%ifnull ! currentSone>
+                       <div class="create-reply">
+                               <form method="post" action="createReply.html">
+                                       <input type="hidden" name="formPassword" value="<% formPassword|html>" />
+                                       <input type="hidden" name="returnPage" value="<% request.uri|html>" />
+                                       <input type="hidden" name="post" value="<% post.id|html>" />
+                                       <input type="text" class="reply-input" name="text" value="" />
+                                       <button type="submit"><%= View.Post.SendReply|l10n|html></button>
+                               </form>
+                       </div>
+               <%/if>
        </div>
 </div>