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
Jérome Perrin
gitlab-ce
Commits
097c283a
Commit
097c283a
authored
Dec 10, 2016
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove left_align setting from notification setting dropdown in favor of a pure css solution
parent
69ffa814
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
12 additions
and
10 deletions
+12
-10
app/assets/stylesheets/pages/notifications.scss
app/assets/stylesheets/pages/notifications.scss
+4
-0
app/assets/stylesheets/pages/projects.scss
app/assets/stylesheets/pages/projects.scss
+4
-0
app/controllers/notification_settings_controller.rb
app/controllers/notification_settings_controller.rb
+1
-5
app/views/profiles/notifications/show.html.haml
app/views/profiles/notifications/show.html.haml
+1
-1
app/views/shared/notifications/_button.html.haml
app/views/shared/notifications/_button.html.haml
+1
-2
app/views/shared/notifications/_notification_dropdown.html.haml
...ews/shared/notifications/_notification_dropdown.html.haml
+1
-2
No files found.
app/assets/stylesheets/pages/notifications.scss
View file @
097c283a
.notification-list-item
{
line-height
:
34px
;
.dropdown-menu
{
@extend
.dropdown-menu-align-right
;
}
}
.notification
{
...
...
app/assets/stylesheets/pages/projects.scss
View file @
097c283a
...
...
@@ -188,6 +188,10 @@
margin-left
:
10px
;
}
.notification-dropdown
.dropdown-menu
{
@extend
.dropdown-menu-align-right
;
}
.download-button
{
@media
(
max-width
:
$screen-md-max
)
{
margin-left
:
0
;
...
...
app/controllers/notification_settings_controller.rb
View file @
097c283a
...
...
@@ -37,11 +37,7 @@ class NotificationSettingsController < ApplicationController
def
render_response
render
json:
{
html:
view_to_html_string
(
"shared/notifications/_button"
,
notification_setting:
@notification_setting
,
left_align:
@notification_setting
.
source
.
nil?
),
html:
view_to_html_string
(
"shared/notifications/_button"
,
notification_setting:
@notification_setting
),
saved:
@saved
}
end
...
...
app/views/profiles/notifications/show.html.haml
View file @
097c283a
...
...
@@ -30,7 +30,7 @@
%br
.clearfix
.form-group.pull-left.global-notification-setting
=
render
'shared/notifications/button'
,
notification_setting:
@global_notification_setting
,
left_align:
true
=
render
'shared/notifications/button'
,
notification_setting:
@global_notification_setting
.clearfix
...
...
app/views/shared/notifications/_button.html.haml
View file @
097c283a
-
left_align
=
local_assigns
[
:left_align
]
-
if
notification_setting
.dropdown.notification-dropdown
=
form_for
notification_setting
,
remote:
true
,
html:
{
class:
"inline notification-form"
}
do
|
f
|
...
...
@@ -19,7 +18,7 @@
=
notification_title
(
notification_setting
.
level
)
=
icon
(
"caret-down"
)
=
render
"shared/notifications/notification_dropdown"
,
notification_setting:
notification_setting
,
left_align:
left_align
=
render
"shared/notifications/notification_dropdown"
,
notification_setting:
notification_setting
=
content_for
:scripts_body
do
=
render
"shared/notifications/custom_notifications"
,
notification_setting:
notification_setting
app/views/shared/notifications/_notification_dropdown.html.haml
View file @
097c283a
-
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"
unless
left_align
)]
}
%ul
.dropdown-menu.dropdown-menu-no-wrap.dropdown-menu-selectable.dropdown-menu-large
{
role:
"menu"
,
class:
[
notifications_menu_identifier
(
"dropdown"
,
notification_setting
)]
}
-
NotificationSetting
.
levels
.
each_key
do
|
level
|
-
next
if
level
==
"custom"
-
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