-
- <%= label_tag :timeline_options_exclude_reporters,
- l('timelines.filter.exclude_reporters') %>
-
- <%= check_box_tag("timeline[options][exclude_reporters]",
- :yes,
- timeline.options["exclude_reporters"].present?) %>
-
-
-
- <%= label_tag :timeline_options_exclude_empty,
- l('timelines.filter.exclude_empty') %>
-
- <%= check_box_tag("timeline[options][exclude_empty]",
- :yes,
- timeline.options["exclude_empty"].present?) %>
-
-
-
- <%= label_tag 'timeline_options_project_types',
- l("timelines.filter.project_types") %>
+ <%= f.fields_for :options, timeline_options do |ff| %>
+
+ <%= ff.check_box :exclude_reporters, label: l('timelines.filter.exclude_reporters') %>
+
+
+ <%= ff.check_box :exclude_empty, label: l('timelines.filter.exclude_empty') %>
+
+
+
+
+
- <% if User.current.impaired? %>
- <%= select("timeline[options]",
- :planning_element_time_types,
+
+ <% if User.current.impaired? %>
+ <%= ff.select(:planning_element_time_types,
filter_select_with_none(
timeline.available_planning_element_types,
:name, :id),
- {:selected => timeline.selected_planning_element_time_types.map(&:id)},
+ {:selected => timeline.selected_planning_element_time_types.map(&:id), label: l('timelines.filter.project_time_filter') },
{:multiple => true,
:size => 12}) %>
<% else %>
- <%= select("timeline[options]", :planning_element_time_types,
+ <%= ff.select(:planning_element_time_types,
options_for_select([]),
- {},
+ { label: l('timelines.filter.project_time_filter') },
{ :'data-ajaxURL' => api_v2_paginate_types_path,
:multiple => true,
:'data-selected' => filter_select(
@@ -182,101 +146,28 @@ See doc/COPYRIGHT.rdoc for more details.
:name, :id).to_json
}) %>
<% end %>
-
-
-
- <%= label_tag 'timeline_options_planning_element_time_absolute',
- l('timelines.filter.project_time_filter_absolute_timeframe') %>
-
- <%= radio_button("timeline[options]",
- :planning_element_time,
- 'absolute',
- :checked => (timeline.planning_element_time == 'absolute')) %>
-
- <%
- historical_label_start = label_tag 'timeline_options_planning_element_time_absolute_one',
- l('timelines.filter.project_time_filter_historical_from'),
- class: 'inline-label'
-
- historical_text1 = text_field_tag "timeline[options][planning_element_time_absolute_one]",
- timeline.options["planning_element_time_absolute_one"],
- :size => 10
- historical_calendar1 = calendar_for('timeline_options_planning_element_time_absolute_one')
-
- historical_label_end = label_tag 'timeline_options_planning_element_time_absolute_two',
- l('timelines.filter.project_time_filter_historical_to'),
- class: 'inline-label'
-
- historical_text2 = text_field_tag "timeline[options][planning_element_time_absolute_two]",
- timeline.options["planning_element_time_absolute_two"],
- :size => 10
- historical_calendar2 = calendar_for('timeline_options_planning_element_time_absolute_two')
- %>
-
- <%= l('timelines.filter.project_time_filter_historical',
- start_label: historical_label_start,
- startdate: historical_text1 + historical_calendar1,
- end_label: historical_label_end,
- enddate: historical_text2 + historical_calendar2).html_safe %>
-
-
-
-
- <%= label_tag 'timeline_options_planning_element_time_relative',
- l('timelines.filter.project_time_filter_relative_timeframe') %>
-
- <%= radio_button("timeline[options]",
- :planning_element_time,
- 'relative',
- :checked => (timeline.planning_element_time == 'relative')) %>
-
- <%
- relative_label_start = label_tag 'timeline_options_planning_element_time_relative_one',
- l('timelines.filter.project_time_filter_historical_from'),
- class: 'inline-label'
-
- relative_text1 = text_field_tag "timeline[options][planning_element_time_relative_one]",
- timeline.options["planning_element_time_relative_one"],
- :size => 3
-
- relative_select1 = select("timeline[options]",
- :planning_element_time_relative_one_unit,
- [ [l('timelines.filter.time_relative.days'), 0],
- [l('timelines.filter.time_relative.weeks'), '1'],
- [l('timelines.filter.time_relative.months'), '2']
- ],
- { :selected => timeline.options['planning_element_time_relative_one_unit'] },
- { :multiple => false, :size => 1})
-
- relative_label_end = label_tag 'timeline_options_planning_element_time_relative_two',
- l('timelines.filter.project_time_filter_historical_to'),
- class: 'inline-label'
-
- relative_text2 = text_field_tag "timeline[options][planning_element_time_relative_two]",
- timeline.options["planning_element_time_relative_two"],
- :size => 3
-
- relative_select2 = select("timeline[options]",
- :planning_element_time_relative_two_unit,
- [ [l('timelines.filter.time_relative.days'), 0],
- [l('timelines.filter.time_relative.weeks'), '1'],
- [l('timelines.filter.time_relative.months'), '2']
- ],
- { :selected => timeline.options['planning_element_time_relative_two_unit'] },
- { :multiple => false, :size => 1})
- %>
-
- <%= l('timelines.filter.project_time_filter_relative',
- start_label: relative_label_start,
- startspan: relative_text1,
- startspanunit: relative_select1,
- end_label: relative_label_end,
- endspan: relative_text2,
- endspanunit: relative_select2
-
- ).html_safe %>
-
-
-
+
+ <%= ff.label :planning_element_time_absolute_one %>
+ <%= ff.text_field :planning_element_time_absolute_one, label: l('timelines.filter.project_time_filter_historical_from') %>
+ <%= calendar_for :timeline_options_planning_element_time_absolute_one %>
+ <%= ff.text_field :planning_element_time_absolute_two, label: l('timelines.filter.project_time_filter_historical_to') %>
+ <%= calendar_for :timeline_options_planning_element_time_absolute_two %>
+
+ <%= ff.text_field :planning_element_time_relative_one, label: l('timelines.filter.project_time_filter_historical_from') %>
+ <%= calendar_for :timeline_options_planning_element_time_relative_one %>
+ <%= ff.text_field :planning_element_time_relative_two, label: l('timelines.filter.project_time_filter_historical_to') %>
+ <%= calendar_for :timeline_optionsplanning_element_time_relative_two %>
+