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
Boxiang Sun
gitlab-ce
Commits
4a1d19a6
Commit
4a1d19a6
authored
May 29, 2018
by
Luke Bennett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tidy tooltip_title and fix dropdown open left
parent
5e5828a4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
10 deletions
+8
-10
app/helpers/labels_helper.rb
app/helpers/labels_helper.rb
+5
-7
app/views/shared/_label.html.haml
app/views/shared/_label.html.haml
+3
-3
No files found.
app/helpers/labels_helper.rb
View file @
4a1d19a6
...
@@ -211,14 +211,12 @@ module LabelsHelper
...
@@ -211,14 +211,12 @@ module LabelsHelper
end
end
end
end
def
label_status_tooltip
(
status
)
def
label_status_tooltip
(
label
,
status
)
return
''
unless
status
type
=
label
.
is_a?
(
ProjectLabel
)
?
'project'
:
'group'
level
=
status
.
unsubscribed?
?
type
:
status
.
sub
(
'-level'
,
''
)
action
=
status
.
unsubscribed?
?
'Subscribe'
:
'Unsubscribe'
if
status
.
unsubscribed?
"
#{
action
}
at
#{
level
}
level"
"Subscribe at
#{
label
.
is_a?
(
ProjectLabel
)
?
'project'
:
'group'
}
level"
else
"Unsubscribe at
#{
status
.
sub
(
'-'
,
' '
)
}
"
end
end
end
# Required for Banzai::Filter::LabelReferenceFilter
# Required for Banzai::Filter::LabelReferenceFilter
...
...
app/views/shared/_label.html.haml
View file @
4a1d19a6
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
-
toggle_subscription_path
=
toggle_subscription_label_path
(
label
,
@project
)
if
current_user
-
toggle_subscription_path
=
toggle_subscription_label_path
(
label
,
@project
)
if
current_user
-
show_label_merge_requests_link
=
show_label_issuables_link?
(
label
,
:merge_requests
,
project:
@project
)
-
show_label_merge_requests_link
=
show_label_issuables_link?
(
label
,
:merge_requests
,
project:
@project
)
-
show_label_issues_link
=
show_label_issuables_link?
(
label
,
:issues
,
project:
@project
)
-
show_label_issues_link
=
show_label_issuables_link?
(
label
,
:issues
,
project:
@project
)
-
tooltip_title
=
label_status_tooltip
(
status
)
-
tooltip_title
=
label_status_tooltip
(
label
,
status
)
if
status
%li
.label-list-item
{
id:
label_css_id
,
data:
{
id:
label
.
id
}
}
%li
.label-list-item
{
id:
label_css_id
,
data:
{
id:
label
.
id
}
}
=
render
"shared/label_row"
,
label:
label
,
subject:
subject
,
force_priority:
force_priority
=
render
"shared/label_row"
,
label:
label
,
subject:
subject
,
force_priority:
force_priority
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
.dropdown
.dropdown
%button
{
type:
'button'
,
class:
'btn btn-transparent js-label-options-dropdown label-action'
,
data:
{
toggle:
'dropdown'
}
}
%button
{
type:
'button'
,
class:
'btn btn-transparent js-label-options-dropdown label-action'
,
data:
{
toggle:
'dropdown'
}
}
=
sprite_icon
(
'ellipsis_v'
)
=
sprite_icon
(
'ellipsis_v'
)
.dropdown-menu.dropdown-
menu-align-righ
t
.dropdown-menu.dropdown-
open-lef
t
%ul
%ul
-
if
label
.
is_a?
(
ProjectLabel
)
&&
label
.
project
.
group
&&
can?
(
current_user
,
:admin_label
,
label
.
project
.
group
)
-
if
label
.
is_a?
(
ProjectLabel
)
&&
label
.
project
.
group
&&
can?
(
current_user
,
:admin_label
,
label
.
project
.
group
)
%li
%li
...
@@ -55,7 +55,7 @@
...
@@ -55,7 +55,7 @@
%span
%span
=
_
(
'Subscribe'
)
=
_
(
'Subscribe'
)
=
sprite_icon
(
'chevron-down'
)
=
sprite_icon
(
'chevron-down'
)
.dropdown-menu.dropdown-
menu-align-righ
t
.dropdown-menu.dropdown-
open-lef
t
%ul
%ul
%li
%li
%button
.js-subscribe-button.label-subscribe-button.btn.btn-default
{
class:
(
'hidden'
unless
status
.
unsubscribed?
),
data:
{
status:
status
,
url:
toggle_subscription_project_label_path
(
@project
,
label
)
}
}
%button
.js-subscribe-button.label-subscribe-button.btn.btn-default
{
class:
(
'hidden'
unless
status
.
unsubscribed?
),
data:
{
status:
status
,
url:
toggle_subscription_project_label_path
(
@project
,
label
)
}
}
...
...
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