Add permalinks for posts and authors.
[Sone.git] / src / main / resources / templates / viewSone.html
1 <%include include/head.html>
2
3         <div class="page-id hidden">view-sone</div>
4         <div class="sone-id hidden"><% sone.id|html></div>
5
6         <%ifnull sone>
7
8                 <h1><%= Page.ViewSone.Page.TitleWithoutSone|l10n|html></h1>
9
10                 <p><%= Page.ViewSone.NoSone.Description|l10n|replace needle="{sone}" replacementKey=sone.id|html></p>
11
12         <%elseifnull sone.name>
13
14                 <h1><%= Page.ViewSone.Page.TitleWithoutSone|l10n|html></h1>
15
16                 <p><%= Page.ViewSone.UnknownSone.Description|l10n|html></p>
17
18         <%else>
19
20                 <%if ! sone.current>
21                         <%include include/viewSone.html>
22                 <%/if>
23
24                 <h1><%= Page.ViewSone.Profile.Title|l10n|html></h1>
25
26                         <div class="profile-field">
27                                 <div class="name"><%= Page.ViewSone.Profile.Label.Name|l10n|html></div>
28                                 <div class="value"><a href="/WebOfTrust/ShowIdentity?id=<% sone.id|html>"><% sone.niceName|html></a></div>
29                         </div>
30
31                         <%foreach sone.profile.fields field>
32                                 <div class="profile-field">
33                                         <div class="name"><% field.name|html></div>
34                                         <div class="value"><% field.value|parse></div>
35                                 </div>
36                         <%/foreach>
37
38                 <%ifnull ! currentSone>
39                         <%if ! sone.current>
40                                 <p><%= Page.ViewSone.WriteAMessage|l10n|html></p>
41
42                                 <form action="createPost.html" id="post-message" method="post">
43                                         <input type="hidden" name="formPassword" value="<% formPassword|html>" />
44                                         <input type="hidden" name="returnPage" value="<% request.uri|html>" />
45                                         <input type="hidden" name="recipient" value="<% sone.id|html>" />
46                                         <label for="sender"><%= Page.Index.Label.Sender|l10n|html></label>
47                                         <div class="sender">
48                                                 <select name="sender" title="<%= View.UpdateStatus.Text.ChooseSenderIdentity|l10n|html>">
49                                                         <%foreach localSones localSone>
50                                                                 <option value="<% localSone.id|html>"<%if localSone.current> selected="selected"<%/if>><% localSone.niceName|html></option>
51                                                         <%/foreach>
52                                                 </select>
53                                         </div>
54                                         <div class="select-sender"><button type="button" title="<%= View.UpdateStatus.Text.ChooseSenderIdentity|l10n|html>">+</button></div><label for="text"><%= Page.Index.Label.Text|l10n|html></label>
55                                         <input type="text" name="text" value="" />
56                                         <button type="submit"><%= Page.CreatePost.Button.Post|l10n|html></button>
57                                 </form>
58                         <%/if>
59                 <%/if>
60
61                 <h1><%= Page.ViewSone.PostList.Title|l10n|replace needle="{sone}" replacementKey=sone.niceName|html></h1>
62
63                 <%foreach posts post>
64                         <%first>
65                                 <div id="posts">
66                                         <%include include/pagination.html pagination=postPagination pageParameter==postPage>
67                         <%/first>
68                         <%include include/viewPost.html>
69                         <%last>
70                                         <%include include/pagination.html pagination=postPagination pageParameter==postPage>
71                                 </div>
72                         <%/last>
73                 <%foreachelse>
74                         <div><%= Page.ViewSone.PostList.Text.NoPostYet|l10n|html></div>
75                 <%/foreach>
76
77                 <%foreach repliedPosts post>
78                         <%first>
79                                 <h2><%= Page.ViewSone.Replies.Title|l10n|html|replace needle="{sone}" replacementKey=sone.niceName></h2>
80                                 <div id="replied-posts">
81                                         <%include include/pagination.html pagination=repliedPostPagination pageParameter==repliedPostPage>
82                         <%/first>
83                         <%include include/viewPost.html>
84                         <%last>
85                                         <%include include/pagination.html pagination=repliedPostPagination pageParameter==repliedPostPage>
86                                 </div>
87                         <%/last>
88                 <%/foreach>
89
90         <%/if>
91
92 <%include include/tail.html>