Add header for the list of posts on the “view Sone” page.
[Sone.git] / src / main / resources / templates / viewSone.html
index a984ce5..a9b0a21 100644 (file)
@@ -1,4 +1,10 @@
-<div id="sone">
+<%include include/head.html>
+
+       <script language="javascript">
+               $(document).ready(function() {
+                       addCommentLinks();
+               });
+       </script>
 
        <%ifnull sone.name>
 
 
        <%else>
 
-               <h1></h1><%= Page.ViewSone.Page.TitleWithSone|l10n|insert needle="{sone}" key=sone.name|html></h1>
-
-               <h1><%= Page.ViewSone.PostList.Title|l10n|insert needle="{sone}" key=sone.name|html></h1>
+               <%if ! sone.current>
+                       <%include include/viewSone.html>
+               <%/if>
 
                <div id="posts">
                        <%foreach sone.posts post>
-                               <div class="post">
-                                       <div class="author"><a href="viewSone.html?sone=<% post.sone.id>"><% post.sone.name|html></a></div>
-                                       <div class="text"><% post.text|html></div>
-                                       <div class="time"><% post.time|date format="MMM d, yyyy, HH:mm:ss"></div>
-                               </div>
+                               <%first>
+                                       <h1><%= Page.ViewSone.PostList.Title|l10n|insert needle="{sone}" key=sone.niceName|html></h1>
+                               <%/first>
+                               <%include include/viewPost.html>
                        <%foreachelse>
                                <div><%= Page.ViewSone.PostList.Text.NoPostYet|l10n|html></div>
                        <%/foreach>
                </div>
 
+               <h1><%= Page.ViewSone.Following.Title|l10n|html></h1>
+
+               <div id="following">
+                       <%foreach sone.friends sone>
+                               <%include include/viewSone.html>
+                       <%foreachelse>
+                               <div><%= Page.ViewSone.Following.FollowingNone.Text|l10n|html></div>
+                       <%/foreach>
+               </div>
+
        <%/if>
 
-</div>
+<%include include/tail.html>