class Engine2::Templates

Public Class Methods

blob() click to toggle source
# File lib/engine2/templates.rb, line 33
def blob
    {template: "fields/blob"}
end
bsselect_picker(options = {}) click to toggle source
# File lib/engine2/templates.rb, line 111
def bsselect_picker options = {}
    options.merge({
        template: options[:optional] ? "fields/bsselect_picker_opt" : "fields/bsselect_picker",
        animation: BS_ANIMATION
    })
end
checkbox() click to toggle source
# File lib/engine2/templates.rb, line 151
def checkbox
    {template: "fields/checkbox"}
end
checkbox_button(options = {}) click to toggle source
# File lib/engine2/templates.rb, line 161
def checkbox_button options = {}
    {template: "fields/checkbox_button"}.merge(options)
end
checkbox_buttons(options = {}) click to toggle source
# File lib/engine2/templates.rb, line 155
def checkbox_buttons options = {}
    options.merge({
        template: options[:optional] ? "fields/checkbox_buttons_opt" : "fields/checkbox_buttons"
    })
end
currency() click to toggle source
# File lib/engine2/templates.rb, line 147
def currency
    {template: "fields/currency"}
end
date_picker() click to toggle source
# File lib/engine2/templates.rb, line 53
def date_picker
    {template: "fields/date", animation: BS_ANIMATION}
end
date_range() click to toggle source
# File lib/engine2/templates.rb, line 139
def date_range
    {template: "fields/date_range", animation: BS_ANIMATION}
end
date_time() click to toggle source
# File lib/engine2/templates.rb, line 143
def date_time
    {template: "fields/date_time", animation: BS_ANIMATION}
end
datetime_picker() click to toggle source
# File lib/engine2/templates.rb, line 61
def datetime_picker
    {template: "fields/datetime", animation: BS_ANIMATION}
end
decimal() click to toggle source
# File lib/engine2/templates.rb, line 41
def decimal
    {template: "fields/integer"}
end
decimal_date() click to toggle source
# File lib/engine2/templates.rb, line 45
def decimal_date
    {template: "fields/decimal_date", animation: BS_ANIMATION}
end
decimal_time() click to toggle source
# File lib/engine2/templates.rb, line 49
def decimal_time
    {template: "fields/decimal_time", animation: BS_ANIMATION}
end
default_template() click to toggle source
# File lib/engine2/templates.rb, line 9
def default_template
    {template: "fields/input_text"}
end
email(length) click to toggle source
# File lib/engine2/templates.rb, line 135
def email length
    {template: "fields/email", length: length}
end
file_store() click to toggle source
# File lib/engine2/templates.rb, line 29
def file_store
    {template: "fields/file_store"}
end
input_text(length) click to toggle source
# File lib/engine2/templates.rb, line 17
def input_text length
    {template: "fields/input_text", length: length}
end
integer() click to toggle source
# File lib/engine2/templates.rb, line 37
def integer
    {template: "fields/integer"}
end
list_bsmselect(length, options = {}) click to toggle source
# File lib/engine2/templates.rb, line 85
def list_bsmselect length, options = {}
    options.merge({
        template: "fields/list_bsmselect",
        length: length,
        animation: BS_ANIMATION
    })
end
list_bsselect(length, options = {}) click to toggle source
# File lib/engine2/templates.rb, line 77
def list_bsselect length, options = {}
    options.merge({
        template: options[:optional] ? "fields/list_bsselect_opt" : "fields/list_bsselect",
        length: length,
        animation: BS_ANIMATION
    })
end
list_buttons(options = {}) click to toggle source
# File lib/engine2/templates.rb, line 93
def list_buttons options = {}
    options.merge({
        template: options[:optional] ? "fields/list_buttons_opt" : "fields/list_buttons"
    })
end
list_mbuttons(options = {}) click to toggle source
# File lib/engine2/templates.rb, line 99
def list_mbuttons options = {}
    options.merge({
        template: options[:optional] ? "fields/list_mbuttons_opt" : "fields/list_mbuttons"
    })
end
list_select(length, options = {}) click to toggle source
# File lib/engine2/templates.rb, line 65
def list_select length, options = {}
    template = if options[:multiple]
        "fields/list_mselect"
    else
        options[:optional] ? "fields/list_select_opt" : "fields/list_select"
    end
    options.merge({
        template: template,
        length: length
    })
end
password(length) click to toggle source
# File lib/engine2/templates.rb, line 25
def password length
    {template: "fields/password", length: length}
end
radio_checkbox() click to toggle source
# File lib/engine2/templates.rb, line 165
def radio_checkbox
    {template: "fields/radio_checkbox"}
end
scaffold() click to toggle source
# File lib/engine2/templates.rb, line 169
def scaffold
    {template: "fields/scaffold"}
end
scaffold_picker(options = {}) click to toggle source

def bs_select_picker(options)

{
      resource: options[:resource],
    template: "fields/bs_select"
}

end

# File lib/engine2/templates.rb, line 125
def scaffold_picker options = {}
    options.merge({
        template: 'fields/scaffold_picker'
    })
end
select_picker(options = {}) click to toggle source
# File lib/engine2/templates.rb, line 105
def select_picker options = {}
    options.merge({
        template: options[:optional] ? "fields/select_picker_opt" : "fields/select_picker"
    })
end
text() click to toggle source
# File lib/engine2/templates.rb, line 21
def text
    {template: "fields/text"}
end
text_area(cols, rows) click to toggle source
# File lib/engine2/templates.rb, line 13
def text_area cols, rows
    {template: "fields/text_area", cols: cols, rows: rows}
end
time_picker() click to toggle source
# File lib/engine2/templates.rb, line 57
def time_picker
    {template: "fields/time", animation: BS_ANIMATION}
end
typeahead_picker(options = {}) click to toggle source
# File lib/engine2/templates.rb, line 131
def typeahead_picker options = {}
    {template: "fields/typeahead_picker", length: 20, limit: 10, min_length: 0, animation: BS_ANIMATION}.merge(options)
end