From f5ae451a5603ac8865d731e059d656a6dc47d515 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Mon, 7 Mar 2011 17:34:22 +0100 Subject: [PATCH] Show hint if some posts could not be shown. --- src/main/resources/i18n/sone.en.properties | 1 + src/main/resources/templates/bookmarks.html | 16 +++++++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/main/resources/i18n/sone.en.properties b/src/main/resources/i18n/sone.en.properties index 2165bb5..4c85ab0 100644 --- a/src/main/resources/i18n/sone.en.properties +++ b/src/main/resources/i18n/sone.en.properties @@ -167,6 +167,7 @@ Page.Unbookmark.Title=Remove Bookmark - Sone Page.Bookmarks.Title=Bookmarks - Sone Page.Bookmarks.Page.Title=Bookmarks Page.Bookmarks.Text.NoBookmarks=You don’t have any bookmarks defined right now. You can bookmark posts by clicking the star below the post. +Page.Bookmarks.Text.PostsNotLoaded=Some of your bookmarked posts have not been shown because they could not be loaded. This can happen if your restarted Sone recently or if the originating Sone has deleted the post. Page.NoPermission.Title=Unauthorized Access - Sone Page.NoPermission.Page.Title=Unauthorized Access diff --git a/src/main/resources/templates/bookmarks.html b/src/main/resources/templates/bookmarks.html index ddf2bfc..af592db 100644 --- a/src/main/resources/templates/bookmarks.html +++ b/src/main/resources/templates/bookmarks.html @@ -7,10 +7,20 @@
<%include include/pagination.html> <%foreach posts post> - <%include include/viewPost.html> - <%foreachelse> -

<%= Page.Bookmarks.Text.NoBookmarks|l10n|html>

+ <%if post.loaded> + <%= true|store key=postShown> + <%include include/viewPost.html> + <%else> + <%= true|store key=postNotLoaded> + <%/if> <%/foreach> + <%if postNotLoaded> +

<%= Page.Bookmarks.Text.PostsNotLoaded|l10n|html>

+ <%else> + <%if !postShown> +

<%= Page.Bookmarks.Text.NoBookmarks|l10n|html>

+ <%/if> + <%/if> <%include include/pagination.html>
-- 2.7.4