Class: Templet::Utils::LinkSetFactoryWrapper

Inherits:
LinkSetFactory show all
Includes:
Mixins::Bs::Lists
Defined in:
app/helpers/templet/utils/link_set_factory_wrapper.rb,
lib/generators/templet/templates/core/templet/utils/link_set_factory_wrapper.rb

Overview

Creates HTML links for REST actions in Bootstrap containers

Constant Summary

Constants included from Constants

Constants::BS_BUTTON, Constants::BS_BUTTON_BLOCK, Constants::BS_BUTTON_DROPDOWN, Constants::BS_BUTTON_GROUP, Constants::BS_BUTTON_GROUP_JUSTIFIED, Constants::BS_BUTTON_GROUP_VERTICAL, Constants::BS_BUTTON_SIZE, Constants::BS_BUTTON_SUBMIT, Constants::BS_BUTTON_SUBMIT_SEARCH, Constants::BS_BUTTON_TOOLBAR, Constants::BS_BUTTON_TYPE, Constants::BS_COL, Constants::BS_COL_OFFSET, Constants::BS_FORM, Constants::BS_FORM_INLINE, Constants::BS_LIST_GROUP, Constants::BS_LIST_GROUP_ITEM, Constants::BS_LIST_INLINE, Constants::BS_LIST_UNSTYLED, Constants::BS_NAV, Constants::BS_NAV_PILLS, Constants::BS_NAV_PILLS_STACKED, Constants::BS_NAV_TABS, Constants::BS_PANEL, Constants::BS_PANEL_BODY, Constants::BS_PANEL_HEADING, Constants::BS_PANEL_TITLE, Constants::BS_SELECTED, Constants::BS_TABLE, Constants::BS_TOOLBAR

Instance Attribute Summary

Attributes inherited from LinkSetFactory

#action, #klass, #options, #renderer

Instance Method Summary collapse

Methods included from Mixins::Bs::Lists

#button_group_dropdown, #in_button_group, #in_button_toolbar, #in_html_list, #in_list_group_buttons, #in_list_group_links, #in_nav

Methods included from Mixins::HtmlPresenters

#default_list_class, #default_table_class, #get_list_class, #html_definition_list, #html_form, #html_list, #html_table, #stacked_list_class

Instance Method Details

#call(type = nil, **options) ⇒ Object



8
9
10
11
12
# File 'app/helpers/templet/utils/link_set_factory_wrapper.rb', line 8

def call(type=nil, **options)
  stacked = options.delete(:stacked) || false

  wrap type, create(link_set_options(type).merge options), stacked: stacked
end