Class: Wice::Columns::ViewColumnString
- Inherits:
-
ViewColumn
- Object
- ViewColumn
- Wice::Columns::ViewColumnString
- Defined in:
- lib/wice/columns/column_string.rb
Overview
:nodoc:
Constant Summary
Constants inherited from ViewColumn
Wice::Columns::ViewColumn::FIELDS
Instance Attribute Summary collapse
-
#auto_reloading_input_with_negation_checkbox ⇒ Object
Returns the value of attribute auto_reloading_input_with_negation_checkbox.
-
#negation ⇒ Object
Returns the value of attribute negation.
Attributes inherited from ViewColumn
#cell_rendering_block, #contains_a_text_input, #custom_filter, #grid, #main_table, #model, #table_name
Instance Method Summary collapse
-
#auto_reloading_input_with_negation_checkbox? ⇒ Boolean
:nodoc:.
-
#has_auto_reloading_input? ⇒ Boolean
:nodoc:.
-
#render_filter_internal(params) ⇒ Object
:nodoc:.
-
#yield_declaration_of_column_filter ⇒ Object
:nodoc:.
Methods inherited from ViewColumn
#add_css_class, #attribute_name_fully_qualified_for_all_but_main_table_columns, #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
Constructor Details
This class inherits a constructor from Wice::Columns::ViewColumn
Instance Attribute Details
#auto_reloading_input_with_negation_checkbox ⇒ Object
Returns the value of attribute auto_reloading_input_with_negation_checkbox.
8 9 10 |
# File 'lib/wice/columns/column_string.rb', line 8 def auto_reloading_input_with_negation_checkbox @auto_reloading_input_with_negation_checkbox end |
#negation ⇒ Object
Returns the value of attribute negation.
8 9 10 |
# File 'lib/wice/columns/column_string.rb', line 8 def negation @negation end |
Instance Method Details
#auto_reloading_input_with_negation_checkbox? ⇒ Boolean
:nodoc:
58 59 60 |
# File 'lib/wice/columns/column_string.rb', line 58 def auto_reloading_input_with_negation_checkbox? #:nodoc: self.auto_reloading_input_with_negation_checkbox end |
#has_auto_reloading_input? ⇒ Boolean
:nodoc:
54 55 56 |
# File 'lib/wice/columns/column_string.rb', line 54 def has_auto_reloading_input? #:nodoc: auto_reload end |
#render_filter_internal(params) ⇒ Object
:nodoc:
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/wice/columns/column_string.rb', line 10 def render_filter_internal(params) #:nodoc: @contains_a_text_input = true css_class = 'form-control input-sm ' + (auto_reload ? 'auto-reload' : '') if negation self.auto_reloading_input_with_negation_checkbox = true if auto_reload @query, _, parameter_name, @dom_id = form_parameter_name_id_and_query(:v => '') @query2, _, parameter_name2, @dom_id2 = form_parameter_name_id_and_query(:n => '') '<div class="text-filter-container">' + text_field_tag(parameter_name, params[:v], :size => 8, :id => @dom_id, :class => css_class) + if defined?(Wice::Defaults::NEGATION_CHECKBOX_LABEL) && ! Wice::ConfigurationProvider.value_for(:NEGATION_CHECKBOX_LABEL).blank? Wice::ConfigurationProvider.value_for(:NEGATION_CHECKBOX_LABEL) else '' end + check_box_tag(parameter_name2, '1', (params[:n] == '1'), :id => @dom_id2, :title => NlMessage['negation_checkbox_title'], :class => "negation-checkbox #{css_class}") + '</div>' else @query, _, parameter_name, @dom_id = form_parameter_name_id_and_query('') text_field_tag(parameter_name, (params.blank? ? '' : params), :size => 8, :id => @dom_id, :class => css_class) end end |
#yield_declaration_of_column_filter ⇒ Object
:nodoc:
39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/wice/columns/column_string.rb', line 39 def yield_declaration_of_column_filter #:nodoc: if negation { :templates => [@query, @query2], :ids => [@dom_id, @dom_id2] } else { :templates => [@query], :ids => [@dom_id] } end end |