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
531d27e7
Commit
531d27e7
authored
Jun 17, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed alignment of notification dropdown menu
parent
33c61bd4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
4 deletions
+6
-4
_notifications.html.haml
app/views/notifications/buttons/_notifications.html.haml
+3
-2
show.html.haml
app/views/profiles/notifications/show.html.haml
+1
-1
_notification_dropdown.html.haml
...ews/shared/notifications/_notification_dropdown.html.haml
+2
-1
No files found.
app/views/notifications/buttons/_notifications.html.haml
View file @
531d27e7
-
left_align
=
local_assigns
[
:left_align
]
-
if
notification_setting
-
if
notification_setting
.dropdown.notification-dropdown.pull-right
.dropdown.notification-dropdown.pull-right
=
form_for
notification_setting
,
remote:
true
,
html:
{
class:
"inline"
,
id:
"notification-form"
}
do
|
f
|
=
form_for
notification_setting
,
remote:
true
,
html:
{
class:
"inline"
,
id:
"notification-form"
}
do
|
f
|
=
hidden_setting_source_input
(
notification_setting
)
=
hidden_setting_source_input
(
notification_setting
)
=
f
.
hidden_field
:level
,
class:
"notification_setting_level"
=
f
.
hidden_field
:level
,
class:
"notification_setting_level"
.js-notification-toggle-btns
.js-notification-toggle-btns
.btn-group
%div
{
class:
(
"btn-group"
if
notification_setting
.
custom?
)
}
-
if
notification_setting
.
custom?
-
if
notification_setting
.
custom?
%button
.dropdown-new.btn.btn-default.notifications-btn
#notifications-button
{
type:
"button"
,
data:
{
toggle:
"modal"
,
target:
"#"
+
notifications_menu_identifier
(
"modal"
,
notification_setting
)
}
}
%button
.dropdown-new.btn.btn-default.notifications-btn
#notifications-button
{
type:
"button"
,
data:
{
toggle:
"modal"
,
target:
"#"
+
notifications_menu_identifier
(
"modal"
,
notification_setting
)
}
}
=
icon
(
"bell"
,
class:
"js-notification-loading"
)
=
icon
(
"bell"
,
class:
"js-notification-loading"
)
...
@@ -18,7 +19,7 @@
...
@@ -18,7 +19,7 @@
=
notification_title
(
notification_setting
.
level
)
=
notification_title
(
notification_setting
.
level
)
=
icon
(
"caret-down"
)
=
icon
(
"caret-down"
)
=
render
"shared/notifications/notification_dropdown"
,
notification_setting:
notification_setting
=
render
"shared/notifications/notification_dropdown"
,
notification_setting:
notification_setting
,
left_align:
left_align
=
content_for
:scripts_body
do
=
content_for
:scripts_body
do
=
render
"shared/notifications/custom_notifications"
,
notification_setting:
notification_setting
=
render
"shared/notifications/custom_notifications"
,
notification_setting:
notification_setting
app/views/profiles/notifications/show.html.haml
View file @
531d27e7
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
%br
%br
.clearfix
.clearfix
.form-group.pull-left
.form-group.pull-left
=
render
'notifications/buttons/notifications'
,
notification_setting:
@global_notification_setting
=
render
'notifications/buttons/notifications'
,
notification_setting:
@global_notification_setting
,
left_align:
true
.clearfix
.clearfix
...
...
app/views/shared/notifications/_notification_dropdown.html.haml
View file @
531d27e7
%ul
.dropdown-menu.dropdown-menu-no-wrap.dropdown-menu-align-right.dropdown-menu-selectable.dropdown-menu-large
{
role:
"menu"
,
class:
notifications_menu_identifier
(
"dropdown"
,
notification_setting
)
}
-
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?
)]
}
-
NotificationSetting
.
levels
.
each_key
do
|
level
|
-
NotificationSetting
.
levels
.
each_key
do
|
level
|
-
next
if
level
==
"custom"
-
next
if
level
==
"custom"
-
next
if
level
==
"global"
&&
notification_setting
.
source
.
nil?
-
next
if
level
==
"global"
&&
notification_setting
.
source
.
nil?
...
...
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