diff options
| author | Tim Almdal <tnalmdal@shaw.ca> | 2009-09-23 15:00:32 -0700 |
|---|---|---|
| committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-09-23 15:00:32 -0700 |
| commit | 3efaf4b1a11fbc7ef1cfd265086e92a9b1ef4eb8 (patch) | |
| tree | 06fc546b7f221cac00b0568bc0b2b91eec30e287 /modules/gallery/helpers/gallery.php | |
| parent | a24d9d67a6d6ee0b976068880476e69b432b1406 (diff) | |
| parent | 719b111219608f6a19a3a460d2953bc3362c9c28 (diff) | |
Merge branch 'master' into talmdal_dev
Diffstat (limited to 'modules/gallery/helpers/gallery.php')
| -rw-r--r-- | modules/gallery/helpers/gallery.php | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/modules/gallery/helpers/gallery.php b/modules/gallery/helpers/gallery.php index 80ae65bd..91dd2073 100644 --- a/modules/gallery/helpers/gallery.php +++ b/modules/gallery/helpers/gallery.php @@ -114,19 +114,32 @@ class gallery_Core { } } + switch ($item->type) { + case "album": + $option_text = t("Album options"); + $edit_text = t("Edit album"); + break; + case "movie": + $option_text = t("Movie options"); + $edit_text = t("Edit movie"); + break; + default: + $option_text = t("Photo options"); + $edit_text = t("Edit photo"); + } + $menu->append($options_menu = Menu::factory("submenu") ->id("options_menu") - ->label(t("Photo options"))); + ->label($option_text)); if ($item && ($can_edit || $can_add)) { if ($can_edit) { $options_menu->append(Menu::factory("dialog") ->id("edit_item") - ->label($item->is_album() ? t("Edit album") : t("Edit photo")) + ->label($edit_text) ->url(url::site("form/edit/{$item->type}s/$item->id"))); } if ($item->is_album()) { - $options_menu->label(t("Album options")); if ($can_edit) { $options_menu->append(Menu::factory("dialog") ->id("edit_permissions") |
