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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
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
Hide 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
...
@@ -34,8 +34,8 @@ class @LabelsSelect
if
issueUpdateURL
if
issueUpdateURL
labelHTMLTemplate
=
_
.
template
(
labelHTMLTemplate
=
_
.
template
(
'<% _.each(labels, function(label){ %>
'<% _.each(labels, function(label){ %>
<a href="<%= ["",issueURLSplit[1], issueURLSplit[2],""].join("/") %>issues?label_name=<%= _.escape(label.title) %>">
<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 %>;">
<span class="label has-tooltip color-label" title="<%= _.escape(label.description) %>" style="background-color: <%= label.color %>;
color: <%= label.text_color %>;
">
<%= _.escape(label.title) %>
<%= _.escape(label.title) %>
</span>
</span>
</a>
</a>
...
@@ -157,6 +157,7 @@ class @LabelsSelect
...
@@ -157,6 +157,7 @@ class @LabelsSelect
data
.
issueURLSplit
=
issueURLSplit
data
.
issueURLSplit
=
issueURLSplit
labelCount
=
0
labelCount
=
0
if
data
.
labels
.
length
if
data
.
labels
.
length
console
.
log
data
.
labels
template
=
labelHTMLTemplate
(
data
)
template
=
labelHTMLTemplate
(
data
)
labelCount
=
data
.
labels
.
length
labelCount
=
data
.
labels
.
length
else
else
...
...
app/controllers/projects/issues_controller.rb
View file @
7f23e0b8
...
@@ -110,7 +110,7 @@ class Projects::IssuesController < Projects::ApplicationController
...
@@ -110,7 +110,7 @@ class Projects::IssuesController < Projects::ApplicationController
end
end
end
end
format
.
json
do
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
end
end
end
...
...
app/controllers/projects/merge_requests_controller.rb
View file @
7f23e0b8
...
@@ -155,7 +155,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController
...
@@ -155,7 +155,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController
@merge_request
.
target_project
,
@merge_request
])
@merge_request
.
target_project
,
@merge_request
])
end
end
format
.
json
do
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
end
end
else
else
...
...
app/helpers/labels_helper.rb
View file @
7f23e0b8
...
@@ -37,7 +37,7 @@ module LabelsHelper
...
@@ -37,7 +37,7 @@ module LabelsHelper
link
=
send
(
"namespace_project_
#{
type
.
to_s
.
pluralize
}
_path"
,
link
=
send
(
"namespace_project_
#{
type
.
to_s
.
pluralize
}
_path"
,
project
.
namespace
,
project
.
namespace
,
project
,
project
,
label_name:
label
.
name
)
label_name:
[
label
.
name
]
)
if
block_given?
if
block_given?
link_to
link
,
&
block
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