Module: Card::Set::Abstract::Pointer::HtmlViews::HtmlFormat
- Extended by:
- Card::Set::AbstractFormat
- Defined in:
- tmpsets/set/mod008-pointer/abstract/02_pointer/html_views.rb
Instance Method Summary collapse
- #add_item_modal_link ⇒ Object
- #add_item_overlay_link ⇒ Object
- #autocomplete_input ⇒ Object
- #checkbox_input ⇒ Object
- #default_editor ⇒ Object
- #list_input(args = {}) ⇒ Object
- #multiselect_input ⇒ Object
- #radio_input ⇒ Object
- #select_input ⇒ Object
- #standard_pointer_core ⇒ Object
- #standard_pointer_items(paging_args) ⇒ Object
- #wrap_item(rendered, item_view) ⇒ Object
Instance Method Details
#add_item_modal_link ⇒ Object
93 94 95 96 97 98 99 100 101 102 103 104 |
# File 'tmpsets/set/mod008-pointer/abstract/02_pointer/html_views.rb', line 93 def add_item_modal_link modal_link "Add Item", size: :large, class: "btn btn-sm btn-primary _add-item-link", path: { view: :filter_items_modal, item: implicit_item_view, filter_card: filter_card.name, slot_selector: filtered_list_slot_class, item_selector: "_filtered-list-item", slot: { hide: [:modal_footer] }, filter: { not_ids: card.item_ids.map(&:to_s).join(",") } } end |
#add_item_overlay_link ⇒ Object
106 |
# File 'tmpsets/set/mod008-pointer/abstract/02_pointer/html_views.rb', line 106 def ; end |
#autocomplete_input ⇒ Object
67 68 69 70 |
# File 'tmpsets/set/mod008-pointer/abstract/02_pointer/html_views.rb', line 67 def autocomplete_input items = items_for_input haml :autocomplete_input, item: items.first, options_card: end |
#checkbox_input ⇒ Object
72 73 74 |
# File 'tmpsets/set/mod008-pointer/abstract/02_pointer/html_views.rb', line 72 def checkbox_input haml :checkbox_input end |
#default_editor ⇒ Object
48 49 50 |
# File 'tmpsets/set/mod008-pointer/abstract/02_pointer/html_views.rb', line 48 def default_editor :list end |
#list_input(args = {}) ⇒ Object
56 57 58 59 60 61 |
# File 'tmpsets/set/mod008-pointer/abstract/02_pointer/html_views.rb', line 56 def list_input args={} items = items_for_input args[:item_list] extra_class = "pointer-list-ul" ul_classes = classy "pointer-list-editor", extra_class haml :list_input, items: items, ul_classes: ul_classes end |
#multiselect_input ⇒ Object
87 88 89 90 91 |
# File 'tmpsets/set/mod008-pointer/abstract/02_pointer/html_views.rb', line 87 def multiselect_input select_tag "pointer_multiselect-#{unique_id}", (card., card.item_names), multiple: true, class: "pointer-multiselect form-control" end |
#radio_input ⇒ Object
76 77 78 |
# File 'tmpsets/set/mod008-pointer/abstract/02_pointer/html_views.rb', line 76 def radio_input haml :radio_input end |
#select_input ⇒ Object
80 81 82 83 84 85 |
# File 'tmpsets/set/mod008-pointer/abstract/02_pointer/html_views.rb', line 80 def select_input = { "-- Select --" => "" }.merge card. select_tag("pointer_select-#{unique_id}", (, card.item_name), class: "pointer-select form-control") end |
#standard_pointer_core ⇒ Object
21 22 23 24 25 |
# File 'tmpsets/set/mod008-pointer/abstract/02_pointer/html_views.rb', line 21 def standard_pointer_core with_paging do |paging_args| wrap_with :div, standard_pointer_items(paging_args), class: "pointer-list" end end |
#standard_pointer_items(paging_args) ⇒ Object
27 28 29 |
# File 'tmpsets/set/mod008-pointer/abstract/02_pointer/html_views.rb', line 27 def standard_pointer_items paging_args pointer_items paging_args.extract!(:limit, :offset) end |
#wrap_item(rendered, item_view) ⇒ Object
40 41 42 |
# File 'tmpsets/set/mod008-pointer/abstract/02_pointer/html_views.rb', line 40 def wrap_item rendered, item_view %(<div class="pointer-item item-#{item_view}">#{rendered}</div>) end |