Commit 9f38cf5093f5141717cfa1b1c956ed8ec9135ebe
1 parent
c4856e6f
Exists in
master
and in
4 other branches
Improve Notifications page. Much easier to find muted projects now
Showing
5 changed files
with
41 additions
and
20 deletions
Show diff stats
app/helpers/notifications_helper.rb
| 1 | 1 | module NotificationsHelper |
| 2 | + def notification_icon(notification) | |
| 3 | + if notification.disabled? | |
| 4 | + content_tag :i, nil, class: 'icon-circle cred' | |
| 5 | + elsif notification.participating? | |
| 6 | + content_tag :i, nil, class: 'icon-circle cblue' | |
| 7 | + elsif notification.watch? | |
| 8 | + content_tag :i, nil, class: 'icon-circle cgreen' | |
| 9 | + else | |
| 10 | + content_tag :i, nil, class: 'icon-circle-blank cblue' | |
| 11 | + end | |
| 12 | + end | |
| 2 | 13 | end | ... | ... |
app/views/admin/users/index.html.haml
| ... | ... | @@ -55,4 +55,4 @@ |
| 55 | 55 | - else |
| 56 | 56 | = link_to 'Block', block_admin_user_path(user), confirm: 'USER WILL BE BLOCKED! Are you sure?', method: :put, class: "btn btn-small btn-remove" |
| 57 | 57 | = link_to 'Destroy', [:admin, user], confirm: "USER #{user.name} WILL BE REMOVED! Are you sure?", method: :delete, class: "btn btn-small btn-remove" |
| 58 | - = paginate @users, theme: "gitlab" | |
| 58 | + = paginate @users, theme: "gitlab" | ... | ... |
app/views/dashboard/projects.html.haml
app/views/profiles/notifications/_settings.html.haml
app/views/profiles/notifications/show.html.haml
| 1 | -%h3.page-title Setup your notification level | |
| 2 | - | |
| 3 | -%p.light | |
| 4 | - %strong Disabled | |
| 5 | - – You will not get any notifications via email | |
| 6 | -%p.light | |
| 7 | - %strong Participating | |
| 8 | - – You will receive only notifications from related resources(ex. from assigned issue or your commit) | |
| 9 | -%p.light | |
| 10 | - %strong Watch | |
| 11 | - – You will receive all notifications from projects in which you participate | |
| 12 | -%hr | |
| 1 | +%h3.page-title | |
| 2 | + Notifications settings | |
| 3 | + | |
| 4 | +.alert.alert-info | |
| 5 | + %p | |
| 6 | + %i.icon-circle.cred | |
| 7 | + %strong Disabled | |
| 8 | + – You will not get any notifications via email | |
| 9 | + %p | |
| 10 | + %i.icon-circle.cblue | |
| 11 | + %strong Participating | |
| 12 | + – You will receive only notifications from related resources(ex. from assigned issue or your commit) | |
| 13 | + %p | |
| 14 | + %i.icon-circle.cgreen | |
| 15 | + %strong Watch | |
| 16 | + – You will receive all notifications from projects in which you participate | |
| 13 | 17 | |
| 14 | 18 | .row |
| 15 | 19 | .span4 |
| 16 | - %h5 Global setting | |
| 20 | + %h4 | |
| 21 | + = notification_icon(@notification) | |
| 22 | + Global setting | |
| 17 | 23 | .span7 |
| 18 | 24 | = form_tag profile_notifications_path, method: :put, remote: true, class: 'update-notifications' do |
| 19 | 25 | = hidden_field_tag :notification_type, 'global' |
| ... | ... | @@ -30,20 +36,21 @@ |
| 30 | 36 | = radio_button_tag :notification_level, Notification::N_WATCH, @notification.watch?, class: 'trigger-submit' |
| 31 | 37 | %span Watch |
| 32 | 38 | |
| 33 | -%hr | |
| 39 | +%br | |
| 34 | 40 | = link_to '#', class: 'js-toggle-visibility-link' do |
| 35 | - %h6.btn.btn-tiny | |
| 41 | + %span.btn.btn-tiny | |
| 36 | 42 | %i.icon-chevron-down |
| 37 | 43 | %span Advanced notifications settings |
| 38 | 44 | .js-toggle-visibility-container.hide |
| 39 | - %h5 Groups: | |
| 40 | - %ul.well-list | |
| 45 | + %hr | |
| 46 | + %h4 Groups: | |
| 47 | + %ul.bordered-list | |
| 41 | 48 | - @users_groups.each do |users_group| |
| 42 | 49 | - notification = Notification.new(users_group) |
| 43 | 50 | = render 'settings', type: 'group', membership: users_group, notification: notification |
| 44 | 51 | |
| 45 | - %h5 Projects: | |
| 46 | - %ul.well-list | |
| 52 | + %h4 Projects: | |
| 53 | + %ul.bordered-list | |
| 47 | 54 | - @users_projects.each do |users_project| |
| 48 | 55 | - notification = Notification.new(users_project) |
| 49 | 56 | = render 'settings', type: 'project', membership: users_project, notification: notification | ... | ... |