Commit 9f38cf50 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Improve Notifications page. Much easier to find muted projects now

parent c4856e6f
module NotificationsHelper module NotificationsHelper
def notification_icon(notification)
if notification.disabled?
content_tag :i, nil, class: 'icon-circle cred'
elsif notification.participating?
content_tag :i, nil, class: 'icon-circle cblue'
elsif notification.watch?
content_tag :i, nil, class: 'icon-circle cgreen'
else
content_tag :i, nil, class: 'icon-circle-blank cblue'
end
end
end end
...@@ -55,4 +55,4 @@ ...@@ -55,4 +55,4 @@
- else - else
= link_to 'Block', block_admin_user_path(user), confirm: 'USER WILL BE BLOCKED! Are you sure?', method: :put, class: "btn btn-small btn-remove" = link_to 'Block', block_admin_user_path(user), confirm: 'USER WILL BE BLOCKED! Are you sure?', method: :put, class: "btn btn-small btn-remove"
= link_to 'Destroy', [:admin, user], confirm: "USER #{user.name} WILL BE REMOVED! Are you sure?", method: :delete, class: "btn btn-small btn-remove" = link_to 'Destroy', [:admin, user], confirm: "USER #{user.name} WILL BE REMOVED! Are you sure?", method: :delete, class: "btn btn-small btn-remove"
= paginate @users, theme: "gitlab" = paginate @users, theme: "gitlab"
%h3.page-title My Projects
.row .row
.span3 .span3
%ul.nav.nav-pills.nav-stacked %ul.nav.nav-pills.nav-stacked
......
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
.row .row
.span4 .span4
%span %span
= notification_icon(notification)
- if membership.kind_of? UsersGroup - if membership.kind_of? UsersGroup
= link_to membership.group.name, membership.group = link_to membership.group.name, membership.group
- else - else
......
%h3.page-title Setup your notification level %h3.page-title
Notifications settings
%p.light
%strong Disabled .alert.alert-info
– You will not get any notifications via email %p
%p.light %i.icon-circle.cred
%strong Participating %strong Disabled
– You will receive only notifications from related resources(ex. from assigned issue or your commit) – You will not get any notifications via email
%p.light %p
%strong Watch %i.icon-circle.cblue
– You will receive all notifications from projects in which you participate %strong Participating
%hr – You will receive only notifications from related resources(ex. from assigned issue or your commit)
%p
%i.icon-circle.cgreen
%strong Watch
– You will receive all notifications from projects in which you participate
.row .row
.span4 .span4
%h5 Global setting %h4
= notification_icon(@notification)
Global setting
.span7 .span7
= form_tag profile_notifications_path, method: :put, remote: true, class: 'update-notifications' do = form_tag profile_notifications_path, method: :put, remote: true, class: 'update-notifications' do
= hidden_field_tag :notification_type, 'global' = hidden_field_tag :notification_type, 'global'
...@@ -30,20 +36,21 @@ ...@@ -30,20 +36,21 @@
= radio_button_tag :notification_level, Notification::N_WATCH, @notification.watch?, class: 'trigger-submit' = radio_button_tag :notification_level, Notification::N_WATCH, @notification.watch?, class: 'trigger-submit'
%span Watch %span Watch
%hr %br
= link_to '#', class: 'js-toggle-visibility-link' do = link_to '#', class: 'js-toggle-visibility-link' do
%h6.btn.btn-tiny %span.btn.btn-tiny
%i.icon-chevron-down %i.icon-chevron-down
%span Advanced notifications settings %span Advanced notifications settings
.js-toggle-visibility-container.hide .js-toggle-visibility-container.hide
%h5 Groups: %hr
%ul.well-list %h4 Groups:
%ul.bordered-list
- @users_groups.each do |users_group| - @users_groups.each do |users_group|
- notification = Notification.new(users_group) - notification = Notification.new(users_group)
= render 'settings', type: 'group', membership: users_group, notification: notification = render 'settings', type: 'group', membership: users_group, notification: notification
%h5 Projects: %h4 Projects:
%ul.well-list %ul.bordered-list
- @users_projects.each do |users_project| - @users_projects.each do |users_project|
- notification = Notification.new(users_project) - notification = Notification.new(users_project)
= render 'settings', type: 'project', membership: users_project, notification: notification = render 'settings', type: 'project', membership: users_project, notification: notification
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment