%# (C) COPYRIGHT HELP/SYSTEMS, L.L.C. 2010 %>
<%
button_id = "button_close_#{@notification_list.id}"
form_id = "edit_notification_list_#{@notification_list.id}"
@title_section = t('notification_lists.dialog_title')
@title_section = @title_section + ' ' + t('common.view_only_mode') if @view_only
@title_item = h @notification_list.name
@help_link_anchor = HELP_URL_CONFIG['scheduling_objects']['notification_lists']['notification_list_settings']
%>
<% form_for @notification_list, :html => {:id => form_id,:class => "edit_notification_list",:autocomplete => "off",
:onsubmit => "try {helpsys.CntMgr.getController('#{form_id}').submitForm();} catch(e) {console.log(e);};return false;"} do |form| %>
<%= hidden_field :notification_list, :public_list, :value=>'1' %>
<% render(:layout => 'shared/edit_section',:locals => {:section_id => "notification-list-general",
:section_title => t('common.general_title')}) do %>
<%= t_label('common.name') %>
<%= h @notification_list.name %>
<%= t_label('common.description')%>
<%= h @notification_list.description %>
<%= t_label('common.tags')%>
<%= h @notification_list.tag_list %>
<% end %>
<% render(:layout => 'shared/edit_section',
:locals => {
:section_id => "notification-list-email-contacts",
:section_title => t('notification_lists.email_contact_heading')}) do %>
<%= t('notification_lists.email_contacts_to_notify')%>
<% if @notification_list.notification_list_users.email_contact.length == 0 %>
- <%= t('notification_lists.no_emails_to_notify')%>
<% else %>
<%= comma_separated_li( Array.new(@notification_list.notification_list_users.email_contact.collect {|i| h (i.notify_contact.nil? ? '' : i.notify_contact.email_address)}.sort) ) %>
<% end %>
<% end %>
<% render(:layout => 'shared/edit_section',
:locals => {
:section_id => "notification-list-users",
:section_title => t('notification_lists.users_heading')}) do %>
<%= t('notification_lists.users_to_notify')%>
<% if @notification_list.notification_list_users.user.length == 0 %>
- <%= t('notification_lists.no_users_to_notify')%>
<% else %>
<%= comma_separated_li( Array.new(@notification_list.notification_list_users.user.collect {|i| h i.notify_contact.name + ' (' + i.notify_contact.username + ')'}.sort {|a,b| a.upcase <=> b.upcase}) ) %>
<% end %>
<% end %>
<%= standard_buttons(button_id) %>
<% end %>