Class: YummyGuide::Administrate::Filters::DatetimeLocalRange
- Defined in:
- lib/yummy_guide/administrate/filters.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#initialize, #label_text, #visible?, #with_name, with_options
Constructor Details
This class inherits a constructor from YummyGuide::Administrate::Filters::Base
Instance Method Details
#row(view_context, form, _scope, current_values, locals) ⇒ Object
255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 |
# File 'lib/yummy_guide/administrate/filters.rb', line 255 def row(view_context, form, _scope, current_values, locals) from_name = ([:from] || :"start_#{name}").to_sym to_name = ([:to] || :"end_#{name}").to_sym view_context.content_tag(:tr) do view_context.safe_join([ label_cell(view_context, form, locals), view_context.content_tag(:td) do view_context.safe_join([ form.datetime_local_field(from_name, value: current_values[from_name.to_s].presence || evaluate_option([:from_default], view_context, locals)), view_context.content_tag(:p, "〜", style: "text-align: center; margin: 0;"), form.datetime_local_field(to_name, value: current_values[to_name.to_s].presence || evaluate_option([:to_default], view_context, locals)) ]) end, clear_cell(view_context) ]) end end |