BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
5f72aaa3
Commit
5f72aaa3
authored
Aug 24, 2017
by
Maxim Rydkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
replace `is_legacy_group_milestone?` with `legacy_group_milestone?`
parent
48d3e5fa
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
9 additions
and
9 deletions
+9
-9
milestones_controller.rb
app/controllers/groups/milestones_controller.rb
+3
-3
milestones_helper.rb
app/helpers/milestones_helper.rb
+1
-1
milestoneish.rb
app/models/concerns/milestoneish.rb
+1
-1
group_milestone.rb
app/models/group_milestone.rb
+1
-1
show.html.haml
app/views/groups/milestones/show.html.haml
+1
-1
_milestone.html.haml
app/views/shared/milestones/_milestone.html.haml
+1
-1
_top.html.haml
app/views/shared/milestones/_top.html.haml
+1
-1
No files found.
app/controllers/groups/milestones_controller.rb
View file @
5f72aaa3
...
...
@@ -35,13 +35,13 @@ class Groups::MilestonesController < Groups::ApplicationController
end
def
edit
render_404
if
@milestone
.
is_
legacy_group_milestone?
render_404
if
@milestone
.
legacy_group_milestone?
end
def
update
# Keep this compatible with legacy group milestones where we have to update
# 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"
}
milestones
=
@milestone
.
milestones
else
...
...
@@ -67,7 +67,7 @@ class Groups::MilestonesController < Groups::ApplicationController
end
def
milestone_path
if
@milestone
.
is_
legacy_group_milestone?
if
@milestone
.
legacy_group_milestone?
group_milestone_path
(
group
,
@milestone
.
safe_title
,
title:
@milestone
.
title
)
else
group_milestone_path
(
group
,
@milestone
.
iid
)
...
...
app/helpers/milestones_helper.rb
View file @
5f72aaa3
...
...
@@ -164,7 +164,7 @@ module MilestonesHelper
def
group_milestone_route
(
milestone
,
params
=
{})
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
)
else
group_milestone_path
(
@group
,
milestone
.
iid
,
milestone:
params
)
...
...
app/models/concerns/milestoneish.rb
View file @
5f72aaa3
...
...
@@ -78,7 +78,7 @@ module Milestoneish
false
end
def
is_
legacy_group_milestone?
def
legacy_group_milestone?
false
end
...
...
app/models/group_milestone.rb
View file @
5f72aaa3
...
...
@@ -17,7 +17,7 @@ class GroupMilestone < GlobalMilestone
{
group_id:
group
.
id
}
end
def
is_
legacy_group_milestone?
def
legacy_group_milestone?
true
end
end
app/views/groups/milestones/show.html.haml
View file @
5f72aaa3
=
render
"header_title"
=
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
app/views/shared/milestones/_milestone.html.haml
View file @
5f72aaa3
...
...
@@ -21,7 +21,7 @@
-
if
milestone
.
is_a?
(
GlobalMilestone
)
||
milestone
.
is_group_milestone?
.row
.col-sm-6
-
if
milestone
.
is_
legacy_group_milestone?
-
if
milestone
.
legacy_group_milestone?
.expiration
=
render
(
'shared/milestone_expired'
,
milestone:
milestone
)
.projects
-
milestone
.
milestones
.
each
do
|
milestone
|
...
...
app/views/shared/milestones/_top.html.haml
View file @
5f72aaa3
...
...
@@ -44,7 +44,7 @@
-
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
}
-
if
@milestone
.
is_
legacy_group_milestone?
||
@milestone
.
is_dashboard_milestone?
-
if
@milestone
.
legacy_group_milestone?
||
@milestone
.
is_dashboard_milestone?
.table-holder
%table
.table
%thead
...
...
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