Commit 295ca904f1728f9748c77595fd32de1d7e3dcf6f
1 parent
0715abaf
Exists in
master
and in
4 other branches
Restyle milestones index
Showing
3 changed files
with
18 additions
and
17 deletions
Show diff stats
app/controllers/milestones_controller.rb
@@ -14,7 +14,7 @@ class MilestonesController < ProjectResourceController | @@ -14,7 +14,7 @@ class MilestonesController < ProjectResourceController | ||
14 | @milestones = case params[:f] | 14 | @milestones = case params[:f] |
15 | when 'all'; @project.milestones.order("state, due_date DESC") | 15 | when 'all'; @project.milestones.order("state, due_date DESC") |
16 | when 'closed'; @project.milestones.closed.order("due_date DESC") | 16 | when 'closed'; @project.milestones.closed.order("due_date DESC") |
17 | - else @project.milestones.active.order("due_date ASC") | 17 | + else @project.milestones.active.order("due_date DESC") |
18 | end | 18 | end |
19 | 19 | ||
20 | @milestones = @milestones.includes(:project) | 20 | @milestones = @milestones.includes(:project) |
app/views/milestones/_milestone.html.haml
@@ -13,11 +13,8 @@ | @@ -13,11 +13,8 @@ | ||
13 | - if milestone.is_empty? | 13 | - if milestone.is_empty? |
14 | %span.muted Empty | 14 | %span.muted Empty |
15 | - else | 15 | - else |
16 | - .row | ||
17 | - .span4 | ||
18 | - .progress.progress-info | ||
19 | - .bar{style: "width: #{milestone.percent_complete}%;"} | ||
20 | - .span6 | 16 | + %div |
17 | + %div | ||
21 | = link_to project_issues_path(milestone.project, milestone_id: milestone.id) do | 18 | = link_to project_issues_path(milestone.project, milestone_id: milestone.id) do |
22 | = pluralize milestone.issues.count, 'Issue' | 19 | = pluralize milestone.issues.count, 'Issue' |
23 | | 20 | |
@@ -25,3 +22,5 @@ | @@ -25,3 +22,5 @@ | ||
25 | = pluralize milestone.merge_requests.count, 'Merge Request' | 22 | = pluralize milestone.merge_requests.count, 'Merge Request' |
26 | | 23 | |
27 | %span.light #{milestone.percent_complete}% complete | 24 | %span.light #{milestone.percent_complete}% complete |
25 | + .progress.progress-info | ||
26 | + .bar{style: "width: #{milestone.percent_complete}%;"} |
app/views/milestones/index.html.haml
@@ -5,9 +5,10 @@ | @@ -5,9 +5,10 @@ | ||
5 | - if can? current_user, :admin_milestone, @project | 5 | - if can? current_user, :admin_milestone, @project |
6 | = link_to "New Milestone", new_project_milestone_path(@project), class: "pull-right btn btn-small", title: "New Milestone" | 6 | = link_to "New Milestone", new_project_milestone_path(@project), class: "pull-right btn btn-small", title: "New Milestone" |
7 | %br | 7 | %br |
8 | - %div.ui-box | ||
9 | - .title | ||
10 | - %ul.nav.nav-pills | 8 | + |
9 | + .row | ||
10 | + .span3 | ||
11 | + %ul.nav.nav-pills.nav-stacked | ||
11 | %li{class: ("active" if (params[:f] == "active" || !params[:f]))} | 12 | %li{class: ("active" if (params[:f] == "active" || !params[:f]))} |
12 | = link_to project_milestones_path(@project, f: "active") do | 13 | = link_to project_milestones_path(@project, f: "active") do |
13 | Active | 14 | Active |
@@ -17,12 +18,13 @@ | @@ -17,12 +18,13 @@ | ||
17 | %li{class: ("active" if params[:f] == "all")} | 18 | %li{class: ("active" if params[:f] == "all")} |
18 | = link_to project_milestones_path(@project, f: "all") do | 19 | = link_to project_milestones_path(@project, f: "all") do |
19 | All | 20 | All |
21 | + .span9 | ||
22 | + %div.ui-box | ||
23 | + %ul.well-list | ||
24 | + = render @milestones | ||
20 | 25 | ||
21 | - %ul.well-list | ||
22 | - = render @milestones | ||
23 | - | ||
24 | - - if @milestones.present? | ||
25 | - %li.bottom= paginate @milestones, theme: "gitlab" | ||
26 | - - else | ||
27 | - %li | ||
28 | - %h3.nothing_here_message Nothing to show here | 26 | + - if @milestones.present? |
27 | + %li.bottom= paginate @milestones, theme: "gitlab" | ||
28 | + - else | ||
29 | + %li | ||
30 | + %h3.nothing_here_message Nothing to show here |