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
dd6b4227
Commit
dd6b4227
authored
Apr 11, 2019
by
Winnie Hellmann
Committed by
James Lopez
Apr 11, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hide scoped labels help text without corresponding license
parent
e2b21a24
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
71 additions
and
14 deletions
+71
-14
ee/app/views/shared/labels/_create_label_help_text.html.haml
ee/app/views/shared/labels/_create_label_help_text.html.haml
+15
-14
ee/changelogs/unreleased/winh-hide-scoped-labels-message-ee.yml
...ngelogs/unreleased/winh-hide-scoped-labels-message-ee.yml
+5
-0
ee/spec/views/shared/labels/_create_label_help_text.html.haml_spec.rb
...s/shared/labels/_create_label_help_text.html.haml_spec.rb
+51
-0
No files found.
ee/app/views/shared/labels/_create_label_help_text.html.haml
View file @
dd6b4227
-
docs_link
=
help_page_path
(
'user/project/labels.md'
,
anchor:
'scoped-labels'
)
-
if
@label
.
subject
.
feature_available?
(
:scoped_labels
)
-
docs_link
=
help_page_path
(
'user/project/labels.md'
,
anchor:
'scoped-labels'
)
.col-sm-10.offset-sm-2.form-text.text-muted.js-has-scoped-labels.hidden
Using
%code
::
denotes a
%a
{
href:
docs_link
,
target:
'_blank'
,
rel:
'noopener noreferrer'
}
scoped label set
.col-sm-10.offset-sm-2.form-text.text-muted.js-use-scoped-labels
Use
%code
::
to create a
%a
{
href:
docs_link
,
target:
'_blank'
,
rel:
'noopener noreferrer'
}
scoped label set
(eg.
%code
priority::1
)
.col-sm-10.offset-sm-2.form-text.text-muted.js-has-scoped-labels.hidden
Using
%code
::
denotes a
%a
{
href:
docs_link
,
target:
'_blank'
,
rel:
'noopener noreferrer'
}
scoped label set
.col-sm-10.offset-sm-2.form-text.text-muted.js-use-scoped-labels
Use
%code
::
to create a
%a
{
href:
docs_link
,
target:
'_blank'
,
rel:
'noopener noreferrer'
}
scoped label set
(eg.
%code
priority::1
)
ee/changelogs/unreleased/winh-hide-scoped-labels-message-ee.yml
0 → 100644
View file @
dd6b4227
---
title
:
Hide scoped labels help text without corresponding license
merge_request
:
10737
author
:
type
:
fixed
ee/spec/views/shared/labels/_create_label_help_text.html.haml_spec.rb
0 → 100644
View file @
dd6b4227
# frozen_string_literal: true
require
'spec_helper'
describe
'app/views/shared/labels/_create_label_help_text.html.haml'
do
include
ApplicationHelper
shared_examples
'scoped labels'
do
context
'when license has scoped labels feature'
do
before
do
stub_licensed_features
(
scoped_labels:
true
)
end
it
'displays scoped labels hint'
do
render
'shared/labels/create_label_help_text'
expect
(
rendered
).
to
have_content
'scoped label'
end
end
context
'when license does not have scoped labels feature'
do
before
do
stub_licensed_features
(
scoped_labels:
false
)
end
it
'does not display scoped labels hint'
do
render
'shared/labels/create_label_help_text'
expect
(
rendered
).
not_to
have_content
'scoped label'
end
end
end
context
'for project label'
do
before
do
project
=
create
(
:project
)
@label
=
project
.
labels
.
new
end
include_examples
'scoped labels'
end
context
'for group label'
do
before
do
group
=
create
(
:group
)
@label
=
group
.
labels
.
new
end
include_examples
'scoped labels'
end
end
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