Module: Card::Set::Rule::QuickEditor::HtmlFormat
- Extended by:
- AbstractFormat
- Defined in:
- platypus/tmp/set/gem-defaults/mod010-rules/rule/quick_editor.rb
Instance Method Summary collapse
-
#quick_edit ⇒ Object
-
#quick_form ⇒ Object
-
#quick_form_opts ⇒ Object
-
#set_info(notify_change = nil) ⇒ Object
-
#undo_button ⇒ Object
-
#view: quick_edit ⇒ Object
-
#view: quick_edit_success ⇒ Object
Instance Method Details
#quick_edit ⇒ Object
17 18 19 |
# File 'platypus/tmp/set/gem-defaults/mod010-rules/rule/quick_editor.rb', line 17 def quick_edit haml :quick_edit end |
#quick_form ⇒ Object
21 22 23 24 25 |
# File 'platypus/tmp/set/gem-defaults/mod010-rules/rule/quick_editor.rb', line 21 def quick_form card_form :update, quick_form_opts do quick_editor end end |
#quick_form_opts ⇒ Object
27 28 29 30 |
# File 'platypus/tmp/set/gem-defaults/mod010-rules/rule/quick_editor.rb', line 27 def quick_form_opts { "data-slot-selector": ".set-info.card-slot", success: { view: :quick_edit_success } } end |
#set_info(notify_change = nil) ⇒ Object
32 33 34 35 36 |
# File 'platypus/tmp/set/gem-defaults/mod010-rules/rule/quick_editor.rb', line 32 def set_info notify_change=nil wrap true, class: "set-info" do haml :set_info, notify_change: notify_change end end |
#undo_button ⇒ Object
38 39 40 41 42 43 44 45 |
# File 'platypus/tmp/set/gem-defaults/mod010-rules/rule/quick_editor.rb', line 38 def link_to "undo", method: :post, rel: "nofollow", remote: true, class: "btn btn-secondary ms-2 btn-sm btn-reduced-padding slotter", "data-slot-selector": ".card-slot.quick_edit-view", path: { action: :update, revert_actions: [card.last_action_id], revert_to: :previous } end |
#view: quick_edit ⇒ Object
9 10 11 |
# File 'platypus/tmp/set/gem-defaults/mod010-rules/rule/quick_editor.rb', line 9 view :quick_edit, unknown: true, wrap: :slot do quick_edit end |
#view: quick_edit_success ⇒ Object
13 14 15 |
# File 'platypus/tmp/set/gem-defaults/mod010-rules/rule/quick_editor.rb', line 13 view :quick_edit_success do set_info true end |