Aurora.Uix.Templates.Basic.Actions.ShowComponent (Aurora UIX v0.1.4-rc.4)

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 :auix with :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

edit_header_action(assigns)

@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 :auix with :source, :entity, :module, and :name.

Returns

Rendered.t() - The rendered "edit" action link.

set_actions(socket)

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 :auix with :layout_tree and action group maps.

Returns

Socket.t() - The updated socket with default actions configured and modifications applied.