summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <robert@gitlab.com>2018-05-16 16:59:48 +0000
committerRobert Speicher <robert@gitlab.com>2018-05-16 16:59:48 +0000
commitd98364fa33fff8b4a571563e5f17329ffdba8a17 (patch)
tree3fda27102953bdb0dd350c7c52f59f68c9677e1e
parent50d687f626ed18e158613a14c4338c01c6e71b85 (diff)
parente2e72fe5680e65bfed4d5fff5def829ff7ef9aeb (diff)
downloadgitlab-ce-d98364fa33fff8b4a571563e5f17329ffdba8a17.tar.gz
Merge branch 'osw-fix-boards-list-header-color' into 'master'
Adjust board lists header text color Closes #36983 See merge request gitlab-org/gitlab-ce!18955
-rw-r--r--app/models/list.rb3
-rw-r--r--app/views/shared/boards/components/_board.html.haml2
-rw-r--r--spec/fixtures/api/schemas/list.json2
3 files changed, 5 insertions, 2 deletions
diff --git a/app/models/list.rb b/app/models/list.rb
index 918275be142..5daf35ef845 100644
--- a/app/models/list.rb
+++ b/app/models/list.rb
@@ -31,7 +31,8 @@ class List < ActiveRecord::Base
if options.key?(:label)
json[:label] = label.as_json(
project: board.project,
- only: [:id, :title, :description, :color]
+ only: [:id, :title, :description, :color],
+ methods: [:text_color]
)
end
end
diff --git a/app/views/shared/boards/components/_board.html.haml b/app/views/shared/boards/components/_board.html.haml
index 4bff6468bb0..aea40df41b0 100644
--- a/app/views/shared/boards/components/_board.html.haml
+++ b/app/views/shared/boards/components/_board.html.haml
@@ -15,7 +15,7 @@
":title" => '(list.label ? list.label.description : "")',
data: { container: "body", placement: "bottom" },
class: "label color-label title board-title-text",
- ":style" => "{ backgroundColor: (list.label && list.label.color ? list.label.color : null), color: (list.label && list.label.text_color ? list.label.text_color : \"#2e2e2e\") }" }
+ ":style" => "{ backgroundColor: (list.label && list.label.color ? list.label.color : null), color: (list.label && list.label.textColor ? list.label.textColor : \"#2e2e2e\") }" }
{{ list.title }}
- if can?(current_user, :admin_list, current_board_parent)
diff --git a/spec/fixtures/api/schemas/list.json b/spec/fixtures/api/schemas/list.json
index 622a1e40d07..05922df6b81 100644
--- a/spec/fixtures/api/schemas/list.json
+++ b/spec/fixtures/api/schemas/list.json
@@ -17,6 +17,7 @@
"required": [
"id",
"color",
+ "text_color",
"description",
"title",
"priority"
@@ -29,6 +30,7 @@
},
"description": { "type": ["string", "null"] },
"title": { "type": "string" },
+ "title": { "text_color": "string" },
"priority": { "type": ["integer", "null"] }
}
},