Class: Plutonium::UI::Page::WizardCompleted
- Inherits:
-
Base
- Object
- Component::Base
- Base
- Plutonium::UI::Page::WizardCompleted
- Defined in:
- lib/plutonium/ui/page/wizard_completed.rb
Overview
The "already completed" page for a one-time wizard (§9). Shown when a user
re-opens a one-time wizard they've already finished: the completion marker
is retained but its data is cleared, so there is nothing to review — just
a confirmation that the flow is done.
Authors can override the body entirely with a completed do |wizard| … end
block on the wizard class (rendered in this component's Phlex context, with
the wizard yielded); otherwise the built-in confirmation renders.
Instance Method Summary collapse
-
#initialize(runner:, exit_url:) ⇒ WizardCompleted
constructor
A new instance of WizardCompleted.
- #view_template ⇒ Object
Methods included from Component::Behaviour
Methods included from Component::Tokens
Methods included from Component::Kit
#BuildActionButton, #BuildActionsDropdown, #BuildAvatar, #BuildBlock, #BuildBreadcrumbs, #BuildBulkActionsToolbar, #BuildColorModeSelector, #BuildDynaFrameContent, #BuildDynaFrameHost, #BuildEmptyCard, #BuildFrameNavigatorPanel, #BuildModalCentered, #BuildModalSlideover, #BuildPageHeader, #BuildPanel, #BuildRowActionsDropdown, #BuildSkeletonTable, #BuildTabList, #BuildTableFilterPills, #BuildTableInfo, #BuildTablePagination, #BuildTableScopesBar, #BuildTableScopesPills, #BuildTableSearchBar, #BuildTableToolbar, #BuildTableViewSwitcher, #method_missing, #respond_to_missing?
Constructor Details
#initialize(runner:, exit_url:) ⇒ WizardCompleted
Returns a new instance of WizardCompleted.
17 18 19 20 21 22 |
# File 'lib/plutonium/ui/page/wizard_completed.rb', line 17 def initialize(runner:, exit_url:) @runner = runner @wizard = runner.wizard @exit_url = exit_url super(page_title: @wizard.class.label, page_description: nil) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Plutonium::UI::Component::Kit
Instance Method Details
#view_template ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/plutonium/ui/page/wizard_completed.rb', line 24 def view_template DynaFrameContent() do article(class: "pu-wizard pu-wizard-completed mx-auto max-w-2xl") do div(class: card_classes) do div(class: "px-6 py-10 text-center sm:px-10") do block = @wizard.class.completed_block if block instance_exec(@wizard, &block) else render_default end end end end end end |