Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
6bd85ee6
Commit
6bd85ee6
authored
Feb 29, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Notifications settings UI
Closes #13859
parent
1fe9b933
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
72 additions
and
70 deletions
+72
-70
app/assets/stylesheets/pages/notifications.scss
app/assets/stylesheets/pages/notifications.scss
+10
-8
app/views/profiles/notifications/_settings.html.haml
app/views/profiles/notifications/_settings.html.haml
+2
-2
app/views/profiles/notifications/show.html.haml
app/views/profiles/notifications/show.html.haml
+60
-60
No files found.
app/assets/stylesheets/pages/notifications.scss
View file @
6bd85ee6
.global-notifications-form
.level-title
{
.notification-list-item
{
font-size
:
15px
;
line-height
:
34px
;
color
:
#333
;
font-weight
:
bold
;
}
}
.notification-icon-holder
{
.notification
{
width
:
20px
;
position
:
relative
;
float
:
left
;
top
:
1px
;
>
.fa
{
font-size
:
18px
;
}
}
}
.ns-part
{
.ns-part
{
color
:
$gl-
primary
;
color
:
$gl-
text-green
;
}
}
.ns-watch
{
.ns-watch
{
...
...
app/views/profiles/notifications/_settings.html.haml
View file @
6bd85ee6
%li
%li
.notification-list-item
%span
.notification.fa.fa-holder
%span
.notification.fa.fa-holder
.append-right-5
-
if
notification
.
global?
-
if
notification
.
global?
=
notification_icon
(
@notification
)
=
notification_icon
(
@notification
)
-
else
-
else
...
...
app/views/profiles/notifications/show.html.haml
View file @
6bd85ee6
-
page_title
"Notifications"
-
page_title
"Notifications"
-
header_title
page_title
,
profile_notifications_path
-
header_title
page_title
,
profile_notifications_path
.prepend-top-default
=
form_for
@user
,
url:
profile_notifications_path
,
method: :put
,
html:
{
class:
'update-notifications prepend-top-default'
}
do
|
f
|
=
form_for
@user
,
url:
profile_notifications_path
,
method: :put
,
html:
{
class:
'update-notifications form-horizontal global-notifications-form'
}
do
|
f
|
-
if
@user
.
errors
.
any?
-
if
@user
.
errors
.
any?
%div
.alert.alert-danger
%div
.alert.alert-danger
%ul
%ul
...
@@ -10,65 +9,66 @@
...
@@ -10,65 +9,66 @@
%li
=
msg
%li
=
msg
=
hidden_field_tag
:notification_type
,
'global'
=
hidden_field_tag
:notification_type
,
'global'
.row
.col-lg-3.profile-settings-sidebar
%h4
=
page_title
%p
You can specify notification level per group or per project.
%p
By default, all projects and groups will use the global notifications setting.
.col-lg-9
%h5
Global notification settings
.form-group
=
f
.
label
:notification_email
,
class:
"label-light"
=
f
.
select
:notification_email
,
@user
.
all_emails
,
{
include_blank:
false
},
class:
"select2"
.form-group
=
f
.
label
:notification_level
,
class:
'label-light'
.radio
=
f
.
label
:notification_level
,
value:
Notification
::
N_DISABLED
do
=
f
.
radio_button
:notification_level
,
Notification
::
N_DISABLED
.level-title
Disabled
%p
You will not get any notifications via email
.form-group
.radio
=
f
.
label
:notification_email
,
class:
"control-label"
=
f
.
label
:notification_level
,
value:
Notification
::
N_MENTION
do
.col-sm-10
=
f
.
radio_button
:notification_level
,
Notification
::
N_MENTION
=
f
.
select
:notification_email
,
@user
.
all_emails
,
{
include_blank:
false
},
class:
"form-control"
.level-title
On Mention
%p
You will receive notifications only for comments in which you were @mentioned
.form-group
.radio
=
f
.
label
:notification_level
,
class:
'control-label'
=
f
.
label
:notification_level
,
value:
Notification
::
N_PARTICIPATING
do
.col-sm-10
=
f
.
radio_button
:notification_level
,
Notification
::
N_PARTICIPATING
.radio
.level-title
=
f
.
label
:notification_level
,
value:
Notification
::
N_DISABLED
do
Participating
=
f
.
radio_button
:notification_level
,
Notification
::
N_DISABLED
%p
You will only receive notifications from related resources (e.g. from your commits or assigned issues)
.level-title
Disabled
%p
You will not get any notifications via email
.radio
.radio
=
f
.
label
:notification_level
,
value:
Notification
::
N_MENTION
do
=
f
.
label
:notification_level
,
value:
Notification
::
N_WATCH
do
=
f
.
radio_button
:notification_level
,
Notification
::
N_MENTION
=
f
.
radio_button
:notification_level
,
Notification
::
N_WATCH
.level-title
.level-title
On Mention
Watch
%p
You will receive notifications only for comments in which you were @mentioned
%p
You will receive notifications for any activity
.radio
.prepend-top-default
=
f
.
label
:notification_level
,
value:
Notification
::
N_PARTICIPATING
do
=
f
.
submit
'Update settings'
,
class:
"btn btn-create"
=
f
.
radio_button
:notification_level
,
Notification
::
N_PARTICIPATING
%hr
.level-title
%h5
Participating
Groups (
#{
@group_members
.
count
}
)
%p
You will only receive notifications from related resources (e.g. from your commits or assigned issues)
%div
%ul
.bordered-list
.radio
-
@group_members
.
each
do
|
group_member
|
=
f
.
label
:notification_level
,
value:
Notification
::
N_WATCH
do
-
notification
=
Notification
.
new
(
group_member
)
=
f
.
radio_button
:notification_level
,
Notification
::
N_WATCH
=
render
'settings'
,
type:
'group'
,
membership:
group_member
,
notification:
notification
.level-title
%h5
Watch
Projects (
#{
@project_members
.
count
}
)
%p
You will receive notifications for any activity
%p
.account-well
To specify the notification level per project of a group you belong to, you need to be a member of the project itself, not only its group.
.gray-content-block
.append-bottom-default
=
f
.
submit
'Save changes'
,
class:
"btn btn-create"
%ul
.bordered-list
-
@project_members
.
each
do
|
project_member
|
.row.all-notifications.prepend-top-default
-
notification
=
Notification
.
new
(
project_member
)
.col-md-6
=
render
'settings'
,
type:
'project'
,
membership:
project_member
,
notification:
notification
%p
You can also specify notification level per group or per project.
%br
By default, all projects and groups will use the notification level set above.
%h4
Groups:
%ul
.bordered-list
-
@group_members
.
each
do
|
group_member
|
-
notification
=
Notification
.
new
(
group_member
)
=
render
'settings'
,
type:
'group'
,
membership:
group_member
,
notification:
notification
.col-md-6
%p
To specify the notification level per project of a group you belong to,
%br
you need to be a member of the project itself, not only its group.
%h4
Projects:
%ul
.bordered-list
-
@project_members
.
each
do
|
project_member
|
-
notification
=
Notification
.
new
(
project_member
)
=
render
'settings'
,
type:
'project'
,
membership:
project_member
,
notification:
notification
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment