Class: Plutonium::UI::Page::WizardChooser
- Inherits:
-
Base
- Object
- Component::Base
- Base
- Plutonium::UI::Page::WizardChooser
- Defined in:
- lib/plutonium/ui/page/wizard_chooser.rb
Overview
The "resume or start new" chooser (ยง4.5), shown at the bare launch URL when
a tokened wizard opts in with on_relaunch :prompt and the user already has
pending (in-progress) runs. Lists each pending run with a Resume link and
offers a Start-new button. Keyed/one-time/anchored wizards never reach here
(they auto-resume their single keyed run); only tokened wizards can have
several concurrent runs to choose between.
Instance Method Summary collapse
-
#initialize(wizard_class:, entries:, start_new_url:) ⇒ WizardChooser
constructor
A new instance of WizardChooser.
- #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(wizard_class:, entries:, start_new_url:) ⇒ WizardChooser
Returns a new instance of WizardChooser.
16 17 18 19 20 21 |
# File 'lib/plutonium/ui/page/wizard_chooser.rb', line 16 def initialize(wizard_class:, entries:, start_new_url:) @wizard_class = wizard_class @entries = entries @start_new_url = start_new_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
23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/plutonium/ui/page/wizard_chooser.rb', line 23 def view_template DynaFrameContent() do article(class: "pu-wizard pu-wizard-chooser mx-auto max-w-2xl", data: {wizard_chooser: true}) do render_header div(class: card_classes) do render_pending_list render_start_new end end end end |