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
iv
gitlab-ce
Commits
1942b97d
Commit
1942b97d
authored
Apr 11, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6760 from jvanbaarsen/label-color-lowercase
Determine label color based on lowercase name
parents
4881d493
28f1a5d7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
1 deletion
+14
-1
app/helpers/labels_helper.rb
app/helpers/labels_helper.rb
+1
-1
spec/helpers/labels_helper_spec.rb
spec/helpers/labels_helper_spec.rb
+13
-0
No files found.
app/helpers/labels_helper.rb
View file @
1942b97d
...
...
@@ -12,7 +12,7 @@ module LabelsHelper
def
label_css_class
(
name
)
klass
=
Gitlab
::
IssuesLabels
case
name
case
name
.
downcase
when
*
klass
.
warning_labels
'label-warning'
when
*
klass
.
neutral_labels
...
...
spec/helpers/labels_helper_spec.rb
0 → 100644
View file @
1942b97d
require
'spec_helper'
describe
LabelsHelper
do
describe
'#label_css_class'
do
it
'returns label-danger when given Bug as param'
do
expect
(
label_css_class
(
'bug'
)).
to
eq
(
'label-danger'
)
end
it
'returns label-danger when given Bug as param'
do
expect
(
label_css_class
(
'Bug'
)).
to
eq
(
'label-danger'
)
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