aboutsummaryrefslogtreecommitdiff
path: root/mod/lightpics/views/default/object/image/navigation.php
blob: 155b76364dd14a76995ec5f8e4cda9c8e5b8c887 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
/**
 * Photo navigation
 *
 * @uses $vars['entity']
 */

$photo = $vars['entity'];

$album = $photo->getContainerEntity();
$previous_photo = $album->getPreviousImage($photo->getGUID());
$next_photo = $album->getNextImage($photo->getGUID());
$size = $album->getSize();
$index = $album->getIndex($photo->getGUID());

echo '<ul class="elgg-menu elgg-menu-hz tidypics-album-nav">';
echo '<li>';
echo elgg_view('output/url', array(
	'text' => elgg_view_icon('arrow-left'),
	'href' => $previous_photo->getURL(),
));
echo '</li>';

echo '<li>';
echo '<span>' . elgg_echo('image:index', array($index, $size)) . '</span>';
echo '</li>';

echo '<li>';
echo elgg_view('output/url', array(
	'text' => elgg_view_icon('arrow-right'),
	'href' => $next_photo->getURL(),
));
echo '</li>';
echo '</ul>';