aboutsummaryrefslogtreecommitdiff
path: root/views/_alerts_table.haml
diff options
context:
space:
mode:
authorPatrick J Cherry <patrick@bytemark.co.uk>2012-05-01 16:11:51 +0100
committerPatrick J Cherry <patrick@bytemark.co.uk>2012-05-01 16:11:51 +0100
commit9caa15360effe79b84197fd68fc22996b64e35aa (patch)
tree5b49819eb94bbd80d90d6fbf1d86be895e6e20ef /views/_alerts_table.haml
parent2e5b3be3a89e54a986608c37d1093e17356b7e5c (diff)
Updated views to be neater with respect to notice/errors and in the case when no
alerts are found in a table.
Diffstat (limited to 'views/_alerts_table.haml')
-rw-r--r--views/_alerts_table.haml9
1 files changed, 8 insertions, 1 deletions
diff --git a/views/_alerts_table.haml b/views/_alerts_table.haml
index 40b2b1c..ed759be 100644
--- a/views/_alerts_table.haml
+++ b/views/_alerts_table.haml
@@ -11,7 +11,14 @@
});
%th#summary Summary
%th#time At
- = partial("alerts_table_group", :collection => @grouped_alerts)
+ - if @grouped_alerts.length > 0
+ = partial("alerts_table_group", :collection => @grouped_alerts)
+ - else
+ %tr{:class => %w(notice)}
+ %td
+ %td{:style => "text-align: center;"}
+ = "No #{@alert_type} alerts found!"
+ %td
%tr
%td{ :colspan => 3}
%address