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