_progress.html.haml 934 B

12345678910111213141516171819202122232425
  1. - progress_index = { rules: 0, details: 1, confirm: 2 }[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
  23. .circle
  24. .label= t('auth.progress.review')