Module: Card::Set::All::EditInline::HtmlFormat
- Extended by:
- Card::Set::AbstractFormat
- Defined in:
- platypus/tmp/set/gem-defaults/mod011-edit/all/edit_inline.rb
Instance Method Summary collapse
-
#cancel_in_place_button(args = {}) ⇒ Object
-
#edit_inline_link(view = :edit_inline, align: :left) ⇒ Object
-
#edit_row(title, content, edit_view) ⇒ Object
-
#view: edit_inline ⇒ Object
-
#view: edit_inline_buttons ⇒ Object
-
#view: edit_name_row ⇒ Object
-
#view: edit_row ⇒ Object
TODO: better styling for this so that is reusable At the moment it is used for the name and type field in the board (with fixed 50px width for the title column) and for password and email for accounts (with fixed 75px width for the title column) The view is very similar to labeled but with fixed edit link on the right and a fixed width for the labels so that the content column is aligned There is also the problem that label and content are not vertically aligned.
Instance Method Details
#cancel_in_place_button(args = {}) ⇒ Object
58 59 60 61 |
# File 'platypus/tmp/set/gem-defaults/mod011-edit/all/edit_inline.rb', line 58 def args={} args.reverse_merge! class: "cancel-button btn-sm", href: path args end |
#edit_inline_link(view = :edit_inline, align: :left) ⇒ Object
53 54 55 56 |
# File 'platypus/tmp/set/gem-defaults/mod011-edit/all/edit_inline.rb', line 53 def edit_inline_link view=:edit_inline, align: :left align = align == :left ? "ms-2" : "ms-auto" link_to_view view, , class: "#{align} edit-link", "data-cy": "edit-link" end |
#edit_row(title, content, edit_view) ⇒ Object
44 45 46 47 48 49 50 51 |
# File 'platypus/tmp/set/gem-defaults/mod011-edit/all/edit_inline.rb', line 44 def edit_row title, content, edit_view class_up "card-slot", "d-flex form-group" wrap true, class: :row do haml :edit_row, title: title, content: content, edit_link: edit_inline_link(edit_view) end end |
#view: edit_inline ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'platypus/tmp/set/gem-defaults/mod011-edit/all/edit_inline.rb', line 9 view :edit_inline, perms: :update, unknown: true, cache: :never, wrap: :slot do add_name_context voo.hide :name_formgroup, :type_formgroup with_nest_mode :edit do card_form :update, success: edit_success do [ edit_view_hidden, _render_content_formgroups, _render(voo. || :edit_inline_buttons) ] end end end |
#view: edit_inline_buttons ⇒ Object
27 28 29 30 31 |
# File 'platypus/tmp/set/gem-defaults/mod011-edit/all/edit_inline.rb', line 27 view :edit_inline_buttons do do [, , ] end end |
#view: edit_name_row ⇒ Object
23 24 25 |
# File 'platypus/tmp/set/gem-defaults/mod011-edit/all/edit_inline.rb', line 23 view :edit_name_row do edit_row "Name", card.name, :name_form end |
#view: edit_row ⇒ Object
TODO: better styling for this so that is reusable At the moment it is used for the name and type field in the board (with fixed 50px width for the title column) and for password and email for accounts (with fixed 75px width for the title column) The view is very similar to labeled but with fixed edit link on the right and a fixed width for the labels so that the content column is aligned There is also the problem that label and content are not vertically aligned
40 41 42 |
# File 'platypus/tmp/set/gem-defaults/mod011-edit/all/edit_inline.rb', line 40 view :edit_row do edit_row render_title, render_core, :edit_inline end |