Use head and tail includes on all pages.
[Sone.git] / src / main / resources / templates / viewSone.html
1 <%include include/head.html>
2
3         <%ifnull sone.name>
4
5                 <h1><%= Page.ViewSone.Page.TitleWithoutSone|l10n|html></h1>
6
7                 <div><%= Page.ViewSone.UnknownSone.Description|l10n|html></div>
8
9         <%else>
10
11                 <h1><%= Page.ViewSone.Page.TitleWithSone|l10n|insert needle="{sone}" key=sone.niceName|html></h1>
12
13                 <h1><%= Page.ViewSone.PostList.Title|l10n|insert needle="{sone}" key=sone.niceName|html></h1>
14
15                 <%if ! sone.isCurrent>
16                         <%if sone.isFriend>
17                                 <div><a href="unfollowSone.html?sone=<% sone.id>"><%= Page.ViewSone.UnfollowSone.Text|l10n|html></a></div>
18                         <%else>
19                                 <div><a href="followSone.html?sone=<% sone.id>"><%= Page.ViewSone.FollowSone.Text|l10n|html></a></div>
20                         <%/if>
21                 <%/if>
22
23                 <div id="posts">
24                         <%foreach sone.posts post>
25                                 <div class="post">
26                                         <div class="author"><a href="viewSone.html?sone=<% post.sone.id>"><% post.sone.niceName|html></a></div>
27                                         <div class="text"><% post.text|html></div>
28                                         <div class="time"><% post.time|date format="MMM d, yyyy, HH:mm:ss"></div>
29                                 </div>
30                                 <%foreach post.replies reply>
31                                         <div class="reply">
32                                                 <div class="author"><a href="viewSone.html?sone=<% reply.sone.id>"><% reply.sone.niceName|html></a></div>
33                                                 <div class="text"><% reply.text|html></div>
34                                                 <div class="time"><% reply.time|date format="MMM d, yyyy, HH:mm:ss"></div>
35                                         </div>
36                                 <%/foreach>
37                                 <div class="create-reply">
38                                         <form method="post" action="createReply.html">
39                                                 <input type="hidden" name="formPassword" value="<% formPassword|html>" />
40                                                 <input type="hidden" name="post" value="<% post.id>" />
41                                                 <input type="text" name="text" value="" />
42                                                 <button type="submit">Post Reply</button>
43                                         </form>
44                                 </div>
45                         <%foreachelse>
46                                 <div><%= Page.ViewSone.PostList.Text.NoPostYet|l10n|html></div>
47                         <%/foreach>
48                 </div>
49                 
50                 <h1><%= Page.ViewSone.Following.Title|l10n|html></h1>
51                 
52                 <div id="following">
53                         <%foreach sone.friends friend>
54                                 <%first>
55                                         <ul>
56                                 <%/first>
57                                         <li><a href="viewSone.html?sone=<% friend.id>"><% friend.niceName|html></a> (<% friend.requestUri|html>)</li>
58                                 <%last>
59                                         </ul>
60                                 <%/last>
61                         <%foreachelse>
62                                 <div><%= Page.ViewSone.Following.FollowingNone.Text|l10n|html></div>
63                         <%/foreach>
64                 </div>
65
66         <%/if>
67
68 <%include include/tail.html>