Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
2f5bcdd51b8e
Unverified
Commit
0602c5d0
authored
Aug 15, 2014
by
Dmitriy Zaporozhets
Browse files
Change default label color
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
dd05d867d701
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/helpers/labels_helper.rb
View file @
2f5bcdd5
...
...
@@ -4,7 +4,7 @@ def project_label_names
end
def
render_colored_label
(
label
)
label_color
=
label
.
color
||
"#428bca"
label_color
=
label
.
color
||
Label
::
DEFAULT_COLOR
text_color
=
text_color_for_bg
(
label_color
)
content_tag
:span
,
class:
'label color-label'
,
style:
"background:
#{
label_color
}
;color:
#{
text_color
}
"
do
...
...
app/models/label.rb
View file @
2f5bcdd5
class
Label
<
ActiveRecord
::
Base
DEFAULT_COLOR
=
'#
82C5FF
'
DEFAULT_COLOR
=
'#
428bca
'
belongs_to
:project
has_many
:label_links
,
dependent: :destroy
...
...
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