Only show trust controls when logged in.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sun, 16 Jan 2011 13:43:41 +0000 (14:43 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sun, 16 Jan 2011 13:43:41 +0000 (14:43 +0100)
src/main/resources/templates/include/viewPost.html
src/main/resources/templates/include/viewReply.html

index a19ee73..11e0b3e 100644 (file)
                                        <input type="hidden" name="post" value="<% post.id|html>" />
                                        <button type="submit" value="1"><%= View.Post.UnlikeLink|l10n|html></button>
                                </form>
-                       <%/if>
-                       <%if !post.sone.current>
-                               <span class='separator'>·</span>
-                               <form class="trust post-trust<%if post.sone.trust.assigned> hidden<%/if>" action="trust.html" method="post">
-                                       <input type="hidden" name="formPassword" value="<% formPassword|html>" />
-                                       <input type="hidden" name="returnPage" value="<% request.uri|html>" />
-                                       <input type="hidden" name="sone" value="<% post.sone.id|html>" />
-                                       <button type="submit" title="<%= View.Trust.Tooltip.Trust|l10n|html>">✓</button>
-                               </form>
-                               <form class="distrust post-distrust" action="distrust.html" method="post">
-                                       <input type="hidden" name="formPassword" value="<% formPassword|html>" />
-                                       <input type="hidden" name="returnPage" value="<% request.uri|html>" />
-                                       <input type="hidden" name="sone" value="<% post.sone.id|html>" />
-                                       <button type="submit" title="<%= View.Trust.Tooltip.Distrust|l10n|html>">✗</button>
-                               </form>
-                               <form class="untrust post-untrust<%if !post.sone.trust.assigned> hidden<%/if>" action="untrust.html" method="post">
-                                       <input type="hidden" name="formPassword" value="<% formPassword|html>" />
-                                       <input type="hidden" name="returnPage" value="<% request.uri|html>" />
-                                       <input type="hidden" name="sone" value="<% post.sone.id|html>" />
-                                       <button type="submit" title="<%= View.Trust.Tooltip.Untrust|l10n|html>">↶</button>
-                               </form>
+                               <%if !post.sone.current>
+                                       <span class='separator'>·</span>
+                                       <form class="trust post-trust<%if post.sone.trust.assigned> hidden<%/if>" action="trust.html" method="post">
+                                               <input type="hidden" name="formPassword" value="<% formPassword|html>" />
+                                               <input type="hidden" name="returnPage" value="<% request.uri|html>" />
+                                               <input type="hidden" name="sone" value="<% post.sone.id|html>" />
+                                               <button type="submit" title="<%= View.Trust.Tooltip.Trust|l10n|html>">✓</button>
+                                       </form>
+                                       <form class="distrust post-distrust" action="distrust.html" method="post">
+                                               <input type="hidden" name="formPassword" value="<% formPassword|html>" />
+                                               <input type="hidden" name="returnPage" value="<% request.uri|html>" />
+                                               <input type="hidden" name="sone" value="<% post.sone.id|html>" />
+                                               <button type="submit" title="<%= View.Trust.Tooltip.Distrust|l10n|html>">✗</button>
+                                       </form>
+                                       <form class="untrust post-untrust<%if !post.sone.trust.assigned> hidden<%/if>" action="untrust.html" method="post">
+                                               <input type="hidden" name="formPassword" value="<% formPassword|html>" />
+                                               <input type="hidden" name="returnPage" value="<% request.uri|html>" />
+                                               <input type="hidden" name="sone" value="<% post.sone.id|html>" />
+                                               <button type="submit" title="<%= View.Trust.Tooltip.Untrust|l10n|html>">↶</button>
+                                       </form>
+                               <%/if>
                        <%/if>
                        <%if post.sone.current>
                                <span class='separator'>·</span>
index 8c6884b..2c52e11 100644 (file)
                                        <input type="hidden" name="reply" value="<% reply.id|html>" />
                                        <button type="submit" value="1"><%= View.Post.UnlikeLink|l10n|html></button>
                                </form>
-                       <%/if>
-                       <%if !reply.sone.current>
-                               <span class='separator'>·</span>
-                               <form class="trust reply-trust<%if reply.sone.trust.assigned> hidden<%/if>" action="trust.html" method="post">
-                                       <input type="hidden" name="formPassword" value="<% formPassword|html>" />
-                                       <input type="hidden" name="returnPage" value="<% request.uri|html>" />
-                                       <input type="hidden" name="sone" value="<% reply.sone.id|html>" />
-                                       <button type="submit" title="<%= View.Trust.Tooltip.Trust|l10n|html>">✓</button>
-                               </form>
-                               <form class="distrust reply-distrust" action="distrust.html" method="post">
-                                       <input type="hidden" name="formPassword" value="<% formPassword|html>" />
-                                       <input type="hidden" name="returnPage" value="<% request.uri|html>" />
-                                       <input type="hidden" name="sone" value="<% reply.sone.id|html>" />
-                                       <button type="submit" title="<%= View.Trust.Tooltip.Distrust|l10n|html>">✗</button>
-                               </form>
-                               <form class="untrust reply-untrust<%if !reply.sone.trust.assigned> hidden<%/if>" action="untrust.html" method="post">
-                                       <input type="hidden" name="formPassword" value="<% formPassword|html>" />
-                                       <input type="hidden" name="returnPage" value="<% request.uri|html>" />
-                                       <input type="hidden" name="sone" value="<% reply.sone.id|html>" />
-                                       <button type="submit" title="<%= View.Trust.Tooltip.Untrust|l10n|html>">↶</button>
-                               </form>
+                               <%if !reply.sone.current>
+                                       <span class='separator'>·</span>
+                                       <form class="trust reply-trust<%if reply.sone.trust.assigned> hidden<%/if>" action="trust.html" method="post">
+                                               <input type="hidden" name="formPassword" value="<% formPassword|html>" />
+                                               <input type="hidden" name="returnPage" value="<% request.uri|html>" />
+                                               <input type="hidden" name="sone" value="<% reply.sone.id|html>" />
+                                               <button type="submit" title="<%= View.Trust.Tooltip.Trust|l10n|html>">✓</button>
+                                       </form>
+                                       <form class="distrust reply-distrust" action="distrust.html" method="post">
+                                               <input type="hidden" name="formPassword" value="<% formPassword|html>" />
+                                               <input type="hidden" name="returnPage" value="<% request.uri|html>" />
+                                               <input type="hidden" name="sone" value="<% reply.sone.id|html>" />
+                                               <button type="submit" title="<%= View.Trust.Tooltip.Distrust|l10n|html>">✗</button>
+                                       </form>
+                                       <form class="untrust reply-untrust<%if !reply.sone.trust.assigned> hidden<%/if>" action="untrust.html" method="post">
+                                               <input type="hidden" name="formPassword" value="<% formPassword|html>" />
+                                               <input type="hidden" name="returnPage" value="<% request.uri|html>" />
+                                               <input type="hidden" name="sone" value="<% reply.sone.id|html>" />
+                                               <button type="submit" title="<%= View.Trust.Tooltip.Untrust|l10n|html>">↶</button>
+                                       </form>
+                               <%/if>
                        <%/if>
                        <%if reply.sone.current>
                                <span class='separator'>·</span>