Commit 2a76c7fd authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'improve-milestones-ui' into 'master'

Improve milestones ui

* change progress bar colors
* make milestone title bold

See merge request !1660
parents b51e2a05 3e6147ad
.issues-sortable-list .str-truncated { .issues-sortable-list .str-truncated {
max-width: 90%; max-width: 90%;
} }
li.milestone {
h4 {
font-weight: bold;
}
}
...@@ -8,4 +8,15 @@ module MilestonesHelper ...@@ -8,4 +8,15 @@ module MilestonesHelper
dashboard_milestones_path(opts) dashboard_milestones_path(opts)
end end
end end
def milestone_progress_bar(milestone)
options = {
class: 'progress-bar progress-bar-success',
style: "width: #{milestone.percent_complete}%;"
}
content_tag :div, class: 'progress' do
content_tag :div, nil, options
end
end
end end
...@@ -28,8 +28,7 @@ ...@@ -28,8 +28,7 @@
= 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 = milestone_progress_bar(milestone)
.progress-bar{style: "width: #{milestone.percent_complete}%;"}
%div %div
%br %br
- milestone.milestones.each do |milestone| - milestone.milestones.each do |milestone|
......
...@@ -39,8 +39,7 @@ ...@@ -39,8 +39,7 @@
#{@dashboard_milestone.closed_items_count} closed #{@dashboard_milestone.closed_items_count} closed
– –
#{@dashboard_milestone.open_items_count} open #{@dashboard_milestone.open_items_count} open
.progress.progress-info = milestone_progress_bar(@dashboard_milestone)
.progress-bar{style: "width: #{@dashboard_milestone.percent_complete}%;"}
%ul.nav.nav-tabs %ul.nav.nav-tabs
%li.active %li.active
......
...@@ -36,8 +36,7 @@ ...@@ -36,8 +36,7 @@
= 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 = milestone_progress_bar(milestone)
.progress-bar{style: "width: #{milestone.percent_complete}%;"}
%div %div
%br %br
- milestone.milestones.each do |milestone| - milestone.milestones.each do |milestone|
......
...@@ -45,8 +45,7 @@ ...@@ -45,8 +45,7 @@
#{@group_milestone.closed_items_count} closed #{@group_milestone.closed_items_count} closed
– –
#{@group_milestone.open_items_count} open #{@group_milestone.open_items_count} open
.progress.progress-info = milestone_progress_bar(@group_milestone)
.progress-bar{style: "width: #{@group_milestone.percent_complete}%;"}
%ul.nav.nav-tabs %ul.nav.nav-tabs
%li.active %li.active
......
...@@ -23,5 +23,4 @@ ...@@ -23,5 +23,4 @@
= 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 = milestone_progress_bar(milestone)
.progress-bar{style: "width: #{milestone.percent_complete}%;"}
...@@ -43,8 +43,7 @@ ...@@ -43,8 +43,7 @@
   
%span.light #{@milestone.percent_complete}% complete %span.light #{@milestone.percent_complete}% complete
%span.pull-right= @milestone.expires_at %span.pull-right= @milestone.expires_at
.progress.progress-info = milestone_progress_bar(@milestone)
.progress-bar{style: "width: #{@milestone.percent_complete}%;"}
%ul.nav.nav-tabs %ul.nav.nav-tabs
......
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