From 01d00dfd8680c9e03fda9c4a0fb3dce04a88e2f8 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Mon, 2 Feb 2009 03:55:33 +0000 Subject: Change the item menu to allow the watch icon to change depending on whether the item is currently being watched. Currently the icon is the same as the add icon and needs to be changed. --- modules/notification/helpers/notification_menu.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'modules/notification/helpers') diff --git a/modules/notification/helpers/notification_menu.php b/modules/notification/helpers/notification_menu.php index 3781b663..d04aa8ba 100644 --- a/modules/notification/helpers/notification_menu.php +++ b/modules/notification/helpers/notification_menu.php @@ -24,12 +24,14 @@ class notification_menu_Core { $item = $theme->item(); if ($item) { + $watching = notification::is_watching($item); + $menu ->append(Menu::factory("link") ->id("watch") ->label(t("Enable notifications for this album")) ->url(url::site("notification/watch/$item->id")) - ->css_id("gWatchLink")); + ->css_id($watching ? "gRemoveWatchLink" : "gAddWatchLink")); } } } -- cgit v1.2.3