Aurora. Uix. Templates. Basic. Actions. ShowComponent
(Aurora UIX v0.1.4-rc.6)
Copy Markdown
Renders default header and footer action links (edit, back) for entities in show layouts.
Key Features
- Provides LiveView-compatible components for "edit" and "back" actions.
- Generates links using assigns context for entity and module information.
- Supplies helpers to add all default header and footer actions to assigns.
- Supports dynamic modification of actions via layout tree options.
Key Constraints
- Assumes assigns contain
:auixwith:entity,:source,:module,:name, and:title. - Only intended for use in show page layouts.
Summary
Functions
Renders the "back" action link for the footer in the show layout.
Renders the "edit" action link for an entity in the show layout.
Sets up actions for the show layout by adding defaults and applying modifications.
Functions
@spec edit_header_action(map()) :: Phoenix.LiveView.Rendered.t()
Renders the "edit" action link for an entity in the show layout.
Parameters
assigns(map()) - Assigns map containing the layout tree and other context.- Must include
:auixwith:source,:entity,:module, and:name.
- Must include
Returns
Rendered.t() - The rendered "edit" action link.
@spec set_actions(Phoenix.LiveView.Socket.t()) :: Phoenix.LiveView.Socket.t()
Sets up actions for the show layout by adding defaults and applying modifications.
Parameters
socket(Socket.t()) - LiveView socket containing the layout tree and context.- Must include
:auixwith:layout_treeand action group maps.
- Must include
Returns
Socket.t() - The updated socket with default actions configured and modifications applied.