mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-05-20 19:39:16 -04:00
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:
@@ -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"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user