.section
  - if report.resource_statuses.present?
    - index = 0
    %h4
      %a{ :href => '#', :class => 'expand-all' } Expand all
    .section
      %dl.expandable-list
        - statuses.each do |status, resources|
          %h3 #{status.titleize} (#{resources.count})
          - resources.each do |status|
            - index += 1
            %dt{:class => cycle( 'odd', 'even' )}
              - if status.events.empty?
                %span{:class => 'non-expandable-bullet'}= status.name
              - else
                = link_to h(status.name), {}, {:class => 'expandable-link collapsed-link', :id => "expand-#{index}"}
              - if status.file or status.line
                = "(#{status.file}:#{status.line})"
            %dd.expandable.collapsed{:id => "expandable-#{index}"}
              %table
                %tr
                  %th Property
                  %th Message
                - status.events.each do |event|
                  %tr{:class => "status #{event.status}"}
                    %td= event.property
                    %td= popup_md5s( h(event.message), :exclude_md5s => [event.desired_value])
          %br
  - else
    %h3 Events
    %p= describe_no_matches_for(:events, :report)
