summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-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) {