- if @incident.errors.present?
  #error_explanation
    %ul
      - @incident.errors.full_messages.each do |message|
        %li= message
%h1
  - if @incident.completed?
    Editing
  - else
    Completing
  Incident Report
- if @current_user == @incident.driver || @current_user.staff?
  %h2 Driver Report
  = render 'incident_reports/form',
    report: @incident.driver_incident_report
- if @incident.supervisor.present?
  - if @current_user == @incident.supervisor || @current_user.staff?
    %h2 Supervisor Account of Incident
    = render 'incident_reports/form',
      report: @incident.supervisor_incident_report
    %h2 Supervisor Report
    = render 'supervisor_reports/form',
      report: @incident.supervisor_report
- else
  %h3 Assign a supervisor...
  = render 'incidents/add_supervisor', incident: @incident
- if @current_user.staff?
  %h2 Incident Details
  = render 'incidents/form', incident: @incident
= link_to 'Show', @incident
|
= link_to 'Back', incidents_url

- if @incident.errors.present?
  #error_explanation
    %ul
      - @incident.errors.full_messages.each do |message|
        %li= message
%h1
  - if @incident.completed?
    Editing
  - else
    Completing
  Incident Report
- if @current_user.staff?
  %h2 Incident Details
  = render 'incidents/form', incident: @incident
- if @current_user == @incident.driver || @current_user.staff?
  %h2 Driver Report
  = render 'incident_reports/form',
    report: @incident.driver_incident_report
- if @incident.supervisor.present?
  - if @current_user == @incident.supervisor || @current_user.staff?
    %h2 Supervisor Account of Incident
    = render 'incident_reports/form',
      report: @incident.supervisor_incident_report
    %h2 Supervisor Report
    = render 'supervisor_reports/form',
      report: @incident.supervisor_report
- else
  %h3 Assign a supervisor...
  = render 'incidents/add_supervisor', incident: @incident
= link_to 'Show', @incident
|
= link_to 'Back', incidents_url

Move incident details to the top
Move incident details to the top
