Project

General

Profile

Actions

Feature #29053

closed

Add check/unchek all icon in "Email notifications" section on "My account" page

Added by Go MAEDA over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
UI
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed

Description

"Email notifications" section on "My account" page, you can select which project notifications to receive if you choose "For any event on the selected projects only...".

you cannot select/deselect all projects at once because there is no check/uncheck all icon which you can see various pages in Redmine.

I think also "Email notifications" section should have check/uncheck all icon when users select projects by using checkboxes.


Files

email-notifications-section@2x.png (62.1 KB) email-notifications-section@2x.png Go MAEDA, 2018-06-19 11:59
screenshot.png (31.8 KB) screenshot.png Mizuki ISHIKAWA, 2018-06-20 02:34
projects-fieldset@2x.png (29.6 KB) projects-fieldset@2x.png Go MAEDA, 2018-06-20 04:30

Related issues

Copied to Redmine - Feature #29080: Add check/uncheck all icon in "Copy" section on copy_project pageClosedGo MAEDA

Actions
Actions #1

Updated by Mizuki ISHIKAWA over 6 years ago

I think that you can realize that feature by adding this one line.

diff --git a/app/views/users/_mail_notifications.html.erb b/app/views/users/_mail_notifications.html.erb
index 7d253f7e8d..9dc4355ec4 100644
--- a/app/views/users/_mail_notifications.html.erb
+++ b/app/views/users/_mail_notifications.html.erb
@@ -18,6 +18,7 @@
           ) + ' ' + h(project.name)
         )
       end %>
+  <p><%= check_all_links('notified-projects') %></p>
   <%= hidden_field_tag 'user[notified_project_ids][]', '' %>
   <p><em class="info"><%= l(:text_user_mail_option) %></em></p>
 <% end %>

Actions #2

Updated by Mizuki ISHIKAWA over 6 years ago

This is a nice feature for those who need to see many projects.

Actions #3

Updated by Go MAEDA over 6 years ago

  • Target version set to 3.4.7

Mizuki ISHIKAWA wrote:

I think that you can realize that feature by adding this one line.
[...]

Thank you for posting the patch so quickly.

Setting target version to 3.4.7.

Actions #4

Updated by Go MAEDA over 6 years ago

Mizuki ISHIKAWA, maybe it would be better to use a green tick icon which is used on other pages. What do you think about this idea?

Actions #5

Updated by Mizuki ISHIKAWA over 6 years ago

Go MAEDA wrote:

Mizuki ISHIKAWA, maybe it would be better to use a green tick icon which is used on other pages. What do you think about this idea?

I suggested #29053#note-1 because I did not have the idea of enclosing with a fieldset.
The green tick icon is used frequently on other screens, so I think that the layout you suggested is better.

Actions #6

Updated by Mizuki ISHIKAWA over 6 years ago

By applying the following code, #29053#note-4 layout can be realized.

diff --git a/app/views/users/_mail_notifications.html.erb b/app/views/users/_mail_notifications.html.erb
index 7d253f7e8d..96340dc055 100644
--- a/app/views/users/_mail_notifications.html.erb
+++ b/app/views/users/_mail_notifications.html.erb
@@ -7,6 +7,7 @@
       :onchange => 'if (this.value == "selected") {$("#notified-projects").show();} else {$("#notified-projects").hide();}'
      ) %>
 </p>
+<fieldset class="box" id="notified-project-ids"><legend><%= toggle_checkboxes_link("#notified-project-ids input[type=checkbox]") %><%=l(:label_project_plural)%></legend>
 <%= content_tag 'div', :id => 'notified-projects', :style => (@user.mail_notification == 'selected' ? '' : 'display:none;') do %>
   <%= render_project_nested_lists(@user.projects) do |project|
         content_tag('label', 
@@ -21,6 +22,7 @@
   <%= hidden_field_tag 'user[notified_project_ids][]', '' %>
   <p><em class="info"><%= l(:text_user_mail_option) %></em></p>
 <% end %>
+</fieldset>

 <%= fields_for :pref, @user.pref do |pref_fields| %>
 <p>

Actions #7

Updated by Go MAEDA over 6 years ago

  • Target version changed from 3.4.7 to 4.1.0

I slightly updated the patch in #29053#note-6. The previous patch shows an empty "Projects" box when other than "For any event on the selected projects only..." is selected.

diff --git a/app/views/users/_mail_notifications.html.erb b/app/views/users/_mail_notifications.html.erb
index 7d253f7e8..85842de56 100644
--- a/app/views/users/_mail_notifications.html.erb
+++ b/app/views/users/_mail_notifications.html.erb
@@ -7,7 +7,8 @@
       :onchange => 'if (this.value == "selected") {$("#notified-projects").show();} else {$("#notified-projects").hide();}'
      ) %>
 </p>
-<%= content_tag 'div', :id => 'notified-projects', :style => (@user.mail_notification == 'selected' ? '' : 'display:none;') do %>
+<%= content_tag 'fieldset', :id => 'notified-projects', :style => (@user.mail_notification == 'selected' ? '' : 'display:none;') do %>
+  <legend><%= toggle_checkboxes_link("#notified-projects input[type=checkbox]") %><%=l(:label_project_plural)%></legend>
   <%= render_project_nested_lists(@user.projects) do |project|
         content_tag('label',
           check_box_tag(
Actions #8

Updated by Go MAEDA over 6 years ago

  • Copied to Feature #29080: Add check/uncheck all icon in "Copy" section on copy_project page added
Actions #9

Updated by Go MAEDA over 6 years ago

  • Status changed from New to Closed
  • Assignee set to Go MAEDA
  • Target version changed from 4.1.0 to 4.0.0
  • Resolution set to Fixed

Committed. Thank you for improving Redmine.

Actions

Also available in: Atom PDF