diff options
author | Andy Staudacher <andy.st@gmail.com> | 2009-06-06 15:24:49 -0700 |
---|---|---|
committer | Andy Staudacher <andy.st@gmail.com> | 2009-06-06 15:24:49 -0700 |
commit | b9ee6f7d185c734dcff595d06d9c6e6fda5822ac (patch) | |
tree | 4cc37bde852469449afd0989bfceeeddac84a200 /modules/notification/helpers | |
parent | 0e415dae9b29d792f631d3b94349086b8094c920 (diff) | |
parent | b179b106c2b4d3971498f513ffc71eff1b6b1a5d (diff) |
Merge branch 'master' of git@github.com:gallery/gallery3
Diffstat (limited to 'modules/notification/helpers')
-rw-r--r-- | modules/notification/helpers/notification_menu.php | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/modules/notification/helpers/notification_menu.php b/modules/notification/helpers/notification_menu.php index 87927874..696aad62 100644 --- a/modules/notification/helpers/notification_menu.php +++ b/modules/notification/helpers/notification_menu.php @@ -18,19 +18,21 @@ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ class notification_menu_Core { - static function album($menu, $theme) { + static function site($menu, $theme) { if (!user::active()->guest) { $item = $theme->item(); - - if ($item) { + + if ($item && $item->is_album()) { $watching = notification::is_watching($item); - $menu + $watching ? $label = t("Remove notifications") : $label = t("Enable notifications"); + + $menu->get("options_menu") ->append(Menu::factory("link") ->id("watch") - ->label(t("Enable notifications for this album")) - ->url(url::site("notification/watch/$item->id?csrf=" . access::csrf_token())) - ->css_id($watching ? "gRemoveNotifyLink" : "gAddNotifyLink")); + ->label($label) + ->css_id("gNotifyLink") + ->url(url::site("notification/watch/$item->id?csrf=" . access::csrf_token()))); } } } |