.header
  %h2
    = render 'report_title', :report => report
  - unless SETTINGS.enable_read_only_mode
    %ul.actions
      - Registry.each_callback :report, :actions do |thing|
        = thing.call self, report
      %li= link_to 'Delete', report, :confirm => 'Are you sure?', :method => :delete, :class => "delete button"

.item
  - user_facing = Hash.new { |hash, key| hash[key] = key[/[a-z].*/i].titleize }
  - user_facing.update '800_resource_statuses' => 'Events'
  - panels = []
  %ul#report-tabs.tabbed
    - Registry.each_callback :core, :report_view_widgets do |name, widget|
      - panels << capture_haml do
        %div.panel(id="#{user_facing[name].downcase}")
          = widget.call self, report
      %li(id="#{user_facing[name].downcase}-tab")
        %a= user_facing[name]
  = panels

- Registry.each_callback :report, :tail do |thing|
  = thing.call self, report
