Class: Lipsiadmin::View::Helpers::InstanceTag
- Inherits:
-
ActionView::Helpers::InstanceTag
- Object
- ActionView::Helpers::InstanceTag
- Lipsiadmin::View::Helpers::InstanceTag
- Includes:
- CountrySelectHelper
- Defined in:
- lib/view/helpers/view_helper.rb
Overview
:nodoc:
Constant Summary
Constants included from CountrySelectHelper
CountrySelectHelper::COUNTRIES
Instance Method Summary collapse
- #to_country_select_tag(priority_countries, options, html_options) ⇒ Object
- #to_ext_date_select_tag(options = {}, html_options = {}) ⇒ Object
- #to_ext_datetime_select_tag(options = {}, html_options = {}) ⇒ Object
Methods included from CountrySelectHelper
#country_options_for_select, #country_select
Instance Method Details
#to_country_select_tag(priority_countries, options, html_options) ⇒ Object
194 195 196 197 198 199 200 201 202 203 204 |
# File 'lib/view/helpers/view_helper.rb', line 194 def to_country_select_tag(priority_countries, , ) = .stringify_keys add_default_name_and_id() value = value(object) content_tag("select", ( (value, priority_countries), , value ), ) end |
#to_ext_date_select_tag(options = {}, html_options = {}) ⇒ Object
178 179 180 |
# File 'lib/view/helpers/view_helper.rb', line 178 def to_ext_date_select_tag( = {}, = {}) to_ext_datetime_select_tag({ :hideTime => true.to_l }.merge(), ) end |
#to_ext_datetime_select_tag(options = {}, html_options = {}) ⇒ Object
182 183 184 185 186 187 188 189 190 191 192 |
# File 'lib/view/helpers/view_helper.rb', line 182 def to_ext_datetime_select_tag( = {}, = {}) = .stringify_keys = DEFAULT_FIELD_OPTIONS.merge() ["type"] = "hidden" ["value"] ||= value_before_type_cast(object) ["value"] &&= html_escape(["value"]) add_default_name_and_id() = { :applyTo => ["id"], :dateFormat => I18n.t("extjs.dateFormat") }.merge() tag("input", ) + content_tag(:script, "new Ext.form.DateTimeField(#{.to_json});", :type => Mime::JS) end |