summaryrefslogtreecommitdiff
path: root/modules/slideshow/helpers
diff options
context:
space:
mode:
authorChad Kieffer <ckieffer@gmail.com>2009-08-28 13:48:54 -0600
committerChad Kieffer <ckieffer@gmail.com>2009-08-28 13:48:54 -0600
commit5a2853bca1ea9a9231e01814df9aa373bf50d19c (patch)
tree431264bfb9de1d8bbdc6a9ba7775a363381f96e8 /modules/slideshow/helpers
parentf1e008a14f2dfb51d1204dad3deb19e2e3df16c8 (diff)
parent6dcfdb6432d556f43736d60de8f310f247868bfa (diff)
Merge branch 'master' of git@github.com:gallery/gallery3
Diffstat (limited to 'modules/slideshow/helpers')
-rw-r--r--modules/slideshow/helpers/slideshow_event.php18
1 files changed, 11 insertions, 7 deletions
diff --git a/modules/slideshow/helpers/slideshow_event.php b/modules/slideshow/helpers/slideshow_event.php
index cf79f71a..1b881de4 100644
--- a/modules/slideshow/helpers/slideshow_event.php
+++ b/modules/slideshow/helpers/slideshow_event.php
@@ -31,13 +31,17 @@ class slideshow_event_Core {
}
static function album_menu($menu, $theme) {
- $menu
- ->append(Menu::factory("link")
- ->id("slideshow")
- ->label(t("View slideshow"))
- ->url("javascript:PicLensLite.start(" .
- "{maxScale:0,feedUrl:PicLensLite.indexFeeds()[0].url})")
- ->css_id("gSlideshowLink"));
+ $descendants_count = ORM::factory("item", $theme->item->id)
+ ->descendants_count(array("type" => "photo"));
+ if ($descendants_count > 1) {
+ $menu
+ ->append(Menu::factory("link")
+ ->id("slideshow")
+ ->label(t("View slideshow"))
+ ->url("javascript:PicLensLite.start(" .
+ "{maxScale:0,feedUrl:PicLensLite.indexFeeds()[0].url})")
+ ->css_id("gSlideshowLink"));
+ }
}
static function photo_menu($menu, $theme) {