Get the trust directly from the identity.
[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>
11                         <%= Page.ViewSone.NoSone.Description|l10n|replace needle=="{sone}" replacement=soneId|html>
12                         <a href="/WebOfTrust/ShowIdentity?id=<% soneId|html>"><%= Page.ViewSone.Profile.Name.WoTLink|l10n|html></a>
13                 </p>
14
15         <%elseifnull sone.name>
16
17                 <h1><%= Page.ViewSone.Page.TitleWithoutSone|l10n|html></h1>
18
19                 <p><%= Page.ViewSone.UnknownSone.Description|l10n|html></p>
20                 <p>
21                         <%= Page.ViewSone.UnknownSone.LinkToWebOfTrust|l10n|html>
22                         <a href="/WebOfTrust/ShowIdentity?id=<% sone.id|html>"><%= Page.ViewSone.Profile.Name.WoTLink|l10n|html></a>
23                 </p>
24
25         <%else>
26
27                 <%if ! sone.current>
28                         <%include include/viewSone.html>
29                 <%/if>
30
31                 <h1><%= Page.ViewSone.Profile.Title|l10n|html></h1>
32
33                         <div class="profile-field">
34                                 <div class="name"><%= Page.ViewSone.Profile.Label.Name|l10n|html></div>
35                                 <div class="value"><% sone.niceName|html> (<a href="/WebOfTrust/ShowIdentity?id=<% sone.id|html>"><%= Page.ViewSone.Profile.Name.WoTLink|l10n|html></a>)</div>
36                         </div>
37
38                         <%foreach sone.albums album>
39                                 <%first>
40                                         <div class="profile-field">
41                                                 <div class="name"><%= Page.ViewSone.Profile.Label.Albums|l10n|html></div>
42                                                 <div class="value">
43                                                         <a href="imageBrowser.html?sone=<% sone.id|html>"><% =Page.ViewSone.Profile.Albums.Text.All|l10n|html></a>,
44                                 <%/first>
45                                         <a href="imageBrowser.html?album=<%album.id|html>"><%album.title|html></a><%notlast>, <%/notlast>
46                                 <%last>
47                                                 </div>
48                                         </div>
49                                 <%/last>
50                         <%/foreach>
51
52                         <%foreach sone.profile.fields field>
53                                 <div class="profile-field">
54                                         <div class="name"><% field.name|html></div>
55                                         <div class="value"><% field.value|parse sone=sone></div>
56                                 </div>
57                         <%/foreach>
58
59                 <%ifnull ! currentSone>
60                         <%if ! sone.current>
61                                 <p><%= Page.ViewSone.WriteAMessage|l10n|html></p>
62
63                                 <form action="createPost.html" id="post-message" method="post">
64                                         <input type="hidden" name="formPassword" value="<% formPassword|html>" />
65                                         <input type="hidden" name="returnPage" value="<% request.uri|html>" />
66                                         <input type="hidden" name="recipient" value="<% sone.id|html>" />
67                                         <label for="sender"><%= Page.Index.Label.Sender|l10n|html></label>
68                                         <div class="sender">
69                                                 <select name="sender" title="<%= View.UpdateStatus.Text.ChooseSenderIdentity|l10n|html>">
70                                                         <%foreach localSones localSone>
71                                                                 <option value="<% localSone.id|html>"<%if localSone.current> selected="selected"<%/if>><% localSone.niceName|html></option>
72                                                         <%/foreach>
73                                                 </select>
74                                         </div>
75                                         <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>
76                                         <input type="text" name="text" value="" />
77                                         <button type="submit"><%= Page.CreatePost.Button.Post|l10n|html></button>
78                                 </form>
79                         <%/if>
80                 <%/if>
81
82                 <h1><%= Page.ViewSone.PostList.Title|l10n|replace needle=="{sone}" replacement=sone.niceName|html></h1>
83
84                 <%foreach posts post>
85                         <%first>
86                                 <div id="posts">
87                                         <%include include/pagination.html pagination=postPagination pageParameter==postPage paginationName==post-navigation>
88                         <%/first>
89                         <%include include/viewPost.html>
90                         <%last>
91                                         <%include include/pagination.html pagination=postPagination pageParameter==postPage>
92                                 </div>
93                         <%/last>
94                 <%foreachelse>
95                         <div><%= Page.ViewSone.PostList.Text.NoPostYet|l10n|html></div>
96                 <%/foreach>
97
98                 <%foreach repliedPosts post>
99                         <%first>
100                                 <h2><%= Page.ViewSone.Replies.Title|l10n|html|replace needle=="{sone}" replacement=sone.niceName></h2>
101                                 <div id="replied-posts">
102                                         <%include include/pagination.html pagination=repliedPostPagination pageParameter==repliedPostPage paginationName==reply-navigation>
103                         <%/first>
104                         <%include include/viewPost.html>
105                         <%last>
106                                         <%include include/pagination.html pagination=repliedPostPagination pageParameter==repliedPostPage>
107                                 </div>
108                         <%/last>
109                 <%/foreach>
110
111         <%/if>
112
113 <%include include/tail.html>