|
|
|
@ -33,42 +33,27 @@ See doc/COPYRIGHT.rdoc for more details. |
|
|
|
|
</legend> |
|
|
|
|
|
|
|
|
|
<div style="display:none;"> |
|
|
|
|
<div> |
|
|
|
|
<p class="tl-form-overflow"> |
|
|
|
|
<%= label_tag :timeline_options_exclude_reporters, |
|
|
|
|
l('timelines.filter.exclude_reporters') %> |
|
|
|
|
|
|
|
|
|
<%= check_box_tag("timeline[options][exclude_reporters]", |
|
|
|
|
:yes, |
|
|
|
|
timeline.options["exclude_reporters"].present?) %> |
|
|
|
|
</p> |
|
|
|
|
|
|
|
|
|
<p class="tl-form-overflow"> |
|
|
|
|
<%= label_tag :timeline_options_exclude_empty, |
|
|
|
|
l('timelines.filter.exclude_empty') %> |
|
|
|
|
|
|
|
|
|
<%= check_box_tag("timeline[options][exclude_empty]", |
|
|
|
|
:yes, |
|
|
|
|
timeline.options["exclude_empty"].present?) %> |
|
|
|
|
</p> |
|
|
|
|
|
|
|
|
|
<p class="tl-form-overflow"> |
|
|
|
|
<%= label_tag 'timeline_options_project_types', |
|
|
|
|
l("timelines.filter.project_types") %> |
|
|
|
|
<%= f.fields_for :options, timeline_options do |ff| %> |
|
|
|
|
<div class="form--field"> |
|
|
|
|
<%= ff.check_box :exclude_reporters, label: l('timelines.filter.exclude_reporters') %> |
|
|
|
|
</div> |
|
|
|
|
<div class="form--field"> |
|
|
|
|
<%= ff.check_box :exclude_empty, label: l('timelines.filter.exclude_empty') %> |
|
|
|
|
</div> |
|
|
|
|
<div class="form--field"> |
|
|
|
|
<% if User.current.impaired? %> |
|
|
|
|
<%= select("timeline[options]", |
|
|
|
|
:project_types, |
|
|
|
|
<%= ff.select :project_types, |
|
|
|
|
filter_select_with_none( |
|
|
|
|
timeline.available_project_types, |
|
|
|
|
:name, :id), |
|
|
|
|
{:selected => timeline.selected_project_types.map(&:id)}, |
|
|
|
|
{:multiple => true, |
|
|
|
|
:size => 12}) %> |
|
|
|
|
:name, :id |
|
|
|
|
), |
|
|
|
|
{ selected: timeline.selected_project_types.map(&:id), label: l("timelines.filter.project_types") }, |
|
|
|
|
multiple: true |
|
|
|
|
%> |
|
|
|
|
<% else %> |
|
|
|
|
<%= select("timeline[options]", |
|
|
|
|
:project_types, |
|
|
|
|
<%= ff.select(:project_types, |
|
|
|
|
options_for_select([]), |
|
|
|
|
{}, |
|
|
|
|
{ label: l("timelines.filter.project_types") }, |
|
|
|
|
{ :'data-ajaxURL' => api_v2_paginate_project_types_path, |
|
|
|
|
:multiple => true, |
|
|
|
|
:'data-selected' => filter_select( |
|
|
|
@ -76,27 +61,20 @@ See doc/COPYRIGHT.rdoc for more details. |
|
|
|
|
:name, :id).to_json |
|
|
|
|
}) %> |
|
|
|
|
<% end %> |
|
|
|
|
|
|
|
|
|
</p> |
|
|
|
|
|
|
|
|
|
<p class="tl-form-overflow"> |
|
|
|
|
<%= label_tag 'timeline_options_project_status', |
|
|
|
|
l("timelines.filter.project_status") %> |
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
|
<div class="form--field"> |
|
|
|
|
<% if User.current.impaired? %> |
|
|
|
|
<%= select("timeline[options]", |
|
|
|
|
:project_status, |
|
|
|
|
<%= ff.select(:project_status, |
|
|
|
|
filter_select_with_none( |
|
|
|
|
timeline.available_project_status, |
|
|
|
|
:name, :id), |
|
|
|
|
{:selected => timeline.selected_project_status.map(&:id)}, |
|
|
|
|
{:selected => timeline.selected_project_status.map(&:id), label: l("timelines.filter.project_status") }, |
|
|
|
|
{:multiple => true, |
|
|
|
|
:size => 12}) %> |
|
|
|
|
<% else %> |
|
|
|
|
<%= select("timeline[options]", |
|
|
|
|
:project_status, |
|
|
|
|
<%= ff.select(:project_status, |
|
|
|
|
options_for_select([]), |
|
|
|
|
{}, |
|
|
|
|
{ label: l("timelines.filter.project_status") }, |
|
|
|
|
{ :'data-ajaxURL' => api_v2_paginate_reported_project_statuses_path, |
|
|
|
|
:multiple => true, |
|
|
|
|
:'data-selected' => filter_select( |
|
|
|
@ -104,25 +82,20 @@ See doc/COPYRIGHT.rdoc for more details. |
|
|
|
|
:name, :id).to_json |
|
|
|
|
}) %> |
|
|
|
|
<% end %> |
|
|
|
|
</p> |
|
|
|
|
<p class="tl-form-overflow"> |
|
|
|
|
<%= label_tag 'timeline_options_project_responsibles', |
|
|
|
|
l("timelines.filter.project_responsible") %> |
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
|
<div class="form--field"> |
|
|
|
|
<% if User.current.impaired? %> |
|
|
|
|
<%= select("timeline[options]", |
|
|
|
|
:project_responsibles, |
|
|
|
|
<%= ff.select(:project_responsibles, |
|
|
|
|
filter_select_with_none( |
|
|
|
|
timeline.available_responsibles, |
|
|
|
|
:name, :id), |
|
|
|
|
{:selected => timeline.selected_project_responsibles.map(&:id)}, |
|
|
|
|
{:selected => timeline.selected_project_responsibles.map(&:id), label: l("timelines.filter.project_responsible") }, |
|
|
|
|
{:multiple => true, |
|
|
|
|
:size => 12}) %> |
|
|
|
|
<% else %> |
|
|
|
|
<%= select("timeline[options]", |
|
|
|
|
:project_responsibles, |
|
|
|
|
<%= ff.select(:project_responsibles, |
|
|
|
|
options_for_select([]), |
|
|
|
|
{}, |
|
|
|
|
{ label: l("timelines.filter.project_responsible") }, |
|
|
|
|
{ :'data-ajaxURL' => api_v2_paginate_users_path, |
|
|
|
|
:multiple => true, |
|
|
|
|
:'data-selected' => filter_select( |
|
|
|
@ -130,26 +103,20 @@ See doc/COPYRIGHT.rdoc for more details. |
|
|
|
|
:name, :id).to_json |
|
|
|
|
}) %> |
|
|
|
|
<% end %> |
|
|
|
|
</p> |
|
|
|
|
|
|
|
|
|
<p class="tl-form-overflow"> |
|
|
|
|
<%= label_tag 'timeline_options_parents', |
|
|
|
|
l("timelines.filter.parent") %> |
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
|
<div class="form--field"> |
|
|
|
|
<% if User.current.impaired? %> |
|
|
|
|
<%= select("timeline[options]", |
|
|
|
|
:parents, |
|
|
|
|
<%= ff.select(:parents, |
|
|
|
|
filter_select_with_none( |
|
|
|
|
timeline.available_parents, |
|
|
|
|
:name, :id), |
|
|
|
|
{:selected => timeline.selected_parents.map(&:id)}, |
|
|
|
|
{:selected => timeline.selected_parents.map(&:id), label: l("timelines.filter.parent") }, |
|
|
|
|
{:multiple => true, |
|
|
|
|
:size => 12}) %> |
|
|
|
|
<% else %> |
|
|
|
|
<%= select("timeline[options]", |
|
|
|
|
:parents, |
|
|
|
|
<%= ff.select(:parents, |
|
|
|
|
options_for_select([]), |
|
|
|
|
{}, |
|
|
|
|
{ label: l("timelines.filter.parent") }, |
|
|
|
|
{ :'data-ajaxURL' => api_v2_paginate_projects_path, |
|
|
|
|
:multiple => true, |
|
|
|
|
:'data-selected' => filter_select( |
|
|
|
@ -157,24 +124,21 @@ See doc/COPYRIGHT.rdoc for more details. |
|
|
|
|
:name, :id).to_json |
|
|
|
|
}) %> |
|
|
|
|
<% end %> |
|
|
|
|
</p> |
|
|
|
|
<p class="tl-form-overflow"> |
|
|
|
|
<%= label_tag 'timeline_options_planning_element_time_types', |
|
|
|
|
l('timelines.filter.project_time_filter') %> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div class="form--field"> |
|
|
|
|
<% if User.current.impaired? %> |
|
|
|
|
<%= select("timeline[options]", |
|
|
|
|
:planning_element_time_types, |
|
|
|
|
<%= 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 %> |
|
|
|
|
</p> |
|
|
|
|
|
|
|
|
|
<p class="tl-form-overflow"> |
|
|
|
|
<%= 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 %> |
|
|
|
|
</p> |
|
|
|
|
|
|
|
|
|
<p class="tl-form-overflow"> |
|
|
|
|
|
|
|
|
|
<%= 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 %> |
|
|
|
|
|
|
|
|
|
</p> |
|
|
|
|
</div> |
|
|
|
|
<h4><%= l('timelines.filter.project_time_filter_absolute_timeframe') %></h4> |
|
|
|
|
<div class="form--field"> |
|
|
|
|
<%= ff.radio_button :planning_element_time, 'absolute' %> |
|
|
|
|
</div> |
|
|
|
|
<div class="form--field-container"> |
|
|
|
|
<%= 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 %> |
|
|
|
|
</div> |
|
|
|
|
<h4><%= l('timelines.filter.project_time_filter_relative_timeframe') %></h4> |
|
|
|
|
<div class="form--field"> |
|
|
|
|
<%= ff.radio_button :planning_element_time, 'relative' %> |
|
|
|
|
</div> |
|
|
|
|
<div class="form--field-container"> |
|
|
|
|
<%= 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 %> |
|
|
|
|
</div> |
|
|
|
|
<% end %> |
|
|
|
|
</div> |
|
|
|
|
</fieldset> |
|
|
|
|