+<%= submit_tag l(:button_apply) %>
+<% end %>
+
+<% content_for :sidebar do %>
+<%= render :partial => 'sidebar' %>
+<% end %>
diff --git a/app/views/users/_form.rhtml b/app/views/users/_form.rhtml
index 56b15798..72cf3c95 100644
--- a/app/views/users/_form.rhtml
+++ b/app/views/users/_form.rhtml
@@ -14,7 +14,6 @@
<% end if @custom_values%>
<%= f.check_box :admin %>
-
<%= f.check_box :mail_notification %>
diff --git a/db/migrate/001_setup.rb b/db/migrate/001_setup.rb
index 8b299eb1..1160dd5e 100644
--- a/db/migrate/001_setup.rb
+++ b/db/migrate/001_setup.rb
@@ -284,7 +284,7 @@ class Setup < ActiveRecord::Migration
Permission.create :controller => "versions", :action => "destroy_file", :description => "button_delete", :sort => 1322
# create default administrator account
- user = User.create :firstname => "redMine", :lastname => "Admin", :mail => "admin@somenet.foo", :mail_notification => true, :language => "en"
+ user = User.create :firstname => "Redmine", :lastname => "Admin", :mail => "admin@somenet.foo", :mail_notification => true, :language => "en"
user.login = "admin"
user.password = "admin"
user.admin = true
diff --git a/db/migrate/075_add_members_mail_notification.rb b/db/migrate/075_add_members_mail_notification.rb
new file mode 100644
index 00000000..d83ba8dd
--- /dev/null
+++ b/db/migrate/075_add_members_mail_notification.rb
@@ -0,0 +1,9 @@
+class AddMembersMailNotification < ActiveRecord::Migration
+ def self.up
+ add_column :members, :mail_notification, :boolean, :default => false, :null => false
+ end
+
+ def self.down
+ remove_column :members, :mail_notification
+ end
+end
diff --git a/lang/bg.yml b/lang/bg.yml
index 15bbb523..d4ef3511 100644
--- a/lang/bg.yml
+++ b/lang/bg.yml
@@ -526,3 +526,8 @@ label_theme: Тема
label_default: По подразбиране
label_search_titles_only: Само в заглавията
label_nobody: nobody
+button_change_password: Change password
+text_user_mail_option: "For unselected projects, you will only receive notifications about things you watch or you're involved in (eg. issues you're the author or assignee)."
+label_user_mail_option_selected: "For any event on the selected projects only..."
+label_user_mail_option_all: "For any event on all my projects"
+label_user_mail_option_none: "Only for things I watch or I'm involved in"
diff --git a/lang/cs.yml b/lang/cs.yml
index 8e5f91b4..b7b88884 100644
--- a/lang/cs.yml
+++ b/lang/cs.yml
@@ -526,3 +526,8 @@ label_theme: Theme
label_default: Default
label_search_titles_only: Search titles only
label_nobody: nobody
+button_change_password: Change password
+text_user_mail_option: "For unselected projects, you will only receive notifications about things you watch or you're involved in (eg. issues you're the author or assignee)."
+label_user_mail_option_selected: "For any event on the selected projects only..."
+label_user_mail_option_all: "For any event on all my projects"
+label_user_mail_option_none: "Only for things I watch or I'm involved in"
diff --git a/lang/de.yml b/lang/de.yml
index dae96057..793876fc 100644
--- a/lang/de.yml
+++ b/lang/de.yml
@@ -526,3 +526,8 @@ label_theme: Theme
label_default: Default
label_search_titles_only: Search titles only
label_nobody: nobody
+button_change_password: Change password
+text_user_mail_option: "For unselected projects, you will only receive notifications about things you watch or you're involved in (eg. issues you're the author or assignee)."
+label_user_mail_option_selected: "For any event on the selected projects only..."
+label_user_mail_option_all: "For any event on all my projects"
+label_user_mail_option_none: "Only for things I watch or I'm involved in"
diff --git a/lang/en.yml b/lang/en.yml
index 7d23e4fb..d0dc6466 100644
--- a/lang/en.yml
+++ b/lang/en.yml
@@ -127,7 +127,7 @@ field_parent: Subproject of
field_is_in_chlog: Issues displayed in changelog
field_is_in_roadmap: Issues displayed in roadmap
field_login: Login
-field_mail_notification: Mail notifications
+field_mail_notification: Email notifications
field_admin: Administrator
field_last_login_on: Last connection
field_language: Language
@@ -174,7 +174,7 @@ setting_login_required: Authent. required
setting_self_registration: Self-registration enabled
setting_attachment_max_size: Attachment max. size
setting_issues_export_limit: Issues export limit
-setting_mail_from: Emission mail address
+setting_mail_from: Emission email address
setting_host_name: Host name
setting_text_formatting: Text formatting
setting_wiki_compression: Wiki history compression
@@ -437,6 +437,9 @@ label_bulk_edit_selected_issues: Bulk edit selected issues
label_theme: Theme
label_default: Default
label_search_titles_only: Search titles only
+label_user_mail_option_all: "For any event on all my projects"
+label_user_mail_option_selected: "For any event on the selected projects only..."
+label_user_mail_option_none: "Only for things I watch or I'm involved in"
button_login: Login
button_submit: Submit
@@ -470,12 +473,13 @@ button_archive: Archive
button_unarchive: Unarchive
button_reset: Reset
button_rename: Rename
+button_change_password: Change password
status_active: active
status_registered: registered
status_locked: locked
-text_select_mail_notifications: Select actions for which mail notifications should be sent.
+text_select_mail_notifications: Select actions for which email notifications should be sent.
text_regexp_info: eg. ^[A-Z0-9]+$
text_min_max_length_info: 0 means no restriction
text_project_destroy_confirmation: Are you sure you want to delete this project and all related data ?
@@ -500,6 +504,7 @@ text_wiki_destroy_confirmation: Are you sure you want to delete this wiki and al
text_issue_category_destroy_question: Some issues (%d) are assigned to this category. What do you want to do ?
text_issue_category_destroy_assignments: Remove category assignments
text_issue_category_reassign_to: Reassign issues to this category
+text_user_mail_option: "For unselected projects, you will only receive notifications about things you watch or you're involved in (eg. issues you're the author or assignee)."
default_role_manager: Manager
default_role_developper: Developer
diff --git a/lang/es.yml b/lang/es.yml
index c3392b2d..d66220e0 100644
--- a/lang/es.yml
+++ b/lang/es.yml
@@ -529,3 +529,8 @@ label_theme: Theme
label_default: Default
label_search_titles_only: Search titles only
label_nobody: nobody
+button_change_password: Change password
+text_user_mail_option: "For unselected projects, you will only receive notifications about things you watch or you're involved in (eg. issues you're the author or assignee)."
+label_user_mail_option_selected: "For any event on the selected projects only..."
+label_user_mail_option_all: "For any event on all my projects"
+label_user_mail_option_none: "Only for things I watch or I'm involved in"
diff --git a/lang/fr.yml b/lang/fr.yml
index 4b46189f..ce543b68 100644
--- a/lang/fr.yml
+++ b/lang/fr.yml
@@ -437,6 +437,9 @@ label_bulk_edit_selected_issues: Modifier les demandes sélectionnées
label_theme: Thème
label_default: Défaut
label_search_titles_only: Uniquement dans les titres
+label_user_mail_option_all: "Pour tous les événements de tous mes projets"
+label_user_mail_option_selected: "Pour tous les événements des projets sélectionnés..."
+label_user_mail_option_none: "Seulement pour ce que je surveille ou à quoi je participe"
button_login: Connexion
button_submit: Soumettre
@@ -470,6 +473,7 @@ button_archive: Archiver
button_unarchive: Désarchiver
button_reset: Réinitialiser
button_rename: Renommer
+button_change_password: Changer de mot de passe
status_active: actif
status_registered: enregistré
@@ -500,6 +504,7 @@ text_wiki_destroy_confirmation: Etes-vous sûr de vouloir supprimer ce wiki et t
text_issue_category_destroy_question: Des demandes (%d) sont affectées à cette catégories. Que voulez-vous faire ?
text_issue_category_destroy_assignments: N'affecter les demandes à aucune autre catégorie
text_issue_category_reassign_to: Réaffecter les demandes à cette catégorie
+text_user_mail_option: "Pour les projets non sélectionnés, vous recevrez seulement des notifications pour ce que vous surveillez ou à quoi vous participez (exemple: demandes dont vous êtes l'auteur ou la personne assignée)."
default_role_manager: Manager
default_role_developper: Développeur
diff --git a/lang/he.yml b/lang/he.yml
index 106bc009..0a310924 100644
--- a/lang/he.yml
+++ b/lang/he.yml
@@ -526,3 +526,8 @@ enumeration_doc_categories: קטגוריות מסמכים
enumeration_activities: פעילויות (מעקב אחר זמנים)
label_search_titles_only: Search titles only
label_nobody: nobody
+button_change_password: Change password
+text_user_mail_option: "For unselected projects, you will only receive notifications about things you watch or you're involved in (eg. issues you're the author or assignee)."
+label_user_mail_option_selected: "For any event on the selected projects only..."
+label_user_mail_option_all: "For any event on all my projects"
+label_user_mail_option_none: "Only for things I watch or I'm involved in"
diff --git a/lang/it.yml b/lang/it.yml
index 8dad1566..b4888808 100644
--- a/lang/it.yml
+++ b/lang/it.yml
@@ -526,3 +526,8 @@ label_theme: Theme
label_default: Default
label_search_titles_only: Search titles only
label_nobody: nobody
+button_change_password: Change password
+text_user_mail_option: "For unselected projects, you will only receive notifications about things you watch or you're involved in (eg. issues you're the author or assignee)."
+label_user_mail_option_selected: "For any event on the selected projects only..."
+label_user_mail_option_all: "For any event on all my projects"
+label_user_mail_option_none: "Only for things I watch or I'm involved in"
diff --git a/lang/ja.yml b/lang/ja.yml
index ce70a4c3..3016d385 100644
--- a/lang/ja.yml
+++ b/lang/ja.yml
@@ -527,3 +527,8 @@ label_theme: テーマ
label_default: 既定
label_search_titles_only: Search titles only
label_nobody: nobody
+button_change_password: Change password
+text_user_mail_option: "For unselected projects, you will only receive notifications about things you watch or you're involved in (eg. issues you're the author or assignee)."
+label_user_mail_option_selected: "For any event on the selected projects only..."
+label_user_mail_option_all: "For any event on all my projects"
+label_user_mail_option_none: "Only for things I watch or I'm involved in"
diff --git a/lang/nl.yml b/lang/nl.yml
index c5928c23..9b7d73a9 100644
--- a/lang/nl.yml
+++ b/lang/nl.yml
@@ -527,3 +527,8 @@ label_theme: Theme
label_default: Default
label_search_titles_only: Search titles only
label_nobody: nobody
+button_change_password: Change password
+text_user_mail_option: "For unselected projects, you will only receive notifications about things you watch or you're involved in (eg. issues you're the author or assignee)."
+label_user_mail_option_selected: "For any event on the selected projects only..."
+label_user_mail_option_all: "For any event on all my projects"
+label_user_mail_option_none: "Only for things I watch or I'm involved in"
diff --git a/lang/pl.yml b/lang/pl.yml
index 23b028ba..1b8602ab 100644
--- a/lang/pl.yml
+++ b/lang/pl.yml
@@ -526,3 +526,8 @@ label_theme: Temat
label_default: Domyślne
label_search_titles_only: Przeszukuj tylko tytuły
label_nobody: nobody
+button_change_password: Change password
+text_user_mail_option: "For unselected projects, you will only receive notifications about things you watch or you're involved in (eg. issues you're the author or assignee)."
+label_user_mail_option_selected: "For any event on the selected projects only..."
+label_user_mail_option_all: "For any event on all my projects"
+label_user_mail_option_none: "Only for things I watch or I'm involved in"
diff --git a/lang/pt-br.yml b/lang/pt-br.yml
index bb335b08..da25974a 100644
--- a/lang/pt-br.yml
+++ b/lang/pt-br.yml
@@ -526,3 +526,8 @@ label_theme: Theme
label_default: Default
label_search_titles_only: Search titles only
label_nobody: nobody
+button_change_password: Change password
+text_user_mail_option: "For unselected projects, you will only receive notifications about things you watch or you're involved in (eg. issues you're the author or assignee)."
+label_user_mail_option_selected: "For any event on the selected projects only..."
+label_user_mail_option_all: "For any event on all my projects"
+label_user_mail_option_none: "Only for things I watch or I'm involved in"
diff --git a/lang/pt.yml b/lang/pt.yml
index 2fcfbd33..94dace1d 100644
--- a/lang/pt.yml
+++ b/lang/pt.yml
@@ -526,3 +526,8 @@ label_theme: Theme
label_default: Default
label_search_titles_only: Search titles only
label_nobody: nobody
+button_change_password: Change password
+text_user_mail_option: "For unselected projects, you will only receive notifications about things you watch or you're involved in (eg. issues you're the author or assignee)."
+label_user_mail_option_selected: "For any event on the selected projects only..."
+label_user_mail_option_all: "For any event on all my projects"
+label_user_mail_option_none: "Only for things I watch or I'm involved in"
diff --git a/lang/ro.yml b/lang/ro.yml
index 08eb75b0..93352c8c 100644
--- a/lang/ro.yml
+++ b/lang/ro.yml
@@ -526,3 +526,8 @@ label_theme: Theme
label_default: Default
label_search_titles_only: Search titles only
label_nobody: nobody
+button_change_password: Change password
+text_user_mail_option: "For unselected projects, you will only receive notifications about things you watch or you're involved in (eg. issues you're the author or assignee)."
+label_user_mail_option_selected: "For any event on the selected projects only..."
+label_user_mail_option_all: "For any event on all my projects"
+label_user_mail_option_none: "Only for things I watch or I'm involved in"
diff --git a/lang/sv.yml b/lang/sv.yml
index 17b57b5d..139105ed 100644
--- a/lang/sv.yml
+++ b/lang/sv.yml
@@ -527,3 +527,8 @@ label_theme: Theme
label_default: Default
label_search_titles_only: Search titles only
label_nobody: nobody
+button_change_password: Change password
+text_user_mail_option: "For unselected projects, you will only receive notifications about things you watch or you're involved in (eg. issues you're the author or assignee)."
+label_user_mail_option_selected: "For any event on the selected projects only..."
+label_user_mail_option_all: "For any event on all my projects"
+label_user_mail_option_none: "Only for things I watch or I'm involved in"
diff --git a/lang/zh.yml b/lang/zh.yml
index 3826be6d..9fda045b 100644
--- a/lang/zh.yml
+++ b/lang/zh.yml
@@ -529,3 +529,8 @@ label_theme: Theme
label_default: Default
label_search_titles_only: Search titles only
label_nobody: nobody
+button_change_password: Change password
+text_user_mail_option: "For unselected projects, you will only receive notifications about things you watch or you're involved in (eg. issues you're the author or assignee)."
+label_user_mail_option_selected: "For any event on the selected projects only..."
+label_user_mail_option_all: "For any event on all my projects"
+label_user_mail_option_none: "Only for things I watch or I'm involved in"
diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css
index 1ae20416..b56fa6a3 100644
--- a/public/stylesheets/application.css
+++ b/public/stylesheets/application.css
@@ -116,6 +116,7 @@ textarea.wiki-edit { width: 99%; }
li p {margin-top: 0;}
div.issue {background:#ffffdd; padding:6px; margin-bottom:6px;border: 1px solid #d7d7d7;}
.autoscroll {overflow-x: auto; padding:1px; width:100%;}
+#user_firstname, #user_lastname, #user_mail, #notification_option { width: 90%; }
/***** Tabular forms ******/
.tabular p{
diff --git a/test/functional/my_controller_test.rb b/test/functional/my_controller_test.rb
index b2389c39..5df2932e 100644
--- a/test/functional/my_controller_test.rb
+++ b/test/functional/my_controller_test.rb
@@ -61,29 +61,30 @@ class MyControllerTest < Test::Unit::TestCase
end
def test_change_password
- get :account
+ get :password
assert_response :success
- assert_template 'account'
+ assert_template 'password'
# non matching password confirmation
- post :change_password, :password => 'jsmith',
- :new_password => 'hello',
- :new_password_confirmation => 'hello2'
+ post :password, :password => 'jsmith',
+ :new_password => 'hello',
+ :new_password_confirmation => 'hello2'
assert_response :success
- assert_template 'account'
+ assert_template 'password'
assert_tag :tag => "div", :attributes => { :class => "errorExplanation" }
# wrong password
- post :change_password, :password => 'wrongpassword',
- :new_password => 'hello',
- :new_password_confirmation => 'hello'
- assert_redirected_to 'my/account'
+ post :password, :password => 'wrongpassword',
+ :new_password => 'hello',
+ :new_password_confirmation => 'hello'
+ assert_response :success
+ assert_template 'password'
assert_equal 'Wrong password', flash[:error]
# good password
- post :change_password, :password => 'jsmith',
- :new_password => 'hello',
- :new_password_confirmation => 'hello'
+ post :password, :password => 'jsmith',
+ :new_password => 'hello',
+ :new_password_confirmation => 'hello'
assert_redirected_to 'my/account'
assert User.try_to_login('jsmith', 'hello')
end
diff --git a/test/unit/user_test.rb b/test/unit/user_test.rb
index 52776c62..397bdf68 100644
--- a/test/unit/user_test.rb
+++ b/test/unit/user_test.rb
@@ -105,4 +105,28 @@ class UserTest < Test::Unit::TestCase
# user with no role
assert !@dlopper.role_for_project(Project.find(2)).member?
end
+
+ def test_mail_notification_all
+ @jsmith.mail_notification = true
+ @jsmith.notified_project_ids = []
+ @jsmith.save
+ @jsmith.reload
+ assert @jsmith.projects.first.recipients.include?(@jsmith.mail)
+ end
+
+ def test_mail_notification_selected
+ @jsmith.mail_notification = false
+ @jsmith.notified_project_ids = [@jsmith.projects.first.id]
+ @jsmith.save
+ @jsmith.reload
+ assert @jsmith.projects.first.recipients.include?(@jsmith.mail)
+ end
+
+ def test_mail_notification_none
+ @jsmith.mail_notification = false
+ @jsmith.notified_project_ids = []
+ @jsmith.save
+ @jsmith.reload
+ assert !@jsmith.projects.first.recipients.include?(@jsmith.mail)
+ end
end