site_notifications

Rails Plugin: Site-wide notifications -- inspired by Railscasts (work in progress)

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

Related Repositories

site_notifications

site_notifications

Rails Plugin: Site-wide notifications -- inspired by Railscasts (work in progress) ...

site_notifications

site_notifications

Concrete5 add-on that lets you send notifications and alerts to your website. ...


Top Contributors

arya