diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-01-17 14:14:12 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-01-17 14:14:12 +0000 |
commit | e3618bdbecd9b5d86eb6d2c8c256ba3fcdf05189 (patch) | |
tree | 3b54c10eecece6cc2674491a76a4e5e932d82d1e /app/helpers/email_addresses_helper.rb | |
parent | 7f29c2fd88f271ac59f1c10b90942fec57b35ae2 (diff) | |
download | redmine-e3618bdbecd9b5d86eb6d2c8c256ba3fcdf05189.tar.gz redmine-e3618bdbecd9b5d86eb6d2c8c256ba3fcdf05189.zip |
Add support for multiple email addresses per user (#4244).
git-svn-id: http://svn.redmine.org/redmine/trunk@13886 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers/email_addresses_helper.rb')
-rw-r--r-- | app/helpers/email_addresses_helper.rb | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/app/helpers/email_addresses_helper.rb b/app/helpers/email_addresses_helper.rb new file mode 100644 index 000000000..f397e9907 --- /dev/null +++ b/app/helpers/email_addresses_helper.rb @@ -0,0 +1,38 @@ +# encoding: utf-8 +# +# Redmine - project management software +# Copyright (C) 2006-2015 Jean-Philippe Lang +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +module EmailAddressesHelper + + # Returns a link to enable or disable notifications for the address + def toggle_email_address_notify_link(address) + if address.notify? + link_to image_tag('email.png'), + user_email_address_path(address.user, address, :notify => '0'), + :method => :put, + :title => l(:label_disable_notifications), + :remote => true + else + link_to image_tag('email_disabled.png'), + user_email_address_path(address.user, address, :notify => '1'), + :method => :put, + :title => l(:label_enable_notifications), + :remote => true + end + end +end |