Change links to HTML forms.
[Sone.git] / src / main / resources / templates / knownSones.html
index f188f56..a0b270a 100644 (file)
@@ -4,7 +4,23 @@
 
        <div id="known-sones">
                <%foreach knownSones sone>
-                       <div><a href="viewSone.html?sone=<% sone.id>"><% sone.niceName|html></a> (<% sone.requestUri|html>)</div>
+                       <div>
+                               <div class="profile-link"><a href="viewSone.html?sone=<% sone.id>"><% sone.niceName|html></a></div>
+                               <div>(<% sone.requestUri|html>)</div>
+                               <%if sone.isBlocked>
+                                       <form class="unblock" action="unblockSone.html" method="post">
+                                               <input type="hidden" name="formPassword" value="<% formPassword|html>" />
+                                               <input type="hidden" name="sone" value="<% sone.id>" />
+                                               <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>" />
+                                               <button type="submit"><%= View.Sone.Button.BlockSone|l10n|html></button>
+                                       </form>
+                               <%/if>
+                       </div>
                <%foreachelse>
                        <div><%= Page.KnownSones.Text.NoKnownSones|l10n|html></div>
                <%/foreach>