From c182560799d5d40fdc665b9ecc223d596b87107c Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Thu, 14 Oct 2010 16:08:07 +0200 Subject: [PATCH] Show links for adding or removing friends. --- src/main/resources/i18n/sone.en.properties | 2 ++ src/main/resources/templates/viewSone.html | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/src/main/resources/i18n/sone.en.properties b/src/main/resources/i18n/sone.en.properties index 5a99acb..964299e 100644 --- a/src/main/resources/i18n/sone.en.properties +++ b/src/main/resources/i18n/sone.en.properties @@ -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 diff --git a/src/main/resources/templates/viewSone.html b/src/main/resources/templates/viewSone.html index 21bd83c..524d476 100644 --- a/src/main/resources/templates/viewSone.html +++ b/src/main/resources/templates/viewSone.html @@ -12,6 +12,14 @@

<%= Page.ViewSone.PostList.Title|l10n|insert needle="{sone}" key=sone.niceName|html>

+ <%if ! sone.isCurrent> + <%if sone.isFriend> +
<%= Page.ViewSone.RemoveFriend.Text|l10n|html>
+ <%else> +
<%= Page.ViewSone.AddFriend.Text|l10n|html>
+ <%/if> + <%/if> +
<%foreach sone.posts post>
-- 2.7.4