BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
9a1feb65
Commit
9a1feb65
authored
Jul 16, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed labels & milestones loading the wrong path
parent
3582861c
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
4 deletions
+10
-4
dropdowns_helper.rb
app/helpers/dropdowns_helper.rb
+5
-1
labels_helper.rb
app/helpers/labels_helper.rb
+2
-1
milestones_helper.rb
app/helpers/milestones_helper.rb
+2
-1
_label_dropdown.html.haml
app/views/shared/issuable/_label_dropdown.html.haml
+1
-1
No files found.
app/helpers/dropdowns_helper.rb
View file @
9a1feb65
...
...
@@ -40,7 +40,11 @@ module DropdownsHelper
end
def
dropdown_toggle
(
toggle_text
,
data_attr
,
options
=
{})
default_label
=
options
[
:data
][
:default_label
]
default_label
=
if
options
[
:data
]
options
[
:data
][
:default_label
]
else
''
end
content_tag
(
:button
,
class:
"dropdown-menu-toggle
#{
options
[
:toggle_class
]
if
options
.
has_key?
(
:toggle_class
)
}
"
,
id:
(
options
[
:id
]
if
options
.
has_key?
(
:id
)),
type:
"button"
,
data:
data_attr
)
do
output
=
content_tag
(
:span
,
toggle_text
,
class:
"dropdown-toggle-text
#{
'is-default'
if
toggle_text
==
default_label
}
"
)
output
<<
icon
(
'chevron-down'
)
...
...
app/helpers/labels_helper.rb
View file @
9a1feb65
...
...
@@ -115,8 +115,9 @@ module LabelsHelper
end
def
labels_filter_path
project
=
@target_project
||
@project
if
@project
namespace_project_labels_path
(
@project
.
namespace
,
@
project
,
:json
)
namespace_project_labels_path
(
project
.
namespace
,
project
,
:json
)
else
dashboard_labels_path
(
:json
)
end
...
...
app/helpers/milestones_helper.rb
View file @
9a1feb65
...
...
@@ -47,8 +47,9 @@ module MilestonesHelper
end
def
milestones_filter_dropdown_path
project
=
@target_project
||
@project
if
@project
namespace_project_milestones_path
(
@project
.
namespace
,
@
project
,
:json
)
namespace_project_milestones_path
(
project
.
namespace
,
project
,
:json
)
else
dashboard_milestones_path
(
:json
)
end
...
...
app/views/shared/issuable/_label_dropdown.html.haml
View file @
9a1feb65
...
...
@@ -14,7 +14,7 @@
-
if
selected
.
present?
-
if
selected
.
respond_to?
(
'any?'
)
-
selected
=
project
.
labels
.
find_by_id
(
selected
)
||
selected
-
selected
=
project
.
labels
.
where
(
id:
selected
)
||
selected
-
selected
.
each
do
|
label
|
-
id
=
label
.
try
(
:id
)
||
label
-
title
=
label
.
try
(
:title
)
||
label
...
...
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