Mercurial > hg > soundsoftware-site
comparison app/helpers/settings_helper.rb @ 51:371eac10df0b live
* Merge from "cannam" branch. This includes update to Redmine trunk, plus welcome/tip-of-the-day from luisf branch.
author | Chris Cannam |
---|---|
date | Wed, 24 Nov 2010 12:20:08 +0000 |
parents | 94944d00e43c |
children | cbce1fd3b1b7 |
comparison
equal
deleted
inserted
replaced
34:09b1d4349da3 | 51:371eac10df0b |
---|---|
69 | 69 |
70 def setting_label(setting, options={}) | 70 def setting_label(setting, options={}) |
71 label = options.delete(:label) | 71 label = options.delete(:label) |
72 label != false ? content_tag("label", l(label || "setting_#{setting}")) : '' | 72 label != false ? content_tag("label", l(label || "setting_#{setting}")) : '' |
73 end | 73 end |
74 | |
75 # Renders a notification field for a Redmine::Notifiable option | |
76 def notification_field(notifiable) | |
77 return content_tag(:label, | |
78 check_box_tag('settings[notified_events][]', | |
79 notifiable.name, | |
80 Setting.notified_events.include?(notifiable.name)) + | |
81 l_or_humanize(notifiable.name, :prefix => 'label_'), | |
82 :class => notifiable.parent.present? ? "parent" : '') | |
83 end | |
74 end | 84 end |