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
Boxiang Sun
gitlab-ce
Commits
7f23e0b8
Commit
7f23e0b8
authored
Apr 21, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes text color on labels in sidebar
parent
b4ed6efd
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
5 deletions
+6
-5
app/assets/javascripts/labels_select.js.coffee
app/assets/javascripts/labels_select.js.coffee
+3
-2
app/controllers/projects/issues_controller.rb
app/controllers/projects/issues_controller.rb
+1
-1
app/controllers/projects/merge_requests_controller.rb
app/controllers/projects/merge_requests_controller.rb
+1
-1
app/helpers/labels_helper.rb
app/helpers/labels_helper.rb
+1
-1
No files found.
app/assets/javascripts/labels_select.js.coffee
View file @
7f23e0b8
...
...
@@ -34,8 +34,8 @@ class @LabelsSelect
if
issueUpdateURL
labelHTMLTemplate
=
_
.
template
(
'<% _.each(labels, function(label){ %>
<a href="<%= ["",issueURLSplit[1], issueURLSplit[2],""].join("/") %>issues?label_name=<%= _.escape(label.title) %>">
<span class="label has-tooltip color-label" title="<%= _.escape(label.description) %>" style="background-color: <%= label.color %>;">
<a href="<%= ["",issueURLSplit[1], issueURLSplit[2],""].join("/") %>issues?label_name
[]
=<%= _.escape(label.title) %>">
<span class="label has-tooltip color-label" title="<%= _.escape(label.description) %>" style="background-color: <%= label.color %>;
color: <%= label.text_color %>;
">
<%= _.escape(label.title) %>
</span>
</a>
...
...
@@ -157,6 +157,7 @@ class @LabelsSelect
data
.
issueURLSplit
=
issueURLSplit
labelCount
=
0
if
data
.
labels
.
length
console
.
log
data
.
labels
template
=
labelHTMLTemplate
(
data
)
labelCount
=
data
.
labels
.
length
else
...
...
app/controllers/projects/issues_controller.rb
View file @
7f23e0b8
...
...
@@ -110,7 +110,7 @@ class Projects::IssuesController < Projects::ApplicationController
end
end
format
.
json
do
render
json:
@issue
.
to_json
(
include:
[
:milestone
,
:labels
,
assignee:
{
methods: :avatar_url
}])
render
json:
@issue
.
to_json
(
include:
[
:milestone
,
labels:
{
methods: :text_color
}
,
assignee:
{
methods: :avatar_url
}])
end
end
end
...
...
app/controllers/projects/merge_requests_controller.rb
View file @
7f23e0b8
...
...
@@ -155,7 +155,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController
@merge_request
.
target_project
,
@merge_request
])
end
format
.
json
do
render
json:
@merge_request
.
to_json
(
include:
[
:milestone
,
:labels
,
assignee:
{
methods: :avatar_url
}])
render
json:
@merge_request
.
to_json
(
include:
[
:milestone
,
labels:
{
methods: :text_color
}
,
assignee:
{
methods: :avatar_url
}])
end
end
else
...
...
app/helpers/labels_helper.rb
View file @
7f23e0b8
...
...
@@ -37,7 +37,7 @@ module LabelsHelper
link
=
send
(
"namespace_project_
#{
type
.
to_s
.
pluralize
}
_path"
,
project
.
namespace
,
project
,
label_name:
label
.
name
)
label_name:
[
label
.
name
]
)
if
block_given?
link_to
link
,
&
block
...
...
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