summaryrefslogtreecommitdiff
path: root/modules/notification/helpers
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-06-06 11:39:11 -0700
committerBharat Mediratta <bharat@menalto.com>2009-06-06 11:39:11 -0700
commit5835715e49f98943c561d6cee67840488c428175 (patch)
tree4a48034bc1f3e4b279b8791dbc7c30b5d21f8cac /modules/notification/helpers
parentab1fc6ad533968ac7cb1d0506e989f549935b7aa (diff)
parentcd92b2ed85f063d990412601c19eeed1783be7c4 (diff)
Merge branch 'master' of git@github.com:gallery/gallery3
Diffstat (limited to 'modules/notification/helpers')
-rw-r--r--modules/notification/helpers/notification_menu.php16
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())));
}
}
}