Commit 12869a9e authored by Mike Greiling's avatar Mike Greiling

move progress bar from milestone summary into the sidebar

parent d3de86c6
...@@ -53,6 +53,21 @@ ...@@ -53,6 +53,21 @@
} }
.milestone-sidebar { .milestone-sidebar {
.gutter-toggle {
margin-bottom: 10px;
}
.milestone-progress {
.title {
padding-top: 5px;
}
.progress {
height: 6px;
margin: 0;
}
}
.remaining-days strong { .remaining-days strong {
font-weight: normal; font-weight: normal;
} }
...@@ -67,49 +82,21 @@ ...@@ -67,49 +82,21 @@
margin-right: 0; margin-right: 0;
} }
.right-sidebar-collapsed & { .milestone-progress {
.reference { .sidebar-collapsed-icon {
border-top: 1px solid $border-gray-normal; clear: both;
} padding: 15px 5px 5px;
}
}
.milestone-summary {
.milestone-stat {
white-space: nowrap;
margin-right: 10px;
&.with-drilldown { .progress {
margin-right: 2px; margin: 5px 0;
}
} }
.milestone-stats-and-buttons {
display: flex;
justify-content: flex-start;
flex-wrap: wrap;
@media (min-width: $screen-xs-min) {
justify-content: space-between;
flex-wrap: nowrap;
} }
} }
.milestone-stats { .right-sidebar-collapsed & {
order: 2; .reference {
width: 100%; border-top: 1px solid $border-gray-normal;
padding: 7px 0;
flex-shrink: 1;
@media (min-width: $screen-xs-min) {
// when displayed on one line stats go first, buttons second
order: 1;
}
} }
.progress {
width: 100%;
margin: 15px 0;
} }
} }
......
- header_title "Milestones", dashboard_milestones_path - header_title "Milestones", dashboard_milestones_path
= render 'shared/milestones/top', milestone: @milestone = render 'shared/milestones/top', milestone: @milestone
= render 'shared/milestones/summary', milestone: @milestone
= render 'shared/milestones/tabs', milestone: @milestone, show_full_project_name: true = render 'shared/milestones/tabs', milestone: @milestone, show_full_project_name: true
= render 'shared/milestones/sidebar', milestone: @milestone, affix_offset: 51 = render 'shared/milestones/sidebar', milestone: @milestone, affix_offset: 51
...@@ -4,6 +4,5 @@ ...@@ -4,6 +4,5 @@
= page_specific_javascript_bundle_tag('simulate_drag') if Rails.env.test? = page_specific_javascript_bundle_tag('simulate_drag') if Rails.env.test?
= render 'shared/milestones/top', milestone: @milestone, group: @group = render 'shared/milestones/top', milestone: @milestone, group: @group
= render 'shared/milestones/summary', milestone: @milestone
= render 'shared/milestones/tabs', milestone: @milestone, show_project_name: true = render 'shared/milestones/tabs', milestone: @milestone, show_project_name: true
= render 'shared/milestones/sidebar', milestone: @milestone, affix_offset: 102 = render 'shared/milestones/sidebar', milestone: @milestone, affix_offset: 102
...@@ -56,6 +56,5 @@ ...@@ -56,6 +56,5 @@
.alert.alert-success.prepend-top-default .alert.alert-success.prepend-top-default
%span All issues for this milestone are closed. You may close this milestone now. %span All issues for this milestone are closed. You may close this milestone now.
= render 'shared/milestones/summary', milestone: @milestone, project: @project
= render 'shared/milestones/tabs', milestone: @milestone = render 'shared/milestones/tabs', milestone: @milestone
= render 'shared/milestones/sidebar', milestone: @milestone, project: @project, affix_offset: 153 = render 'shared/milestones/sidebar', milestone: @milestone, project: @project, affix_offset: 153
...@@ -3,12 +3,19 @@ ...@@ -3,12 +3,19 @@
%aside.right-sidebar.js-right-sidebar{ data: { "offset-top" => affix_offset, "spy" => "affix" }, class: sidebar_gutter_collapsed_class, 'aria-live' => 'polite' } %aside.right-sidebar.js-right-sidebar{ data: { "offset-top" => affix_offset, "spy" => "affix" }, class: sidebar_gutter_collapsed_class, 'aria-live' => 'polite' }
.issuable-sidebar.milestone-sidebar .issuable-sidebar.milestone-sidebar
.block.issuable-sidebar-header .block.milestone-progress.issuable-sidebar-header
%a.gutter-toggle.pull-right.js-sidebar-toggle{ role: "button", href: "#", "aria-label" => "Toggle sidebar" } %a.gutter-toggle.pull-right.js-sidebar-toggle{ role: "button", href: "#", "aria-label" => "Toggle sidebar" }
= sidebar_gutter_toggle_icon = sidebar_gutter_toggle_icon
%span.issuable-header-text.hide-collapsed .sidebar-collapsed-icon
Milestone #{milestone.try(:to_reference) || milestone.title} %span== #{milestone.percent_complete(current_user)}%
= milestone_progress_bar(milestone)
.title.hide-collapsed
%strong== #{milestone.percent_complete(current_user)}%
%span.hide-collapsed
complete
.value.hide-collapsed
= milestone_progress_bar(milestone)
- if project - if project
.block.due_date .block.due_date
......
- project = local_assigns[:project]
.context.prepend-top-default
.milestone-summary
%h4 Progress
.milestone-stats-and-buttons
.milestone-stats
%span.milestone-stat
%strong== #{milestone.percent_complete(current_user)}%
complete
= milestone_progress_bar(milestone)
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