summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorMike Greiling <mike@pixelcog.com>2017-03-24 12:13:29 -0500
committerMike Greiling <mike@pixelcog.com>2017-03-24 17:06:48 -0500
commit9023526c053529ea9e5c4898cdc577fe0e547dac (patch)
tree57cbe9d97c1ed6285e0efcbfdf346c1d76d7382e /app
parent92e0bd9b672061cfd3172624db85847993f31beb (diff)
downloadgitlab-ce-9023526c053529ea9e5c4898cdc577fe0e547dac.tar.gz
move milestone due date info to sidebar
Diffstat (limited to 'app')
-rw-r--r--app/assets/stylesheets/pages/milestone.scss4
-rw-r--r--app/views/projects/milestones/show.html.haml2
-rw-r--r--app/views/shared/milestones/_sidebar.html.haml22
-rw-r--r--app/views/shared/milestones/_summary.html.haml4
4 files changed, 23 insertions, 9 deletions
diff --git a/app/assets/stylesheets/pages/milestone.scss b/app/assets/stylesheets/pages/milestone.scss
index efbd9365fd9..68a865200a6 100644
--- a/app/assets/stylesheets/pages/milestone.scss
+++ b/app/assets/stylesheets/pages/milestone.scss
@@ -62,10 +62,6 @@
}
}
- .remaining-days {
- color: $orange-600;
- }
-
.milestone-stats-and-buttons {
display: flex;
justify-content: flex-start;
diff --git a/app/views/projects/milestones/show.html.haml b/app/views/projects/milestones/show.html.haml
index 2ebd927042e..7299f6046f4 100644
--- a/app/views/projects/milestones/show.html.haml
+++ b/app/views/projects/milestones/show.html.haml
@@ -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
diff --git a/app/views/shared/milestones/_sidebar.html.haml b/app/views/shared/milestones/_sidebar.html.haml
index d955ef52676..4f95d789942 100644
--- a/app/views/shared/milestones/_sidebar.html.haml
+++ b/app/views/shared/milestones/_sidebar.html.haml
@@ -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
diff --git a/app/views/shared/milestones/_summary.html.haml b/app/views/shared/milestones/_summary.html.haml
index 78079f633d5..7ee7ce047b9 100644
--- a/app/views/shared/milestones/_summary.html.haml
+++ b/app/views/shared/milestones/_summary.html.haml
@@ -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