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

Restyle milestones index

parent 0715abaf
......@@ -14,7 +14,7 @@ class MilestonesController < ProjectResourceController
@milestones = case params[:f]
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")
else @project.milestones.active.order("due_date DESC")
end
@milestones = @milestones.includes(:project)
......
......@@ -13,11 +13,8 @@
- if milestone.is_empty?
%span.muted Empty
- else
.row
.span4
.progress.progress-info
.bar{style: "width: #{milestone.percent_complete}%;"}
.span6
%div
%div
= link_to project_issues_path(milestone.project, milestone_id: milestone.id) do
= pluralize milestone.issues.count, 'Issue'
&nbsp;
......@@ -25,3 +22,5 @@
= pluralize milestone.merge_requests.count, 'Merge Request'
&nbsp;
%span.light #{milestone.percent_complete}% complete
.progress.progress-info
.bar{style: "width: #{milestone.percent_complete}%;"}
......@@ -5,9 +5,10 @@
- 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"
%br
%div.ui-box
.title
%ul.nav.nav-pills
.row
.span3
%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
......@@ -17,12 +18,13 @@
%li{class: ("active" if params[:f] == "all")}
= link_to project_milestones_path(@project, f: "all") do
All
.span9
%div.ui-box
%ul.well-list
= render @milestones
%ul.well-list
= render @milestones
- if @milestones.present?
%li.bottom= paginate @milestones, theme: "gitlab"
- else
%li
%h3.nothing_here_message Nothing to show here
- if @milestones.present?
%li.bottom= paginate @milestones, theme: "gitlab"
- else
%li
%h3.nothing_here_message Nothing to show here
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