1
0
mirror of https://github.com/osmarks/mycorrhiza.git synced 2024-12-13 05:50:27 +00:00
mycorrhiza/templates/unattach.qtpl
2021-01-19 23:08:59 +05:00

25 lines
772 B
Plaintext

{% import "net/http" %}
{% func UnattachAskHTML(rq *http.Request, hyphaName string, isOld bool) %}
<main>
{%= navHTML(rq, hyphaName, "unattach-ask") %}
{%- if isOld -%}
<section>
<h1>Unattach {%s hyphaName %}?</h1>
<p>Do you really want to unattach hypha <em>{%s hyphaName %}</em>?</p>
<p><a href="/unattach-confirm/{%s hyphaName %}"><strong>Confirm</strong></a></p>
<p><a href="/page/{%s hyphaName %}">Cancel</a></p>
</section>
{%- else -%}
{%= cannotUnattachDueToNonExistence(hyphaName) %}
{%- endif -%}
</main>
{% endfunc %}
{% func cannotUnattachDueToNonExistence(hyphaName string) %}
<section>
<h1>Cannot unattach {%s hyphaName %}</h1>
<p>This hypha does not exist.</p>
<p><a href="/page/{%s hyphaName %}">Go back</a></p>
</section>
{% endfunc %}