2017-09-10 17:25:29 +05:30
|
|
|
- affix_offset = local_assigns.fetch(:affix_offset, "50")
|
2017-08-17 22:00:37 +05:30
|
|
|
- project = local_assigns[:project]
|
|
|
|
|
2017-09-10 17:25:29 +05:30
|
|
|
%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-08-17 22:00:37 +05:30
|
|
|
.issuable-sidebar.milestone-sidebar
|
|
|
|
.block.milestone-progress.issuable-sidebar-header
|
2018-11-08 19:23:39 +05:30
|
|
|
%a.gutter-toggle.float-right.js-sidebar-toggle.has-tooltip{ role: "button", href: "#", "aria-label" => "Toggle sidebar", title: sidebar_gutter_tooltip_text, data: { container: 'body', placement: 'left', boundary: 'viewport' } }
|
2017-08-17 22:00:37 +05:30
|
|
|
= sidebar_gutter_toggle_icon
|
|
|
|
.title.hide-collapsed
|
|
|
|
%strong.bold== #{milestone.percent_complete(current_user)}%
|
|
|
|
%span.hide-collapsed
|
|
|
|
complete
|
|
|
|
.value.hide-collapsed
|
|
|
|
= milestone_progress_bar(milestone)
|
|
|
|
|
2018-10-15 14:42:47 +05:30
|
|
|
.block.milestone-progress.hide-expanded
|
2018-11-08 19:23:39 +05:30
|
|
|
.sidebar-collapsed-icon.has-tooltip{ title: milestone_progress_tooltip_text(milestone), data: { container: 'body', html: 'true', placement: 'left', boundary: 'viewport' } }
|
2018-10-15 14:42:47 +05:30
|
|
|
%span== #{milestone.percent_complete(current_user)}%
|
|
|
|
= milestone_progress_bar(milestone)
|
|
|
|
|
2017-08-17 22:00:37 +05:30
|
|
|
.block.start_date.hide-collapsed
|
|
|
|
.title
|
|
|
|
Start date
|
|
|
|
- if @project && can?(current_user, :admin_milestone, @project)
|
2018-11-08 19:23:39 +05:30
|
|
|
= link_to 'Edit', edit_project_milestone_path(@project, @milestone), class: 'js-sidebar-dropdown-toggle edit-link float-right'
|
2017-08-17 22:00:37 +05:30
|
|
|
.value
|
|
|
|
%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.collapsed-milestone-date
|
|
|
|
- if milestone.start_date && milestone.due_date
|
|
|
|
- if milestone.start_date.year == milestone.due_date.year
|
2018-11-08 19:23:39 +05:30
|
|
|
.milestone-date.has-tooltip{ title: milestone_time_for(milestone.start_date, :start), data: { container: 'body', html: 'true', placement: 'left', boundary: 'viewport' } }
|
2018-10-15 14:42:47 +05:30
|
|
|
= milestone.start_date.strftime('%b %-d')
|
2017-08-17 22:00:37 +05:30
|
|
|
- else
|
2018-11-08 19:23:39 +05:30
|
|
|
.milestone-date.has-tooltip{ title: milestone_time_for(milestone.start_date, :start), data: { container: 'body', html: 'true', placement: 'left', boundary: 'viewport' } }
|
2018-10-15 14:42:47 +05:30
|
|
|
= milestone.start_date.strftime('%b %-d %Y')
|
2017-08-17 22:00:37 +05:30
|
|
|
.date-separator -
|
2018-11-08 19:23:39 +05:30
|
|
|
.due_date.has-tooltip{ title: milestone_time_for(milestone.due_date, :end), data: { container: 'body', html: 'true', placement: 'left', boundary: 'viewport' } }
|
2018-10-15 14:42:47 +05:30
|
|
|
= milestone.due_date.strftime('%b %-d %Y')
|
2017-08-17 22:00:37 +05:30
|
|
|
- elsif milestone.start_date
|
|
|
|
From
|
2018-11-08 19:23:39 +05:30
|
|
|
.milestone-date.has-tooltip{ title: milestone_time_for(milestone.start_date, :start), data: { container: 'body', html: 'true', placement: 'left', boundary: 'viewport' } }
|
2018-10-15 14:42:47 +05:30
|
|
|
= milestone.start_date.strftime('%b %-d %Y')
|
2017-08-17 22:00:37 +05:30
|
|
|
- elsif milestone.due_date
|
|
|
|
Until
|
2018-11-08 19:23:39 +05:30
|
|
|
.milestone-date.has-tooltip{ title: milestone_time_for(milestone.due_date, :end), data: { container: 'body', html: 'true', placement: 'left', boundary: 'viewport' } }
|
2018-10-15 14:42:47 +05:30
|
|
|
= milestone.due_date.strftime('%b %-d %Y')
|
2017-08-17 22:00:37 +05:30
|
|
|
- else
|
2018-11-08 19:23:39 +05:30
|
|
|
.has-tooltip{ title: milestone_time_for(milestone.start_date, :start), data: { container: 'body', html: 'true', placement: 'left', boundary: 'viewport' } }
|
2018-10-15 14:42:47 +05:30
|
|
|
None
|
2017-08-17 22:00:37 +05:30
|
|
|
.title.hide-collapsed
|
|
|
|
Due date
|
|
|
|
- if @project && can?(current_user, :admin_milestone, @project)
|
2018-11-08 19:23:39 +05:30
|
|
|
= link_to 'Edit', edit_project_milestone_path(@project, @milestone), class: 'js-sidebar-dropdown-toggle edit-link float-right'
|
2017-08-17 22:00:37 +05:30
|
|
|
.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
|
2019-02-15 15:39:39 +05:30
|
|
|
- remaining_days = remaining_days_in_words(milestone.due_date, milestone.start_date)
|
2017-08-17 22:00:37 +05:30
|
|
|
- if remaining_days.present?
|
|
|
|
= surround '(', ')' do
|
|
|
|
%span.remaining-days= remaining_days
|
|
|
|
|
|
|
|
- if !project || can?(current_user, :read_issue, project)
|
|
|
|
.block.issues
|
2018-11-08 19:23:39 +05:30
|
|
|
.sidebar-collapsed-icon.has-tooltip{ title: milestone_issues_tooltip_text(milestone), data: { container: 'body', html: 'true', placement: 'left', boundary: 'viewport' } }
|
2017-08-17 22:00:37 +05:30
|
|
|
%strong
|
2017-09-10 17:25:29 +05:30
|
|
|
= custom_icon('issues')
|
2017-08-17 22:00:37 +05:30
|
|
|
%span= milestone.issues_visible_to_user(current_user).count
|
|
|
|
.title.hide-collapsed
|
|
|
|
Issues
|
2018-11-08 19:23:39 +05:30
|
|
|
%span.badge.badge-pill= milestone.issues_visible_to_user(current_user).count
|
2018-05-09 12:01:36 +05:30
|
|
|
- if show_new_issue_link?(project)
|
2018-11-08 19:23:39 +05:30
|
|
|
= link_to new_project_issue_path(project, issue: { milestone_id: milestone.id }), class: "float-right", title: "New Issue" do
|
2017-08-17 22:00:37 +05:30
|
|
|
New issue
|
|
|
|
.value.hide-collapsed.bold
|
|
|
|
%span.milestone-stat
|
|
|
|
= link_to milestones_browse_issuables_path(milestone, type: :issues) do
|
|
|
|
Open:
|
|
|
|
= milestone.issues_visible_to_user(current_user).opened.count
|
|
|
|
%span.milestone-stat
|
|
|
|
= link_to milestones_browse_issuables_path(milestone, type: :issues, state: 'closed') do
|
|
|
|
Closed:
|
|
|
|
= milestone.issues_visible_to_user(current_user).closed.count
|
|
|
|
|
2018-03-27 19:54:05 +05:30
|
|
|
.block
|
2019-09-30 21:07:59 +05:30
|
|
|
#issuable-time-tracker{ data: { time_estimate: @milestone.total_issue_time_estimate,
|
|
|
|
time_spent: @milestone.total_issue_time_spent,
|
|
|
|
human_time_estimate: @milestone.human_total_issue_time_estimate,
|
|
|
|
human_time_spent: @milestone.human_total_issue_time_spent,
|
|
|
|
limit_to_hours: Gitlab::CurrentSettings.time_tracking_limit_to_hours.to_s } }
|
2018-03-27 19:54:05 +05:30
|
|
|
// Fallback while content is loading
|
|
|
|
.title.hide-collapsed
|
|
|
|
= _('Time tracking')
|
|
|
|
= icon('spinner spin')
|
2018-03-17 18:26:18 +05:30
|
|
|
|
2018-11-08 19:23:39 +05:30
|
|
|
= render_if_exists 'shared/milestones/weight', milestone: milestone
|
|
|
|
|
2020-01-01 13:55:28 +05:30
|
|
|
- if milestone.merge_requests_enabled?
|
|
|
|
.block.merge-requests
|
|
|
|
.sidebar-collapsed-icon.has-tooltip{ title: milestone_merge_requests_tooltip_text(milestone), data: { container: 'body', html: 'true', placement: 'left', boundary: 'viewport' } }
|
|
|
|
%strong
|
|
|
|
= custom_icon('mr_bold')
|
|
|
|
%span= milestone.merge_requests.count
|
|
|
|
.title.hide-collapsed
|
|
|
|
Merge requests
|
|
|
|
%span.badge.badge-pill= milestone.merge_requests.count
|
|
|
|
.value.hide-collapsed.bold
|
|
|
|
- if !project || can?(current_user, :read_merge_request, project)
|
|
|
|
%span.milestone-stat
|
|
|
|
= link_to milestones_browse_issuables_path(milestone, type: :merge_requests) do
|
|
|
|
Open:
|
|
|
|
= milestone.merge_requests.opened.count
|
|
|
|
%span.milestone-stat
|
|
|
|
= link_to milestones_browse_issuables_path(milestone, type: :merge_requests, state: 'closed') do
|
|
|
|
Closed:
|
|
|
|
= milestone.merge_requests.closed.count
|
|
|
|
%span.milestone-stat
|
|
|
|
= link_to milestones_browse_issuables_path(milestone, type: :merge_requests, state: 'merged') do
|
|
|
|
Merged:
|
|
|
|
= milestone.merge_requests.merged.count
|
|
|
|
- else
|
|
|
|
%span.milestone-stat
|
2017-08-17 22:00:37 +05:30
|
|
|
Open:
|
|
|
|
= milestone.merge_requests.opened.count
|
2020-01-01 13:55:28 +05:30
|
|
|
%span.milestone-stat
|
2017-08-17 22:00:37 +05:30
|
|
|
Closed:
|
|
|
|
= milestone.merge_requests.closed.count
|
2020-01-01 13:55:28 +05:30
|
|
|
%span.milestone-stat
|
2017-08-17 22:00:37 +05:30
|
|
|
Merged:
|
|
|
|
= milestone.merge_requests.merged.count
|
|
|
|
|
2019-12-26 22:10:19 +05:30
|
|
|
- if project
|
|
|
|
- recent_releases, total_count, more_count = recent_releases_with_counts(milestone)
|
|
|
|
.block.releases
|
|
|
|
.sidebar-collapsed-icon.has-tooltip{ title: milestone_releases_tooltip_text(milestone), data: { container: 'body', placement: 'left', boundary: 'viewport' } }
|
|
|
|
%strong
|
|
|
|
= icon('rocket')
|
|
|
|
%span= total_count
|
|
|
|
.title.hide-collapsed= n_('Release', 'Releases', total_count)
|
|
|
|
.hide-collapsed
|
|
|
|
- if total_count.zero?
|
|
|
|
.no-value= _('None')
|
|
|
|
- else
|
|
|
|
.font-weight-bold
|
|
|
|
- recent_releases.each do |release|
|
|
|
|
= link_to release.name, project_releases_path(project, :anchor => release.tag)
|
|
|
|
- unless release == recent_releases.last
|
|
|
|
%span.font-weight-normal •
|
|
|
|
- if more_count > 0
|
|
|
|
%span.font-weight-normal •
|
|
|
|
= link_to n_('%{count} more release', '%{count} more releases', more_count) % { count: more_count }, project_releases_path(project), class: 'font-weight-normal'
|
|
|
|
|
2017-08-17 22:00:37 +05:30
|
|
|
- milestone_ref = milestone.try(:to_reference, full: true)
|
|
|
|
- if milestone_ref.present?
|
|
|
|
.block.reference
|
|
|
|
.sidebar-collapsed-icon.dont-change-state
|
2019-12-21 20:55:43 +05:30
|
|
|
= clipboard_button(text: milestone_ref, title: _("Copy reference"), placement: "left", boundary: 'viewport')
|
2017-08-17 22:00:37 +05:30
|
|
|
.cross-project-reference.hide-collapsed
|
|
|
|
%span
|
|
|
|
Reference:
|
|
|
|
%cite{ title: milestone_ref }
|
|
|
|
= milestone_ref
|
2019-12-21 20:55:43 +05:30
|
|
|
= clipboard_button(text: milestone_ref, title: _("Copy reference"), placement: "left", boundary: 'viewport')
|