%# (C) COPYRIGHT HELP/SYSTEMS, L.L.C. 2009 %>
<%
button_id = "button_close_#{@job_suite.id}"
form_id = "edit_job_suite_#{@job_suite.id}"
@title_section = t('.dialog_title')
@title_section = @title_section + ' ' + t('common.view_only_mode') if @view_only
@title_item = h @job_suite.name
@help_link_anchor = HELP_URL_CONFIG['job_suites']['settings']
%>
<% form_for(@job_suite,
:html => {
:id => form_id,
:class => "edit_job_suite",
:autocomplete => "off",
:onsubmit => "try {helpsys.CntMgr.getController('#{form_id}').submitForm();} catch(e) {console.log(e);};return false;"}) do |form| %>
<% render(
:layout => 'shared/edit_section',
:locals => {
:section_id => "job-general",
:section_title => t('common.general_title')}) do %>
<%= t_label('common.name') %>
<%= h @job_suite.name %>
<%= t_label('common.description') %>
<%= h @job_suite.description %>
<%= t_label("jobs.job.calendar") %>
<%= h @job_suite.calendar.name unless @job_suite.calendar.nil? %>
<%= t_label("jobs.job.timezone_option") %>
<%= h @job_suite.timezone_type_text %>
<%= t_label('common.tags') %>
<%= h @job_suite.tag_list %>
<%= t_label('job_suites.edit_general.variable_base_date_option_select') %>
<%= show_variable_base_date_options(@job_suite.variable_base_date) %>
<% end %>
<%= render(
:partial => 'edit_schedule',
:layout => 'shared/edit_section',
:locals => {
:section_id => "job-schedule",
:section_title => t('.job_schedule'),
:details_only => true}) %>
<% render(
:layout => 'shared/edit_section',
:locals => {
:section_id => "job-exceptions",
:section_title => t('.exception_tab')}) do %>
<%= t_label('job_suites.job_suite.runtime_range_allowed') %>
<%= @job_suite.runtime_range_allowed_text %>
<%= t_label('job_suites.job_suite.non_working_options') %>
<%= @job_suite.non_workday_option_text %>
<%= t('jobs.omit_members')%>
<% job_date_objects = @job_suite.job_date_objects.collect{ |i| i.date_object.name if i.date_object_type == 1} %>
<% job_date_objects = job_date_objects.compact %>
<% if job_date_objects.length == 0 %>
- <%= t('jobs.job.no_date_lists_members')%>
<% else %>
<%= comma_separated_li(job_date_objects) %>
<% end %>
<% end %>
<% render(
:layout => 'shared/edit_section',
:locals => {
:section_id => "job-missed-job",
:section_title => t('job_suites.missed_options_tab')}) do %>
<%= t_label('jobs.missed_job_option.header') %>
<%= show_missed_job_options(@job_suite.missed_action) %>
<% end %>
<% render(
:layout => 'shared/edit_section',
:locals => {
:section_id => "job-control",
:section_title => t('job_suites.control.job_history_purge')}) do %>
<% if @job_suite.system_defaults_for_job_history_purge
label_text = t('jobs.job.using_defaults')
else
if @job_suite.job_history_purge
case @job_suite.job_history_purge_option
when SystemSetting::PURGE_BY_RUNS
label_text = @job_suite.job_history_runs_to_keep == 1 ? t('jobs.job.job_purged_after_run') : t('jobs.job.job_purged_after_runs', :runs => @job_suite.job_history_runs_to_keep)
when SystemSetting::PURGE_BY_DAYS
label_text = @job_suite.job_history_days_to_keep == 1 ? t('jobs.job.job_purged_keep_day') : t('jobs.job.job_purged_keep_days', :days => @job_suite.job_history_days_to_keep)
else
label_text = ""
end
else
label_text = t('jobs.job.job_history_not_purged')
end
end %>
<% end %>
<% if !@view_only %>
<%= button_to_function(t('jobs.job.redirect_edit_member_job_btn'), "try {helpsys.CntMgr.getController('#{form_id}').onRedirectEditMemberJob();} catch(e) {console.log(e);};return false;", :class => "save-button") %>
<% end%>
<%= standard_buttons(button_id) %>
<% end %>