diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-02-02 03:55:33 +0000 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-02-02 03:55:33 +0000 |
commit | 01d00dfd8680c9e03fda9c4a0fb3dce04a88e2f8 (patch) | |
tree | 2b73a29646b1172cb79ceb6cba6490b5bb66a909 /modules/notification/helpers/notification_menu.php | |
parent | 0eb593711bc2d5abac0ec35eb21d9fe722e7bd30 (diff) |
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.
Diffstat (limited to 'modules/notification/helpers/notification_menu.php')
-rw-r--r-- | modules/notification/helpers/notification_menu.php | 4 |
1 files changed, 3 insertions, 1 deletions
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")); } } } |