h1= t 'dunlop.reports.title'
ul
  - if can? :report, :system
    li
      h4= t('dunlop.reports.system.title')
      ul
        li= link_to t('dunlop.reports.system.workflow_instance_workflow_steps.title', workflow_instance: WorkflowInstance.model_name.human), %i[reports system workflow_instance_workflow_steps]
        li= link_to t('dunlop.reports.system.workflow_instance_fields.title'), %i[reports system workflow_instance_fields]
        li= link_to t('dunlop.reports.system.workflow_steps_in_batch_finished.title'), %i[reports system workflow_steps_in_batch_finished]
        - if Dunlop::OverdueHandling.registry.present?
          li= link_to t('dunlop.reports.system.workflow_steps_overdue.title'), %i[reports system workflow_steps_overdue]
        - if can? :manage, User
          li= link_to t('dunlop.reports.users_permissions_table.title'), dunlop.permissions_table_users_path
        /li= link_to 'WorkflowInstance workflow_steps', %i[reports system workflow_instance_workflow_steps]
        /li= link_to 'WorkflowStep scenarios', %i[reports system workflow_step_scenarios]
hr
.row
  .small-12.columns
    table
      tbody
        tr
          th= t 'dunlop.statistics.overall.total_count'
          td= WorkflowInstance.count
        tr
          th= t 'dunlop.statistics.overall.active_count'
          td= WorkflowInstance.active.count
        tr
          th= t 'dunlop.statistics.overall.archived_count'
          td= WorkflowInstance.archived.count

