Whitespace fixes.
[Sone.git] / src / main / resources / templates / knownSones.html
1 <%include include/head.html>
2
3         <div class="page-id hidden">known-sones</div>
4
5         <script language="javascript">
6
7                 $(document).ready(function() {
8                         $("select[name=sort]").change(function() {
9                                 value = $(this).val();
10                                 if ((value == "activity") || (value == "posts") || (value == "images")) {
11                                         $("select[name=order]").val("desc");
12                                 } else if (value == "name") {
13                                         $("select[name=order]").val("asc");
14                                 }
15                         });
16                         $("#sort-options select").change(function() {
17                                 this.form.submit();
18                         });
19                 });
20
21         </script>
22
23         <h1><%= Page.KnownSones.Page.Title|l10n|html></h1>
24
25         <div id="sort-options">
26                 <form action="knownSones.html" method="get">
27                         <div>
28                                 <%= Page.KnownSones.Label.Sort|l10n|html>
29                                 <select name="sort">
30                                         <option value="name"<%if sort|match value="name"> selected="selected"<%/if>><%= Page.KnownSones.Sort.Field.Name|l10n|html></option>
31                                         <option value="activity"<%if sort|match value="activity"> selected="selected"<%/if>><%= Page.KnownSones.Sort.Field.LastActivity|l10n|html></option>
32                                         <option value="posts"<%if sort|match value="posts"> selected="selected"<%/if>><%= Page.KnownSones.Sort.Field.Posts|l10n|html></option>
33                                         <option value="images"<%if sort|match value="images"> selected="selected"<%/if>><%= Page.KnownSones.Sort.Field.Images|l10n|html></option>
34                                 </select>
35                                 <select name="order">
36                                         <option value="asc"<%if order|match value="asc"> selected="selected"<%/if>><%= Page.KnownSones.Sort.Order.Ascending|l10n|html></option>
37                                         <option value="desc"<%if order|match value="desc"> selected="selected"<%/if>><%= Page.KnownSones.Sort.Order.Descending|l10n|html></option>
38                                 </select>
39                         </div>
40                         <%ifnull !currentSone>
41                                 <div>
42                                         <%= Page.KnownSones.Label.FollowedSones|l10n|html>
43                                         <select name="followedSones">
44                                                 <option value="none"></option>
45                                                 <option value="show-only"<%if followedSones|match value="show-only"> selected="selected"<%/if>><%= Page.KnownSones.FollowedSones.ShowOnly|l10n|html></option>
46                                                 <option value="hide"<%if followedSones|match value="hide"> selected="selected"<%/if>><%= Page.KnownSones.FollowedSones.Hide|l10n|html></option>
47                                         </select>
48                                 </div>
49                         <%/if>
50                         <div>
51                                 <button type="submit"><%= Page.KnownSones.Button.Apply|l10n|html></button>
52                         </div>
53                 </form>
54         </div>
55
56         <div>
57                 <form action="followSone.html" method="post">
58                         <input type="hidden" name="formPassword" value="<%formPassword|html>" />
59                         <input type="hidden" name="returnPage" value="<%request.uri|html>" />
60                         <input type="hidden" name="sone" value="<%foreach pagination.items sone><%if !sone.friend><%if !sone.current><%sone.id> <%/if><%/if><%/foreach>" />
61                         <button type="submit"><%= Page.KnownSones.Button.FollowAllSones|l10n|html></button>
62                 </form>
63         </div>
64
65         <div>
66                 <form action="unfollowSone.html" method="post">
67                         <input type="hidden" name="formPassword" value="<%formPassword|html>" />
68                         <input type="hidden" name="returnPage" value="<%request.uri|html>" />
69                         <input type="hidden" name="sone" value="<%foreach pagination.items sone><%if sone.friend><%sone.id> <%/if><%/foreach>" />
70                         <button type="submit"><%= Page.KnownSones.Button.UnfollowAllSones|l10n|html></button>
71                 </form>
72         </div>
73
74         <div id="known-sones">
75                 <%= page|store key=pageParameter>
76                 <%include include/pagination.html>
77                 <%foreach pagination.items sone>
78                         <%include include/viewSone.html>
79                 <%foreachelse>
80                         <div><%= Page.KnownSones.Text.NoKnownSones|l10n|html></div>
81                 <%/foreach>
82                 <%include include/pagination.html>
83         </div>
84
85 <%include include/tail.html>