Commit 36714377 authored by Mike Greiling's avatar Mike Greiling

combine milestone start and end dates in collapsed sidebar

parent 3b513675
...@@ -68,6 +68,18 @@ ...@@ -68,6 +68,18 @@
} }
} }
.collapsed-milestone-date {
font-size: 12px;
}
.milestone-date {
display: block;
}
.date-separator {
line-height: 5px;
}
.remaining-days strong { .remaining-days strong {
font-weight: normal; font-weight: normal;
} }
......
...@@ -17,16 +17,12 @@ ...@@ -17,16 +17,12 @@
.value.hide-collapsed .value.hide-collapsed
= milestone_progress_bar(milestone) = milestone_progress_bar(milestone)
.block.start_date .block.start_date.hide-collapsed
.sidebar-collapsed-icon .title
= icon('calendar', 'aria-hidden': 'true')
%span.js-due-date-sidebar-value
= milestone.start_date.try(:to_s, :medium) || 'None'
.title.hide-collapsed
Start date Start date
- if @project && can?(current_user, :admin_milestone, @project) - if @project && can?(current_user, :admin_milestone, @project)
= link_to 'Edit', edit_namespace_project_milestone_path(@project.namespace, @project, @milestone), class: 'edit-link pull-right' = link_to 'Edit', edit_namespace_project_milestone_path(@project.namespace, @project, @milestone), class: 'edit-link pull-right'
.value.hide-collapsed .value
%span.value-content %span.value-content
- if milestone.start_date - if milestone.start_date
%span.bold= milestone.start_date.to_s(:medium) %span.bold= milestone.start_date.to_s(:medium)
...@@ -36,8 +32,22 @@ ...@@ -36,8 +32,22 @@
.block.due_date .block.due_date
.sidebar-collapsed-icon .sidebar-collapsed-icon
= icon('calendar', 'aria-hidden': 'true') = icon('calendar', 'aria-hidden': 'true')
%span.js-due-date-sidebar-value %span.collapsed-milestone-date
= milestone.due_date.try(:to_s, :medium) || 'None' - if milestone.start_date && milestone.due_date
- if milestone.start_date.year == milestone.due_date.year
.milestone-date= milestone.start_date.strftime('%b %-d')
- else
.milestone-date= milestone.start_date.strftime('%b %-d %Y')
.date-separator -
.due_date= milestone.due_date.strftime('%b %-d %Y')
- elsif milestone.start_date
From
.milestone-date= milestone.start_date.strftime('%b %-d %Y')
- elsif milestone.due_date
Until
.milestone-date= milestone.due_date.strftime('%b %-d %Y')
- else
None
.title.hide-collapsed .title.hide-collapsed
Due date Due date
- if @project && can?(current_user, :admin_milestone, @project) - if @project && can?(current_user, :admin_milestone, @project)
......
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