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
b1bdd829
Commit
b1bdd829
authored
Jun 16, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4269 from dosire/scrum-view-for-milestone
Scrum view style milestone view.
parents
593dfc40
f7ea649f
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
18 additions
and
28 deletions
+18
-28
app/assets/javascripts/milestones.js.coffee
app/assets/javascripts/milestones.js.coffee
+0
-7
app/models/issue.rb
app/models/issue.rb
+2
-0
app/views/milestones/_issues.html.haml
app/views/milestones/_issues.html.haml
+10
-0
app/views/milestones/show.html.haml
app/views/milestones/show.html.haml
+6
-13
features/project/issues/milestones.feature
features/project/issues/milestones.feature
+0
-2
features/steps/project/project_milestones.rb
features/steps/project/project_milestones.rb
+0
-6
No files found.
app/assets/javascripts/milestones.js.coffee
View file @
b1bdd829
$
->
$
->
$
(
'.milestone-issue-filter li[data-closed]'
).
addClass
(
'hide'
)
$
(
'.milestone-issue-filter ul.nav li a'
).
click
->
$
(
'.milestone-issue-filter li'
).
toggleClass
(
'active'
)
$
(
'.milestone-issue-filter li[data-closed]'
).
toggleClass
(
'hide'
)
false
$
(
'.milestone-merge-requests-filter li[data-closed]'
).
addClass
(
'hide'
)
$
(
'.milestone-merge-requests-filter li[data-closed]'
).
addClass
(
'hide'
)
$
(
'.milestone-merge-requests-filter ul.nav li a'
).
click
->
$
(
'.milestone-merge-requests-filter ul.nav li a'
).
click
->
...
...
app/models/issue.rb
View file @
b1bdd829
...
@@ -28,6 +28,8 @@ class Issue < ActiveRecord::Base
...
@@ -28,6 +28,8 @@ class Issue < ActiveRecord::Base
scope
:cared
,
->
(
user
)
{
where
(
assignee_id:
user
)
}
scope
:cared
,
->
(
user
)
{
where
(
assignee_id:
user
)
}
scope
:authored
,
->
(
user
)
{
where
(
author_id:
user
)
}
scope
:authored
,
->
(
user
)
{
where
(
author_id:
user
)
}
scope
:open_for
,
->
(
user
)
{
opened
.
assigned
(
user
)
}
scope
:open_for
,
->
(
user
)
{
opened
.
assigned
(
user
)
}
scope
:assigned
,
->
{
where
(
"assignee_id IS NOT NULL"
)
}
scope
:unassigned
,
->
{
where
(
"assignee_id IS NULL"
)
}
state_machine
:state
,
initial: :opened
do
state_machine
:state
,
initial: :opened
do
event
:close
do
event
:close
do
...
...
app/views/milestones/_issues.html.haml
0 → 100644
View file @
b1bdd829
.span6
.ui-box.milestone-issue-filter
%h5
.title
=
title
%ul
.well-list
-
issues
.
each
do
|
issue
|
%li
{
data:
{
closed:
issue
.
closed?
}}
=
link_to
[
@project
,
issue
]
do
%span
.badge.badge-info
##{issue.id}
–
=
link_to_gfm
truncate
(
issue
.
title
,
length:
60
),
[
@project
,
issue
]
\ No newline at end of file
app/views/milestones/show.html.haml
View file @
b1bdd829
...
@@ -56,20 +56,11 @@
...
@@ -56,20 +56,11 @@
.row
.row
.span6
=
render
(
partial:
'issues'
,
locals:
{
title:
'Unstarted Issues (open and unassigned)'
,
issues:
@issues
.
opened
.
unassigned
})
.ui-box.milestone-issue-filter
.title
=
render
(
partial:
'issues'
,
locals:
{
title:
'Ongoing Issues (open and assigned)'
,
issues:
@issues
.
opened
.
assigned
})
%ul
.nav.nav-pills
%li
.active
=
link_to
(
'Open Issues'
,
'#'
)
%li
=
link_to
(
'All Issues'
,
'#'
)
%ul
.well-list
-
@issues
.
each
do
|
issue
|
%li
{
data:
{
closed:
issue
.
closed?
}}
=
link_to
[
@project
,
issue
]
do
%span
.badge.badge-info
##{issue.id}
–
=
link_to_gfm
truncate
(
issue
.
title
,
length:
60
),
[
@project
,
issue
]
.row
.span6
.span6
.ui-box.milestone-merge-requests-filter
.ui-box.milestone-merge-requests-filter
.title
.title
...
@@ -84,6 +75,8 @@
...
@@ -84,6 +75,8 @@
–
–
=
link_to_gfm
truncate
(
merge_request
.
title
,
length:
60
),
[
@project
,
merge_request
]
=
link_to_gfm
truncate
(
merge_request
.
title
,
length:
60
),
[
@project
,
merge_request
]
=
render
(
:partial
=>
'issues'
,
locals:
{
title:
'Completed Issues (closed)'
,
issues:
@issues
.
closed
})
%hr
%hr
%h6
Participants:
%h6
Participants:
%div
%div
...
...
features/project/issues/milestones.feature
View file @
b1bdd829
...
@@ -22,5 +22,3 @@ Feature: Project Milestones
...
@@ -22,5 +22,3 @@ Feature: Project Milestones
Given
the milestone has open and closed issues
Given
the milestone has open and closed issues
And
I click link
"v2.2"
And
I click link
"v2.2"
Then
I should see 3 issues
Then
I should see 3 issues
When
I click link
"All Issues"
Then
I should see 4 issues
features/steps/project/project_milestones.rb
View file @
b1bdd829
...
@@ -51,11 +51,5 @@ class ProjectMilestones < Spinach::FeatureSteps
...
@@ -51,11 +51,5 @@ class ProjectMilestones < Spinach::FeatureSteps
Then
"I should see 3 issues"
do
Then
"I should see 3 issues"
do
page
.
should
have_selector
(
'.milestone-issue-filter .well-list li'
,
count:
4
)
page
.
should
have_selector
(
'.milestone-issue-filter .well-list li'
,
count:
4
)
page
.
should
have_selector
(
'.milestone-issue-filter .well-list li.hide'
,
count:
1
)
end
Then
"I should see 4 issues"
do
page
.
should
have_selector
(
'.milestone-issue-filter .well-list li'
,
count:
4
)
page
.
should_not
have_selector
(
'.milestone-issue-filter .well-list li.hide'
)
end
end
end
end
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