Hide message input when not logged in. Fixes #98.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 26 Jan 2011 09:17:39 +0000 (10:17 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 26 Jan 2011 09:17:39 +0000 (10:17 +0100)
src/main/resources/templates/viewSone.html

index fac920b..4b2502a 100644 (file)
                                </div>
                        <%/foreach>
 
-               <%if ! sone.current>
-                       <p><%= Page.ViewSone.WriteAMessage|l10n|html></p>
-
-                       <form action="createPost.html" id="post-message" method="post">
-                               <input type="hidden" name="formPassword" value="<% formPassword|html>" />
-                               <input type="hidden" name="returnPage" value="<% request.uri|html>" />
-                               <input type="hidden" name="recipient" value="<% sone.id|html>" />
-                               <input type="text" name="text" value="" />
-                               <button type="submit"><%= Page.CreatePost.Button.Post|l10n|html></button>
-                       </form>
+               <%ifnull ! currentSone>
+                       <%if ! sone.current>
+                               <p><%= Page.ViewSone.WriteAMessage|l10n|html></p>
+
+                               <form action="createPost.html" id="post-message" method="post">
+                                       <input type="hidden" name="formPassword" value="<% formPassword|html>" />
+                                       <input type="hidden" name="returnPage" value="<% request.uri|html>" />
+                                       <input type="hidden" name="recipient" value="<% sone.id|html>" />
+                                       <input type="text" name="text" value="" />
+                                       <button type="submit"><%= Page.CreatePost.Button.Post|l10n|html></button>
+                               </form>
+                       <%/if>
                <%/if>
 
                <h1><%= Page.ViewSone.PostList.Title|l10n|replace needle="{sone}" replacementKey=sone.niceName|html></h1>