Implement a better Sone Rescue Mode.
[Sone.git] / src / main / resources / templates / rescue.html
diff --git a/src/main/resources/templates/rescue.html b/src/main/resources/templates/rescue.html
new file mode 100644 (file)
index 0000000..e08edc3
--- /dev/null
@@ -0,0 +1,32 @@
+<%include include/head.html>
+
+<h1><%= Page.Rescue.Page.Title|l10n 0=currentSone.niceName|html></h1>
+
+<p><%= Page.Rescue.Text.Description|l10n|html></p>
+<p><%= Page.Rescue.Text.Procedure|l10n|html></p>
+
+<%if soneRescuer.fetching>
+       <p><%= Page.Rescue.Text.Fetching|l10n 0=soneRescuer.currentEdition|html></p>
+<%else>
+       <%if soneRescuer.hasNextEdition>
+               <%if soneRescuer.lastFetchSuccessful>
+                       <p><%= Page.Rescue.Text.Fetched|l10n 0=soneRescuer.currentEdition|html></p>
+               <%else>
+                       <p><%= Page.Rescue.Text.NotFetched|l10n 0=soneRescuer.currentEdition|html></p>
+               <%/if>
+               <form action="rescue.html" method="post">
+                       <input type="hidden" name="formPassword" value="<%formPassword|html>" />
+                       <label><%= Page.Rescue.Label.NextEdition|l10n|html></label>
+                       <input type="field" name="edition" value="<%soneRescuer.nextEdition>" />
+                       <button type="submit" name="fetch" value="true"><%= Page.Rescue.Button.Fetch|l10n|html></button>
+               </form>
+       <%else>
+               <%if soneRescuer.lastFetchSuccessful>
+                       <p><%= Page.Rescue.Text.Fetched|l10n 0=soneRescuer.currentEdition|html></p>
+               <%else>
+                       <p><%= Page.Rescue.Text.FetchedLast|l10n|html></p>
+               <%/if>
+       <%/if>
+<%/if>
+
+<%include include/tail.html>