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
e66a8b4c
Commit
e66a8b4c
authored
Jun 30, 2014
by
Marin Jankovski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move milestone link in group head, 2 column milestone for MR and issues.
parent
c223fb1a
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
44 additions
and
33 deletions
+44
-33
app/assets/stylesheets/sections/groups.scss
app/assets/stylesheets/sections/groups.scss
+9
-0
app/controllers/groups/milestones_controller.rb
app/controllers/groups/milestones_controller.rb
+2
-2
app/models/group_milestone.rb
app/models/group_milestone.rb
+4
-8
app/views/groups/milestones/_issue.html.haml
app/views/groups/milestones/_issue.html.haml
+3
-1
app/views/groups/milestones/_issues.html.haml
app/views/groups/milestones/_issues.html.haml
+4
-4
app/views/groups/milestones/_merge_request.html.haml
app/views/groups/milestones/_merge_request.html.haml
+7
-2
app/views/groups/milestones/_merge_requests.html.haml
app/views/groups/milestones/_merge_requests.html.haml
+4
-3
app/views/groups/milestones/show.html.haml
app/views/groups/milestones/show.html.haml
+8
-10
app/views/layouts/nav/_group.html.haml
app/views/layouts/nav/_group.html.haml
+3
-3
No files found.
app/assets/stylesheets/sections/groups.scss
View file @
e66a8b4c
...
...
@@ -7,3 +7,12 @@
.member-search-form
{
float
:
left
;
}
.milestone-row
{
@include
str-truncated
(
90%
);
}
.label.label-default.project-name
{
width
:
80px
;
@include
str-truncated
(
80%
);
}
app/controllers/groups/milestones_controller.rb
View file @
e66a8b4c
...
...
@@ -14,8 +14,8 @@ class Groups::MilestonesController < ApplicationController
def
show
project_milestones
=
Milestone
.
where
(
project_id:
group
.
projects
)
@group_milestone
=
Milestones
::
GroupService
.
new
(
project_milestones
).
milestone
(
title
)
@
project_issues
=
@group_milestone
.
filter_by
(
params
[
:status
],
"issues"
)
@
project_merge_requests
=
@group_milestone
.
filter_by
(
params
[
:status
],
"merge_requests"
)
@
issues
=
@group_milestone
.
issues
@
merge_requests
=
@group_milestone
.
merge_requests
end
def
update
...
...
app/models/group_milestone.rb
View file @
e66a8b4c
...
...
@@ -65,16 +65,12 @@ class GroupMilestone
state
==
'closed'
end
def
opened_unassigned_
issues
milestones
.
map
{
|
milestone
|
milestone
.
issues
.
opened
.
unassigned
}
def
issues
milestones
.
map
{
|
milestone
|
milestone
.
issues
}.
flatten
.
group_by
(
&
:state
)
end
def
opened_assigned_issues
milestones
.
map
{
|
milestone
|
milestone
.
issues
.
opened
.
assigned
}
end
def
closed_issues
milestones
.
map
{
|
milestone
|
milestone
.
issues
.
closed
}
def
merge_requests
milestones
.
map
{
|
milestone
|
milestone
.
merge_requests
}.
flatten
.
group_by
(
&
:state
)
end
def
participants
...
...
app/views/groups/milestones/_issue.html.haml
View file @
e66a8b4c
%li
{
id:
dom_id
(
issue
,
'sortable'
),
class:
'issue-row'
,
'data-iid'
=>
issue
.
iid
}
%span
.
str-truncated
%span
.
milestone-row
-
project
=
issue
.
project
%span
.label.label-default.project-name
=
project
.
name
=
link_to
[
project
,
issue
]
do
%span
.cgray
##{issue.iid}
=
link_to_gfm
issue
.
title
,
[
project
,
issue
]
...
...
app/views/groups/milestones/_issues.html.haml
View file @
e66a8b4c
.panel.panel-default
.panel-heading
=
nam
e
.panel-heading
=
titl
e
%ul
{
class:
"well-list issues-sortable-list"
}
-
if
issues
-
issues
.
each
do
|
issue
|
=
render
'issue'
,
issue:
issue
app/views/groups/milestones/_merge_request.html.haml
View file @
e66a8b4c
%li
{
id:
dom_id
(
merge_request
,
'sortable'
),
class:
'mr-row'
,
'data-iid'
=>
merge_request
.
iid
}
%span
.
str-truncated
%span
.
milestone-row
-
project
=
merge_request
.
project
%span
.label.label-default.project-name
=
project
.
name
=
link_to
[
project
,
merge_request
]
do
%span
.cgray
##{merge_request.iid}
=
link_to_gfm
truncate
(
merge_request
.
title
,
length:
60
),
[
project
,
merge_request
]
=
link_to_gfm
merge_request
.
title
,
[
project
,
merge_request
]
.pull-right.assignee-icon
-
if
merge_request
.
assignee
=
image_tag
avatar_icon
(
merge_request
.
assignee
.
email
,
16
),
class:
"avatar s16"
app/views/groups/milestones/_merge_requests.html.haml
View file @
e66a8b4c
.panel.panel-default
.panel-heading
=
nam
e
.panel-heading
=
titl
e
%ul
{
class:
"well-list merge_requests-sortable-list"
}
-
if
merge_requests
-
merge_requests
.
sort_by
(
&
:position
).
each
do
|
merge_request
|
=
render
'merge_request'
,
merge_request:
merge_request
app/views/groups/milestones/show.html.haml
View file @
e66a8b4c
...
...
@@ -52,19 +52,17 @@
.tab-content
.tab-pane.active
#tab-issues
.row
.col-md-4.responsive-side
=
render
'groups/filter'
,
entity:
'milestone'
.col-md-8
-
@project_issues
.
each
do
|
name
,
issues
|
=
render
'issues'
,
name:
name
,
issues:
issues
.col-md-6
=
render
'issues'
,
title:
"Open"
,
issues:
@issues
[
"opened"
]
.col-md-6
=
render
'issues'
,
title:
"Closed"
,
issues:
@issues
[
"closed"
]
.tab-pane
#tab-merge-requests
.row
.col-md-4.responsive-side
=
render
'groups/filter'
,
entity:
'milestone'
.col-md-8
-
@project_merge_requests
.
each
do
|
name
,
merge_requests
|
=
render
'merge_requests'
,
name:
name
,
merge_requests:
merge_requests
.col-md-6
=
render
'merge_requests'
,
title:
"Open"
,
merge_requests:
@merge_requests
[
"opened"
]
.col-md-6
=
render
'merge_requests'
,
title:
"Closed"
,
merge_requests:
@merge_requests
[
"closed"
]
.tab-pane
#tab-participants
%ul
.bordered-list
...
...
app/views/layouts/nav/_group.html.haml
View file @
e66a8b4c
...
...
@@ -2,6 +2,9 @@
=
nav_link
(
path:
'groups#show'
,
html_options:
{
class:
'home'
})
do
=
link_to
group_path
(
@group
),
title:
"Home"
do
Activity
=
nav_link
(
path:
'groups#milestones'
)
do
=
link_to
group_milestones_path
(
@group
)
do
Milestones
=
nav_link
(
path:
'groups#issues'
)
do
=
link_to
issues_group_path
(
@group
)
do
Issues
...
...
@@ -12,9 +15,6 @@
Merge Requests
-
if
current_user
%span
.count
=
current_user
.
cared_merge_requests
.
opened
.
of_group
(
@group
).
count
=
nav_link
(
path:
'groups#milestones'
)
do
=
link_to
group_milestones_path
(
@group
)
do
Milestones
=
nav_link
(
path:
'groups#members'
)
do
=
link_to
"Members"
,
members_group_path
(
@group
)
...
...
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