From 9f6bee75108f08463516bce554b76faf56e2122f Mon Sep 17 00:00:00 2001 From: Patrick J Cherry Date: Tue, 1 May 2012 14:32:37 +0100 Subject: Updated history partial to be better. --- views/_history.haml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'views/_history.haml') diff --git a/views/_history.haml b/views/_history.haml index 61bcf59..03d02d7 100644 --- a/views/_history.haml +++ b/views/_history.haml @@ -4,7 +4,12 @@ %p = history.created_at.strftime("%R") - history.alerts.each do |alert| - = alert.subject + %a{ :href => url_for(alert) } + = alert.id + %strong + = alert.subject = alert.summary + - if alert.source != alert.subject + = "-- from #{alert.source} = history.event - @today = history.created_at -- cgit v1.2.1 From 9caa15360effe79b84197fd68fc22996b64e35aa Mon Sep 17 00:00:00 2001 From: Patrick J Cherry Date: Tue, 1 May 2012 16:11:51 +0100 Subject: Updated views to be neater with respect to notice/errors and in the case when no alerts are found in a table. --- views/_history.haml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'views/_history.haml') diff --git a/views/_history.haml b/views/_history.haml index 03d02d7..cfeec51 100644 --- a/views/_history.haml +++ b/views/_history.haml @@ -4,12 +4,14 @@ %p = history.created_at.strftime("%R") - history.alerts.each do |alert| - %a{ :href => url_for(alert) } + %a{ :href => self.class.url_for(alert) } = alert.id - %strong - = alert.subject + %strong + = alert.subject = alert.summary - if alert.source != alert.subject - = "-- from #{alert.source} + = "(from #{alert.source})" = history.event + - if history.user + = "by #{history.user}" - @today = history.created_at -- cgit v1.2.1