Commit 5f72aaa3 authored by Maxim Rydkin's avatar Maxim Rydkin

replace `is_legacy_group_milestone?` with `legacy_group_milestone?`

parent 48d3e5fa
...@@ -35,13 +35,13 @@ class Groups::MilestonesController < Groups::ApplicationController ...@@ -35,13 +35,13 @@ class Groups::MilestonesController < Groups::ApplicationController
end end
def edit def edit
render_404 if @milestone.is_legacy_group_milestone? render_404 if @milestone.legacy_group_milestone?
end end
def update def update
# Keep this compatible with legacy group milestones where we have to update # Keep this compatible with legacy group milestones where we have to update
# all projects milestones states at once. # all projects milestones states at once.
if @milestone.is_legacy_group_milestone? if @milestone.legacy_group_milestone?
update_params = milestone_params.select { |key| key == "state_event" } update_params = milestone_params.select { |key| key == "state_event" }
milestones = @milestone.milestones milestones = @milestone.milestones
else else
...@@ -67,7 +67,7 @@ class Groups::MilestonesController < Groups::ApplicationController ...@@ -67,7 +67,7 @@ class Groups::MilestonesController < Groups::ApplicationController
end end
def milestone_path def milestone_path
if @milestone.is_legacy_group_milestone? if @milestone.legacy_group_milestone?
group_milestone_path(group, @milestone.safe_title, title: @milestone.title) group_milestone_path(group, @milestone.safe_title, title: @milestone.title)
else else
group_milestone_path(group, @milestone.iid) group_milestone_path(group, @milestone.iid)
......
...@@ -164,7 +164,7 @@ module MilestonesHelper ...@@ -164,7 +164,7 @@ module MilestonesHelper
def group_milestone_route(milestone, params = {}) def group_milestone_route(milestone, params = {})
params = nil if params.empty? params = nil if params.empty?
if milestone.is_legacy_group_milestone? if milestone.legacy_group_milestone?
group_milestone_path(@group, milestone.safe_title, title: milestone.title, milestone: params) group_milestone_path(@group, milestone.safe_title, title: milestone.title, milestone: params)
else else
group_milestone_path(@group, milestone.iid, milestone: params) group_milestone_path(@group, milestone.iid, milestone: params)
......
...@@ -78,7 +78,7 @@ module Milestoneish ...@@ -78,7 +78,7 @@ module Milestoneish
false false
end end
def is_legacy_group_milestone? def legacy_group_milestone?
false false
end end
......
...@@ -17,7 +17,7 @@ class GroupMilestone < GlobalMilestone ...@@ -17,7 +17,7 @@ class GroupMilestone < GlobalMilestone
{ group_id: group.id } { group_id: group.id }
end end
def is_legacy_group_milestone? def legacy_group_milestone?
true true
end end
end end
= render "header_title" = render "header_title"
= render 'shared/milestones/top', milestone: @milestone, group: @group = render 'shared/milestones/top', milestone: @milestone, group: @group
= render 'shared/milestones/tabs', milestone: @milestone, show_project_name: true if @milestone.is_legacy_group_milestone? = render 'shared/milestones/tabs', milestone: @milestone, show_project_name: true if @milestone.legacy_group_milestone?
= render 'shared/milestones/sidebar', milestone: @milestone, affix_offset: 102 = render 'shared/milestones/sidebar', milestone: @milestone, affix_offset: 102
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
- if milestone.is_a?(GlobalMilestone) || milestone.is_group_milestone? - if milestone.is_a?(GlobalMilestone) || milestone.is_group_milestone?
.row .row
.col-sm-6 .col-sm-6
- if milestone.is_legacy_group_milestone? - if milestone.legacy_group_milestone?
.expiration= render('shared/milestone_expired', milestone: milestone) .expiration= render('shared/milestone_expired', milestone: milestone)
.projects .projects
- milestone.milestones.each do |milestone| - milestone.milestones.each do |milestone|
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
- close_msg = group ? 'You may close the milestone now.' : 'Navigate to the project to close the milestone.' - close_msg = group ? 'You may close the milestone now.' : 'Navigate to the project to close the milestone.'
%span All issues for this milestone are closed. #{close_msg} %span All issues for this milestone are closed. #{close_msg}
- if @milestone.is_legacy_group_milestone? || @milestone.is_dashboard_milestone? - if @milestone.legacy_group_milestone? || @milestone.is_dashboard_milestone?
.table-holder .table-holder
%table.table %table.table
%thead %thead
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment