Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
|Failed to load latest commit information.|
SiteNotifications ================= This is still a plugin in development. Still needs a lot of work to do: - Properly set up the generator templates so a resource name can be specified - Default to ERB templates, optionally use haml templates (currently only haml) - Write tests - Add features: - periodical checking of notifications - specify auto-hide duration per notification instead of in the view - more Example ======= To make it work: 1. Run the site_notifications generator: ./script/generate site_notifications 2. Set some sort of permissions in the NotificationsController to limit create/update/delete actions or delete them and do that through script/console 3. Include the notifications.js (needs effects.js and prototype.js) and notifications.css in your layout 4. call the notifications helper in your layout: # it's using haml, so you need haml installed = notifications(:slide => true, :auto_hide_after => 2) # the slide parameter is if you want it to snap or slide (using scriptaculous) # the auto_hide_after is.. well... it auto hides after 2 seconds or # nil if you want it to only hide after clicking on it