summaryrefslogtreecommitdiff
path: root/app/helpers
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-03-30 06:49:04 +0000
committerRémy Coutable <remy@rymai.me>2016-03-30 06:49:04 +0000
commit4a4398560c45ed5b4e2258d4dd535a4e548073fc (patch)
treefd987bb1bf3c8992ed35e7deb8dd7477b44d9f47 /app/helpers
parentf7d20a6f76de33624f069185d28649e6e9b411f7 (diff)
parent6a3d8ac207c300474ccfbbd3c5cab8566279b9ac (diff)
downloadgitlab-ce-4a4398560c45ed5b4e2258d4dd535a4e548073fc.tar.gz
Merge branch 'added-milestone-upcoming' into 'master'
Dropdown bug fixes - Added back upcoming to milestone filter ![Screen_Shot_2016-03-23_at_16.45.22](/uploads/8c31eff7e0984aad17881f6397ff17cd/Screen_Shot_2016-03-23_at_16.45.22.png) - Fixed bug that would cause the currently selected value to disappear on filters - Fixed bug that throw an error when filtering by upcoming when there is only a milestone in the past Closes #14536 See merge request !3368
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/issuables_helper.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/helpers/issuables_helper.rb b/app/helpers/issuables_helper.rb
index 62050691a39..b14b8218d02 100644
--- a/app/helpers/issuables_helper.rb
+++ b/app/helpers/issuables_helper.rb
@@ -47,6 +47,14 @@ module IssuablesHelper
end
end
+ def milestone_dropdown_label(milestone_title, default_label = "Milestone")
+ if milestone_title == Milestone::Upcoming.name
+ milestone_title = Milestone::Upcoming.title
+ end
+
+ h(milestone_title.presence || default_label)
+ end
+
private
def sidebar_gutter_collapsed?