Skip to content
代码片段 群组 项目
未验证 提交 0602c5d0 编辑于 作者: Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
浏览文件

Change default label color

上级 433dac77
No related branches found
No related tags found
无相关合并请求
...@@ -4,7 +4,7 @@ def project_label_names ...@@ -4,7 +4,7 @@ def project_label_names
end end
def render_colored_label(label) 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) text_color = text_color_for_bg(label_color)
content_tag :span, class: 'label color-label', style: "background:#{label_color};color:#{text_color}" do content_tag :span, class: 'label color-label', style: "background:#{label_color};color:#{text_color}" do
......
class Label < ActiveRecord::Base class Label < ActiveRecord::Base
DEFAULT_COLOR = '#82C5FF' DEFAULT_COLOR = '#428bca'
belongs_to :project belongs_to :project
has_many :label_links, dependent: :destroy has_many :label_links, dependent: :destroy
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册