{% import "net/http" %} {% import "github.com/bouncepaw/mycorrhiza/cfg" %} {% import "github.com/bouncepaw/mycorrhiza/util" %} {% import "github.com/bouncepaw/mycorrhiza/user" %} {% func Toolbar(u *user.User) %} {% endfunc %} {% func EditHTML(rq *http.Request, hyphaName, textAreaFill, warning string) %} {%s= NavHTML(rq, hyphaName, "edit") %}

Edit {%s util.BeautifulName(hyphaName) %}

{%s= warning %}

Cancel
{%s= Toolbar(user.FromRequest(rq)) %}
{%= editScripts() %} {% endfunc %} {% func PreviewHTML(rq *http.Request, hyphaName, textAreaFill, warning string, renderedPage string) %} {%s= NavHTML(rq, hyphaName, "edit") %}

Edit {%s util.BeautifulName(hyphaName) %} (preview)

{%s= warning %}

Cancel

Note that the hypha is not saved yet. You can preview the changes ↓

{%s= renderedPage %}
{%s= Toolbar(user.FromRequest(rq)) %}
{%= editScripts() %} {% endfunc %} {% func editScripts() %} {% for _, scriptPath := range cfg.EditScripts %} {% endfor %} {% endfunc %}