From 38cf6ca403b485644405b8ec39af334a877e58b2 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Fri, 30 Jan 2009 20:52:25 +0000 Subject: The start of the notification module. At this point, the icon has been added to the item menu in the sidebar (both photo and album). There is a corresponding icon in themes/default/images that needs to be spruced up. You can add and remove notifications to albums and photos, but nothing happens under the covers for event handling. --- modules/notification/helpers/notification_menu.php | 50 ++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 modules/notification/helpers/notification_menu.php (limited to 'modules/notification/helpers/notification_menu.php') diff --git a/modules/notification/helpers/notification_menu.php b/modules/notification/helpers/notification_menu.php new file mode 100644 index 00000000..8c2e84d8 --- /dev/null +++ b/modules/notification/helpers/notification_menu.php @@ -0,0 +1,50 @@ +guest) { + $item = $theme->item(); + + if ($item) { + $menu + ->append(Menu::factory("dialog") + ->id("watch") + ->label(t("Enable notifications for this album")) + ->url(url::site("notification/watch/$item->id")) + ->css_id("gWatchLink")); + } + } + } + + static function photo($menu, $theme) { + if (!user::active()->guest) { + $item = $theme->item(); + + if ($item) { + $menu + ->append(Menu::factory("dialog") + ->id("watch") + ->label(t("Enable notifications for this photo")) + ->url(url::site("notification/watch/$item->id")) + ->css_id("gWatchLink")); + } + } + } +} -- cgit v1.2.3