move milestone due date info to sidebar

This commit is contained in:
Mike Greiling 2017-03-24 12:13:29 -05:00
parent 92e0bd9b67
commit 9023526c05
4 changed files with 23 additions and 9 deletions

View file

@ -62,10 +62,6 @@
}
}
.remaining-days {
color: $orange-600;
}
.milestone-stats-and-buttons {
display: flex;
justify-content: flex-start;

View file

@ -58,4 +58,4 @@
= render 'shared/milestones/summary', milestone: @milestone, project: @project
= render 'shared/milestones/tabs', milestone: @milestone
= render 'shared/milestones/sidebar', milestone: @milestone, affix_offset: 153
= render 'shared/milestones/sidebar', milestone: @milestone, project: @project, affix_offset: 153

View file

@ -1,4 +1,5 @@
- affix_offset = local_assigns.fetch(:affix_offset, "102")
- project = local_assigns[:project]
%aside.right-sidebar.js-right-sidebar{ data: { "offset-top" => affix_offset, "spy" => "affix" }, class: sidebar_gutter_collapsed_class, 'aria-live' => 'polite' }
.issuable-sidebar
@ -9,6 +10,27 @@
%span.issuable-header-text.hide-collapsed
Milestone #{milestone.try(:to_reference) || milestone.title}
- if project
.block.due_date
.sidebar-collapsed-icon
= icon('calendar', 'aria-hidden': 'true')
%span.js-due-date-sidebar-value
= milestone.due_date.try(:to_s, :medium) || 'None'
.title.hide-collapsed
Due date
- if can?(current_user, :admin_milestone, @project)
= link_to 'Edit', edit_namespace_project_milestone_path(@project.namespace, @project, @milestone), class: 'edit-link pull-right'
.value.hide-collapsed
%span.value-content
- if milestone.due_date
%span.bold= milestone.due_date.to_s(:medium)
- else
%span.no-value No due date
- remaining_days = milestone_remaining_days(milestone)
- if remaining_days.present?
= surround '(', ')' do
%span.remaining-days= remaining_days
- milestone_ref = milestone.try(:to_reference, full: true)
- if milestone_ref.present?
.block

View file

@ -26,10 +26,6 @@
%span.milestone-stat
%strong== #{milestone.percent_complete(current_user)}%
complete
- remaining_days = milestone_remaining_days(milestone)
- if remaining_days.present?
%span.milestone-stat
%span.remaining-days= remaining_days
.milestone-progress-buttons
%span.tab-issues-buttons