diff options
author | jhilden <jakobhilden@gmail.com> | 2009-06-02 19:31:11 -0400 |
---|---|---|
committer | jhilden <jakobhilden@gmail.com> | 2009-06-02 19:31:11 -0400 |
commit | dde5fb96ee9db5a67b286ea4ac4f35190453a6ef (patch) | |
tree | eb0e52aa07335eeb20a2d1d4eee9f8e2065e12a2 /modules/gallery/helpers | |
parent | 01c577479420997508b2600138d60eff88781ac7 (diff) |
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
Diffstat (limited to 'modules/gallery/helpers')
-rw-r--r-- | modules/gallery/helpers/gallery_menu.php | 13 |
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"))); |