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
0
Merge Requests
0
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
iv
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
Show 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,15 +9,22 @@
...
@@ -10,15 +9,22 @@
%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
.form-group
=
f
.
label
:notification_email
,
class:
"control-label"
=
f
.
label
:notification_email
,
class:
"label-light"
.col-sm-10
=
f
.
select
:notification_email
,
@user
.
all_emails
,
{
include_blank:
false
},
class:
"select2"
=
f
.
select
:notification_email
,
@user
.
all_emails
,
{
include_blank:
false
},
class:
"form-control"
.form-group
.form-group
=
f
.
label
:notification_level
,
class:
'control-label'
=
f
.
label
:notification_level
,
class:
'label-light'
.col-sm-10
.radio
.radio
=
f
.
label
:notification_level
,
value:
Notification
::
N_DISABLED
do
=
f
.
label
:notification_level
,
value:
Notification
::
N_DISABLED
do
=
f
.
radio_button
:notification_level
,
Notification
::
N_DISABLED
=
f
.
radio_button
:notification_level
,
Notification
::
N_DISABLED
...
@@ -47,27 +53,21 @@
...
@@ -47,27 +53,21 @@
Watch
Watch
%p
You will receive notifications for any activity
%p
You will receive notifications for any activity
.gray-content-block
.prepend-top-default
=
f
.
submit
'Save changes'
,
class:
"btn btn-create"
=
f
.
submit
'Update settings'
,
class:
"btn btn-create"
%hr
.row.all-notifications.prepend-top-default
%h5
.col-md-6
Groups (
#{
@group_members
.
count
}
)
%p
%div
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
%ul
.bordered-list
-
@group_members
.
each
do
|
group_member
|
-
@group_members
.
each
do
|
group_member
|
-
notification
=
Notification
.
new
(
group_member
)
-
notification
=
Notification
.
new
(
group_member
)
=
render
'settings'
,
type:
'group'
,
membership:
group_member
,
notification:
notification
=
render
'settings'
,
type:
'group'
,
membership:
group_member
,
notification:
notification
%h5
.col-md-6
Projects (
#{
@project_members
.
count
}
)
%p
%p
.account-well
To specify the notification level per project of a group you belong to,
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.
%br
.append-bottom-default
you need to be a member of the project itself, not only its group.
%h4
Projects:
%ul
.bordered-list
%ul
.bordered-list
-
@project_members
.
each
do
|
project_member
|
-
@project_members
.
each
do
|
project_member
|
-
notification
=
Notification
.
new
(
project_member
)
-
notification
=
Notification
.
new
(
project_member
)
...
...
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