- t_scope = 'dunlop.reports.system.workflow_steps_overdue'
= page_title t('title', scope: t_scope)
ul
- Dunlop::OverdueHandling.registry.each do |workflow_step_name, config|
  - workflow_step = workflow_step_name.to_s.classify.constantize
  - date = config.date_target_class.human_attribute_name(config.date_target_column)
  - if config.from.is_nested?
    - date = [config.date_target_class.model_name.human, date].join(' &rarr; ')
  - t_args = {scope: t_scope, workflow_step: workflow_step.model_name.human, date: date}
  - if config.time < 0
    li== t('before_date', t_args.merge(time: human_duration(config.time).gsub('-', '')))
  - elsif config.time.zero?
    li== t('on_date', t_args)
  - else
    li== t('after_date', t_args.merge(time: human_duration(config.time)))
.page-actions
  = link_to 'Back', reports_root_path, class: 'back'
