Class: Wice::Columns::ViewColumnInteger

Inherits:
ViewColumn show all
Defined in:
lib/wice/columns/column_integer.rb

Overview

:nodoc:

Direct Known Subclasses

ViewColumnFloat

Constant Summary

Constants inherited from ViewColumn

Wice::Columns::ViewColumn::FIELDS

Instance Attribute Summary

Attributes inherited from ViewColumn

#cell_rendering_block, #contains_a_text_input, #custom_filter, #filter_control_options, #grid, #main_table, #table_name

Instance Method Summary collapse

Methods inherited from ViewColumn

#add_css_class, #attribute_name_fully_qualified_for_all_but_main_table_columns, #auto_reloading_input_with_negation_checkbox?, #capable_of_hosting_filter_related_icons?, #config, #controller, #css_class, #detachness, #filter_shown?, #filter_shown_in_main_table?, #form_parameter_name_id_and_query, #fully_qualified_attribute_name, #has_auto_reloading_calendar?, #has_auto_reloading_select?, #initialize, #render_filter, #table_alias_or_table_name, #yield_declaration

Methods included from ActionView::Helpers::TagHelper

#public_tag_options

Constructor Details

This class inherits a constructor from Wice::Columns::ViewColumn

Instance Method Details

#has_auto_reloading_input?Boolean

:nodoc:

Returns:

  • (Boolean)


27
28
29
# File 'lib/wice/columns/column_integer.rb', line 27

def has_auto_reloading_input? #:nodoc:
  auto_reload
end

#render_filter_internal(params) ⇒ Object

:nodoc:



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/wice/columns/column_integer.rb', line 4

def render_filter_internal(params) #:nodoc:
  @contains_a_text_input = true

  @query, _, parameter_name, @dom_id = form_parameter_name_id_and_query(eq: '')

  opts = { size: 3, id: @dom_id, class: 'range-start' }

  opts[:class] += ' form-control input-sm'

  if auto_reload
    opts[:class] += ' auto-reload'
  end

  text_field_tag(parameter_name,  params[:eq], opts)
end

#yield_declaration_of_column_filterObject

:nodoc:



20
21
22
23
24
25
# File 'lib/wice/columns/column_integer.rb', line 20

def yield_declaration_of_column_filter #:nodoc:
  {
    templates: [@query],
    ids:       [@dom_id]
  }
end