<%# (C) COPYRIGHT HELP/SYSTEMS, L.L.C. 2011 %> <% form_id = "where_used_notification_list_#{@notification_list.id}" button_id = "button_close_#{@notification_list.id}" @title_section = t('common.new_where_used_title', :type => t('common.notification_list')) @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']['where_used'] %> <% render(:layout => 'shared/edit_section',:locals => {:section_id => "where-used-agents", :section_title => t(".agent_title")}) do %> <%= t('notification_lists.whereused.assigned_agents_text', :count => @notification_list.agents.count) if @notification_list.agents.count > 1 || @notification_list.agents.count == 0 %> <%= t('notification_lists.whereused.assigned_agent_text', :count => @notification_list.agents.count) if @notification_list.agents.count == 1 %> <% end %> <% render(:layout => 'shared/edit_section',:locals => {:section_id => "where-used-agent-event-monitors", :section_title => t(".agent_event_monitor_title")}) do %> <%= t('notification_lists.whereused.assigned_agent_event_monitors_text', :count => @notification_list.agent_event_monitors.count) if @notification_list.agent_event_monitors.count > 1 || @notification_list.agent_event_monitors.count == 0 %> <%= t('notification_lists.whereused.assigned_agent_event_monitor_text', :count => @notification_list.agent_event_monitors.count) if @notification_list.agent_event_monitors.count == 1 %> <% end %> <% render(:layout => 'shared/edit_section',:locals => {:section_id => "where-used-job-monitors", :section_title => t(".job_monitor_title")}) do %> <%= t('notification_lists.whereused.assigned_job_monitors_text', :count => @notification_list.job_monitor_count) if @notification_list.job_monitor_count > 1 || @notification_list.job_monitor_count == 0 %> <%= t('notification_lists.whereused.assigned_job_monitor_text', :count => @notification_list.job_monitor_count) if @notification_list.job_monitor_count == 1 %> <% end %> <% render(:layout => 'shared/edit_section',:locals => {:section_id => "where-used-jobs", :section_title => t(".job_status_notification_title")}) do %> <% notification_list_job_count = @notification_list.job_status_notification_count %> <%= t('notification_lists.whereused.assigned_job_status_notifications_text', :count => notification_list_job_count) if notification_list_job_count > 1 || notification_list_job_count == 0 %> <%= t('notification_lists.whereused.assigned_job_status_notification_text', :count => notification_list_job_count) if notification_list_job_count == 1 %> <% end %> <% render(:layout => 'shared/edit_section',:locals => {:section_id => "where-used-output-distributions", :section_title => t(".output_distribution_title")}) do %> <% od_count = Job.count(:select => "DISTINCT jobs.id", :joins => "left join output_distributions on jobs.id = output_distributions.job_id", :conditions => "(output_distributions.notification_list_id = #{@notification_list.id} or jobs.email_notification_list_id = #{@notification_list.id})") %> <%= t('notification_lists.whereused.assigned_output_distribution_notifications_text', :count => od_count) if od_count > 1 || od_count == 0 %> <%= t('notification_lists.whereused.assigned_output_distribution_notification_text', :count => od_count) if od_count == 1 %> <% end %> <% render(:layout => 'shared/edit_section',:locals => {:section_id => "where-used-job-suite-monitors", :section_title => t(".job_suite_monitor_title")}) do %> <%= t('notification_lists.whereused.assigned_job_suite_monitors_text', :count => @notification_list.job_suite_monitor_count) if @notification_list.job_suite_monitor_count > 1 || @notification_list.job_suite_monitor_count == 0 %> <%= t('notification_lists.whereused.assigned_job_suite_monitor_text', :count => @notification_list.job_suite_monitor_count) if @notification_list.job_suite_monitor_count == 1 %> <% end %> <% render(:layout => 'shared/edit_section',:locals => {:section_id => "where-used-job-suites", :section_title => t(".job_suite_status_notification_title")}) do %> <% notification_list_job_suite_count = @notification_list.job_suite_status_notification_count %> <%= t('notification_lists.whereused.assigned_job_suite_status_notifications_text', :count => notification_list_job_suite_count) if notification_list_job_suite_count > 1 || notification_list_job_suite_count == 0 %> <%= t('notification_lists.whereused.assigned_job_suite_status_notification_text', :count => notification_list_job_suite_count) if notification_list_job_suite_count == 1 %> <% end %> <% render(:layout => 'shared/edit_section',:locals => {:section_id => "where-used-member-job-monitors", :section_title => t(".member_job_monitor_title")}) do %> <%= t('notification_lists.whereused.assigned_member_job_monitors_text', :count => @notification_list.member_job_monitor_count) if @notification_list.member_job_monitor_count > 1 || @notification_list.member_job_monitor_count == 0 %> <%= t('notification_lists.whereused.assigned_member_job_monitor_text', :count => @notification_list.member_job_monitor_count) if @notification_list.member_job_monitor_count == 1 %> <% end %> <% render(:layout => 'shared/edit_section',:locals => {:section_id => "where-used-member-jobs", :section_title => t(".member_job_status_notification_title")}) do %> <% notification_list_member_job_count = @notification_list.member_job_status_notification_count %> <%= t('notification_lists.whereused.assigned_member_job_status_notifications_text', :count => notification_list_member_job_count) if notification_list_member_job_count > 1 || notification_list_member_job_count == 0 %> <%= t('notification_lists.whereused.assigned_member_job_status_notification_text', :count => notification_list_member_job_count) if notification_list_member_job_count == 1 %> <% end %> <% render(:layout => 'shared/edit_section',:locals => {:section_id => "where-used-member-job-output-distributions", :section_title => t(".member_job_output_distribution_title")}) do %> <% od_count = MemberJob.count(:select => "DISTINCT jobs.id", :joins => "left join output_distributions on jobs.id = output_distributions.job_id", :conditions => "(output_distributions.notification_list_id = #{@notification_list.id} or jobs.email_notification_list_id = #{@notification_list.id})") %> <%= t('notification_lists.whereused.assigned_output_distribution_notifications_text', :count => od_count) if od_count > 1 || od_count == 0 %> <%= t('notification_lists.whereused.assigned_output_distribution_notification_text', :count => od_count) if od_count == 1 %> <% end %> <% render(:layout => 'shared/edit_section',:locals => {:section_id => "where-used-snmp-traps", :section_title => t(".snmp_trap_monitor_title")}) do %> <%= t('notification_lists.whereused.assigned_snmp_trap_monitors_text', :count => @notification_list.snmp_trap_monitors.count) if @notification_list.snmp_trap_monitors.count > 1 || @notification_list.snmp_trap_monitors.count == 0 %> <%= t('notification_lists.whereused.assigned_snmp_trap_monitor_text', :count => @notification_list.snmp_trap_monitors.count) if @notification_list.snmp_trap_monitors.count == 1 %> <% end %> <% render(:layout => 'shared/edit_section',:locals => {:section_id => "where-used-notification-list", :section_title => t(".switch_section")}) do %> <%= t('notification_lists.whereused.switch_section_preview') %> <% end %>
<%= button_to_function(t('common.close'), "window.open('#{url_for(:action => 'index')}', '_self');") %>