diff options
author | Mike Greiling <mike@pixelcog.com> | 2017-03-27 12:20:07 -0500 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2017-03-27 12:20:07 -0500 |
commit | 3b513675d0bfdf10725d5eed421d39ca66aebad5 (patch) | |
tree | 8e9dc6ba38505f232d804eaaa99689b62a8ed880 | |
parent | 8dafec40cf7efb1b46bb7b4d7501cfb74da53ba4 (diff) | |
download | gitlab-ce-3b513675d0bfdf10725d5eed421d39ca66aebad5.tar.gz |
add start date to sidebar and display dates on group and dashboard views when possible
-rw-r--r-- | app/views/shared/milestones/_sidebar.html.haml | 55 |
1 files changed, 35 insertions, 20 deletions
diff --git a/app/views/shared/milestones/_sidebar.html.haml b/app/views/shared/milestones/_sidebar.html.haml index 7c45fdf0fab..2de7308ebc2 100644 --- a/app/views/shared/milestones/_sidebar.html.haml +++ b/app/views/shared/milestones/_sidebar.html.haml @@ -17,26 +17,41 @@ .value.hide-collapsed = milestone_progress_bar(milestone) - - 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 + .block.start_date + .sidebar-collapsed-icon + = icon('calendar', 'aria-hidden': 'true') + %span.js-due-date-sidebar-value + = milestone.start_date.try(:to_s, :medium) || 'None' + .title.hide-collapsed + Start date + - 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' + .value.hide-collapsed + %span.value-content + - if milestone.start_date + %span.bold= milestone.start_date.to_s(:medium) + - else + %span.no-value No start date + + .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 @project && 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 - if !project || can?(current_user, :read_issue, project) .block |