Fix check for a recipient.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sun, 27 Jan 2013 21:14:35 +0000 (22:14 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sun, 27 Jan 2013 21:14:35 +0000 (22:14 +0100)
src/main/resources/templates/include/viewPost.html

index 7120d06..b46532f 100644 (file)
        <div class="inner-part">
                <div<%if !post.loaded> class="hidden"<%/if>>
                        <div class="author profile-link"><a href="viewSone.html?sone=<% post.sone.id|html>"><% post.sone.niceName|html></a></div>
        <div class="inner-part">
                <div<%if !post.loaded> class="hidden"<%/if>>
                        <div class="author profile-link"><a href="viewSone.html?sone=<% post.sone.id|html>"><% post.sone.niceName|html></a></div>
-                       <%ifnull !post.recipient>
+                       <%if post.hasRecipient>
                                <span class="recipient-to">→</span>
                                <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>
+                               <%ifnull post.recipient.orNull>
+                                       <div class="recipient profile-link"><a href="viewSone.html?sone=<% post.recipientId.get|html>"><%= View.Post.UnknownAuthor|l10n|html></a></div>
                                <%else>
                                <%else>
-                                       <div class="recipient profile-link"><a href="viewSone.html?sone=<% post.recipient.id|html>"><% post.recipient.niceName|html></a></div>
+                                       <div class="recipient profile-link"><a href="viewSone.html?sone=<% post.recipientId.get|html>"><% post.recipient.get.niceName|html></a></div>
                                <%/if>
                        <%/if>
                        <% post.text|html|store key==originalText text==true>
                                <%/if>
                        <%/if>
                        <% post.text|html|store key==originalText text==true>