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
Tatuya Kamada
gitlab-ce
Commits
639a0b19
Commit
639a0b19
authored
Jul 18, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed milestone dropdown label not persisting
parent
c4847664
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
app/helpers/milestones_helper.rb
app/helpers/milestones_helper.rb
+6
-2
app/views/shared/issuable/_milestone_dropdown.html.haml
app/views/shared/issuable/_milestone_dropdown.html.haml
+1
-1
No files found.
app/helpers/milestones_helper.rb
View file @
639a0b19
...
@@ -55,10 +55,14 @@ module MilestonesHelper
...
@@ -55,10 +55,14 @@ module MilestonesHelper
end
end
end
end
def
milestone_dropdown_selected_text
def
milestone_dropdown_selected_text
(
selected
)
project
=
@target_project
||
@project
||
@projects
project
=
@target_project
||
@project
||
@projects
Milestone
.
of_projects
(
project
).
where
(
title:
params
[
:milestone_title
]).
first
().
try
(
:name
)
if
selected
.
is_a?
Integer
Milestone
.
of_projects
(
project
).
where
(
id:
selected
).
first
.
try
(
:title
)
else
Milestone
.
of_projects
(
project
).
where
(
title:
selected
).
first
.
try
(
:title
)
end
end
end
def
milestone_remaining_days
(
milestone
)
def
milestone_remaining_days
(
milestone
)
...
...
app/views/shared/issuable/_milestone_dropdown.html.haml
View file @
639a0b19
-
project
=
@target_project
||
@project
||
@projects
-
project
=
@target_project
||
@project
||
@projects
-
extra_class
=
extra_class
||
''
-
extra_class
=
extra_class
||
''
-
selected_text
=
milestone_dropdown_selected_text
-
selected_text
=
milestone_dropdown_selected_text
(
selected
)
-
if
selected
.
present?
-
if
selected
.
present?
=
hidden_field_tag
(
name
,
selected
)
=
hidden_field_tag
(
name
,
selected
)
=
dropdown_tag
(
milestone_dropdown_label
(
selected_text
),
options:
{
title:
"Filter by milestone"
,
toggle_class:
"js-milestone-select js-filter-submit
#{
extra_class
}
"
,
filter:
true
,
dropdown_class:
"dropdown-menu-selectable"
,
=
dropdown_tag
(
milestone_dropdown_label
(
selected_text
),
options:
{
title:
"Filter by milestone"
,
toggle_class:
"js-milestone-select js-filter-submit
#{
extra_class
}
"
,
filter:
true
,
dropdown_class:
"dropdown-menu-selectable"
,
...
...
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