diff --git a/src/html/assets/themes/beisel2.0/templates/photo-details.php b/src/html/assets/themes/beisel2.0/templates/photo-details.php index 1084cf335..dfcb06cf0 100644 --- a/src/html/assets/themes/beisel2.0/templates/photo-details.php +++ b/src/html/assets/themes/beisel2.0/templates/photo-details.php @@ -132,6 +132,11 @@ user->isOwner()) { ?> Edit details + 0) { ?> + + " class=""invert"> utility->safe($album['name']); ?> + + 0) { ?>
diff --git a/src/libraries/controllers/PhotoController.php b/src/libraries/controllers/PhotoController.php index 0310a6581..2f14f4aab 100644 --- a/src/libraries/controllers/PhotoController.php +++ b/src/libraries/controllers/PhotoController.php @@ -252,10 +252,24 @@ public function view($id, $options = null) $photo = $apiResp['result']; $this->plugin->setData('photo', $photo); $this->plugin->setData('page', 'photo-detail'); + $photo['previous'] = isset($apiNextPrevious['result']['previous']) ? $apiNextPrevious['result']['previous'] : null; $photo['next'] = isset($apiNextPrevious['result']['next']) ? $apiNextPrevious['result']['next'] : null; + + // Get album details + $db = getDb(); + $albums = array(); + foreach ($photo['albums'] as $albumId) + { + $album = $db->getAlbum($albumId, $photo['owner']); + if ($album) + { + $albums[] = array('id' => $album['id'], 'name' => $album['name']); + } + } + $crumb = $this->session->get('crumb'); - $body = $this->theme->get($this->utility->getTemplate('photo-details.php'), array('photo' => $photo, 'crumb' => $crumb, 'options' => $options)); + $body = $this->theme->get($this->utility->getTemplate('photo-details.php'), array('photo' => $photo, 'crumb' => $crumb, 'options' => $options, 'albums' => $albums)); $this->theme->display($this->utility->getTemplate('template.php'), array('body' => $body, 'page' => 'photo-details')); } else