Class: Katalyst::Content::Editor::List
- Defined in:
- app/helpers/katalyst/content/editor/list.rb
Constant Summary collapse
- ACTIONS =
"dragstart->\#{LIST_CONTROLLER}#dragstart\ndragover->\#{LIST_CONTROLLER}#dragover\ndragenter->\#{LIST_CONTROLLER}#dragenter\ndragleave->\#{LIST_CONTROLLER}#dragleave\ndrop->\#{LIST_CONTROLLER}#drop\ndragend->\#{LIST_CONTROLLER}#dragend\n".gsub(/\s+/, " ").freeze
Constants inherited from Base
Base::CONTAINER_CONTROLLER, Base::ITEM_CONTROLLER, Base::LIST_CONTROLLER, Base::NEW_ITEM_CONTROLLER, Base::STATUS_BAR_CONTROLLER, Base::TURBO_FRAME
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#attributes_scope, #container_form_id, #initialize
Constructor Details
This class inherits a constructor from Katalyst::Content::Editor::Base
Instance Method Details
#build(options, &_block) ⇒ Object
16 17 18 19 20 |
# File 'app/helpers/katalyst/content/editor/list.rb', line 16 def build(, &_block) tag.ol **(id: container_form_id, **) do yield self end end |
#items(*items) ⇒ Object
22 23 24 25 26 27 |
# File 'app/helpers/katalyst/content/editor/list.rb', line 22 def items(*items) render partial: "katalyst/content/editor/item", layout: "katalyst/content/editor/list_item", collection: items, as: :item end |