Add “unknown” Sone state, initialize local and remote Sones differently.
[Sone.git] / src / main / resources / templates / include / viewSone.html
1 <div class="sone <% sone.status><%if sone.modified> modified<%/if>">
2         <div class="profile-link"><a href="viewSone.html?sone=<% sone.id>" title="<% sone.requestUri|html>"><% sone.niceName|html></a></div>
3         <div class="last-update">(<%= View.Sone.Label.LastUpdate|l10n|html> <% sone.time|date format="MMM d, yyyy, HH:mm:ss">)</div>
4         <div class="unknown-marker">?</div>
5         <div class="modified-marker">!</div>
6         <div class="download-marker">⬊</div>
7         <div class="insert-marker">⬈</div>
8         <div class="idle-marker"></div>
9         <%ifnull ! currentSone>
10                 <%if ! sone.current>
11                         <%if sone.friend>
12                                 <form class="unfollow" action="unfollowSone.html" method="post">
13                                         <input type="hidden" name="formPassword" value="<% formPassword|html>" />
14                                         <input type="hidden" name="sone" value="<% sone.id>" />
15                                         <button type="submit"><%= View.Sone.Button.UnfollowSone|l10n|html></button>
16                                 </form>
17                         <%else>
18                                 <form class="follow" action="followSone.html" method="post">
19                                         <input type="hidden" name="formPassword" value="<% formPassword|html>" />
20                                         <input type="hidden" name="sone" value="<% sone.id>" />
21                                         <button type="submit"><%= View.Sone.Button.FollowSone|l10n|html></button>
22                                 </form>
23                         <%/if>
24                         <%if sone.blocked>
25                                 <form class="unblock" action="unblockSone.html" method="post">
26                                         <input type="hidden" name="formPassword" value="<% formPassword|html>" />
27                                         <input type="hidden" name="sone" value="<% sone.id>" />
28                                         <button type="submit"><%= View.Sone.Button.UnblockSone|l10n|html></button>
29                                 </form>
30                         <%else>
31                                 <form class="block" action="blockSone.html" method="post">
32                                         <input type="hidden" name="formPassword" value="<% formPassword|html>" />
33                                         <input type="hidden" name="sone" value="<% sone.id>" />
34                                         <button type="submit"><%= View.Sone.Button.BlockSone|l10n|html></button>
35                                 </form>
36                         <%/if>
37                 <%/if>
38         <%/if>
39 </div>