Commit 295ca904 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Restyle milestones index

parent 0715abaf
...@@ -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 ASC") else @project.milestones.active.order("due_date DESC")
end end
@milestones = @milestones.includes(:project) @milestones = @milestones.includes(:project)
......
...@@ -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'
&nbsp; &nbsp;
...@@ -25,3 +22,5 @@ ...@@ -25,3 +22,5 @@
= pluralize milestone.merge_requests.count, 'Merge Request' = pluralize milestone.merge_requests.count, 'Merge Request'
&nbsp; &nbsp;
%span.light #{milestone.percent_complete}% complete %span.light #{milestone.percent_complete}% complete
.progress.progress-info
.bar{style: "width: #{milestone.percent_complete}%;"}
...@@ -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,7 +18,8 @@ ...@@ -17,7 +18,8 @@
%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 %ul.well-list
= render @milestones = render @milestones
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment