From: David ‘Bombe’ Roden Date: Thu, 14 Oct 2010 14:08:07 +0000 (+0200) Subject: Show links for adding or removing friends. X-Git-Tag: 0.1-RC1~371 X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=commitdiff_plain;h=c182560799d5d40fdc665b9ecc223d596b87107c Show links for adding or removing friends. --- 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>