2017-04-17 16:54:26 -04:00
|
|
|
- affix_offset = local_assigns.fetch(:affix_offset, "50")
|
2017-03-24 13:13:29 -04:00
|
|
|
- project = local_assigns[:project]
|
2017-03-23 16:53:51 -04:00
|
|
|
|
2017-08-16 20:47:59 -04:00
|
|
|
%aside.right-sidebar.js-right-sidebar{ data: { "offset-top" => affix_offset, "spy" => "affix", "always-show-toggle" => true }, class: sidebar_gutter_collapsed_class, 'aria-live' => 'polite' }
|
2017-03-24 16:03:06 -04:00
|
|
|
.issuable-sidebar.milestone-sidebar
|
2017-03-24 17:11:15 -04:00
|
|
|
.block.milestone-progress.issuable-sidebar-header
|
2017-03-23 16:53:51 -04:00
|
|
|
%a.gutter-toggle.pull-right.js-sidebar-toggle{ role: "button", href: "#", "aria-label" => "Toggle sidebar" }
|
|
|
|
= sidebar_gutter_toggle_icon
|
2017-03-24 13:04:46 -04:00
|
|
|
|
2017-03-24 17:11:15 -04:00
|
|
|
.sidebar-collapsed-icon
|
|
|
|
%span== #{milestone.percent_complete(current_user)}%
|
|
|
|
= milestone_progress_bar(milestone)
|
|
|
|
.title.hide-collapsed
|
2017-03-27 13:10:30 -04:00
|
|
|
%strong.bold== #{milestone.percent_complete(current_user)}%
|
2017-03-24 17:11:15 -04:00
|
|
|
%span.hide-collapsed
|
|
|
|
complete
|
|
|
|
.value.hide-collapsed
|
|
|
|
= milestone_progress_bar(milestone)
|
2017-03-24 13:04:46 -04:00
|
|
|
|
2017-03-27 14:14:27 -04:00
|
|
|
.block.start_date.hide-collapsed
|
|
|
|
.title
|
2017-03-27 13:20:07 -04:00
|
|
|
Start date
|
|
|
|
- if @project && can?(current_user, :admin_milestone, @project)
|
2017-08-14 03:26:19 -04:00
|
|
|
= link_to 'Edit', edit_project_milestone_path(@project, @milestone), class: 'js-sidebar-dropdown-toggle edit-link pull-right'
|
2017-03-27 14:14:27 -04:00
|
|
|
.value
|
2017-03-27 13:20:07 -04:00
|
|
|
%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')
|
2017-03-27 14:14:27 -04:00
|
|
|
%span.collapsed-milestone-date
|
|
|
|
- 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
|
2017-03-27 13:20:07 -04:00
|
|
|
.title.hide-collapsed
|
|
|
|
Due date
|
|
|
|
- if @project && can?(current_user, :admin_milestone, @project)
|
2017-08-14 03:26:19 -04:00
|
|
|
= link_to 'Edit', edit_project_milestone_path(@project, @milestone), class: 'js-sidebar-dropdown-toggle edit-link pull-right'
|
2017-03-27 13:20:07 -04:00
|
|
|
.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
|
2017-03-24 13:13:29 -04:00
|
|
|
|
2017-03-24 14:39:33 -04:00
|
|
|
- if !project || can?(current_user, :read_issue, project)
|
2017-04-28 08:29:47 -04:00
|
|
|
.block.issues
|
2017-03-24 14:39:33 -04:00
|
|
|
.sidebar-collapsed-icon
|
|
|
|
%strong
|
2017-08-04 15:37:00 -04:00
|
|
|
= custom_icon('issues')
|
2017-03-29 16:26:24 -04:00
|
|
|
%span= milestone.issues_visible_to_user(current_user).count
|
2017-03-24 14:39:33 -04:00
|
|
|
.title.hide-collapsed
|
|
|
|
Issues
|
2017-03-29 16:26:24 -04:00
|
|
|
%span.badge= milestone.issues_visible_to_user(current_user).count
|
2017-03-24 14:39:33 -04:00
|
|
|
- if project && can?(current_user, :create_issue, project)
|
2017-06-29 13:06:35 -04:00
|
|
|
= link_to new_project_issue_path(project, issue: { milestone_id: milestone.id }), class: "pull-right", title: "New Issue" do
|
2017-03-24 14:39:33 -04:00
|
|
|
New issue
|
2017-03-27 13:10:30 -04:00
|
|
|
.value.hide-collapsed.bold
|
2017-03-27 13:06:48 -04:00
|
|
|
%span.milestone-stat
|
|
|
|
= link_to milestones_browse_issuables_path(milestone, type: :issues) do
|
2017-03-24 15:41:08 -04:00
|
|
|
Open:
|
2017-03-29 16:26:24 -04:00
|
|
|
= milestone.issues_visible_to_user(current_user).opened.count
|
2017-03-27 13:06:48 -04:00
|
|
|
%span.milestone-stat
|
|
|
|
= link_to milestones_browse_issuables_path(milestone, type: :issues, state: 'closed') do
|
2017-03-24 15:41:08 -04:00
|
|
|
Closed:
|
2017-03-29 16:26:24 -04:00
|
|
|
= milestone.issues_visible_to_user(current_user).closed.count
|
2017-03-24 14:39:33 -04:00
|
|
|
|
2017-10-29 16:58:49 -04:00
|
|
|
.block.time_spent
|
|
|
|
.sidebar-collapsed-icon
|
2017-11-02 16:03:50 -04:00
|
|
|
= custom_icon('icon_hourglass')
|
|
|
|
%span.collapsed-milestone-total-time-spent
|
2017-11-06 13:18:20 -05:00
|
|
|
- if milestone.human_total_issue_time_spent
|
|
|
|
= milestone.human_total_issue_time_spent
|
2017-11-02 16:03:50 -04:00
|
|
|
- else
|
2017-11-10 15:18:42 -05:00
|
|
|
= _("None")
|
2017-10-29 16:58:49 -04:00
|
|
|
.title.hide-collapsed
|
2017-11-10 15:18:42 -05:00
|
|
|
= _("Total issue time spent")
|
2017-10-29 16:58:49 -04:00
|
|
|
.value.hide-collapsed
|
2017-11-06 13:18:20 -05:00
|
|
|
- if milestone.human_total_issue_time_spent
|
|
|
|
%span.bold= milestone.human_total_issue_time_spent
|
2017-11-03 00:56:41 -04:00
|
|
|
- else
|
2017-11-10 15:18:42 -05:00
|
|
|
%span.no-value= _("No time spent")
|
2017-10-29 16:58:49 -04:00
|
|
|
|
2017-04-28 08:29:47 -04:00
|
|
|
.block.merge-requests
|
2017-03-24 14:39:33 -04:00
|
|
|
.sidebar-collapsed-icon
|
|
|
|
%strong
|
2017-09-01 15:17:52 -04:00
|
|
|
= custom_icon('mr_bold')
|
2017-04-26 04:35:41 -04:00
|
|
|
%span= milestone.merge_requests.count
|
2017-03-24 14:39:33 -04:00
|
|
|
.title.hide-collapsed
|
|
|
|
Merge requests
|
2017-03-29 16:26:24 -04:00
|
|
|
%span.badge= milestone.merge_requests.count
|
2017-03-27 13:10:30 -04:00
|
|
|
.value.hide-collapsed.bold
|
2017-03-27 13:06:48 -04:00
|
|
|
- if !project || can?(current_user, :read_merge_request, project)
|
2017-03-24 15:41:08 -04:00
|
|
|
%span.milestone-stat
|
|
|
|
= link_to milestones_browse_issuables_path(milestone, type: :merge_requests) do
|
|
|
|
Open:
|
2017-03-29 16:26:24 -04:00
|
|
|
= milestone.merge_requests.opened.count
|
2017-03-24 15:41:08 -04:00
|
|
|
%span.milestone-stat
|
|
|
|
= link_to milestones_browse_issuables_path(milestone, type: :merge_requests, state: 'closed') do
|
|
|
|
Closed:
|
2017-03-29 16:26:24 -04:00
|
|
|
= milestone.merge_requests.closed.count
|
2017-03-24 15:41:08 -04:00
|
|
|
%span.milestone-stat
|
|
|
|
= link_to milestones_browse_issuables_path(milestone, type: :merge_requests, state: 'merged') do
|
|
|
|
Merged:
|
2017-03-29 16:26:24 -04:00
|
|
|
= milestone.merge_requests.merged.count
|
2017-03-24 15:41:08 -04:00
|
|
|
- else
|
|
|
|
%span.milestone-stat
|
|
|
|
Open:
|
2017-03-29 16:26:24 -04:00
|
|
|
= milestone.merge_requests.opened.count
|
2017-03-24 15:41:08 -04:00
|
|
|
%span.milestone-stat
|
|
|
|
Closed:
|
2017-03-29 16:26:24 -04:00
|
|
|
= milestone.merge_requests.closed.count
|
2017-03-24 15:41:08 -04:00
|
|
|
%span.milestone-stat
|
|
|
|
Merged:
|
2017-03-29 16:26:24 -04:00
|
|
|
= milestone.merge_requests.merged.count
|
2017-03-24 14:39:33 -04:00
|
|
|
|
2017-03-24 13:04:46 -04:00
|
|
|
- milestone_ref = milestone.try(:to_reference, full: true)
|
|
|
|
- if milestone_ref.present?
|
2017-03-24 16:29:36 -04:00
|
|
|
.block.reference
|
2017-03-24 13:04:46 -04:00
|
|
|
.sidebar-collapsed-icon.dont-change-state
|
2017-04-06 17:10:14 -04:00
|
|
|
= clipboard_button(text: milestone_ref, title: "Copy reference to clipboard", placement: "left")
|
2017-03-24 13:04:46 -04:00
|
|
|
.cross-project-reference.hide-collapsed
|
|
|
|
%span
|
|
|
|
Reference:
|
|
|
|
%cite{ title: milestone_ref }
|
|
|
|
= milestone_ref
|
2017-04-06 17:10:14 -04:00
|
|
|
= clipboard_button(text: milestone_ref, title: "Copy reference to clipboard", placement: "left")
|