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
Léo-Paul Géneau
gitlab-ce
Commits
d334f8d4
Commit
d334f8d4
authored
Jun 24, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed URL on label button when filtering
Closes #19005
parent
4477dc24
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
app/helpers/labels_helper.rb
app/helpers/labels_helper.rb
+8
-4
app/views/shared/_labels_row.html.haml
app/views/shared/_labels_row.html.haml
+1
-1
No files found.
app/helpers/labels_helper.rb
View file @
d334f8d4
...
...
@@ -34,10 +34,7 @@ module LabelsHelper
# Returns a String
def
link_to_label
(
label
,
project:
nil
,
type: :issue
,
tooltip:
true
,
css_class:
nil
,
&
block
)
project
||=
@project
||
label
.
project
link
=
send
(
"namespace_project_
#{
type
.
to_s
.
pluralize
}
_path"
,
project
.
namespace
,
project
,
label_name:
[
label
.
name
])
link
=
label_filter_path
(
project
,
label
,
type:
type
)
if
block_given?
link_to
link
,
class:
css_class
,
&
block
...
...
@@ -46,6 +43,13 @@ module LabelsHelper
end
end
def
label_filter_path
(
project
,
label
,
type:
issue
)
send
(
"namespace_project_
#{
type
.
to_s
.
pluralize
}
_path"
,
project
.
namespace
,
project
,
label_name:
[
label
.
name
])
end
def
project_label_names
@project
.
labels
.
pluck
(
:title
)
end
...
...
app/views/shared/_labels_row.html.haml
View file @
d334f8d4
-
labels
.
each
do
|
label
|
%span
.label-row.btn-group
{
role:
"group"
,
aria:
{
label:
escape_once
(
label
.
name
)
},
style:
"color: #{text_color_for_bg(label.color)}"
}
=
link_to
namespace_project_label_path
(
@project
.
namespace
,
@project
,
label
),
=
link_to
label_filter_path
(
@project
,
label
,
type:
controller
.
controller_name
),
class:
"btn btn-transparent has-tooltip"
,
style:
"background-color:
#{
label
.
color
}
;"
,
title:
escape_once
(
label
.
description
),
...
...
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