{% import "net/http" %} {% import "path" %} {% import "github.com/bouncepaw/mycorrhiza/user" %} {% import "github.com/bouncepaw/mycorrhiza/util" %} {% func HistoryHTML(rq *http.Request, hyphaName, list string) %} {%= navHTML(rq, hyphaName, "history") %}

History of {%s hyphaName %}

{%s= list %}
{% endfunc %} {% func RevisionHTML(rq *http.Request, hyphaName, naviTitle, contents, relatives, revHash string) %} {%= navHTML(rq, hyphaName, "revision", revHash) %}

Please note that viewing binary parts of hyphae is not supported in history for now.

{%s= naviTitle %} {%s= contents %}
{%= relativeHyphae(relatives) %}
{% endfunc %} If `contents` == "", a helpful message is shown instead. {% func PageHTML(rq *http.Request, hyphaName, naviTitle, contents, relatives, backlinkEntries, prevHyphaName, nextHyphaName string, hasAmnt bool) %} {%= navHTML(rq, hyphaName, "page") %}
{%s= naviTitle %} {% if contents == "" %}

This hypha has no text. Why not create it?

{% else %} {%s= contents %} {% endif %}
{% if prevHyphaName != "" %} {% endif %} {% if nextHyphaName != "" %} {% endif %}
{% if u := user.FromRequest(rq); !user.AuthUsed || u.Group != "anon" %}
{% if hasAmnt %} Unattach current attachment? {% endif %}
{% endif %}
{%= relativeHyphae(relatives) %} {%= backlinks(backlinkEntries) %}
{% endfunc %}