ZWeb.Documents.HtmlTemplatesLive (Portico/Z v0.1.0)
Human interface for ZSchemas.Documents.HtmlTemplate
Handles three routes:
new
edit
index
NEW
The :new
endpoint can take an optional attributes
parameter, which is expected to be a Utility.Text.url_conceal/1
'ed map/JSON, which contains attributes that can be passed to ZSchemas.HtmlTemplate.changeset/1
. This is mostly so that we can provide links to "pre-loaded" templates from the HTML Templates Guide.
Examples
iex> attributes = %{name: "Test Template", identifier: "TEST"}
...> |> Utility.Text.url_conceal()
"eyJuYW1lIjoiWW91IGFyZSBzbyBjb29sIn0="
# later...
GET "/documents/html_templates/new?attributes=eyJuYW1lIjoiWW91IGFyZSBzbyBjb29sIn0="
# and in the view, "name" and "identifier" are preloaded!
Link to this section Summary
Functions
Callback implementation for Phoenix.LiveView.render/1
.
Link to this section Functions
Link to this function
render(arg)
Callback implementation for Phoenix.LiveView.render/1
.