Move most of the JavaScript to sone.js.
[Sone.git] / src / main / resources / templates / include / viewSone.html
index a5debbc..e7599bd 100644 (file)
@@ -1,34 +1,45 @@
-<div class="sone">
-       <div class="profile-link"><a href="viewSone.html?sone=<% sone.id>" title="<% sone.requestUri|html>"><% sone.niceName|html></a></div>
-       <div class="last-update">(<%= View.Sone.Label.LastUpdate|l10n|html> <% sone.time|date format="MMM d, yyyy, HH:mm:ss">)</div>
+<div id="<% sone.id|html>" class="sone <% sone.status|html><%if sone.modified> modified<%/if>">
+       <div class="unknown-marker" title="<%= View.Sone.Status.Unknown|l10n|html>">?</div>
+       <div class="modified-marker" title="<%= View.Sone.Status.Modified|l10n|html>">!</div>
+       <div class="download-marker" title="<%= View.Sone.Status.Downloading|l10n|html>">⬊</div>
+       <div class="insert-marker" title="<%= View.Sone.Status.Inserting|l10n|html>">⬈</div>
+       <div class="idle-marker" title="<%= View.Sone.Status.Idle|l10n|html>">✔</div>
+       <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>
+       <div class="profile-link"><a href="viewSone.html?sone=<% sone.id|html>" title="<% sone.requestUri|html>"><% sone.niceName|html></a></div>
+       <div class="short-request-uri"><% sone.requestUri|substring start=4 length=43|html></div>
        <%ifnull ! currentSone>
                <%if ! sone.current>
                        <%if sone.friend>
                                <form class="unfollow" action="unfollowSone.html" method="post">
                                        <input type="hidden" name="formPassword" value="<% formPassword|html>" />
-                                       <input type="hidden" name="sone" value="<% sone.id>" />
+                                       <input type="hidden" name="sone" value="<% sone.id|html>" />
+                                       <input type="hidden" name="returnPage" value="<% request.uri|html>" />
                                        <button type="submit"><%= View.Sone.Button.UnfollowSone|l10n|html></button>
                                </form>
                        <%else>
                                <form class="follow" action="followSone.html" method="post">
                                        <input type="hidden" name="formPassword" value="<% formPassword|html>" />
-                                       <input type="hidden" name="sone" value="<% sone.id>" />
+                                       <input type="hidden" name="sone" value="<% sone.id|html>" />
+                                       <input type="hidden" name="returnPage" value="<% request.uri|html>" />
                                        <button type="submit"><%= View.Sone.Button.FollowSone|l10n|html></button>
                                </form>
                        <%/if>
                        <%if sone.blocked>
                                <form class="unblock" action="unblockSone.html" method="post">
                                        <input type="hidden" name="formPassword" value="<% formPassword|html>" />
-                                       <input type="hidden" name="sone" value="<% sone.id>" />
+                                       <input type="hidden" name="sone" value="<% sone.id|html>" />
+                                       <input type="hidden" name="returnPage" value="<% request.uri|html>" />
                                        <button type="submit"><%= View.Sone.Button.UnblockSone|l10n|html></button>
                                </form>
                        <%else>
                                <form class="block" action="blockSone.html" method="post">
                                        <input type="hidden" name="formPassword" value="<% formPassword|html>" />
-                                       <input type="hidden" name="sone" value="<% sone.id>" />
+                                       <input type="hidden" name="sone" value="<% sone.id|html>" />
+                                       <input type="hidden" name="returnPage" value="<% request.uri|html>" />
                                        <button type="submit"><%= View.Sone.Button.BlockSone|l10n|html></button>
                                </form>
                        <%/if>
                <%/if>
        <%/if>
+       <div class="spacer">&nbsp;</div>
 </div>