Module: Card::Set::Type::LinkList::HtmlFormat

Extended by:
AbstractFormat
Defined in:
card/tmpsets/set/mod009-card-mod-list/type/link_list.rb,
card/tmpsets/set/mod008-card-mod-list/type/link_list.rb

Instance Method Summary collapse

Instance Method Details

#input_typeObject



27
28
29
# File 'card/tmpsets/set/mod009-card-mod-list/type/link_list.rb', line 27

def input_type
  :link_list
end

#items_for_input(items = nil) ⇒ Object



35
36
37
38
# File 'card/tmpsets/set/mod009-card-mod-list/type/link_list.rb', line 35

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


40
41
42
43
44
45
46
# File 'card/tmpsets/set/mod009-card-mod-list/type/link_list.rb', line 40

def link_list_input args={}
  items = items_for_input args[:item_list]
  extra_class = "pointer-link-list-ul"
  ul_classes = classy "pointer-list-editor", extra_class
  haml :link_list_input, items: items, ul_classes: ul_classes,
                         options_card: options_card_name
end


31
32
33
# File 'card/tmpsets/set/mod009-card-mod-list/type/link_list.rb', line 31

view :link_list_input, cache: :never do
  link_list_input
end