Remove image from previous album, if set.
[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.albums album>
32                                 <%first>
33                                         <div class="profile-field">
34                                                 <div class="name"><%= Page.ViewSone.Profile.Label.Albums|l10n|html></div>
35                                                 <div class="value">
36                                 <%/first>
37                                         <a href="imageBrowser.html?album=<%album.id|html>"><%album.title|html></a><%notlast>, <%/notlast>
38                                 <%last>
39                                                 </div>
40                                         </div>
41                                 <%/last>
42                         <%/foreach>
43
44                         <%foreach sone.profile.fields field>
45                                 <div class="profile-field">
46                                         <div class="name"><% field.name|html></div>
47                                         <div class="value"><% field.value|parse></div>
48                                 </div>
49                         <%/foreach>
50
51                 <%ifnull ! currentSone>
52                         <%if ! sone.current>
53                                 <p><%= Page.ViewSone.WriteAMessage|l10n|html></p>
54
55                                 <form action="createPost.html" id="post-message" method="post">
56                                         <input type="hidden" name="formPassword" value="<% formPassword|html>" />
57                                         <input type="hidden" name="returnPage" value="<% request.uri|html>" />
58                                         <input type="hidden" name="recipient" value="<% sone.id|html>" />
59                                         <label for="sender"><%= Page.Index.Label.Sender|l10n|html></label>
60                                         <div class="sender">
61                                                 <select name="sender" title="<%= View.UpdateStatus.Text.ChooseSenderIdentity|l10n|html>">
62                                                         <%foreach localSones localSone>
63                                                                 <option value="<% localSone.id|html>"<%if localSone.current> selected="selected"<%/if>><% localSone.niceName|html></option>
64                                                         <%/foreach>
65                                                 </select>
66                                         </div>
67                                         <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>
68                                         <input type="text" name="text" value="" />
69                                         <button type="submit"><%= Page.CreatePost.Button.Post|l10n|html></button>
70                                 </form>
71                         <%/if>
72                 <%/if>
73
74                 <h1><%= Page.ViewSone.PostList.Title|l10n|replace needle="{sone}" replacementKey=sone.niceName|html></h1>
75
76                 <%foreach posts post>
77                         <%first>
78                                 <div id="posts">
79                                         <%include include/pagination.html pagination=postPagination pageParameter==postPage>
80                         <%/first>
81                         <%include include/viewPost.html>
82                         <%last>
83                                         <%include include/pagination.html pagination=postPagination pageParameter==postPage>
84                                 </div>
85                         <%/last>
86                 <%foreachelse>
87                         <div><%= Page.ViewSone.PostList.Text.NoPostYet|l10n|html></div>
88                 <%/foreach>
89
90                 <%foreach repliedPosts post>
91                         <%first>
92                                 <h2><%= Page.ViewSone.Replies.Title|l10n|html></h2>
93                                 <div id="replied-posts">
94                                         <%include include/pagination.html pagination=repliedPostPagination pageParameter==repliedPostPage>
95                         <%/first>
96                         <%include include/viewPost.html>
97                         <%last>
98                                         <%include include/pagination.html pagination=repliedPostPagination pageParameter==repliedPostPage>
99                                 </div>
100                         <%/last>
101                 <%/foreach>
102
103         <%/if>
104
105 <%include include/tail.html>