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

History of {%s hyphaName %}

{%s= list %}
{% endfunc %} {% func RevisionHTML(rq *http.Request, h *hyphae.Hypha, contents, relatives, subhyphae, revHash string) %} {%= navHTML(rq, h.Name, "revision", revHash) %}

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

{%s= views.NaviTitleHTML(h) %} {%s= contents %}
{%= subhyphaeMatrix(subhyphae) %}
{%= relativeHyphae(relatives) %}
{% endfunc %} If `contents` == "", a helpful message is shown instead. {% func PageHTML(rq *http.Request, h *hyphae.Hypha, contents, relatives, subhyphae, prevHyphaName, nextHyphaName string) %} {%= navHTML(rq, h.Name, "page") %}
{%s= views.NaviTitleHTML(h) %} {% 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 h.Exists && h.BinaryPath != "" %} Unattach current attachment? {% endif %}
{% endif %} {%= subhyphaeMatrix(subhyphae) %}
{%= relativeHyphae(relatives) %} {%= views.BackLinksHTML(h) %}
{% endfunc %}