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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
12434cb7
Commit
12434cb7
authored
Oct 11, 2012
by
Valeriy Sizov
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1672 from tsigo/milestone_closed_issues
Milestone "All Issues" filter
parents
2b7fd29b
bf1554f8
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
49 additions
and
5 deletions
+49
-5
app/assets/javascripts/milestones.js.coffee
app/assets/javascripts/milestones.js.coffee
+7
-0
app/assets/stylesheets/gitlab_bootstrap/tables.scss
app/assets/stylesheets/gitlab_bootstrap/tables.scss
+5
-0
app/controllers/milestones_controller.rb
app/controllers/milestones_controller.rb
+1
-1
app/views/milestones/show.html.haml
app/views/milestones/show.html.haml
+6
-4
features/project/issues/milestones.feature
features/project/issues/milestones.feature
+8
-0
features/steps/project/project_milestones.rb
features/steps/project/project_milestones.rb
+22
-0
No files found.
app/assets/javascripts/milestones.js.coffee
0 → 100644
View file @
12434cb7
$
->
$
(
'.milestone-issue-filter tr[data-closed]'
).
addClass
(
'hide'
)
$
(
'.milestone-issue-filter ul.nav li a'
).
click
->
$
(
'.milestone-issue-filter li'
).
toggleClass
(
'active'
)
$
(
'.milestone-issue-filter tr[data-closed]'
).
toggleClass
(
'hide'
)
false
app/assets/stylesheets/gitlab_bootstrap/tables.scss
View file @
12434cb7
...
...
@@ -11,6 +11,11 @@ table {
border-bottom
:
1px
solid
#bbb
;
text-shadow
:
0
1px
1px
#fff
;
@include
bg-dark-gray-gradient
;
ul
.nav
{
text-shadow
:
none
;
margin
:
0
;
}
}
th
,
td
{
...
...
app/controllers/milestones_controller.rb
View file @
12434cb7
...
...
@@ -30,7 +30,7 @@ class MilestonesController < ProjectResourceController
end
def
show
@issues
=
@milestone
.
issues
.
opened
.
page
(
params
[
:page
]).
per
(
40
)
@issues
=
@milestone
.
issues
@users
=
@milestone
.
participants
respond_to
do
|
format
|
...
...
app/views/milestones/show.html.haml
View file @
12434cb7
...
...
@@ -45,18 +45,20 @@
.row
.span6
%table
%table
.milestone-issue-filter
%thead
%th
Open Issues
%th
%ul
.nav.nav-pills
%li
.active
=
link_to
(
'Open Issues'
,
'#'
)
%li
=
link_to
(
'All Issues'
,
'#'
)
-
@issues
.
each
do
|
issue
|
%tr
%tr
{
data:
{
closed:
issue
.
closed
}}
%td
=
link_to
[
@project
,
issue
]
do
%span
.badge.badge-info
##{issue.id}
–
=
link_to_gfm
truncate
(
issue
.
title
,
length:
60
),
[
@project
,
issue
]
%br
=
paginate
@issues
,
theme:
"gitlab"
.span6
%table
...
...
features/project/issues/milestones.feature
View file @
12434cb7
...
...
@@ -16,3 +16,11 @@ Feature: Project Milestones
Given
I click link
"New Milestone"
And
I submit new milestone
"v2.3"
Then
I should see milestone
"v2.3"
@javascript
Scenario
:
Listing closed issues
Given
the milestone has open and closed issues
And
I click link
"v2.2"
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 @
12434cb7
...
...
@@ -36,4 +36,26 @@ class ProjectMilestones < Spinach::FeatureSteps
3
.
times
{
Factory
:issue
,
:project
=>
project
,
:milestone
=>
milestone
}
end
Given
'the milestone has open and closed issues'
do
project
=
Project
.
find_by_name
(
"Shop"
)
milestone
=
project
.
milestones
.
find_by_title
(
'v2.2'
)
# 3 Open issues created above; create one closed issue
create
(
:closed_issue
,
project:
project
,
milestone:
milestone
)
end
When
'I click link "All Issues"'
do
click_link
'All Issues'
end
Then
"I should see 3 issues"
do
page
.
should
have_selector
(
'.milestone-issue-filter tbody tr'
,
count:
4
)
page
.
should
have_selector
(
'.milestone-issue-filter tbody tr.hide'
,
count:
1
)
end
Then
"I should see 4 issues"
do
page
.
should
have_selector
(
'.milestone-issue-filter tbody tr'
,
count:
4
)
page
.
should_not
have_selector
(
'.milestone-issue-filter tbody tr.hide'
)
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