1
0

Make sure the album contains photos before displaying the slideshow link.

This commit is contained in:
rWatcher 2011-12-14 23:45:14 -05:00
parent 7aae256e95
commit 92fef908f4
2 changed files with 18 additions and 14 deletions

View File

@ -49,13 +49,15 @@ class minislideshow_event_Core {
static function album_menu($menu, $theme) {
// Add an option to access the slideshow from the album view.
$menu
->append(Menu::factory("link")
->id("minislideshow")
->label(t("View MiniSlide Show"))
->url(url::site("minislideshow/showslideshow/" . $theme->item()->id))
->css_class("g-dialog-link")
->css_id("g-mini-slideshow-link"));
if ($theme->item()->children_count(array(array("type", "=", "photo")))) {
$menu
->append(Menu::factory("link")
->id("minislideshow")
->label(t("View MiniSlide Show"))
->url(url::site("minislideshow/showslideshow/" . $theme->item()->id))
->css_class("g-dialog-link")
->css_id("g-mini-slideshow-link"));
}
}
static function photo_menu($menu, $theme) {

View File

@ -49,13 +49,15 @@ class minislideshow_event_Core {
static function album_menu($menu, $theme) {
// Add an option to access the slideshow from the album view.
$menu
->append(Menu::factory("link")
->id("minislideshow")
->label(t("View MiniSlide Show"))
->url(url::site("minislideshow/showslideshow/" . $theme->item()->id))
->css_class("g-dialog-link")
->css_id("g-mini-slideshow-link"));
if ($theme->item()->children_count(array(array("type", "=", "photo")))) {
$menu
->append(Menu::factory("link")
->id("minislideshow")
->label(t("View MiniSlide Show"))
->url(url::site("minislideshow/showslideshow/" . $theme->item()->id))
->css_class("g-dialog-link")
->css_id("g-mini-slideshow-link"));
}
}
static function photo_menu($menu, $theme) {