sidebar.php 530 B

123456789101112131415161718192021222324252627
  1. <?php
  2. /**
  3. * Install sidebar
  4. *
  5. * @uses $vars['step'] Current step
  6. * @uses $vars['steps'] Array of steps
  7. */
  8. $current_step = $vars['step'];
  9. $steps = $vars['steps'];
  10. $current_step_index = array_search($current_step, $steps);
  11. echo '<ol>';
  12. foreach ($steps as $index => $step) {
  13. if ($index < $current_step_index) {
  14. $class = 'past';
  15. } elseif ($index == $current_step_index) {
  16. $class = 'present';
  17. } else {
  18. $class = 'future';
  19. }
  20. $text = elgg_echo("install:$step");
  21. echo "<li class=\"$class\">$text</li>";
  22. }
  23. echo '</ol>';