{% import "fmt" %} {% import "net/http" %} {% import "github.com/bouncepaw/mycorrhiza/l18n" %} {% func DeleteAsk(rq *http.Request, hyphaName string) %} {% code lc := l18n.FromRequest(rq) %} {%= modalBegin( "delete", hyphaName, ` method="post"`, fmt.Sprintf(lc.Get("ui.ask_delete"), beautifulLink(hyphaName))) %}
{%s= lc.Get("ui.ask_really", &l18n.Replacements{"verb": lc.Get("ui.ask_delete_verb"), "name": fmt.Sprintf("%s", hyphaName)}) %}
{%s lc.Get("ui.ask_delete_tip") %}
{%= modalEnd(hyphaName, true, lc) %} {% endfunc %} {% func RemoveMediaAsk(rq *http.Request, hyphaName string) %} {% code lc := l18n.FromRequest(rq) %} {%= modalBegin( "remove-media", hyphaName, ` method="post"`, fmt.Sprintf(lc.Get("ui.ask_remove_media"), beautifulLink(hyphaName))) %}{%s= lc.Get("ui.ask_really", &l18n.Replacements{"verb": lc.Get("ui.ask_remove_media_verb"), "name": fmt.Sprintf("%s", hyphaName)}) %}
{%= modalEnd(hyphaName, true, lc) %} {% endfunc %} bloody hell !! {% func RenameAsk(rq *http.Request, hyphaName string) %} {% code lc := l18n.FromRequest(rq) %} {%= modalBegin( "rename", hyphaName, ` method="post" enctype="multipart/form-data"`, fmt.Sprintf(lc.Get("ui.ask_rename"), beautifulLink(hyphaName))) %}{%s lc.Get("ui.rename_tip") %}
{%= modalEnd(hyphaName, false, lc) %} {% endfunc %} {% func modalBegin(path, hyphaName, formAttrs, legend string) %}