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
1
Merge Requests
1
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
nexedi
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
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
4 deletions
+10
-4
app/helpers/dropdowns_helper.rb
app/helpers/dropdowns_helper.rb
+5
-1
app/helpers/labels_helper.rb
app/helpers/labels_helper.rb
+2
-1
app/helpers/milestones_helper.rb
app/helpers/milestones_helper.rb
+2
-1
app/views/shared/issuable/_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
...
@@ -40,7 +40,11 @@ module DropdownsHelper
end
end
def
dropdown_toggle
(
toggle_text
,
data_attr
,
options
=
{})
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
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
=
content_tag
(
:span
,
toggle_text
,
class:
"dropdown-toggle-text
#{
'is-default'
if
toggle_text
==
default_label
}
"
)
output
<<
icon
(
'chevron-down'
)
output
<<
icon
(
'chevron-down'
)
...
...
app/helpers/labels_helper.rb
View file @
9a1feb65
...
@@ -115,8 +115,9 @@ module LabelsHelper
...
@@ -115,8 +115,9 @@ module LabelsHelper
end
end
def
labels_filter_path
def
labels_filter_path
project
=
@target_project
||
@project
if
@project
if
@project
namespace_project_labels_path
(
@project
.
namespace
,
@
project
,
:json
)
namespace_project_labels_path
(
project
.
namespace
,
project
,
:json
)
else
else
dashboard_labels_path
(
:json
)
dashboard_labels_path
(
:json
)
end
end
...
...
app/helpers/milestones_helper.rb
View file @
9a1feb65
...
@@ -47,8 +47,9 @@ module MilestonesHelper
...
@@ -47,8 +47,9 @@ module MilestonesHelper
end
end
def
milestones_filter_dropdown_path
def
milestones_filter_dropdown_path
project
=
@target_project
||
@project
if
@project
if
@project
namespace_project_milestones_path
(
@project
.
namespace
,
@
project
,
:json
)
namespace_project_milestones_path
(
project
.
namespace
,
project
,
:json
)
else
else
dashboard_milestones_path
(
:json
)
dashboard_milestones_path
(
:json
)
end
end
...
...
app/views/shared/issuable/_label_dropdown.html.haml
View file @
9a1feb65
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
-
if
selected
.
present?
-
if
selected
.
present?
-
if
selected
.
respond_to?
(
'any?'
)
-
if
selected
.
respond_to?
(
'any?'
)
-
selected
=
project
.
labels
.
find_by_id
(
selected
)
||
selected
-
selected
=
project
.
labels
.
where
(
id:
selected
)
||
selected
-
selected
.
each
do
|
label
|
-
selected
.
each
do
|
label
|
-
id
=
label
.
try
(
:id
)
||
label
-
id
=
label
.
try
(
:id
)
||
label
-
title
=
label
.
try
(
:title
)
||
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