Show recipient on posts.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 26 Nov 2010 19:11:33 +0000 (20:11 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 26 Nov 2010 19:11:33 +0000 (20:11 +0100)
src/main/resources/i18n/sone.en.properties
src/main/resources/templates/include/viewPost.html

index 0db2276..ad3f4b0 100644 (file)
@@ -149,6 +149,7 @@ View.Sone.Status.Idle=This Sone is idle, i.e. not being inserted or downloaded.
 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.DeleteLink=Delete
 View.Post.SendReply=Post Reply!
 View.Post.Reply.DeleteLink=Delete
index 452513b..4b23b1f 100644 (file)
@@ -7,6 +7,14 @@
        <div class="inner-part">
                <div>
                        <div class="author profile-link"><a href="viewSone.html?sone=<% post.sone.id|html>"><% post.sone.niceName|html></a></div>
+                       <%ifnull !post.recipient>
+                               <span class="recipient-to">→</span>
+                               <%ifnull post.recipient.identity>
+                                       <div class="recipient profile-link"><a href="viewSone.html?sone=<% post.recipient.id|html>"><% View.Post.UnknownAuthor|l10n|html></a></div>
+                               <%else>
+                                       <div class="recipient profile-link"><a href="viewSone.html?sone=<% post.recipient.id|html>"><% post.recipient.niceName|html></a></div>
+                               <%/if>
+                       <%/if>
                        <div class="text"><% post.text|html></div>
                </div>
                <div class="status-line">