Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Don't show "edit permissions" for non-albums.

  • Loading branch information...
commit cbec883d8a572fd8b94c9db78b652caf1a22de23 1 parent 60d1bbc
@bharat bharat authored
Showing with 19 additions and 17 deletions.
  1. +19 −17 modules/gallery/helpers/gallery_menu.php
View
36 modules/gallery/helpers/gallery_menu.php
@@ -54,24 +54,26 @@ static function site($menu, $theme) {
}
// @todo Move album options menu to the album quick edit pane
- if ($item->is_album() && $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")));
- }
+ 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"))
+ ->url(url::site("form/add/albums/$item->id?type=album")));
+ }
- if ($can_edit) {
- $options_menu
- ->append(Menu::factory("dialog")
- ->id("edit_permissions")
- ->label(t("Edit permissions"))
- ->url(url::site("permissions/browse/$item->id")));
+ if ($can_edit) {
+ $options_menu
+ ->append(Menu::factory("dialog")
+ ->id("edit_permissions")
+ ->label(t("Edit permissions"))
+ ->url(url::site("permissions/browse/$item->id")));
+ }
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.