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
Léo-Paul Géneau
gitlab-ce
Commits
24f5f071
Commit
24f5f071
authored
Jun 16, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added description to custom option in notification dropdown
Always shows the custom option in the dropdown
parent
89a2c873
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
+8
-6
app/helpers/notifications_helper.rb
app/helpers/notifications_helper.rb
+3
-1
app/views/shared/projects/_notification_dropdown.html.haml
app/views/shared/projects/_notification_dropdown.html.haml
+5
-5
No files found.
app/helpers/notifications_helper.rb
View file @
24f5f071
...
@@ -34,7 +34,7 @@ module NotificationsHelper
...
@@ -34,7 +34,7 @@ module NotificationsHelper
def
notification_description
(
level
)
def
notification_description
(
level
)
case
level
.
to_sym
case
level
.
to_sym
when
:participating
when
:participating
'You will only receive notifications f
rom related resources
'
'You will only receive notifications f
or threads you have participated in
'
when
:mention
when
:mention
'You will receive notifications only for comments in which you were @mentioned'
'You will receive notifications only for comments in which you were @mentioned'
when
:watch
when
:watch
...
@@ -43,6 +43,8 @@ module NotificationsHelper
...
@@ -43,6 +43,8 @@ module NotificationsHelper
'You will not get any notifications via email'
'You will not get any notifications via email'
when
:global
when
:global
'Use your global notification setting'
'Use your global notification setting'
when
:custom
'You will only receive notifications for the events you choose'
end
end
end
end
...
...
app/views/shared/projects/_notification_dropdown.html.haml
View file @
24f5f071
...
@@ -2,8 +2,8 @@
...
@@ -2,8 +2,8 @@
-
NotificationSetting
.
levels
.
each
do
|
level
|
-
NotificationSetting
.
levels
.
each
do
|
level
|
-
if
level
.
first
!=
"custom"
-
if
level
.
first
!=
"custom"
=
notification_list_item
(
level
.
first
,
@notification_setting
)
=
notification_list_item
(
level
.
first
,
@notification_setting
)
-
unless
@notification_setting
.
custom?
%li
.divider
%li
.divider
%li
%
li
%
a
.update-notification
{
href:
"#"
,
role:
"button"
,
data:
{
toggle:
"modal"
,
target:
"#custom-notifications-modal"
,
notification_level:
"custom"
,
notification_title:
"Custom"
}
}
%
a
.update-notification
{
href:
"#"
,
role:
"button"
,
data:
{
toggle:
"modal"
,
target:
"#custom-notifications-modal"
,
notification_level:
"custom"
,
notification_title:
"Custom"
}
}
%
strong
.dropdown-menu-inner-title
Custom
Custom
%span
.dropdown-menu-inner-content
=
notification_description
(
"custom"
)
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