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.
This commit is contained in:
Tim Almdal
2009-02-02 03:55:33 +00:00
parent 0eb593711b
commit 01d00dfd86
3 changed files with 10 additions and 3 deletions

View File

@@ -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"));
}
}
}