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
Jérome Perrin
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
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
app/helpers/labels_helper.rb
app/helpers/labels_helper.rb
+2
-2
spec/lib/banzai/filter/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
end
def
render_colored_cross_project_label
(
label
)
label_suffix
=
label
.
project
.
name
label_suffix
=
" <i>
«
#{
label_suffix
}
</i>"
label_suffix
=
label
.
project
.
name
_with_namespace
label_suffix
=
" <i>
in
#{
label_suffix
}
</i>"
render_colored_label
(
label
,
label_suffix
)
end
...
...
spec/lib/banzai/filter/label_reference_filter_spec.rb
View file @
34769efa
...
...
@@ -178,8 +178,8 @@ describe Banzai::Filter::LabelReferenceFilter, lib: true do
end
describe
'cross project label references'
do
let
(
:
project_name
)
{
'Some project'
}
let
(
:
another_project
)
{
create
(
:empty_project
,
:public
,
name:
project_name
)
}
let
(
:
another_project
)
{
create
(
:empty_project
,
:public
)
}
let
(
:
project_name
)
{
another_project
.
name_with_namespace
}
let
(
:label
)
{
create
(
:label
,
project:
another_project
,
color:
'#00ff00'
)
}
let
(
:reference
)
{
label
.
to_reference
(
project
)
}
...
...
@@ -198,7 +198,7 @@ describe Banzai::Filter::LabelReferenceFilter, lib: true do
end
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
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