More flexible mail notifications settings at user level. A user has now 3 options:
* notification on any event on all his projects * notification on any event on selected projects only (if the user belongs to more than 1 project) * notification only for things that he watches or he is involded in (eg. issues that he watches or he is author or assignee) git-svn-id: http://redmine.rubyforge.org/svn/trunk@855 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
1 parent
eacd050630
commit
90d33c3e51
30 files changed
+254
-93
No files matched your search
@@ -0,0 +1,8 @@
|
||||
<h3><%=l(:label_my_account)%></h3>
|
||||
|
||||
<p><%=l(:field_login)%>: <strong><%= @user.login %></strong><br />
|
||||
<%=l(:field_created_on)%>: <%= format_time(@user.created_on) %></p>
|
||||
<% if @user.rss_token %>
|
||||
<p><%= l(:label_feeds_access_key_created_on, distance_of_time_in_words(Time.now, @user.rss_token.created_on)) %>
|
||||
(<%= link_to l(:button_reset), {:action => 'reset_rss_key'}, :method => :post %>)</p>
|
||||
<% end %>
|
||||
+23
-37
@@ -1,55 +1,41 @@
|
||||
<div class="contextual">
|
||||
<%= link_to(l(:button_change_password), :action => 'password') unless @user.auth_source_id %>
|
||||
</div>
|
||||
<h2><%=l(:label_my_account)%></h2>
|
||||
|
||||
<%= error_messages_for 'user' %>
|
||||
|
||||
<div class="box">
|
||||
<% form_for :user, @user, :url => { :action => "account" }, :builder => TabularFormBuilder, :lang => current_language do |f| %>
|
||||
<div class="splitcontentleft">
|
||||
<h3><%=l(:label_information_plural)%></h3>
|
||||
|
||||
<% labelled_tabular_form_for :user, @user, :url => { :action => "account" } do |f| %>
|
||||
|
||||
<div class="box tabular">
|
||||
<p><%= f.text_field :firstname, :required => true %></p>
|
||||
<p><%= f.text_field :lastname, :required => true %></p>
|
||||
<p><%= f.text_field :mail, :required => true, :size => 40 %></p>
|
||||
<p><%= f.text_field :mail, :required => true %></p>
|
||||
<p><%= f.select :language, lang_options_for_select %></p>
|
||||
<p><%= f.check_box :mail_notification %></p>
|
||||
|
||||
<% fields_for :pref, @user.pref, :builder => TabularFormBuilder, :lang => current_language do |pref_fields| %>
|
||||
<p><%= pref_fields.check_box :hide_mail %></p>
|
||||
<% end %>
|
||||
|
||||
<center><%= submit_tag l(:button_save) %></center>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<%= submit_tag l(:button_save) %>
|
||||
</div>
|
||||
|
||||
<% unless @user.auth_source_id %>
|
||||
<div class="box">
|
||||
<h3><%=l(:field_password)%></h3>
|
||||
|
||||
<% form_tag({:action => 'change_password'}, :class => "tabular") do %>
|
||||
|
||||
<p><label for="password"><%=l(:field_password)%> <span class="required">*</span></label>
|
||||
<%= password_field_tag 'password', nil, :size => 25 %></p>
|
||||
|
||||
<p><label for="new_password"><%=l(:field_new_password)%> <span class="required">*</span></label>
|
||||
<%= password_field_tag 'new_password', nil, :size => 25 %><br />
|
||||
<em><%= l(:text_length_between, 4, 12) %></em></p>
|
||||
|
||||
<p><label for="new_password_confirmation"><%=l(:field_password_confirmation)%> <span class="required">*</span></label>
|
||||
<%= password_field_tag 'new_password_confirmation', nil, :size => 25 %></p>
|
||||
|
||||
<center><%= submit_tag l(:button_save) %></center>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="splitcontentright">
|
||||
<h3><%=l(:field_mail_notification)%></h3>
|
||||
<div class="box">
|
||||
<%= select_tag 'notification_option', options_for_select(@notification_options, @notification_option),
|
||||
:onchange => 'if ($("notification_option").value == "selected") {Element.show("notified-projects")} else {Element.hide("notified-projects")}' %>
|
||||
<% content_tag 'div', :id => 'notified-projects', :style => (@notification_option == 'selected' ? '' : 'display:none;') do %>
|
||||
<p><% User.current.projects.each do |project| %>
|
||||
<label><%= check_box_tag 'notified_project_ids[]', project.id, @user.notified_projects_ids.include?(project.id) %> <%= project.name %></label><br />
|
||||
<% end %></p>
|
||||
<p><em><%= l(:text_user_mail_option) %></em></p>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% content_for :sidebar do %>
|
||||
<h3><%=l(:label_my_account)%></h3>
|
||||
|
||||
<p><%=l(:field_login)%>: <strong><%= @user.login %></strong><br />
|
||||
<%=l(:field_created_on)%>: <%= format_time(@user.created_on) %></p>
|
||||
<% if @user.rss_token %>
|
||||
<p><%= l(:label_feeds_access_key_created_on, distance_of_time_in_words(Time.now, @user.rss_token.created_on)) %>
|
||||
(<%= link_to l(:button_reset), {:action => 'reset_rss_key'}, :method => :post %>)</p>
|
||||
<% end %>
|
||||
<%= render :partial => 'sidebar' %>
|
||||
<% end %>
|
||||
@@ -0,0 +1,22 @@
|
||||
<h2><%=l(:button_change_password)%></h2>
|
||||
|
||||
<%= error_messages_for 'user' %>
|
||||
|
||||
<% form_tag({}, :class => "tabular") do %>
|
||||
<div class="box">
|
||||
<p><label for="password"><%=l(:field_password)%> <span class="required">*</span></label>
|
||||
<%= password_field_tag 'password', nil, :size => 25 %></p>
|
||||
|
||||
<p><label for="new_password"><%=l(:field_new_password)%> <span class="required">*</span></label>
|
||||
<%= password_field_tag 'new_password', nil, :size => 25 %><br />
|
||||
<em><%= l(:text_length_between, 4, 12) %></em></p>
|
||||
|
||||
<p><label for="new_password_confirmation"><%=l(:field_password_confirmation)%> <span class="required">*</span></label>
|
||||
<%= password_field_tag 'new_password_confirmation', nil, :size => 25 %></p>
|
||||
</div>
|
||||
<%= submit_tag l(:button_apply) %>
|
||||
<% end %>
|
||||
|
||||
<% content_for :sidebar do %>
|
||||
<%= render :partial => 'sidebar' %>
|
||||
<% end %>
|
||||
@@ -14,7 +14,6 @@
|
||||
<% end if @custom_values%>
|
||||
|
||||
<p><%= f.check_box :admin %></p>
|
||||
<p><%= f.check_box :mail_notification %></p>
|
||||
</div>
|
||||
|
||||
<div class="box">
|
||||
|
||||
Reference in new issue
Block a user