diff options
author | Phil Hughes <me@iamphill.com> | 2017-07-07 18:19:06 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-07-07 18:19:06 +0100 |
commit | 436047f6575ffc64f065928d1feb4144ca8f7158 (patch) | |
tree | cde5492d734968a0a9c96baccc74a408d3d991b5 /app/helpers | |
parent | c70bf95c2a5cc0bd8a70d8b65fc678ee1c631420 (diff) | |
parent | 1dab640357fa1ba8992757499e4167fcd4ce6276 (diff) | |
download | gitlab-ce-436047f6575ffc64f065928d1feb4144ca8f7158.tar.gz |
Merge branch 'master' into new-nav-fix-contextual-breadcrumbs
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/milestones_helper.rb | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/app/helpers/milestones_helper.rb b/app/helpers/milestones_helper.rb index 8c7851dcfc2..f8860bfee99 100644 --- a/app/helpers/milestones_helper.rb +++ b/app/helpers/milestones_helper.rb @@ -54,8 +54,10 @@ module MilestonesHelper def milestone_class_for_state(param, check, match_blank_param = false) if match_blank_param 'active' if param.blank? || param == check + elsif param == check + 'active' else - 'active' if param == check + check end end @@ -147,4 +149,14 @@ module MilestonesHelper labels_dashboard_milestone_path(milestone, title: milestone.title, format: :json) end end + + def group_milestone_route(milestone, params = {}) + params = nil if params.empty? + + if milestone.is_legacy_group_milestone? + group_milestone_path(@group, milestone.safe_title, title: milestone.title, milestone: params) + else + group_milestone_path(@group, milestone.iid, milestone: params) + end + end end |