Add link to WoT profile of unknown Sones.
[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=soneId|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                 <p>
18                         <%= Page.ViewSone.UnknownSone.LinkToWebOfTrust|l10n|html>
19                         <a href="/WebOfTrust/ShowIdentity?id=<% sone.id|html>"><%= Page.ViewSone.Profile.Name.WoTLink|l10n|html></a>
20                 </p>
21
22         <%else>
23
24                 <%if ! sone.current>
25                         <%include include/viewSone.html>
26                 <%/if>
27
28                 <h1><%= Page.ViewSone.Profile.Title|l10n|html></h1>
29
30                         <div class="profile-field">
31                                 <div class="name"><%= Page.ViewSone.Profile.Label.Name|l10n|html></div>
32                                 <div class="value"><% sone.niceName|html> (<a href="/WebOfTrust/ShowIdentity?id=<% sone.id|html>"><%= Page.ViewSone.Profile.Name.WoTLink|l10n|html></a>)</div>
33                         </div>
34
35                         <%foreach sone.profile.fields field>
36                                 <div class="profile-field">
37                                         <div class="name"><% field.name|html></div>
38                                         <div class="value"><% field.value|parse></div>
39                                 </div>
40                         <%/foreach>
41
42                 <%ifnull ! currentSone>
43                         <%if ! sone.current>
44                                 <p><%= Page.ViewSone.WriteAMessage|l10n|html></p>
45
46                                 <form action="createPost.html" id="post-message" method="post">
47                                         <input type="hidden" name="formPassword" value="<% formPassword|html>" />
48                                         <input type="hidden" name="returnPage" value="<% request.uri|html>" />
49                                         <input type="hidden" name="recipient" value="<% sone.id|html>" />
50                                         <label for="sender"><%= Page.Index.Label.Sender|l10n|html></label>
51                                         <div class="sender">
52                                                 <select name="sender" title="<%= View.UpdateStatus.Text.ChooseSenderIdentity|l10n|html>">
53                                                         <%foreach localSones localSone>
54                                                                 <option value="<% localSone.id|html>"<%if localSone.current> selected="selected"<%/if>><% localSone.niceName|html></option>
55                                                         <%/foreach>
56                                                 </select>
57                                         </div>
58                                         <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>
59                                         <input type="text" name="text" value="" />
60                                         <button type="submit"><%= Page.CreatePost.Button.Post|l10n|html></button>
61                                 </form>
62                         <%/if>
63                 <%/if>
64
65                 <h1><%= Page.ViewSone.PostList.Title|l10n|replace needle="{sone}" replacementKey=sone.niceName|html></h1>
66
67                 <%foreach posts post>
68                         <%first>
69                                 <div id="posts">
70                                         <%include include/pagination.html pagination=postPagination pageParameter==postPage paginationName==post-navigation>
71                         <%/first>
72                         <%include include/viewPost.html>
73                         <%last>
74                                         <%include include/pagination.html pagination=postPagination pageParameter==postPage>
75                                 </div>
76                         <%/last>
77                 <%foreachelse>
78                         <div><%= Page.ViewSone.PostList.Text.NoPostYet|l10n|html></div>
79                 <%/foreach>
80
81                 <%foreach repliedPosts post>
82                         <%first>
83                                 <h2><%= Page.ViewSone.Replies.Title|l10n|html|replace needle="{sone}" replacementKey=sone.niceName></h2>
84                                 <div id="replied-posts">
85                                         <%include include/pagination.html pagination=repliedPostPagination pageParameter==repliedPostPage paginationName==reply-navigation>
86                         <%/first>
87                         <%include include/viewPost.html>
88                         <%last>
89                                         <%include include/pagination.html pagination=repliedPostPagination pageParameter==repliedPostPage>
90                                 </div>
91                         <%/last>
92                 <%/foreach>
93
94         <%/if>
95
96 <%include include/tail.html>