Don’t try to show unknown posts.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sun, 5 Dec 2010 12:36:57 +0000 (13:36 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sun, 5 Dec 2010 12:36:57 +0000 (13:36 +0100)
src/main/resources/i18n/sone.en.properties
src/main/resources/templates/viewPost.html

index 32ff6c6..d0c44f5 100644 (file)
@@ -95,6 +95,8 @@ Page.ViewSone.PostList.Text.NoPostYet=This Sone has not yet posted anything.
 
 Page.ViewPost.Title=View Post - Sone
 Page.ViewPost.Page.Title=View Post by {sone}
+Page.ViewPost.Page.TitleUnknownSone=View Unknown Post
+Page.ViewPost.Text.UnknownPost=This post has not yet been downloaded.
 
 Page.Like.Title=Like Post - Sone
 Page.Unlike.Title=Unlike Post - Sone
index 3de8ebc..a61f858 100644 (file)
@@ -3,8 +3,14 @@
        <div class="page-id hidden">view-post</div>
        <div class="post-id hidden"><% post.id|html></div>
 
-       <h1><%= Page.ViewPost.Page.Title|l10n|insert needle="{sone}" key=post.sone.niceName|html></h1>
+       <%ifnull post.sone>
+               <h1><%= Page.ViewPost.Page.TitleUnknownSone|l10n|html></h1>
 
-       <%include include/viewPost.html>
+               <p><%= Page.ViewPost.Text.UnknownPost|l10n|html></p>
+       <%else>
+               <h1><%= Page.ViewPost.Page.Title|l10n|insert needle="{sone}" key=post.sone.niceName|html></h1>
+
+               <%include include/viewPost.html>
+       <%/if>
 
 <%include include/tail.html>