Module: Card::Set::All::EditContent::HtmlFormat

Extended by:
Card::Set::AbstractFormat
Defined in:
tmpsets/set/mod023-edit/all/edit_content.rb

Instance Method Summary collapse

Instance Method Details



58
59
60
61
62
63
64
65
# File 'tmpsets/set/mod023-edit/all/edit_content.rb', line 58

def bridge_link in_modal=true
  opts = { class: "text-muted" }
  if in_modal
    add_class opts, "close"
    opts["data-slotter-mode"] = "modal-replace"
  end
  link_to_view :bridge, material_icon(:more_horiz), opts
end

#edit_formObject



15
16
17
18
19
20
21
22
23
24
# File 'tmpsets/set/mod023-edit/all/edit_content.rb', line 15

def edit_form
  form_opts = edit_form_opts.reverse_merge success: edit_success
  card_form(:update, form_opts) do
    [
      edit_view_hidden,
      _render_content_formgroup,
      _render_edit_buttons
    ]
  end
end

#edit_form_optsObject



67
68
69
70
# File 'tmpsets/set/mod023-edit/all/edit_content.rb', line 67

def edit_form_opts
  # for override
  { "data-slot-selector": "modal-origin", "data-slot-error-selector": ".card-slot" }
end

#edit_modal_menuObject



52
53
54
55
56
# File 'tmpsets/set/mod023-edit/all/edit_content.rb', line 52

def edit_modal_menu
  wrap_with_modal_menu do
    [close_modal_window, render_bridge_link]
  end
end

#edit_modal_sizeObject



48
49
50
# File 'tmpsets/set/mod023-edit/all/edit_content.rb', line 48

def edit_modal_size
  :large
end