From dde5fb96ee9db5a67b286ea4ac4f35190453a6ef Mon Sep 17 00:00:00 2001 From: jhilden Date: Tue, 2 Jun 2009 19:31:11 -0400 Subject: made "Add photos" its own site menu item * open for suggestions on the submenu item labels * @bharat: not sure about the add photos menu item id in the dropdown case --- modules/gallery/helpers/gallery_menu.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'modules/gallery/helpers') 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") @@ -48,10 +55,6 @@ class gallery_menu_Core { if ($item->is_album()) { 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")) -- cgit v1.2.3