aboutsummaryrefslogtreecommitdiff
path: root/views/_history.haml
blob: a3991136f798d7c7e1e879a47df2f4868c819a92 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
- if @today.nil? or %w(day month year).any?{|s| @today.send(s) != history.created_at.send(s)}
  %h2
    = history.created_at.strftime("%a %d %b %Y")
%p
  = history.created_at.strftime("%R")
  - (history.cached_alerts.empty? ? history.alerts : history.cached_alerts).each do |alert|
    %a{ :href => self.class.url_for(alert) } 
      = alert.id
      %strong
        = alert.subject
    = alert.summary
    - if alert.source != alert.subject 
      = "(from #{alert.source})"
  = history.event
  - if history.user
    = "by #{history.user}"
  - @today = Date.new(history.created_at.year, history.created_at.month, history.created_at.day)