BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
4b204f07
Commit
4b204f07
authored
Jun 17, 2016
by
Felipe Artur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small frontend code fixes and restore 8a2d88f commit
parent
e5aa9028
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
7 deletions
+11
-7
_custom_notifications.html.haml
...iews/shared/notifications/_custom_notifications.html.haml
+9
-5
_notification_dropdown.html.haml
...ews/shared/notifications/_notification_dropdown.html.haml
+2
-2
No files found.
app/views/shared/notifications/_custom_notifications.html.haml
View file @
4b204f07
...
...
@@ -12,16 +12,20 @@
=
form_for
notification_setting
,
html:
{
class:
"custom-notifications-form"
}
do
|
f
|
=
hidden_setting_source_input
(
notification_setting
)
.row
.col-lg-
3
.col-lg-
4
%h4
.prepend-top-0
Notification events
.col-lg-9
%p
Custom notification levels are the same as participating levels. With custom notification levels you will also receive notifications for select events. To find out more, check out
=
succeed
"."
do
%a
{
href:
"http://docs.gitlab.com/ce/workflow/notifications.html"
,
target:
"_blank"
}
notification emails
.col-lg-8
-
NotificationSetting
::
EMAIL_EVENTS
.
each_with_index
do
|
event
,
index
|
-
field_id
=
"
#{
notifications_menu_identifier
(
"modal"
,
notification_setting
)
}
_notification_setting[
#{
event
}
]"
.form-group
.checkbox
{
class:
(
"prepend-top-0"
if
index
==
0
)
}
%label
{
for:
"notification_setting[#{event}]"
}
=
check_box
(
""
,
event
,
{
name:
"notification_setting[
#{
event
}
]"
,
id:
"notification_setting[
#{
event
}
]"
,
class:
"js-custom-notification-event"
,
checked:
notification_setting
.
events
[
event
]
})
%label
{
for:
field_id
}
=
check_box
(
"notification_setting"
,
event
,
id:
field_id
,
class:
"js-custom-notification-event"
,
checked:
notification_setting
.
events
[
event
])
%strong
=
event
.
to_s
.
humanize
=
icon
(
"spinner spin"
,
class:
"custom-notification-event-loading"
)
app/views/shared/notifications/_notification_dropdown.html.haml
View file @
4b204f07
-
left_align
=
local_assigns
[
:left_align
]
%ul
.dropdown-menu.dropdown-menu-no-wrap.dropdown-menu-selectable.dropdown-menu-large
{
role:
"menu"
,
class:
[
notifications_menu_identifier
(
"dropdown"
,
notification_setting
),
(
"dropdown-menu-align-right"
if
left_align
.
nil?
)]
}
%ul
.dropdown-menu.dropdown-menu-no-wrap.dropdown-menu-selectable.dropdown-menu-large
{
role:
"menu"
,
class:
[
notifications_menu_identifier
(
"dropdown"
,
notification_setting
),
(
"dropdown-menu-align-right"
unless
left_align
)]
}
-
NotificationSetting
.
levels
.
each_key
do
|
level
|
-
next
if
level
==
"custom"
-
next
if
level
==
"global"
&&
notification_setting
.
source
.
nil?
...
...
@@ -8,6 +8,6 @@
%li
.divider
%li
%a
.update-notification
{
href:
"#"
,
role:
"button"
,
class:
(
"is-active"
if
notification_setting
.
level
==
"custom"
),
data:
{
toggle:
"modal"
,
target:
"#"
+
notifications_menu_identifier
(
"modal"
,
notification_setting
),
notification_level:
"custom"
,
notification_title:
"Custom"
}
}
%a
.update-notification
{
href:
"#"
,
role:
"button"
,
class:
(
"is-active"
if
notification_setting
.
custom?
),
data:
{
toggle:
"modal"
,
target:
"#"
+
notifications_menu_identifier
(
"modal"
,
notification_setting
),
notification_level:
"custom"
,
notification_title:
"Custom"
}
}
%strong
.dropdown-menu-inner-title
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