annotate lib/redmine/notifiable.rb @ 599:251b380117ce feature_227

Introduce a new latest_downloads plugin to manage active and shortcut for attachments. Add a table for attachment active/shortcut data. Move existing active-handler code into the new plugin (but still using the "old" active column in the attachments table). Note the files_controller stuff doesn't actually work here.
author Chris Cannam <chris.cannam@soundsoftware.ac.uk>
date Tue, 16 Aug 2011 17:01:19 +0100
parents cbce1fd3b1b7
children cbb26bc654de
rev   line source
chris@37 1 module Redmine
chris@37 2 class Notifiable < Struct.new(:name, :parent)
chris@37 3
chris@37 4 def to_s
chris@37 5 name
chris@37 6 end
chris@37 7
chris@37 8 # TODO: Plugin API for adding a new notification?
chris@37 9 def self.all
chris@37 10 notifications = []
chris@37 11 notifications << Notifiable.new('issue_added')
chris@37 12 notifications << Notifiable.new('issue_updated')
chris@37 13 notifications << Notifiable.new('issue_note_added', 'issue_updated')
chris@37 14 notifications << Notifiable.new('issue_status_updated', 'issue_updated')
chris@37 15 notifications << Notifiable.new('issue_priority_updated', 'issue_updated')
chris@37 16 notifications << Notifiable.new('news_added')
Chris@441 17 notifications << Notifiable.new('news_comment_added')
chris@37 18 notifications << Notifiable.new('document_added')
chris@37 19 notifications << Notifiable.new('file_added')
chris@37 20 notifications << Notifiable.new('message_posted')
chris@37 21 notifications << Notifiable.new('wiki_content_added')
chris@37 22 notifications << Notifiable.new('wiki_content_updated')
chris@37 23 notifications
chris@37 24 end
chris@37 25 end
chris@37 26 end