Class: Engine2::SearchTemplates

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

Class Method Summary collapse

Class Method Details

.bsselect_picker(options = {}) ⇒ Object



210
211
212
213
214
215
# File 'lib/engine2/templates.rb', line 210

def bsselect_picker options = {}
    options.merge({
        template: options[:multiple] ? "search_fields/bsmselect_picker" : "search_fields/bsselect_picker",
        animation: BS_ANIMATION
    })
end

.checkbox_buttonsObject

def checkbox_search true_v = “1”, false_v = “0”

{
    template: "search_fields/checkbox2",
    true_value: true_v,
    false_value: false_v
}

end



236
237
238
# File 'lib/engine2/templates.rb', line 236

def checkbox_buttons
    {template: 'search_fields/checkbox_buttons'}
end

.date_picker(options = {}) ⇒ Object



189
190
191
192
193
194
# File 'lib/engine2/templates.rb', line 189

def date_picker options = {}
    options.merge({
        template: "search_fields/date",
        animation: BS_ANIMATION
    })
end

.date_range(options = {}) ⇒ Object



182
183
184
185
186
187
# File 'lib/engine2/templates.rb', line 182

def date_range options = {}
    options.merge({
        template: "search_fields/date_range",
        animation: BS_ANIMATION
    })
end

.decimal_dateObject



259
260
261
# File 'lib/engine2/templates.rb', line 259

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

.input_textObject



178
179
180
# File 'lib/engine2/templates.rb', line 178

def input_text
    {template: "search_fields/input_text"}
end

.integerObject



200
201
202
# File 'lib/engine2/templates.rb', line 200

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

.integer_rangeObject



196
197
198
# File 'lib/engine2/templates.rb', line 196

def integer_range
    {template: "search_fields/integer_range"}
end

.list_bsselect(options = {}) ⇒ Object



244
245
246
247
248
249
# File 'lib/engine2/templates.rb', line 244

def list_bsselect options = {}
    options.merge({
        template: options[:multiple] ? "search_fields/list_bsmselect" : "search_fields/list_bsselect",
        animation: BS_ANIMATION
    })
end

.list_buttonsObject



251
252
253
# File 'lib/engine2/templates.rb', line 251

def list_buttons
    {template: "search_fields/list_buttons"}
end

.list_mbuttonsObject



255
256
257
# File 'lib/engine2/templates.rb', line 255

def list_mbuttons
    {template: "search_fields/list_mbuttons"}
end

.list_selectObject



240
241
242
# File 'lib/engine2/templates.rb', line 240

def list_select
    {template: "search_fields/list_select"}
end

.scaffold_picker(options = {}) ⇒ Object



217
218
219
220
221
222
# File 'lib/engine2/templates.rb', line 217

def scaffold_picker options = {}
    options.merge({
        # template: options[:multiple] ? "search_fields/scaffold_picker" : "search_fields/scaffold_picker"
        template: "search_fields/scaffold_picker"
    })
end

.select_picker(options = {}) ⇒ Object



204
205
206
207
208
# File 'lib/engine2/templates.rb', line 204

def select_picker options = {}
    options.merge({
        template: "search_fields/select_picker"
    })
end

.typeahead_picker(options = {}) ⇒ Object



224
225
226
# File 'lib/engine2/templates.rb', line 224

def typeahead_picker options = {}
    {template: "search_fields/typeahead_picker", limit: 10, min_length: 0, animation: BS_ANIMATION}.merge(options)
end