Module: Card::Set::All::EditContent::HtmlFormat
- Extended by:
- Card::Set::AbstractFormat
- Defined in:
- platypus/tmp/set/gem-defaults/mod011-edit/all/edit_content.rb
Instance Method Summary collapse
-
#edit_form ⇒ Object
-
#edit_form_opts ⇒ Object
-
#edit_modal_menu ⇒ Object
-
#edit_modal_size ⇒ Object
-
#view: edit ⇒ Object
-
#view: edit_form ⇒ Object
Instance Method Details
#edit_form ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'platypus/tmp/set/gem-defaults/mod011-edit/all/edit_content.rb', line 16 def edit_form voo.hide :edit_type_row form_opts = edit_form_opts.reverse_merge success: edit_success card_form :update, form_opts do [ edit_view_hidden, _render_edit_type_row(home_view: :edit_type_row), # home_view is necessary for cancel to work correctly. # it seems a little strange to have to think about home_view here, # but the issue is that something currently has to happen prior to the # render to get voo.slot_options to have the right home view in # the slot wrap. I'd think this would probably best be handled as an # option to #wrap that triggers a new heir voo _render_content_formgroups, _render(voo. || :edit_buttons) ] end end |
#edit_form_opts ⇒ Object
58 59 60 61 |
# File 'platypus/tmp/set/gem-defaults/mod011-edit/all/edit_content.rb', line 58 def edit_form_opts # for override { "data-slot-selector": "modal-origin", "data-slot-error-selector": ".card-slot" } end |
#edit_modal_menu ⇒ Object
52 53 54 55 56 |
# File 'platypus/tmp/set/gem-defaults/mod011-edit/all/edit_content.rb', line 52 def do [render_close_modal_link, board_link(confirm: true)] end end |
#edit_modal_size ⇒ Object
48 49 50 |
# File 'platypus/tmp/set/gem-defaults/mod011-edit/all/edit_content.rb', line 48 def edit_modal_size :large end |
#view: edit ⇒ Object
35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'platypus/tmp/set/gem-defaults/mod011-edit/all/edit_content.rb', line 35 view :edit, perms: :update, unknown: true, cache: :never, wrap: { modal: { footer: "", size: :edit_modal_size, title: :render_title, menu: :edit_modal_menu } } do add_name_context with_nest_mode :edit do voo.show :help voo.hide :save_button wrap(true) { [frame_help, _render_edit_form] } end end |
#view: edit_form ⇒ Object
9 10 11 12 13 14 |
# File 'platypus/tmp/set/gem-defaults/mod011-edit/all/edit_content.rb', line 9 view :edit_form, wrap: :slot do voo.show :edit_type_row with_nest_mode :edit do edit_form end end |