Class: Engine2::Templates

Inherits:
Object show all
Defined in:
lib/engine2/templates.rb

Class Method Summary collapse

Class Method Details

.blobObject



33
34
35
# File 'lib/engine2/templates.rb', line 33

def blob
    {template: "fields/blob"}
end

.bsselect_picker(options = {}) ⇒ Object



100
101
102
103
104
105
# File 'lib/engine2/templates.rb', line 100

def bsselect_picker options = {}
    options.merge({
        template: options[:optional] ? "fields/bsselect_picker_opt" : "fields/bsselect_picker",
        animation: BS_ANIMATION
    })
end

.checkboxObject



140
141
142
# File 'lib/engine2/templates.rb', line 140

def checkbox
    {template: "fields/checkbox"}
end

.checkbox_buttons(options = {}) ⇒ Object



144
145
146
147
148
# File 'lib/engine2/templates.rb', line 144

def checkbox_buttons options = {}
    options.merge({
        template: options[:optional] ? "fields/checkbox_buttons_opt" : "fields/checkbox_buttons"
    })
end

.currencyObject



136
137
138
# File 'lib/engine2/templates.rb', line 136

def currency
    {template: "fields/currency"}
end

.date_pickerObject



53
54
55
# File 'lib/engine2/templates.rb', line 53

def date_picker
    {template: "fields/date", animation: BS_ANIMATION}
end

.date_rangeObject



128
129
130
# File 'lib/engine2/templates.rb', line 128

def date_range
    {template: "fields/date_range", animation: BS_ANIMATION}
end

.date_timeObject



132
133
134
# File 'lib/engine2/templates.rb', line 132

def date_time
    {template: "fields/date_time", animation: BS_ANIMATION}
end

.datetime_pickerObject



61
62
63
# File 'lib/engine2/templates.rb', line 61

def datetime_picker
    {template: "fields/datetime", animation: BS_ANIMATION}
end

.decimalObject



41
42
43
# File 'lib/engine2/templates.rb', line 41

def decimal
    {template: "fields/integer"}
end

.decimal_dateObject



45
46
47
# File 'lib/engine2/templates.rb', line 45

def decimal_date
    {template: "fields/decimal_date", animation: BS_ANIMATION}
end

.decimal_timeObject



49
50
51
# File 'lib/engine2/templates.rb', line 49

def decimal_time
    {template: "fields/decimal_time", animation: BS_ANIMATION}
end

.default_templateObject



9
10
11
# File 'lib/engine2/templates.rb', line 9

def default_template
    {template: "fields/input_text"}
end

.email(length) ⇒ Object



124
125
126
# File 'lib/engine2/templates.rb', line 124

def email length
    {template: "fields/email", length: length}
end

.file_storeObject



29
30
31
# File 'lib/engine2/templates.rb', line 29

def file_store
    {template: "fields/file_store"}
end

.input_text(length) ⇒ Object



17
18
19
# File 'lib/engine2/templates.rb', line 17

def input_text length
    {template: "fields/input_text", length: length}
end

.integerObject



37
38
39
# File 'lib/engine2/templates.rb', line 37

def integer
    {template: "fields/integer"}
end

.list_bsmselect(length, options = {}) ⇒ Object



80
81
82
83
84
85
86
# File 'lib/engine2/templates.rb', line 80

def list_bsmselect length, options = {}
    options.merge({
        template: "fields/list_bsmselect",
        length: length,
        animation: BS_ANIMATION
    })
end

.list_bsselect(length, options = {}) ⇒ Object



72
73
74
75
76
77
78
# File 'lib/engine2/templates.rb', line 72

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 = {}) ⇒ Object



88
89
90
91
92
# File 'lib/engine2/templates.rb', line 88

def list_buttons options = {}
    options.merge({
        template: options[:optional] ? "fields/list_buttons_opt" : "fields/list_buttons"
    })
end

.list_select(length, options = {}) ⇒ Object



65
66
67
68
69
70
# File 'lib/engine2/templates.rb', line 65

def list_select length, options = {}
    options.merge({
        template: options[:optional] ? "fields/list_select_opt" : "fields/list_select",
        length: length
    })
end

.password(length) ⇒ Object



25
26
27
# File 'lib/engine2/templates.rb', line 25

def password length
    {template: "fields/password", length: length}
end

.radio_checkboxObject



150
151
152
# File 'lib/engine2/templates.rb', line 150

def radio_checkbox
    {template: "fields/radio_checkbox"}
end

.scaffoldObject



154
155
156
# File 'lib/engine2/templates.rb', line 154

def scaffold
    {template: "fields/scaffold"}
end

.scaffold_picker(options = {}) ⇒ Object

def bs_select_picker(options)

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

end



114
115
116
117
118
# File 'lib/engine2/templates.rb', line 114

def scaffold_picker options = {}
    options.merge({
        template: 'fields/scaffold_picker'
    })
end

.select_picker(options = {}) ⇒ Object



94
95
96
97
98
# File 'lib/engine2/templates.rb', line 94

def select_picker options = {}
    options.merge({
        template: options[:optional] ? "fields/select_picker_opt" : "fields/select_picker"
    })
end

.textObject



21
22
23
# File 'lib/engine2/templates.rb', line 21

def text
    {template: "fields/text"}
end

.text_area(cols, rows) ⇒ Object



13
14
15
# File 'lib/engine2/templates.rb', line 13

def text_area cols, rows
    {template: "fields/text_area", cols: cols, rows: rows}
end

.time_pickerObject



57
58
59
# File 'lib/engine2/templates.rb', line 57

def time_picker
    {template: "fields/time", animation: BS_ANIMATION}
end

.typeahead_pickerObject



120
121
122
# File 'lib/engine2/templates.rb', line 120

def typeahead_picker
    {template: "fields/typeahead_picker", animation: BS_ANIMATION}
end