diff options
author | Bharat Mediratta <bharat@menalto.com> | 2010-08-22 00:27:24 -0700 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2010-08-22 00:27:24 -0700 |
commit | 04add75f6ff7596319b01c635cb62fafacf504cf (patch) | |
tree | 0e356b7ce42214df8aab4b45d5097328bb8169b9 /modules/organize/helpers | |
parent | 91fab0fcf5fb65d9e210abb031a4ddfee31b1f9e (diff) |
Get rid of the move dialog and move option. Instead, replace it with
a call to Organize with the appropriate album open. I have not yet
figured out how to get the SWF code to highlight the active image, but
that's coming. Partial fix for #1204.
Diffstat (limited to 'modules/organize/helpers')
-rw-r--r-- | modules/organize/helpers/organize_event.php | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/modules/organize/helpers/organize_event.php b/modules/organize/helpers/organize_event.php index ae05fb5d..1593d30e 100644 --- a/modules/organize/helpers/organize_event.php +++ b/modules/organize/helpers/organize_event.php @@ -32,13 +32,23 @@ class organize_event_Core { } static function context_menu($menu, $theme, $item) { - if ($item->is_album() && access::can("edit", $item)) { - $menu->get("options_menu") - ->append(Menu::factory("dialog") - ->id("organize") - ->label(t("Organize album")) - ->css_class("ui-icon-folder-open g-organize-link") - ->url(url::site("organize/dialog/{$item->id}"))); + if (access::can("edit", $item)) { + if ($item->is_album()) { + $menu->get("options_menu") + ->append(Menu::factory("dialog") + ->id("organize") + ->label(t("Organize album")) + ->css_class("ui-icon-folder-open g-organize-link") + ->url(url::site("organize/dialog/{$item->id}"))); + } else { + $parent = $item->parent(); + $menu->get("options_menu") + ->append(Menu::factory("dialog") + ->id("move") + ->label(t("Move to another album")) + ->css_class("ui-icon-folder-open g-organize-link") + ->url(url::site("organize/dialog/{$parent->id}?selected_id={$item->id}"))); + } } } |