You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

_mail_notifications.html.erb 1.7KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <p>
  2. <%= label_tag "user_mail_notification", l(:description_user_mail_notification), :class => "hidden-for-sighted" %>
  3. <%= select_tag(
  4. 'user[mail_notification]',
  5. options_for_select(
  6. user_mail_notification_options(@user), @user.mail_notification),
  7. :onchange => 'if (this.value == "selected") {$("#notified-projects").show();} else {$("#notified-projects").hide();}'
  8. ) %>
  9. </p>
  10. <%= content_tag 'fieldset', :id => 'notified-projects', :style => (@user.mail_notification == 'selected' ? '' : 'display:none;') do %>
  11. <legend><%= toggle_checkboxes_link("#notified-projects input[type=checkbox]") %><%=l(:label_project_plural)%></legend>
  12. <%= render_project_nested_lists(@user.projects) do |project|
  13. content_tag('label',
  14. check_box_tag(
  15. 'user[notified_project_ids][]',
  16. project.id,
  17. @user.notified_projects_ids.include?(project.id),
  18. :id => nil
  19. ) + ' ' + h(project.name)
  20. )
  21. end %>
  22. <%= hidden_field_tag 'user[notified_project_ids][]', '' %>
  23. <p><em class="info"><%= l(:text_user_mail_option) %></em></p>
  24. <% end %>
  25. <%= fields_for :pref, @user.pref do |pref_fields| %>
  26. <% if IssuePriority.default_or_middle and high_priority = IssuePriority.where(['position > ?', IssuePriority.default_or_middle.position]).first %>
  27. <p>
  28. <%= pref_fields.check_box :notify_about_high_priority_issues %>
  29. <label for="pref_notify_about_high_priority_issues"><%= t(:label_user_mail_notify_about_high_priority_issues_html, prio: high_priority.name.downcase) %></label>
  30. </p>
  31. <% end %>
  32. <p>
  33. <%= pref_fields.check_box :no_self_notified %>
  34. <label for="pref_no_self_notified"><%= l(:label_user_mail_no_self_notified) %></label>
  35. </p>
  36. <% end %>