Add blacklisting functionality.
[Sone.git] / src / main / resources / templates / include / viewSone.html
1 <div class="sone <% sone.status|html><%if sone.modified> modified<%/if> <% sone.id|html><%if sone.local> local<%/if>">
2         <div class="id"><% sone.id|html></div>
3         <div class="unknown-marker" title="<%= View.Sone.Status.Unknown|l10n|html>">?</div>
4         <div class="modified-marker" title="<%= View.Sone.Status.Modified|l10n|html>">!</div>
5         <div class="download-marker" title="<%= View.Sone.Status.Downloading|l10n|html>">⬊</div>
6         <div class="insert-marker" title="<%= View.Sone.Status.Inserting|l10n|html>">⬈</div>
7         <div class="idle-marker" title="<%= View.Sone.Status.Idle|l10n|html>">✔</div>
8         <div class="last-update"><%= View.Sone.Label.LastUpdate|l10n|html> <span class="time"><% sone.time|date format="MMM d, yyyy, HH:mm:ss"></span></div>
9         <div class="profile-link"><a href="viewSone.html?sone=<% sone.id|html>" title="<% sone.requestUri|html>"><% sone.niceName|html></a></div>
10         <div class="short-request-uri"><% sone.requestUri|substring start=4 length=43|html></div>
11         <div class="hidden"><% sone.blacklisted></div>
12         <%if ! sone.current>
13                 <%if ! sone.blacklisted>
14                         <form class="blacklist" action="blacklistSone.html" method="post">
15                                 <input type="hidden" name="formPassword" value="<% formPassword|html>" />
16                                 <input type="hidden" name="sone" value="<% sone.id|html>" />
17                                 <input type="hidden" name="returnPage" value="<% request.uri|html>" />
18                                 <button type="submit"><%= View.Sone.Button.BlacklistSone|l10n|html></button>
19                         </form>
20                         <%ifnull ! currentSone>
21                                 <form class="unfollow<%if ! sone.friend> hidden<%/if>" action="unfollowSone.html" method="post">
22                                         <input type="hidden" name="formPassword" value="<% formPassword|html>" />
23                                         <input type="hidden" name="sone" value="<% sone.id|html>" />
24                                         <input type="hidden" name="returnPage" value="<% request.uri|html>" />
25                                         <button type="submit"><%= View.Sone.Button.UnfollowSone|l10n|html></button>
26                                 </form>
27                                 <form class="follow<%if sone.friend> hidden<%/if>" action="followSone.html" method="post">
28                                         <input type="hidden" name="formPassword" value="<% formPassword|html>" />
29                                         <input type="hidden" name="sone" value="<% sone.id|html>" />
30                                         <input type="hidden" name="returnPage" value="<% request.uri|html>" />
31                                         <button type="submit"><%= View.Sone.Button.FollowSone|l10n|html></button>
32                                 </form>
33                                 <form class="unblock<%if ! sone.blocked> hidden<%/if>" action="unblockSone.html" method="post">
34                                         <input type="hidden" name="formPassword" value="<% formPassword|html>" />
35                                         <input type="hidden" name="sone" value="<% sone.id|html>" />
36                                         <input type="hidden" name="returnPage" value="<% request.uri|html>" />
37                                         <button type="submit"><%= View.Sone.Button.UnblockSone|l10n|html></button>
38                                 </form>
39                                 <form class="block<%if sone.blocked> hidden<%/if>" action="blockSone.html" method="post">
40                                         <input type="hidden" name="formPassword" value="<% formPassword|html>" />
41                                         <input type="hidden" name="sone" value="<% sone.id|html>" />
42                                         <input type="hidden" name="returnPage" value="<% request.uri|html>" />
43                                         <button type="submit"><%= View.Sone.Button.BlockSone|l10n|html></button>
44                                 </form>
45                         <%/if>
46                 <%else>
47                         <form class="unblacklist" action="unblacklistSone.html" method="post">
48                                 <input type="hidden" name="formPassword" value="<% formPassword|html>" />
49                                 <input type="hidden" name="sone" value="<% sone.id|html>" />
50                                 <input type="hidden" name="returnPage" value="<% request.uri|html>" />
51                                 <button type="submit"><%= View.Sone.Button.UnblacklistSone|l10n|html></button>
52                         </form>
53                 <%/if>
54         <%/if>
55         <div class="spacer">&nbsp;</div>
56 </div>