summaryrefslogtreecommitdiff
path: root/app/helpers
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-07-07 18:19:06 +0100
committerPhil Hughes <me@iamphill.com>2017-07-07 18:19:06 +0100
commit436047f6575ffc64f065928d1feb4144ca8f7158 (patch)
treecde5492d734968a0a9c96baccc74a408d3d991b5 /app/helpers
parentc70bf95c2a5cc0bd8a70d8b65fc678ee1c631420 (diff)
parent1dab640357fa1ba8992757499e4167fcd4ce6276 (diff)
downloadgitlab-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.rb14
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