_progress.html.haml 1.1 KB

123456789101112131415161718192021222324252627
  1. - progress_index = { rules: 0, details: 1, confirm: 2, confirmed: 3, completed: 4 }[stage.to_sym]
  2. %ol.progress-tracker
  3. %li{ class: progress_index.positive? ? 'completed' : 'active' }
  4. .circle
  5. - if progress_index.positive?
  6. = check_icon
  7. .label= t('auth.progress.rules')
  8. %li.separator{ class: progress_index.positive? ? 'completed' : nil }
  9. %li{ class: [progress_index > 1 && 'completed', progress_index == 1 && 'active'] }
  10. .circle
  11. - if progress_index > 1
  12. = check_icon
  13. .label= t('auth.progress.details')
  14. %li.separator{ class: progress_index > 1 ? 'completed' : nil }
  15. %li{ class: [progress_index > 2 && 'completed', progress_index == 2 && 'active'] }
  16. .circle
  17. - if progress_index > 2
  18. = check_icon
  19. .label= t('auth.progress.confirm')
  20. - if approved_registrations?
  21. %li.separator{ class: progress_index > 2 ? 'completed' : nil }
  22. %li{ class: [progress_index > 3 && 'completed', progress_index == 3 && 'active'] }
  23. .circle
  24. - if progress_index > 3
  25. = check_icon
  26. .label= t('auth.progress.review')