navigation.php 792 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. /**
  3. * Photo navigation
  4. *
  5. * @uses $vars['entity']
  6. */
  7. $photo = $vars['entity'];
  8. $album = $photo->getContainerEntity();
  9. $previous_photo = $album->getPreviousImage($photo->getGUID());
  10. $next_photo = $album->getNextImage($photo->getGUID());
  11. $size = $album->getSize();
  12. $index = $album->getIndex($photo->getGUID());
  13. echo '<ul class="elgg-menu elgg-menu-hz tidypics-album-nav">';
  14. echo '<li>';
  15. echo elgg_view('output/url', array(
  16. 'text' => elgg_view_icon('arrow-left'),
  17. 'href' => $previous_photo->getURL(),
  18. ));
  19. echo '</li>';
  20. echo '<li>';
  21. echo '<span>' . elgg_echo('image:index', array($index, $size)) . '</span>';
  22. echo '</li>';
  23. echo '<li>';
  24. echo elgg_view('output/url', array(
  25. 'text' => elgg_view_icon('arrow-right'),
  26. 'href' => $next_photo->getURL(),
  27. ));
  28. echo '</li>';
  29. echo '</ul>';