summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers/gallery_menu.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gallery/helpers/gallery_menu.php')
-rw-r--r--modules/gallery/helpers/gallery_menu.php13
1 files changed, 8 insertions, 5 deletions
diff --git a/modules/gallery/helpers/gallery_menu.php b/modules/gallery/helpers/gallery_menu.php
index 09c2d91a..d28e71c9 100644
--- a/modules/gallery/helpers/gallery_menu.php
+++ b/modules/gallery/helpers/gallery_menu.php
@@ -30,7 +30,14 @@ class gallery_menu_Core {
$can_edit = $item && access::can("edit", $item) || $is_admin;
$can_add = $item && (access::can("add", $item) || $is_admin);
-
+
+ if ($can_add) {
+ $menu->append(Menu::factory("dialog")
+ ->id("add_photos_item")
+ ->label(t("Add photos"))
+ ->url(url::site("simple_uploader/app/$item->id")));
+ }
+
if ($item && $can_edit || $can_add) {
$menu->append($options_menu = Menu::factory("submenu")
->id("options_menu")
@@ -49,10 +56,6 @@ class gallery_menu_Core {
if ($can_add) {
$options_menu
->append(Menu::factory("dialog")
- ->id("add_item")
- ->label(t("Add a photo"))
- ->url(url::site("simple_uploader/app/$item->id")))
- ->append(Menu::factory("dialog")
->id("add_album")
->label(t("Add an album"))
->url(url::site("form/add/albums/$item->id?type=album")));