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

Instance Method Details

#quick_editObject



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_formObject



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_optsObject



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_buttonObject



38
39
40
41
42
43
44
45
# File 'platypus/tmp/set/gem-defaults/mod010-rules/rule/quick_editor.rb', line 38

def undo_button
  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_editObject



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_successObject



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