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
023c978d
Commit
023c978d
authored
Dec 09, 2019
by
Florie Guibert
Committed by
Heinrich Lee Yu
Feb 25, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor labels in board sidebar
parent
33ad59e2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
8 deletions
+37
-8
app/assets/javascripts/boards/components/board_sidebar.js
app/assets/javascripts/boards/components/board_sidebar.js
+11
-0
app/assets/stylesheets/pages/issuable.scss
app/assets/stylesheets/pages/issuable.scss
+15
-1
app/views/shared/boards/components/sidebar/_labels.html.haml
app/views/shared/boards/components/sidebar/_labels.html.haml
+11
-7
No files found.
app/assets/javascripts/boards/components/board_sidebar.js
View file @
023c978d
...
...
@@ -147,6 +147,17 @@ export default Vue.extend({
showScopedLabels
(
label
)
{
return
boardsStore
.
scopedLabels
.
enabled
&&
isScopedLabel
(
label
);
},
splitScopedLabel
(
label
)
{
return
label
.
title
.
split
(
'
::
'
);
},
scopedLabelScope
(
label
)
{
const
splitLabel
=
this
.
splitScopedLabel
(
label
)
return
splitLabel
[
0
];
},
scopedValue
(
label
)
{
const
splitLabel
=
this
.
splitScopedLabel
(
label
)
return
splitLabel
[
1
];
},
helpLink
()
{
return
boardsStore
.
scopedLabels
.
helpLink
;
},
...
...
app/assets/stylesheets/pages/issuable.scss
View file @
023c978d
...
...
@@ -86,9 +86,23 @@
}
.issuable-show-labels
{
a
{
.gl-label-scoped
{
border-style
:
solid
;
border-width
:
2px
;
&
.gl-label-sm
{
border-width
:
1px
;
}
.gl-label-text
:last-child
{
padding-right
:
22px
;
}
}
.gl-label
{
margin-bottom
:
5px
;
margin-right
:
5px
;
}
a
{
display
:
inline-block
;
.color-label
{
...
...
app/views/shared/boards/components/sidebar/_labels.html.haml
View file @
023c978d
...
...
@@ -9,14 +9,18 @@
=
_
(
"None"
)
%span
{
"v-for"
=>
"label in issue.labels"
}
%span
.d-inline-block.position-relative.scoped-label-wrapper
{
"v-if"
=>
"showScopedLabels(label)"
}
%a
{
href:
'#'
}
%span
.badge.color-label.label
{
":style"
=>
"{ backgroundColor: label.color, color: label.textColor }"
}
%span
.gl-label.gl-label-scoped
{
":style"
=>
"{ borderColor: label.color }"
}
%a
.gl-link.gl-label-link
{
href:
'#'
}
%span
.gl-label-text
{
":style"
=>
"{ backgroundColor: label.color, color: label.textColor }"
}
{{ scopedLabelScope(label) }}
%span
.gl-label-text
{
":style"
=>
"{ backgroundColor: label.textColor, color: label.Color }"
}
{{ scopedValue(label) }}
%a
.label.scoped-label.gl-link.gl-label-icon
{
":href"
=>
"helpLink()"
}
%i
.fa.fa-question-circle
%span
.gl-label
{
"v-else"
=>
true
}
%a
.gl-link.gl-label-link
{
href:
"#"
}
%span
.gl-label-text
{
":style"
=>
"{ backgroundColor: label.color, color: label.textColor }"
}
{{ label.title }}
%a
.label.scoped-label
{
":href"
=>
"helpLink()"
}
%i
.fa.fa-question-circle
{
":style"
=>
"{ backgroundColor: label.color, color: label.textColor }"
}
%a
{
href:
"#"
,
"v-else"
=>
true
}
.badge.color-label.has-tooltip
{
":style"
=>
"{ backgroundColor: label.color, color: label.textColor }"
}
{{ label.title }}
-
if
can_admin_issue?
.selectbox
...
...
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