Cross-LiveView helpers for the Document Creator admin pages.
Summary
Functions
The actor opts list to thread into context-fn calls: [actor_uuid: uuid]
for a signed-in user, otherwise [] — see PhoenixKitWeb.Actor.opts/1.
Pass-through into mutating Documents.* functions for activity-log
attribution.
The acting user's uuid, or nil — see PhoenixKitWeb.Actor.uuid/1.
Sets the admin header's trail for a page under the module: the section
is Document Creator linking to the landing page, crumbs are every
level between it and this page (top down), and title names this page
only — the bar draws the separators. The landing page itself sets
page_title alone, with no section.
The crumb for the Categories list page.
A text crumb for a category or type, named in locale the way the
list page names it. Text, not a link: the Categories list is the only
page either record has.
Functions
@spec actor_opts(Phoenix.LiveView.Socket.t()) :: keyword()
The actor opts list to thread into context-fn calls: [actor_uuid: uuid]
for a signed-in user, otherwise [] — see PhoenixKitWeb.Actor.opts/1.
Pass-through into mutating Documents.* functions for activity-log
attribution.
@spec actor_uuid(Phoenix.LiveView.Socket.t()) :: String.t() | nil
The acting user's uuid, or nil — see PhoenixKitWeb.Actor.uuid/1.
@spec assign_trail(Phoenix.LiveView.Socket.t(), String.t(), [map()]) :: Phoenix.LiveView.Socket.t()
Sets the admin header's trail for a page under the module: the section
is Document Creator linking to the landing page, crumbs are every
level between it and this page (top down), and title names this page
only — the bar draws the separators. The landing page itself sets
page_title alone, with no section.
@spec categories_crumb() :: map()
The crumb for the Categories list page.
A text crumb for a category or type, named in locale the way the
list page names it. Text, not a link: the Categories list is the only
page either record has.