blob: 650737785a9c85b01d4a022fce446febf9c3ac40 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
-# Sanity checking.
- group, alerts = alerts_table_group unless alerts_table_group.nil?
- if alerts.length <= 2
=partial("alerts_table_alert_summary", :collection => alerts)
- else
=partial("alerts_table_alert_summary", :collection => [alerts.first])
=partial("alerts_table_alert_summary", :collection => alerts[1..-1], :locals => {:row_class => ["hidden"]})
%tr{:id => ["tr","group",group]}
%td
%td{:colspan => 2}
There are
%a{:onclick => alerts[1..-1].collect{|a| "$('#tr_summary_#{a.id}').toggle();"}.join + " return false;", :href => "#"}
=alerts.length - 1
more alerts
for the #{@group_by} <em>#{group}</em>.
|