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