Make sure the album contains photos before displaying the slideshow link.
This commit is contained in:
parent
7aae256e95
commit
92fef908f4
|
@ -49,13 +49,15 @@ class minislideshow_event_Core {
|
||||||
|
|
||||||
static function album_menu($menu, $theme) {
|
static function album_menu($menu, $theme) {
|
||||||
// Add an option to access the slideshow from the album view.
|
// Add an option to access the slideshow from the album view.
|
||||||
$menu
|
if ($theme->item()->children_count(array(array("type", "=", "photo")))) {
|
||||||
->append(Menu::factory("link")
|
$menu
|
||||||
->id("minislideshow")
|
->append(Menu::factory("link")
|
||||||
->label(t("View MiniSlide Show"))
|
->id("minislideshow")
|
||||||
->url(url::site("minislideshow/showslideshow/" . $theme->item()->id))
|
->label(t("View MiniSlide Show"))
|
||||||
->css_class("g-dialog-link")
|
->url(url::site("minislideshow/showslideshow/" . $theme->item()->id))
|
||||||
->css_id("g-mini-slideshow-link"));
|
->css_class("g-dialog-link")
|
||||||
|
->css_id("g-mini-slideshow-link"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static function photo_menu($menu, $theme) {
|
static function photo_menu($menu, $theme) {
|
||||||
|
|
|
@ -49,13 +49,15 @@ class minislideshow_event_Core {
|
||||||
|
|
||||||
static function album_menu($menu, $theme) {
|
static function album_menu($menu, $theme) {
|
||||||
// Add an option to access the slideshow from the album view.
|
// Add an option to access the slideshow from the album view.
|
||||||
$menu
|
if ($theme->item()->children_count(array(array("type", "=", "photo")))) {
|
||||||
->append(Menu::factory("link")
|
$menu
|
||||||
->id("minislideshow")
|
->append(Menu::factory("link")
|
||||||
->label(t("View MiniSlide Show"))
|
->id("minislideshow")
|
||||||
->url(url::site("minislideshow/showslideshow/" . $theme->item()->id))
|
->label(t("View MiniSlide Show"))
|
||||||
->css_class("g-dialog-link")
|
->url(url::site("minislideshow/showslideshow/" . $theme->item()->id))
|
||||||
->css_id("g-mini-slideshow-link"));
|
->css_class("g-dialog-link")
|
||||||
|
->css_id("g-mini-slideshow-link"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static function photo_menu($menu, $theme) {
|
static function photo_menu($menu, $theme) {
|
||||||
|
|
Reference in New Issue
Block a user