<%# (C) COPYRIGHT HELP/SYSTEMS, L.L.C. 2010 %> <% button_id = "button_close_#{@calendar.id}" form_id = "edit_calendar_#{@calendar.id}" @title_section = @calendar.fiscal? ? t('.fiscal_title') : t('.title') @title_section = @title_section + ' ' + t('common.view_only_mode') if @view_only @title_item = h @calendar.name if @calendar.fiscal? @help_link_anchor = HELP_URL_CONFIG['scheduling_objects']['calendar_objects']['fiscal_calendar_settings'] else @help_link_anchor = HELP_URL_CONFIG['scheduling_objects']['calendar_objects']['standard_calendar_settings'] end %> <% form_for @calendar, :html => {:id => form_id,:class => "edit_calendar",: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 => "settings-general", :section_title => t('common.general_title')}) do %>

<%= t_label('common.name') %>

<%= h @calendar.name %>

<%= t_label('common.description')%>

<%= h @calendar.description %>

<%= t_label('common.tags')%>

<%= h @calendar.tag_list %>

<%= t_label('calendars.notify_expiration') %>

<%= h @calendar.notify_before_expiration? ? t('common.key_yes') : t('common.key_no') %>

<% end %> <% render(:layout => 'shared/edit_section',:locals => {:section_id => "settings-workdays", :section_title => t('calendars.work_days_of_the_week')}) do %>

<%= t_label 'calendars.working_days' %>

<%= @calendar.working_days %>

<% end %> <%= render( :partial => 'edit_periods', :layout => 'shared/edit_section', :locals => { :section_id => "calendar-periods", :section_title => t('calendars.calendar_periods'), :details_only => true}) if @calendar.fiscal %> <% render(:layout => 'shared/edit_section',:locals => {:section_id => "settings-nonworkdays", :section_title => t('calendars.nonworkdays')}) do %>

<%= t "calendars.no_nonwork_days" if @sorted_array.length == 0 %> <%= t("calendars.one_nonwork_day", :date => @sorted_array.first.nonwork_date.to_s) if @sorted_array.length == 1 %> <%= t("calendars.range_nonwork_days", :length => @sorted_array.length.to_s, :start_date => @sorted_array.first.nonwork_date.to_s, :end_date => @sorted_array.last.nonwork_date.to_s) if @sorted_array.length > 1 %>

<% end %>
<%= standard_buttons(button_id) %>
<% end %>