From: David ‘Bombe’ Roden Date: Fri, 19 Nov 2010 20:53:49 +0000 (+0100) Subject: Don’t always create a Sone for a given ID. X-Git-Tag: 0.3.1-RC1~56 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=728eb9dfab6b9284dbb69701fa8ba4a9b072e7ca;p=Sone.git Don’t always create a Sone for a given ID. --- 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>