Show links for adding or removing friends.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 14 Oct 2010 14:08:07 +0000 (16:08 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 14 Oct 2010 14:08:07 +0000 (16:08 +0200)
src/main/resources/i18n/sone.en.properties
src/main/resources/templates/viewSone.html

index 5a99acb..964299e 100644 (file)
@@ -71,5 +71,7 @@ Page.ViewSone.Page.TitleWithSone=View Sone “{sone}”
 Page.ViewSone.UnknownSone.Description=This Sone has not yet been retrieved. Please check back in a short time.
 Page.ViewSone.PostList.Title=Posts by “{sone}”
 Page.ViewSone.PostList.Text.NoPostYet=This Sone has not yet posted anything.
+Page.ViewSone.RemoveFriend.Text=Remove as Friend
+Page.ViewSone.AddFriend.Text=Add as Friend
 
 Page.Logout.Title=Logout - Sone
index 21bd83c..524d476 100644 (file)
 
                <h1><%= Page.ViewSone.PostList.Title|l10n|insert needle="{sone}" key=sone.niceName|html></h1>
 
+               <%if ! sone.isCurrent>
+                       <%if sone.isFriend>
+                               <div><a href="removeFriend.html?sone=<% sone.id>"><%= Page.ViewSone.RemoveFriend.Text|l10n|html></a></div>
+                       <%else>
+                               <div><a href="addFriend.html?sone=<% sone.id>"><%= Page.ViewSone.AddFriend.Text|l10n|html></a></div>
+                       <%/if>
+               <%/if>
+
                <div id="posts">
                        <%foreach sone.posts post>
                                <div class="post">