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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
d400c94e
Commit
d400c94e
authored
May 24, 2018
by
Luke Bennett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix accuracy of 'prioritized label' badge, when given different contexts
parent
aba153a4
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
4 deletions
+7
-4
app/views/groups/labels/index.html.haml
app/views/groups/labels/index.html.haml
+1
-1
app/views/projects/labels/index.html.haml
app/views/projects/labels/index.html.haml
+1
-1
app/views/shared/_label.html.haml
app/views/shared/_label.html.haml
+3
-1
app/views/shared/_label_row.html.haml
app/views/shared/_label_row.html.haml
+2
-1
No files found.
app/views/groups/labels/index.html.haml
View file @
d400c94e
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
-
if
can_admin_label
-
if
can_admin_label
%h5
{
class:
(
'hide'
if
hide
)
}
Labels
%h5
{
class:
(
'hide'
if
hide
)
}
Labels
%ul
.content-list.manage-labels-list.js-other-labels
%ul
.content-list.manage-labels-list.js-other-labels
=
render
partial:
'shared/label'
,
subject:
@group
,
collection:
@labels
,
as: :label
=
render
partial:
'shared/label'
,
subject:
@group
,
collection:
@labels
,
as: :label
,
locals:
{
use_label_priority:
true
}
=
paginate
@labels
,
theme:
'gitlab'
=
paginate
@labels
,
theme:
'gitlab'
-
else
-
else
=
render
'shared/empty_states/labels'
=
render
'shared/empty_states/labels'
...
...
app/views/projects/labels/index.html.haml
View file @
d400c94e
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
#js-priority-labels-empty-state
.priority-labels-empty-state
{
class:
"#{'hidden' unless @prioritized_labels.empty?}"
}
#js-priority-labels-empty-state
.priority-labels-empty-state
{
class:
"#{'hidden' unless @prioritized_labels.empty?}"
}
=
render
'shared/empty_states/priority_labels'
=
render
'shared/empty_states/priority_labels'
-
if
@prioritized_labels
.
present?
-
if
@prioritized_labels
.
present?
=
render
partial:
'shared/label'
,
subject:
@project
,
collection:
@prioritized_labels
,
as: :label
=
render
partial:
'shared/label'
,
subject:
@project
,
collection:
@prioritized_labels
,
as: :label
,
locals:
{
force_priority:
true
}
-
if
@labels
.
present?
-
if
@labels
.
present?
.other-labels
.other-labels
...
...
app/views/shared/_label.html.haml
View file @
d400c94e
-
label_css_id
=
dom_id
(
label
)
-
label_css_id
=
dom_id
(
label
)
-
status
=
label_subscription_status
(
label
,
@project
).
inquiry
if
current_user
-
status
=
label_subscription_status
(
label
,
@project
).
inquiry
if
current_user
-
subject
=
local_assigns
[
:subject
]
-
subject
=
local_assigns
[
:subject
]
-
use_label_priority
=
local_assigns
.
fetch
(
:use_label_priority
,
false
)
-
force_priority
=
local_assigns
.
fetch
(
:force_priority
,
use_label_priority
?
label
.
priority?
:
false
)
-
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
=
"
#{
status
.
unsubscribed?
?
'Subscribe'
:
'Unsubscribe'
}
at
#{
label
.
is_a?
(
ProjectLabel
)
?
'project'
:
'group'
}
level"
-
tooltip_title
=
"
#{
status
.
unsubscribed?
?
'Subscribe'
:
'Unsubscribe'
}
at
#{
label
.
is_a?
(
ProjectLabel
)
?
'project'
:
'group'
}
level"
%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
=
render
"shared/label_row"
,
label:
label
,
subject:
subject
,
force_priority:
force_priority
%ul
.label-actions-list
%ul
.label-actions-list
-
if
controller
.
is_a?
(
Projects
::
LabelsController
)
-
if
controller
.
is_a?
(
Projects
::
LabelsController
)
%li
.inline
%li
.inline
...
...
app/views/shared/_label_row.html.haml
View file @
d400c94e
-
subject
=
local_assigns
[
:subject
]
-
subject
=
local_assigns
[
:subject
]
-
force_priority
=
local_assigns
.
fetch
(
:force_priority
,
false
)
-
show_label_issues_link
=
show_label_issuables_link?
(
label
,
:issues
,
project:
@project
)
-
show_label_issues_link
=
show_label_issuables_link?
(
label
,
:issues
,
project:
@project
)
-
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
)
...
@@ -17,6 +18,6 @@
...
@@ -17,6 +18,6 @@
·
·
%li
.label-link-item.inline
%li
.label-link-item.inline
=
link_to_label
(
label
,
subject:
subject
,
type: :merge_request
)
{
_
(
'Merge requests'
)
}
=
link_to_label
(
label
,
subject:
subject
,
type: :merge_request
)
{
_
(
'Merge requests'
)
}
-
if
label
.
priority?
-
if
force_priority
%li
.label-link-item.js-priority-badge.inline.prepend-left-10
%li
.label-link-item.js-priority-badge.inline.prepend-left-10
.label-badge.label-badge-blue
=
_
(
'Prioritized label'
)
.label-badge.label-badge-blue
=
_
(
'Prioritized label'
)
\ No newline at end of file
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