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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
41654267
Commit
41654267
authored
Jan 06, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Restyle and refactor milestones filter
parent
560e717f
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
70 additions
and
85 deletions
+70
-85
app/controllers/projects/milestones_controller.rb
app/controllers/projects/milestones_controller.rb
+1
-1
app/helpers/groups_helper.rb
app/helpers/groups_helper.rb
+0
-12
app/helpers/milestones_helper.rb
app/helpers/milestones_helper.rb
+9
-0
app/views/groups/_filter.html.haml
app/views/groups/_filter.html.haml
+0
-12
app/views/groups/milestones/index.html.haml
app/views/groups/milestones/index.html.haml
+34
-38
app/views/projects/milestones/index.html.haml
app/views/projects/milestones/index.html.haml
+10
-22
app/views/shared/_milestones_filter.html.haml
app/views/shared/_milestones_filter.html.haml
+16
-0
No files found.
app/controllers/projects/milestones_controller.rb
View file @
41654267
...
...
@@ -11,7 +11,7 @@ class Projects::MilestonesController < Projects::ApplicationController
respond_to
:html
def
index
@milestones
=
case
params
[
:
f
]
@milestones
=
case
params
[
:
state
]
when
'all'
;
@project
.
milestones
.
order
(
"state, due_date DESC"
)
when
'closed'
;
@project
.
milestones
.
closed
.
order
(
"due_date DESC"
)
else
@project
.
milestones
.
active
.
order
(
"due_date ASC"
)
...
...
app/helpers/groups_helper.rb
View file @
41654267
...
...
@@ -33,18 +33,6 @@ module GroupsHelper
title
end
def
group_filter_path
(
entity
,
options
=
{})
exist_opts
=
{
status:
params
[
:status
]
}
options
=
exist_opts
.
merge
(
options
)
path
=
request
.
path
path
<<
"?
#{
options
.
to_param
}
"
path
end
def
group_settings_page?
if
current_controller?
(
'groups'
)
current_action?
(
'edit'
)
||
current_action?
(
'projects'
)
...
...
app/helpers/milestones_helper.rb
0 → 100644
View file @
41654267
module
MilestonesHelper
def
milestones_filter_path
(
opts
=
{})
if
@project
project_milestones_path
(
@project
,
opts
)
elsif
@group
group_milestones_path
(
@group
,
opts
)
end
end
end
app/views/groups/_filter.html.haml
deleted
100644 → 0
View file @
560e717f
=
form_tag
group_filter_path
(
entity
),
method:
'get'
do
%fieldset
%ul
.nav.nav-pills.nav-stacked
%li
{
class:
(
"active"
if
(
params
[
:status
]
==
'active'
||
!
params
[
:status
]))}
=
link_to
group_filter_path
(
entity
,
status:
'active'
)
do
Active
%li
{
class:
(
"active"
if
params
[
:status
]
==
'closed'
)}
=
link_to
group_filter_path
(
entity
,
status:
'closed'
)
do
Closed
%li
{
class:
(
"active"
if
params
[
:status
]
==
'all'
)}
=
link_to
group_filter_path
(
entity
,
status:
'all'
)
do
All
app/views/groups/milestones/index.html.haml
View file @
41654267
...
...
@@ -9,12 +9,8 @@
%hr
.row
.fixed.sidebar-expand-button.hidden-lg.hidden-md
%i
.fa.fa-list.fa-2x
.col-md-3.responsive-side
=
render
'groups/filter'
,
entity:
'milestone'
.col-md-9
=
render
'shared/milestones_filter'
.milestones
.panel.panel-default
%ul
.well-list
-
if
@group_milestones
.
blank?
...
...
app/views/projects/milestones/index.html.haml
View file @
41654267
...
...
@@ -7,21 +7,9 @@
%i
.fa.fa-plus
New Milestone
.row
.fixed.sidebar-expand-button.hidden-lg.hidden-md.hidden-xs
%i
.fa.fa-list.fa-2x
.col-md-3.responsive-side
%ul
.nav.nav-pills.nav-stacked
%li
{
class:
(
"active"
if
(
params
[
:f
]
==
"active"
||
!
params
[
:f
]))}
=
link_to
project_milestones_path
(
@project
,
f:
"active"
)
do
Active
%li
{
class:
(
"active"
if
params
[
:f
]
==
"closed"
)}
=
link_to
project_milestones_path
(
@project
,
f:
"closed"
)
do
Closed
%li
{
class:
(
"active"
if
params
[
:f
]
==
"all"
)}
=
link_to
project_milestones_path
(
@project
,
f:
"all"
)
do
All
.col-md-9
=
render
'shared/milestones_filter'
.milestones
.panel.panel-default
%ul
.well-list
=
render
@milestones
...
...
app/views/shared/_milestones_filter.html.haml
0 → 100644
View file @
41654267
.fixed.sidebar-expand-button.hidden-lg.hidden-md
%i
.fa.fa-list.fa-2x
.responsive-side.milestones-filters.append-bottom-10
%ul
.nav.nav-pills.nav-compact
%li
{
class:
(
"active"
if
params
[
:state
].
blank?
||
params
[
:state
]
==
'opened'
)}
=
link_to
milestones_filter_path
(
state:
'opened'
)
do
%i
.fa.fa-exclamation-circle
Open
%li
{
class:
(
"active"
if
params
[
:state
]
==
'closed'
)}
=
link_to
milestones_filter_path
(
state:
'closed'
)
do
%i
.fa.fa-check-circle
Closed
%li
{
class:
(
"active"
if
params
[
:state
]
==
'all'
)}
=
link_to
milestones_filter_path
(
state:
'all'
)
do
%i
.fa.fa-compass
All
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