From 728eb9dfab6b9284dbb69701fa8ba4a9b072e7ca Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Fri, 19 Nov 2010 21:53:49 +0100 Subject: [PATCH] =?utf8?q?Don=E2=80=99t=20always=20create=20a=20Sone=20for?= =?utf8?q?=20a=20given=20ID.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/main/java/net/pterodactylus/sone/web/ViewSonePage.java | 2 +- src/main/resources/i18n/sone.en.properties | 1 + src/main/resources/templates/viewSone.html | 8 +++++++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/pterodactylus/sone/web/ViewSonePage.java b/src/main/java/net/pterodactylus/sone/web/ViewSonePage.java index 1ff248d..8b88f2e 100644 --- a/src/main/java/net/pterodactylus/sone/web/ViewSonePage.java +++ b/src/main/java/net/pterodactylus/sone/web/ViewSonePage.java @@ -50,7 +50,7 @@ public class ViewSonePage extends SoneTemplatePage { protected void processTemplate(Request request, Template template) throws RedirectException { super.processTemplate(request, template); String soneId = request.getHttpRequest().getParam("sone"); - Sone sone = webInterface.getCore().getSone(soneId); + Sone sone = webInterface.getCore().getSone(soneId, false); template.set("sone", sone); } diff --git a/src/main/resources/i18n/sone.en.properties b/src/main/resources/i18n/sone.en.properties index 0dd21d0..0db2276 100644 --- a/src/main/resources/i18n/sone.en.properties +++ b/src/main/resources/i18n/sone.en.properties @@ -87,6 +87,7 @@ Page.CreateReply.Button.Post=Post Reply! Page.ViewSone.Title=View Sone - Sone Page.ViewSone.Page.TitleWithoutSone=View unknown Sone +Page.ViewSone.NoSone.Description=There is currently no known Sone with the ID {sone}. If you were looking for a specific Sone, make sure that it is visible in your web of trust! 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. diff --git a/src/main/resources/templates/viewSone.html b/src/main/resources/templates/viewSone.html index fcb2891..534c5ff 100644 --- a/src/main/resources/templates/viewSone.html +++ b/src/main/resources/templates/viewSone.html @@ -1,6 +1,12 @@ <%include include/head.html> - <%ifnull sone.name> + <%ifnull sone> + +

<%= Page.ViewSone.Page.TitleWithoutSone|l10n|html>

+ +

<%= Page.ViewSone.NoSone.Description|l10n|insert needle="{sone}" key=sone.id|html>

+ + <%elseifnull sone.name>

<%= Page.ViewSone.Page.TitleWithoutSone|l10n|html>

-- 2.7.4