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
Léo-Paul Géneau
gitlab-ce
Commits
295ca904
Commit
295ca904
authored
Apr 16, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Restyle milestones index
parent
0715abaf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
17 deletions
+18
-17
app/controllers/milestones_controller.rb
app/controllers/milestones_controller.rb
+1
-1
app/views/milestones/_milestone.html.haml
app/views/milestones/_milestone.html.haml
+4
-5
app/views/milestones/index.html.haml
app/views/milestones/index.html.haml
+13
-11
No files found.
app/controllers/milestones_controller.rb
View file @
295ca904
...
@@ -14,7 +14,7 @@ class MilestonesController < ProjectResourceController
...
@@ -14,7 +14,7 @@ class MilestonesController < ProjectResourceController
@milestones
=
case
params
[
:f
]
@milestones
=
case
params
[
:f
]
when
'all'
;
@project
.
milestones
.
order
(
"state, due_date DESC"
)
when
'all'
;
@project
.
milestones
.
order
(
"state, due_date DESC"
)
when
'closed'
;
@project
.
milestones
.
closed
.
order
(
"due_date DESC"
)
when
'closed'
;
@project
.
milestones
.
closed
.
order
(
"due_date DESC"
)
else
@project
.
milestones
.
active
.
order
(
"due_date
A
SC"
)
else
@project
.
milestones
.
active
.
order
(
"due_date
DE
SC"
)
end
end
@milestones
=
@milestones
.
includes
(
:project
)
@milestones
=
@milestones
.
includes
(
:project
)
...
...
app/views/milestones/_milestone.html.haml
View file @
295ca904
...
@@ -13,11 +13,8 @@
...
@@ -13,11 +13,8 @@
-
if
milestone
.
is_empty?
-
if
milestone
.
is_empty?
%span
.muted
Empty
%span
.muted
Empty
-
else
-
else
.row
%div
.span4
%div
.progress.progress-info
.bar
{
style:
"width: #{milestone.percent_complete}%;"
}
.span6
=
link_to
project_issues_path
(
milestone
.
project
,
milestone_id:
milestone
.
id
)
do
=
link_to
project_issues_path
(
milestone
.
project
,
milestone_id:
milestone
.
id
)
do
=
pluralize
milestone
.
issues
.
count
,
'Issue'
=
pluralize
milestone
.
issues
.
count
,
'Issue'
...
@@ -25,3 +22,5 @@
...
@@ -25,3 +22,5 @@
=
pluralize
milestone
.
merge_requests
.
count
,
'Merge Request'
=
pluralize
milestone
.
merge_requests
.
count
,
'Merge Request'
%span
.light
#{
milestone
.
percent_complete
}
% complete
%span
.light
#{
milestone
.
percent_complete
}
% complete
.progress.progress-info
.bar
{
style:
"width: #{milestone.percent_complete}%;"
}
app/views/milestones/index.html.haml
View file @
295ca904
...
@@ -5,9 +5,10 @@
...
@@ -5,9 +5,10 @@
-
if
can?
current_user
,
:admin_milestone
,
@project
-
if
can?
current_user
,
:admin_milestone
,
@project
=
link_to
"New Milestone"
,
new_project_milestone_path
(
@project
),
class:
"pull-right btn btn-small"
,
title:
"New Milestone"
=
link_to
"New Milestone"
,
new_project_milestone_path
(
@project
),
class:
"pull-right btn btn-small"
,
title:
"New Milestone"
%br
%br
%div
.ui-box
.title
.row
%ul
.nav.nav-pills
.span3
%ul
.nav.nav-pills.nav-stacked
%li
{
class:
(
"active"
if
(
params
[
:f
]
==
"active"
||
!
params
[
:f
]))}
%li
{
class:
(
"active"
if
(
params
[
:f
]
==
"active"
||
!
params
[
:f
]))}
=
link_to
project_milestones_path
(
@project
,
f:
"active"
)
do
=
link_to
project_milestones_path
(
@project
,
f:
"active"
)
do
Active
Active
...
@@ -17,12 +18,13 @@
...
@@ -17,12 +18,13 @@
%li
{
class:
(
"active"
if
params
[
:f
]
==
"all"
)}
%li
{
class:
(
"active"
if
params
[
:f
]
==
"all"
)}
=
link_to
project_milestones_path
(
@project
,
f:
"all"
)
do
=
link_to
project_milestones_path
(
@project
,
f:
"all"
)
do
All
All
.span9
%div
.ui-box
%ul
.well-list
=
render
@milestones
%ul
.well-list
-
if
@milestones
.
present?
=
render
@milestones
%li
.bottom
=
paginate
@milestones
,
theme:
"gitlab"
-
else
-
if
@milestones
.
present?
%li
%li
.bottom
=
paginate
@milestones
,
theme:
"gitlab"
%h3
.nothing_here_message
Nothing to show here
-
else
%li
%h3
.nothing_here_message
Nothing to show here
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