aboutsummaryrefslogtreecommitdiff
path: root/views/default/object/image
diff options
context:
space:
mode:
authorcash <cash.costello@gmail.com>2011-12-11 20:59:29 -0500
committercash <cash.costello@gmail.com>2011-12-11 20:59:29 -0500
commitbe3479085d475428a213868e13e8504e924e32ba (patch)
tree4039eb0fc64185a9531d6b2dd9a135dcca225425 /views/default/object/image
parent67ce751dec9442ccef35bdbe596f9832b3b11c22 (diff)
downloadelgg-be3479085d475428a213868e13e8504e924e32ba.tar.gz
elgg-be3479085d475428a213868e13e8504e924e32ba.tar.bz2
added navigation when viewing full image
Diffstat (limited to 'views/default/object/image')
-rw-r--r--views/default/object/image/full.php13
-rw-r--r--views/default/object/image/navigation.php34
2 files changed, 41 insertions, 6 deletions
diff --git a/views/default/object/image/full.php b/views/default/object/image/full.php
index f866e432d..48ed40876 100644
--- a/views/default/object/image/full.php
+++ b/views/default/object/image/full.php
@@ -46,6 +46,13 @@ $summary = elgg_view_image_block($owner_icon, $list_body, $params);
echo $summary;
+echo '<div class="tidypics-wrapper-photo">';
+echo elgg_view('object/image/navigation', $vars);
+//echo elgg_view('tidypics/tagging/help');
+//echo elgg_view('tidypics/tagging/select', array('photo' => $photo));
+echo $img;
+echo '</div>';
+
if ($photo->description) {
echo elgg_view('output/longtext', array(
'value' => $photo->description,
@@ -53,10 +60,4 @@ if ($photo->description) {
));
}
-echo '<div class="tidypics-wrapper-photo">';
-echo elgg_view('tidypics/tagging/help');
-echo elgg_view('tidypics/tagging/select', array('photo' => $photo));
-echo $img;
-echo '</div>';
-
echo elgg_view_comments($photo);
diff --git a/views/default/object/image/navigation.php b/views/default/object/image/navigation.php
new file mode 100644
index 000000000..155b76364
--- /dev/null
+++ b/views/default/object/image/navigation.php
@@ -0,0 +1,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>';