Module: Card::Set::All::EditType::HtmlFormat

Extended by:
Card::Set::AbstractFormat
Defined in:
platypus/tmp/set/gem-defaults/mod011-edit/all/edit_type.rb

Instance Method Summary collapse

Instance Method Details

#edit_type_successObject



21
22
23
# File 'platypus/tmp/set/gem-defaults/mod011-edit/all/edit_type.rb', line 21

def edit_type_success
  { view: :core }
end

#type_field(args = {}) ⇒ Object



51
52
53
54
55
# File 'platypus/tmp/set/gem-defaults/mod011-edit/all/edit_type.rb', line 51

def type_field args={}
  @no_current_type = args.delete :no_current_type # just a test artifact?
  action_view.select_tag "card[type]", type_field_options,
                         args.merge("data-select2-id": "#{unique_id}-#{Time.now.to_i}")
end

#type_formgroup(args = {}) ⇒ Object



44
45
46
47
48
49
# File 'platypus/tmp/set/gem-defaults/mod011-edit/all/edit_type.rb', line 44

def type_formgroup args={}
  add_class args, "type-field"
  wrap_type_formgroup do
    type_field args
  end
end

#view: board_type_formgroupObject



31
32
33
34
35
36
37
38
# File 'platypus/tmp/set/gem-defaults/mod011-edit/all/edit_type.rb', line 31

view :board_type_formgroup, unknown: true, wrap: :slot do
  type_formgroup href: path(mark: card.id,
                            view: :edit_form,
                            assign: true,
                            slot: { show: :type_form }),
                 class: "_live-type-field",
                 'data-remote': true
end

#view: edit_typeObject



9
10
11
12
13
# File 'platypus/tmp/set/gem-defaults/mod011-edit/all/edit_type.rb', line 9

view :edit_type, cache: :never, perms: :update do
  frame do
    _render_edit_type_form
  end
end

#view: edit_type_formObject



15
16
17
18
19
# File 'platypus/tmp/set/gem-defaults/mod011-edit/all/edit_type.rb', line 15

view :edit_type_form, cache: :never, perms: :update, wrap: :slot do
  card_form :update, success: edit_type_success do
    [type_formgroup, render_new_buttons]
  end
end

#view: edit_type_rowObject



25
26
27
28
29
# File 'platypus/tmp/set/gem-defaults/mod011-edit/all/edit_type.rb', line 25

view :edit_type_row do
  return _render_board_type_formgroup if voo.visible?(:type_form) { false }

  edit_row "Type", link_to_card(card.type), :board_type_formgroup
end

#view: type_formgroupObject



40
41
42
# File 'platypus/tmp/set/gem-defaults/mod011-edit/all/edit_type.rb', line 40

view :type_formgroup do
  type_formgroup
end