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
{
font-size
:
15px
;
color
:
#333
;
font-weight
:
bold
;
.notification-list-item
{
line-height
:
34px
;
}
.notification-icon-holder
{
width
:
20px
;
float
:
left
;
.notification
{
position
:
relative
;
top
:
1px
;
>
.fa
{
font-size
:
18px
;
}
}
.ns-part
{
color
:
$gl-
primary
;
color
:
$gl-
text-green
;
}
.ns-watch
{
...
...
app/views/profiles/notifications/_settings.html.haml
View file @
6bd85ee6
%li
%span
.notification.fa.fa-holder
%li
.notification-list-item
%span
.notification.fa.fa-holder
.append-right-5
-
if
notification
.
global?
=
notification_icon
(
@notification
)
-
else
...
...
app/views/profiles/notifications/show.html.haml
View file @
6bd85ee6
-
page_title
"Notifications"
-
header_title
page_title
,
profile_notifications_path
.prepend-top-default
=
form_for
@user
,
url:
profile_notifications_path
,
method: :put
,
html:
{
class:
'update-notifications form-horizontal global-notifications-form'
}
do
|
f
|
=
form_for
@user
,
url:
profile_notifications_path
,
method: :put
,
html:
{
class:
'update-notifications prepend-top-default'
}
do
|
f
|
-
if
@user
.
errors
.
any?
%div
.alert.alert-danger
%ul
...
...
@@ -10,15 +9,22 @@
%li
=
msg
=
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:
"control-label"
.col-sm-10
=
f
.
select
:notification_email
,
@user
.
all_emails
,
{
include_blank:
false
},
class:
"form-control"
=
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:
'control-label'
.col-sm-10
=
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
...
...
@@ -47,27 +53,21 @@
Watch
%p
You will receive notifications for any activity
.gray-content-block
=
f
.
submit
'Save changes'
,
class:
"btn btn-create"
.row.all-notifications.prepend-top-default
.col-md-6
%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:
.prepend-top-default
=
f
.
submit
'Update settings'
,
class:
"btn btn-create"
%hr
%h5
Groups (
#{
@group_members
.
count
}
)
%div
%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:
%h5
Projects (
#{
@project_members
.
count
}
)
%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.
.append-bottom-default
%ul
.bordered-list
-
@project_members
.
each
do
|
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