Only show follow/block links when the shown Sone is not the current one.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 18 Oct 2010 20:24:26 +0000 (22:24 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 18 Oct 2010 20:24:26 +0000 (22:24 +0200)
src/main/resources/templates/knownSones.html

index 096bc19..3f22405 100644 (file)
@@ -8,31 +8,33 @@
                                <div class="profile-link"><a href="viewSone.html?sone=<% sone.id>" title="<% sone.requestUri|html>"><% sone.niceName|html></a></div>
                                <div class="last-update">(<%= View.Sone.Label.LastUpdate|l10n|html> <% sone.time|date format="MMM d, yyyy, HH:mm:ss">)</div>
                                <%ifnull ! currentSone>
-                                       <%if sone.isFriend>
-                                               <form class="unfollow" action="unfollowSone.html" method="post">
-                                                       <input type="hidden" name="formPassword" value="<% formPassword|html>" />
-                                                       <input type="hidden" name="sone" value="<% sone.id>" />
-                                                       <button type="submit"><%= View.Sone.Button.UnfollowSone|l10n|html></button>
-                                               </form>
-                                       <%else>
-                                               <form class="follow" action="followSone.html" method="post">
-                                                       <input type="hidden" name="formPassword" value="<% formPassword|html>" />
-                                                       <input type="hidden" name="sone" value="<% sone.id>" />
-                                                       <button type="submit"><%= View.Sone.Button.FollowSone|l10n|html></button>
-                                               </form>
-                                       <%/if>
-                                       <%if sone.isBlocked>
-                                               <form class="unblock" action="unblockSone.html" method="post">
-                                                       <input type="hidden" name="formPassword" value="<% formPassword|html>" />
-                                                       <input type="hidden" name="sone" value="<% sone.id>" />
-                                                       <button type="submit"><%= View.Sone.Button.UnblockSone|l10n|html></button>
-                                               </form>
-                                       <%else>
-                                               <form class="block" action="blockSone.html" method="post">
-                                                       <input type="hidden" name="formPassword" value="<% formPassword|html>" />
-                                                       <input type="hidden" name="sone" value="<% sone.id>" />
-                                                       <button type="submit"><%= View.Sone.Button.BlockSone|l10n|html></button>
-                                               </form>
+                                       <%if ! sone.isCurrent>
+                                               <%if sone.isFriend>
+                                                       <form class="unfollow" action="unfollowSone.html" method="post">
+                                                               <input type="hidden" name="formPassword" value="<% formPassword|html>" />
+                                                               <input type="hidden" name="sone" value="<% sone.id>" />
+                                                               <button type="submit"><%= View.Sone.Button.UnfollowSone|l10n|html></button>
+                                                       </form>
+                                               <%else>
+                                                       <form class="follow" action="followSone.html" method="post">
+                                                               <input type="hidden" name="formPassword" value="<% formPassword|html>" />
+                                                               <input type="hidden" name="sone" value="<% sone.id>" />
+                                                               <button type="submit"><%= View.Sone.Button.FollowSone|l10n|html></button>
+                                                       </form>
+                                               <%/if>
+                                               <%if sone.isBlocked>
+                                                       <form class="unblock" action="unblockSone.html" method="post">
+                                                               <input type="hidden" name="formPassword" value="<% formPassword|html>" />
+                                                               <input type="hidden" name="sone" value="<% sone.id>" />
+                                                               <button type="submit"><%= View.Sone.Button.UnblockSone|l10n|html></button>
+                                                       </form>
+                                               <%else>
+                                                       <form class="block" action="blockSone.html" method="post">
+                                                               <input type="hidden" name="formPassword" value="<% formPassword|html>" />
+                                                               <input type="hidden" name="sone" value="<% sone.id>" />
+                                                               <button type="submit"><%= View.Sone.Button.BlockSone|l10n|html></button>
+                                                       </form>
+                                               <%/if>
                                        <%/if>
                                <%/if>
                        </div>