Module: Card::Set::Type::NestList::HtmlFormat

Extended by:
AbstractFormat
Defined in:
platypus/tmp/set/gem-defaults/mod005-list/type/nest_list.rb

Instance Method Summary collapse

Instance Method Details

#input_typeObject



24
25
26
# File 'platypus/tmp/set/gem-defaults/mod005-list/type/nest_list.rb', line 24

def input_type
  :nest_list
end

#items_for_input(items = nil) ⇒ Object



36
37
38
39
# File 'platypus/tmp/set/gem-defaults/mod005-list/type/nest_list.rb', line 36

def items_for_input items=nil
  items ||= card.item_names context: :raw
  items.empty? ? [["", ""]] : items.zip(card.item_options)
end

#nest_list_input(args = {}) ⇒ Object



41
42
43
44
45
46
# File 'platypus/tmp/set/gem-defaults/mod005-list/type/nest_list.rb', line 41

def nest_list_input args={}
  items = items_for_input args[:item_list]
  extra_class = "_nest-list-ul"
  ul_classes = classy "pointer-list-editor", extra_class
  haml :nest_list_input, items: items, ul_classes: ul_classes
end

#view: inputObject



32
33
34
# File 'platypus/tmp/set/gem-defaults/mod005-list/type/nest_list.rb', line 32

view :input do
  _render_hidden_content_field + super()
end

#view: nest_list_inputObject



28
29
30
# File 'platypus/tmp/set/gem-defaults/mod005-list/type/nest_list.rb', line 28

view :nest_list_input, cache: :never do
  nest_list_input
end