BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
34769efa
Commit
34769efa
authored
Mar 03, 2016
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change content of cross project label
parent
d49c8e8e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
labels_helper.rb
app/helpers/labels_helper.rb
+2
-2
label_reference_filter_spec.rb
spec/lib/banzai/filter/label_reference_filter_spec.rb
+3
-3
No files found.
app/helpers/labels_helper.rb
View file @
34769efa
...
@@ -64,8 +64,8 @@ module LabelsHelper
...
@@ -64,8 +64,8 @@ module LabelsHelper
end
end
def
render_colored_cross_project_label
(
label
)
def
render_colored_cross_project_label
(
label
)
label_suffix
=
label
.
project
.
name
label_suffix
=
label
.
project
.
name
_with_namespace
label_suffix
=
" <i>
«
#{
label_suffix
}
</i>"
label_suffix
=
" <i>
in
#{
label_suffix
}
</i>"
render_colored_label
(
label
,
label_suffix
)
render_colored_label
(
label
,
label_suffix
)
end
end
...
...
spec/lib/banzai/filter/label_reference_filter_spec.rb
View file @
34769efa
...
@@ -178,8 +178,8 @@ describe Banzai::Filter::LabelReferenceFilter, lib: true do
...
@@ -178,8 +178,8 @@ describe Banzai::Filter::LabelReferenceFilter, lib: true do
end
end
describe
'cross project label references'
do
describe
'cross project label references'
do
let
(
:
project_name
)
{
'Some project'
}
let
(
:
another_project
)
{
create
(
:empty_project
,
:public
)
}
let
(
:
another_project
)
{
create
(
:empty_project
,
:public
,
name:
project_name
)
}
let
(
:
project_name
)
{
another_project
.
name_with_namespace
}
let
(
:label
)
{
create
(
:label
,
project:
another_project
,
color:
'#00ff00'
)
}
let
(
:label
)
{
create
(
:label
,
project:
another_project
,
color:
'#00ff00'
)
}
let
(
:reference
)
{
label
.
to_reference
(
project
)
}
let
(
:reference
)
{
label
.
to_reference
(
project
)
}
...
@@ -198,7 +198,7 @@ describe Banzai::Filter::LabelReferenceFilter, lib: true do
...
@@ -198,7 +198,7 @@ describe Banzai::Filter::LabelReferenceFilter, lib: true do
end
end
it
'contains cross project content'
do
it
'contains cross project content'
do
expect
(
result
.
css
(
'a'
).
first
.
text
).
to
eq
"
#{
label
.
name
}
«
#{
project_name
}
"
expect
(
result
.
css
(
'a'
).
first
.
text
).
to
eq
"
#{
label
.
name
}
in
#{
project_name
}
"
end
end
end
end
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