Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
986695e1
Commit
986695e1
authored
Nov 13, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor global and group milestones logic
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
05335a3c
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
145 additions
and
156 deletions
+145
-156
app/controllers/concerns/global_milestones.rb
app/controllers/concerns/global_milestones.rb
+19
-0
app/controllers/dashboard/milestones_controller.rb
app/controllers/dashboard/milestones_controller.rb
+7
-22
app/controllers/groups/application_controller.rb
app/controllers/groups/application_controller.rb
+8
-3
app/controllers/groups/avatars_controller.rb
app/controllers/groups/avatars_controller.rb
+0
-2
app/controllers/groups/group_members_controller.rb
app/controllers/groups/group_members_controller.rb
+0
-5
app/controllers/groups/milestones_controller.rb
app/controllers/groups/milestones_controller.rb
+19
-44
app/finders/milestones_finder.rb
app/finders/milestones_finder.rb
+13
-0
app/helpers/labels_helper.rb
app/helpers/labels_helper.rb
+1
-1
app/helpers/milestones_helper.rb
app/helpers/milestones_helper.rb
+1
-1
app/models/global_label.rb
app/models/global_label.rb
+17
-0
app/models/global_milestone.rb
app/models/global_milestone.rb
+13
-5
app/services/labels/group_service.rb
app/services/labels/group_service.rb
+0
-26
app/services/milestones/collection_service.rb
app/services/milestones/collection_service.rb
+1
-1
app/views/dashboard/milestones/index.html.haml
app/views/dashboard/milestones/index.html.haml
+3
-3
app/views/dashboard/milestones/show.html.haml
app/views/dashboard/milestones/show.html.haml
+18
-18
app/views/groups/milestones/index.html.haml
app/views/groups/milestones/index.html.haml
+3
-3
app/views/groups/milestones/new.html.haml
app/views/groups/milestones/new.html.haml
+1
-1
app/views/groups/milestones/show.html.haml
app/views/groups/milestones/show.html.haml
+21
-21
No files found.
app/controllers/concerns/global_milestones.rb
0 → 100644
View file @
986695e1
module
GlobalMilestones
extend
ActiveSupport
::
Concern
def
milestones
@milestones
=
MilestonesFinder
.
new
.
execute
(
@projects
,
params
)
@milestones
=
GlobalMilestone
.
build_collection
(
@milestones
)
@milestones
=
Kaminari
.
paginate_array
(
@milestones
).
page
(
params
[
:page
]).
per
(
ApplicationController
::
PER_PAGE
)
end
def
milestone
milestones
=
Milestone
.
of_projects
(
@projects
).
where
(
title:
params
[
:title
])
if
milestones
.
present?
@milestone
=
GlobalMilestone
.
new
(
params
[
:title
],
milestones
)
else
render_404
end
end
end
app/controllers/dashboard/milestones_controller.rb
View file @
986695e1
class
Dashboard::MilestonesController
<
Dashboard
::
ApplicationController
before_action
:load_projects
include
GlobalMilestones
before_action
:projects
before_action
:milestones
,
only:
[
:index
]
before_action
:milestone
,
only:
[
:show
]
def
index
project_milestones
=
case
params
[
:state
]
when
'all'
;
state
when
'closed'
;
state
(
'closed'
)
else
state
(
'active'
)
end
@dashboard_milestones
=
Milestones
::
GroupService
.
new
(
project_milestones
).
execute
@dashboard_milestones
=
Kaminari
.
paginate_array
(
@dashboard_milestones
).
page
(
params
[
:page
]).
per
(
PER_PAGE
)
end
def
show
project_milestones
=
Milestone
.
where
(
project_id:
@projects
).
order
(
"due_date ASC"
)
@dashboard_milestone
=
Milestones
::
GroupService
.
new
(
project_milestones
).
milestone
(
title
)
end
private
def
load_projects
@projects
=
current_user
.
authorized_projects
.
sorted_by_activity
.
non_archived
end
def
title
params
[
:title
]
end
def
state
(
state
=
nil
)
conditions
=
{
project_id:
@projects
}
conditions
.
reverse_merge!
(
state:
state
)
if
state
Milestone
.
where
(
conditions
).
order
(
"title ASC"
)
def
projects
@projects
||=
current_user
.
authorized_projects
.
sorted_by_activity
.
non_archived
end
end
app/controllers/groups/application_controller.rb
View file @
986695e1
class
Groups::ApplicationController
<
ApplicationController
layout
'group'
before_action
:group
private
def
group
@group
||=
Group
.
find_by
(
path:
params
[
:group_id
])
end
def
authorize_read_group!
unless
@group
and
can?
(
current_user
,
:read_group
,
@group
)
if
current_user
.
nil?
...
...
@@ -12,13 +17,13 @@ class Groups::ApplicationController < ApplicationController
end
end
end
def
authorize_admin_group!
unless
can?
(
current_user
,
:admin_group
,
group
)
return
render_404
end
end
def
authorize_admin_group_member!
unless
can?
(
current_user
,
:admin_group_member
,
group
)
return
render_403
...
...
app/controllers/groups/avatars_controller.rb
View file @
986695e1
class
Groups::AvatarsController
<
ApplicationController
def
destroy
@group
=
Group
.
find_by
(
path:
params
[
:group_id
])
@group
.
remove_avatar!
@group
.
save
redirect_to
edit_group_path
(
@group
)
...
...
app/controllers/groups/group_members_controller.rb
View file @
986695e1
class
Groups::GroupMembersController
<
Groups
::
ApplicationController
skip_before_action
:authenticate_user!
,
only:
[
:index
]
before_action
:group
# Authorize
before_action
:authorize_read_group!
...
...
@@ -80,10 +79,6 @@ class Groups::GroupMembersController < Groups::ApplicationController
protected
def
group
@group
||=
Group
.
find_by
(
path:
params
[
:group_id
])
end
def
member_params
params
.
require
(
:group_member
).
permit
(
:access_level
,
:user_id
)
end
...
...
app/controllers/groups/milestones_controller.rb
View file @
986695e1
class
Groups::MilestonesController
<
Groups
::
ApplicationController
before_action
:authorize_group_milestone!
,
only: :update
before_action
:group
include
GlobalMilestones
def
index
project_milestones
=
case
params
[
:state
]
when
'all'
;
state
when
'closed'
;
state
(
'closed'
)
else
state
(
'active'
)
end
before_action
:projects
before_action
:milestones
,
only:
[
:index
]
before_action
:milestone
,
only:
[
:show
,
:update
]
before_action
:authorize_group_milestone!
,
only:
[
:create
,
:update
]
@group_milestones
=
Milestones
::
GroupService
.
new
(
project_milestones
).
execute
@group_milestones
=
Kaminari
.
paginate_array
(
@group_milestones
).
page
(
params
[
:page
]).
per
(
PER_PAGE
)
def
index
end
def
new
@
group_milestone
=
OpenStruct
.
new
(
title:
nil
,
description:
nil
)
@
milestone
=
Milestone
.
new
end
def
create
...
...
@@ -26,55 +21,35 @@ class Groups::MilestonesController < Groups::ApplicationController
Milestones
::
CreateService
.
new
(
project
,
current_user
,
milestone_params
).
execute
end
redirect_to
group_milestone_path
(
@group
,
title
.
parameterize
,
title:
title
)
redirect_to
milestone_path
(
title
)
end
def
show
project_milestones
=
Milestone
.
where
(
project_id:
group
.
projects
).
order
(
"due_date ASC"
)
@group_milestone
=
Milestones
::
GroupService
.
new
(
project_milestones
).
milestone
(
title
)
end
def
update
project_milestones
=
Milestone
.
where
(
project_id:
group
.
projects
).
order
(
"due_date ASC"
)
@group_milestones
=
Milestones
::
GroupService
.
new
(
project_milestones
).
milestone
(
title
)
@group_milestones
.
milestones
.
each
do
|
milestone
|
Milestones
::
UpdateService
.
new
(
milestone
.
project
,
current_user
,
params
[
:milestone
]).
execute
(
milestone
)
@milestone
.
milestones
.
each
do
|
milestone
|
Milestones
::
UpdateService
.
new
(
milestone
.
project
,
current_user
,
milestone_params
).
execute
(
milestone
)
end
respond_to
do
|
format
|
format
.
js
format
.
html
do
redirect_to
group_milestones_path
(
group
)
end
end
redirect_back_or_default
(
default:
milestone_path
(
@milestone
.
title
))
end
private
def
group
@group
||=
Group
.
find_by
(
path:
params
[
:group_id
])
end
def
title
params
[
:title
]
def
authorize_group_milestone!
return
render_404
unless
can?
(
current_user
,
:admin_group
,
group
)
end
def
state
(
state
=
nil
)
conditions
=
{
project_id:
group
.
projects
}
conditions
.
reverse_merge!
(
state:
state
)
if
state
Milestone
.
where
(
conditions
).
order
(
"title ASC"
)
def
milestone_params
params
.
require
(
:milestone
).
permit
(
:title
,
:description
,
:due_date
,
:state_event
)
end
def
authorize_group_milestone!
return
render_404
unless
can?
(
current_user
,
:admin_group
,
group
)
def
milestone_path
(
title
)
group_milestone_path
(
@group
,
title
.
parameterize
,
title:
title
)
end
def
milestone_params
params
.
require
(
:milestone
).
permit
(
:title
,
:description
,
:due_date
)
def
projects
@projects
||=
@group
.
projects
end
end
app/finders/milestones_finder.rb
0 → 100644
View file @
986695e1
class
MilestonesFinder
def
execute
(
projects
,
params
)
milestones
=
Milestone
.
of_projects
(
projects
)
milestones
=
milestones
.
order
(
"due_date ASC"
)
case
params
[
:state
]
when
'closed'
then
milestones
.
closed
when
'all'
then
milestones
else
milestones
.
active
end
end
end
app/helpers/labels_helper.rb
View file @
986695e1
...
...
@@ -100,7 +100,7 @@ module LabelsHelper
Label
.
where
(
project_id:
@projects
)
end
grouped_labels
=
Labels
::
GroupService
.
new
(
labels
).
execute
grouped_labels
=
GlobalLabel
.
build_collection
(
labels
)
grouped_labels
.
unshift
(
Label
::
None
)
grouped_labels
.
unshift
(
Label
::
Any
)
...
...
app/helpers/milestones_helper.rb
View file @
986695e1
...
...
@@ -28,7 +28,7 @@ module MilestonesHelper
Milestone
.
where
(
project_id:
@projects
)
end
.
active
grouped_milestones
=
Milestones
::
GroupService
.
new
(
milestones
).
execute
grouped_milestones
=
GlobalMilestone
.
build_collection
(
milestones
)
grouped_milestones
.
unshift
(
Milestone
::
None
)
grouped_milestones
.
unshift
(
Milestone
::
Any
)
...
...
app/models/g
roup
_label.rb
→
app/models/g
lobal
_label.rb
View file @
986695e1
class
G
roup
Label
class
G
lobal
Label
attr_accessor
:title
,
:labels
alias_attribute
:name
,
:title
def
self
.
build_collection
(
labels
)
labels
=
labels
.
group_by
(
&
:title
)
labels
.
map
do
|
title
,
label
|
new
(
title
,
label
)
end
end
def
initialize
(
title
,
labels
)
@title
=
title
@labels
=
labels
...
...
app/models/g
roup
_milestone.rb
→
app/models/g
lobal
_milestone.rb
View file @
986695e1
class
G
roup
Milestone
class
G
lobal
Milestone
attr_accessor
:title
,
:milestones
alias_attribute
:name
,
:title
def
self
.
build_collection
(
milestones
)
milestones
=
milestones
.
group_by
(
&
:title
)
milestones
.
map
do
|
title
,
milestones
|
new
(
title
,
milestones
)
end
end
def
initialize
(
title
,
milestones
)
@title
=
title
@milestones
=
milestones
...
...
@@ -10,7 +18,7 @@ class GroupMilestone
def
safe_title
@title
.
parameterize
end
def
projects
milestones
.
map
{
|
milestone
|
milestone
.
project
}
end
...
...
@@ -60,15 +68,15 @@ class GroupMilestone
end
def
issues
@
group_
issues
||=
milestones
.
map
(
&
:issues
).
flatten
.
group_by
(
&
:state
)
@issues
||=
milestones
.
map
(
&
:issues
).
flatten
.
group_by
(
&
:state
)
end
def
merge_requests
@
group_
merge_requests
||=
milestones
.
map
(
&
:merge_requests
).
flatten
.
group_by
(
&
:state
)
@merge_requests
||=
milestones
.
map
(
&
:merge_requests
).
flatten
.
group_by
(
&
:state
)
end
def
participants
@
group_
participants
||=
milestones
.
map
(
&
:participants
).
flatten
.
compact
.
uniq
@participants
||=
milestones
.
map
(
&
:participants
).
flatten
.
compact
.
uniq
end
def
opened_issues
...
...
app/services/labels/group_service.rb
deleted
100644 → 0
View file @
05335a3c
module
Labels
class
GroupService
<
::
BaseService
def
initialize
(
project_labels
)
@project_labels
=
project_labels
.
group_by
(
&
:title
)
end
def
execute
build
(
@project_labels
)
end
def
label
(
title
)
if
title
group_label
=
@project_labels
[
title
].
group_by
(
&
:title
)
build
(
group_label
).
first
else
nil
end
end
private
def
build
(
label
)
label
.
map
{
|
title
,
labels
|
GroupLabel
.
new
(
title
,
labels
)
}
end
end
end
app/services/milestones/
group
_service.rb
→
app/services/milestones/
collection
_service.rb
View file @
986695e1
module
Milestones
class
Group
Service
<
Milestones
::
BaseService
class
Collection
Service
<
Milestones
::
BaseService
def
initialize
(
project_milestones
)
@project_milestones
=
project_milestones
.
group_by
(
&
:title
)
end
...
...
app/views/dashboard/milestones/index.html.haml
View file @
986695e1
...
...
@@ -10,10 +10,10 @@
.milestones
%ul
.content-list
-
if
@
dashboard_
milestones
.
blank?
-
if
@milestones
.
blank?
%li
.nothing-here-block
No milestones to show
-
else
-
@
dashboard_
milestones
.
each
do
|
milestone
|
-
@milestones
.
each
do
|
milestone
|
=
render
'milestone'
,
milestone:
milestone
=
paginate
@
dashboard_
milestones
,
theme:
"gitlab"
=
paginate
@milestones
,
theme:
"gitlab"
app/views/dashboard/milestones/show.html.haml
View file @
986695e1
-
page_title
@
dashboard_
milestone
.
title
,
"Milestones"
-
page_title
@milestone
.
title
,
"Milestones"
%h4
.page-title
.issue-box
{
class:
"issue-box-#{@
dashboard_
milestone.closed? ? 'closed' : 'open'}"
}
-
if
@
dashboard_
milestone
.
closed?
.issue-box
{
class:
"issue-box-#{@milestone.closed? ? 'closed' : 'open'}"
}
-
if
@milestone
.
closed?
Closed
-
else
Open
Milestone
#{
@
dashboard_
milestone
.
title
}
Milestone
#{
@milestone
.
title
}
%hr
-
if
(
@
dashboard_milestone
.
total_items_count
==
@dashboard_milestone
.
closed_items_count
)
&&
@dashboard_
milestone
.
active?
-
if
(
@
milestone
.
total_items_count
==
@milestone
.
closed_items_count
)
&&
@
milestone
.
active?
.alert.alert-success
%span
All issues for this milestone are closed. You may close the milestone now.
...
...
@@ -22,7 +22,7 @@
%th
Open issues
%th
State
%th
Due date
-
@
dashboard_
milestone
.
milestones
.
each
do
|
milestone
|
-
@milestone
.
milestones
.
each
do
|
milestone
|
%tr
%td
=
link_to
"
#{
milestone
.
project
.
name_with_namespace
}
"
,
namespace_project_milestone_path
(
milestone
.
project
.
namespace
,
milestone
.
project
,
milestone
)
...
...
@@ -39,46 +39,46 @@
.context
%p
.lead
Progress:
#{
@
dashboard_
milestone
.
closed_items_count
}
closed
#{
@milestone
.
closed_items_count
}
closed
–
#{
@
dashboard_
milestone
.
open_items_count
}
open
=
milestone_progress_bar
(
@
dashboard_
milestone
)
#{
@milestone
.
open_items_count
}
open
=
milestone_progress_bar
(
@milestone
)
%ul
.nav.nav-tabs
%li
.active
=
link_to
'#tab-issues'
,
'data-toggle'
=>
'tab'
do
Issues
%span
.badge
=
@
dashboard_
milestone
.
issue_count
%span
.badge
=
@milestone
.
issue_count
%li
=
link_to
'#tab-merge-requests'
,
'data-toggle'
=>
'tab'
do
Merge Requests
%span
.badge
=
@
dashboard_
milestone
.
merge_requests_count
%span
.badge
=
@milestone
.
merge_requests_count
%li
=
link_to
'#tab-participants'
,
'data-toggle'
=>
'tab'
do
Participants
%span
.badge
=
@
dashboard_
milestone
.
participants
.
count
%span
.badge
=
@milestone
.
participants
.
count
.pull-right
=
link_to
'Browse Issues'
,
issues_dashboard_path
(
milestone_title:
@
dashboard_
milestone
.
title
),
class:
"btn edit-milestone-link btn-grouped"
=
link_to
'Browse Issues'
,
issues_dashboard_path
(
milestone_title:
@milestone
.
title
),
class:
"btn edit-milestone-link btn-grouped"
.tab-content
.tab-pane.active
#tab-issues
.row
.col-md-6
=
render
'issues'
,
title:
"Open"
,
issues:
@
dashboard_
milestone
.
opened_issues
=
render
'issues'
,
title:
"Open"
,
issues:
@milestone
.
opened_issues
.col-md-6
=
render
'issues'
,
title:
"Closed"
,
issues:
@
dashboard_
milestone
.
closed_issues
=
render
'issues'
,
title:
"Closed"
,
issues:
@milestone
.
closed_issues
.tab-pane
#tab-merge-requests
.row
.col-md-6
=
render
'merge_requests'
,
title:
"Open"
,
merge_requests:
@
dashboard_
milestone
.
opened_merge_requests
=
render
'merge_requests'
,
title:
"Open"
,
merge_requests:
@milestone
.
opened_merge_requests
.col-md-6
=
render
'merge_requests'
,
title:
"Closed"
,
merge_requests:
@
dashboard_
milestone
.
closed_merge_requests
=
render
'merge_requests'
,
title:
"Closed"
,
merge_requests:
@milestone
.
closed_merge_requests
.tab-pane
#tab-participants
%ul
.bordered-list
-
@
dashboard_
milestone
.
participants
.
each
do
|
user
|
-
@milestone
.
participants
.
each
do
|
user
|
%li
=
link_to
user
,
title:
user
.
name
,
class:
"darken"
do
=
image_tag
avatar_icon
(
user
,
32
),
class:
"avatar s32"
...
...
app/views/groups/milestones/index.html.haml
View file @
986695e1
...
...
@@ -14,10 +14,10 @@
group are listed here.
.milestones
%ul
.content-list
-
if
@
group_
milestones
.
blank?
-
if
@milestones
.
blank?
%li
.nothing-here-block
No milestones to show
-
else
-
@
group_
milestones
.
each
do
|
milestone
|
-
@milestones
.
each
do
|
milestone
|
=
render
'milestone'
,
milestone:
milestone
=
paginate
@
group_
milestones
,
theme:
"gitlab"
=
paginate
@milestones
,
theme:
"gitlab"
app/views/groups/milestones/new.html.haml
View file @
986695e1
...
...
@@ -5,7 +5,7 @@
This will create milestone in every selected project
%hr
=
form_for
@
group_milestone
,
as: :
milestone
,
url:
group_milestones_path
(
@group
),
html:
{
class:
'form-horizontal milestone-form gfm-form js-requires-input'
}
do
|
f
|
=
form_for
@milestone
,
url:
group_milestones_path
(
@group
),
html:
{
class:
'form-horizontal milestone-form gfm-form js-requires-input'
}
do
|
f
|
.row
.col-md-6
.form-group
...
...
app/views/groups/milestones/show.html.haml
View file @
986695e1
-
page_title
@
group_
milestone
.
title
,
"Milestones"
-
page_title
@milestone
.
title
,
"Milestones"
=
render
"header_title"
%h4
.page-title
.issue-box
{
class:
"issue-box-#{@
group_
milestone.closed? ? 'closed' : 'open'}"
}
-
if
@
group_
milestone
.
closed?
.issue-box
{
class:
"issue-box-#{@milestone.closed? ? 'closed' : 'open'}"
}
-
if
@milestone
.
closed?
Closed
-
else
Open
Milestone
#{
@
group_
milestone
.
title
}
Milestone
#{
@milestone
.
title
}
.pull-right
-
if
can?
(
current_user
,
:admin_group
,
@group
)
-
if
@
group_
milestone
.
active?
=
link_to
'Close Milestone'
,
group_milestone_path
(
@group
,
@
group_milestone
.
safe_title
,
title:
@group_
milestone
.
title
,
milestone:
{
state_event: :close
}),
method: :put
,
class:
"btn btn-sm btn-close"
-
if
@milestone
.
active?
=
link_to
'Close Milestone'
,
group_milestone_path
(
@group
,
@
milestone
.
safe_title
,
title:
@
milestone
.
title
,
milestone:
{
state_event: :close
}),
method: :put
,
class:
"btn btn-sm btn-close"
-
else
=
link_to
'Reopen Milestone'
,
group_milestone_path
(
@group
,
@
group_milestone
.
safe_title
,
title:
@group_
milestone
.
title
,
milestone:
{
state_event: :activate
}),
method: :put
,
class:
"btn btn-sm btn-grouped btn-reopen"
=
link_to
'Reopen Milestone'
,
group_milestone_path
(
@group
,
@
milestone
.
safe_title
,
title:
@
milestone
.
title
,
milestone:
{
state_event: :activate
}),
method: :put
,
class:
"btn btn-sm btn-grouped btn-reopen"
%hr
-
if
(
@
group_milestone
.
total_items_count
==
@group_milestone
.
closed_items_count
)
&&
@group_
milestone
.
active?
-
if
(
@
milestone
.
total_items_count
==
@milestone
.
closed_items_count
)
&&
@
milestone
.
active?
.alert.alert-success
%span
All issues for this milestone are closed. You may close the milestone now.
...
...
@@ -30,7 +30,7 @@
%th
Open issues
%th
State
%th
Due date
-
@
group_
milestone
.
milestones
.
each
do
|
milestone
|
-
@milestone
.
milestones
.
each
do
|
milestone
|
%tr
%td
=
link_to
"
#{
milestone
.
project
.
name
}
"
,
namespace_project_milestone_path
(
milestone
.
project
.
namespace
,
milestone
.
project
,
milestone
)
...
...
@@ -47,46 +47,46 @@
.context
%p
.lead
Progress:
#{
@
group_
milestone
.
closed_items_count
}
closed
#{
@milestone
.
closed_items_count
}
closed
–
#{
@
group_
milestone
.
open_items_count
}
open
=
milestone_progress_bar
(
@
group_
milestone
)
#{
@milestone
.
open_items_count
}
open
=
milestone_progress_bar
(
@milestone
)
%ul
.nav.nav-tabs
%li
.active
=
link_to
'#tab-issues'
,
'data-toggle'
=>
'tab'
do
Issues
%span
.badge
=
@
group_
milestone
.
issue_count
%span
.badge
=
@milestone
.
issue_count
%li
=
link_to
'#tab-merge-requests'
,
'data-toggle'
=>
'tab'
do
Merge Requests
%span
.badge
=
@
group_
milestone
.
merge_requests_count
%span
.badge
=
@milestone
.
merge_requests_count
%li
=
link_to
'#tab-participants'
,
'data-toggle'
=>
'tab'
do
Participants
%span
.badge
=
@
group_
milestone
.
participants
.
count
%span
.badge
=
@milestone
.
participants
.
count
.pull-right
=
link_to
'Browse Issues'
,
issues_group_path
(
@group
,
milestone_title:
@
group_
milestone
.
title
),
class:
"btn edit-milestone-link btn-grouped"
=
link_to
'Browse Issues'
,
issues_group_path
(
@group
,
milestone_title:
@milestone
.
title
),
class:
"btn edit-milestone-link btn-grouped"
.tab-content
.tab-pane.active
#tab-issues
.row
.col-md-6
=
render
'issues'
,
title:
"Open"
,
issues:
@
group_
milestone
.
opened_issues
=
render
'issues'
,
title:
"Open"
,
issues:
@milestone
.
opened_issues
.col-md-6
=
render
'issues'
,
title:
"Closed"
,
issues:
@
group_
milestone
.
closed_issues
=
render
'issues'
,
title:
"Closed"
,
issues:
@milestone
.
closed_issues
.tab-pane
#tab-merge-requests
.row
.col-md-6
=
render
'merge_requests'
,
title:
"Open"
,
merge_requests:
@
group_
milestone
.
opened_merge_requests
=
render
'merge_requests'
,
title:
"Open"
,
merge_requests:
@milestone
.
opened_merge_requests
.col-md-6
=
render
'merge_requests'
,
title:
"Closed"
,
merge_requests:
@
group_
milestone
.
closed_merge_requests
=
render
'merge_requests'
,
title:
"Closed"
,
merge_requests:
@milestone
.
closed_merge_requests
.tab-pane
#tab-participants
%ul
.bordered-list
-
@
group_
milestone
.
participants
.
each
do
|
user
|
-
@milestone
.
participants
.
each
do
|
user
|
%li
=
link_to
user
,
title:
user
.
name
,
class:
"darken"
do
=
image_tag
avatar_icon
(
user
,
32
),
class:
"avatar s32"
...
...
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