Mercurial > hg > soundsoftware-site
diff app/helpers/.svn/text-base/settings_helper.rb.svn-base @ 37:94944d00e43c
* Update to SVN trunk rev 4411
author | Chris Cannam <chris.cannam@soundsoftware.ac.uk> |
---|---|
date | Fri, 19 Nov 2010 13:24:41 +0000 |
parents | 513646585e45 |
children | cbce1fd3b1b7 |
line wrap: on
line diff
--- a/app/helpers/.svn/text-base/settings_helper.rb.svn-base Fri Sep 24 14:06:04 2010 +0100 +++ b/app/helpers/.svn/text-base/settings_helper.rb.svn-base Fri Nov 19 13:24:41 2010 +0000 @@ -71,4 +71,14 @@ label = options.delete(:label) label != false ? content_tag("label", l(label || "setting_#{setting}")) : '' end + + # Renders a notification field for a Redmine::Notifiable option + def notification_field(notifiable) + return content_tag(:label, + check_box_tag('settings[notified_events][]', + notifiable.name, + Setting.notified_events.include?(notifiable.name)) + + l_or_humanize(notifiable.name, :prefix => 'label_'), + :class => notifiable.parent.present? ? "parent" : '') + end end