Add star for bookmarks in post view.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 17 Feb 2011 09:33:24 +0000 (10:33 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 17 Feb 2011 09:33:24 +0000 (10:33 +0100)
src/main/resources/i18n/sone.en.properties
src/main/resources/static/css/sone.css
src/main/resources/templates/include/viewPost.html

index 5ec8348..08f5f6d 100644 (file)
@@ -200,6 +200,8 @@ View.Sone.Status.Downloading=This Sone is currently being downloaded.
 View.Sone.Status.Inserting=This Sone is currently being inserted.
 
 View.Post.UnknownAuthor=(unknown)
+View.Post.Bookmarks.PostIsBookmarked=Post is bookmarked, click to remove from bookmarks
+View.Post.Bookmarks.PostIsNotBookmarked=Post is not bookmarked, click to bookmark
 View.Post.DeleteLink=Delete
 View.Post.SendReply=Post Reply!
 View.Post.Reply.DeleteLink=Delete
index 676a9d5..f5250e3 100644 (file)
@@ -254,6 +254,11 @@ textarea {
        color: rgb(28, 131, 191);
 }
 
+#sone .post .bookmarks, #sone .post .bookmarked, #sone .post .not-bookmarked {
+       display: inline;
+       color: rgb(28, 131, 191);
+}
+
 #sone .post .time {
        display: inline;
        color: #666;
index dc2912e..92fff0f 100644 (file)
                        <div class="text"><% post.text|parse sone=post.sone></div>
                </div>
                <div class="post-status-line status-line">
+                       <div class="bookmarks">
+                               <form class="bookmarked<%if !post.bookmarked> hidden<%/if>" action="bookmark.html" method="post">
+                                       <input type="hidden" name="formPassword" value="<% formPassword|html>" />
+                                       <input type="hidden" name="returnPage" value="<% request.uri|html>" />
+                                       <input type="hidden" name="post" value="<% post.id|html>" />
+                                       <button type="submit" title="<%= View.Post.Bookmarks.PostIsBookmarked|l10n|html>">★</button>
+                               </form>
+                               <form class="not-bookmarked<%if post.bookmarked> hidden<%/if>" action="unbookmark.html" method="post">
+                                       <input type="hidden" name="formPassword" value="<% formPassword|html>" />
+                                       <input type="hidden" name="returnPage" value="<% request.uri|html>" />
+                                       <input type="hidden" name="post" value="<% post.id|html>" />
+                                       <button type="submit" title="<%= View.Post.Bookmarks.PostIsNotBookmarked|l10n|html>">☆</button>
+                               </form>
+                       </div>
+                       <span class='separator'>·</span>
                        <div class="time"><a href="viewPost.html?post=<% post.id|html>"><% post.time|date format="MMM d, yyyy, HH:mm:ss"></a></div>
                        <div class="likes<%if post.likes.size|match value=0> hidden<%/if>">
                                <span class='separator'>·</span>