2017-04-17 20:54:26 +00:00
|
|
|
- affix_offset = local_assigns.fetch(:affix_offset, "50")
|
2017-03-24 17:13:29 +00:00
|
|
|
- project = local_assigns[:project]
|
2017-03-23 20:53:51 +00:00
|
|
|
|
2017-08-17 00:47:59 +00: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 20:03:06 +00:00
|
|
|
.issuable-sidebar.milestone-sidebar
|
2017-03-24 21:11:15 +00:00
|
|
|
.block.milestone-progress.issuable-sidebar-header
|
2020-06-03 03:08:23 +00:00
|
|
|
%a.gutter-toggle.float-right.js-sidebar-toggle.has-tooltip{ role: "button", href: "#", "aria-label" => s_('MilestoneSidebar|Toggle sidebar'), title: sidebar_gutter_tooltip_text, data: { container: 'body', placement: 'left', boundary: 'viewport' } }
|
2017-03-23 20:53:51 +00:00
|
|
|
= sidebar_gutter_toggle_icon
|
2017-03-24 21:11:15 +00:00
|
|
|
.title.hide-collapsed
|
2020-03-07 00:08:25 +00:00
|
|
|
%strong.bold== #{milestone.percent_complete}%
|
2017-03-24 21:11:15 +00:00
|
|
|
%span.hide-collapsed
|
2020-06-03 03:08:23 +00:00
|
|
|
= s_('MilestoneSidebar|complete')
|
2017-03-24 21:11:15 +00:00
|
|
|
.value.hide-collapsed
|
|
|
|
= milestone_progress_bar(milestone)
|
2017-03-24 17:04:46 +00:00
|
|
|
|
2018-04-19 14:43:20 +00:00
|
|
|
.block.milestone-progress.hide-expanded
|
2018-05-24 16:02:42 +00:00
|
|
|
.sidebar-collapsed-icon.has-tooltip{ title: milestone_progress_tooltip_text(milestone), data: { container: 'body', html: 'true', placement: 'left', boundary: 'viewport' } }
|
2020-03-07 00:08:25 +00:00
|
|
|
%span== #{milestone.percent_complete}%
|
2018-04-19 14:43:20 +00:00
|
|
|
= milestone_progress_bar(milestone)
|
|
|
|
|
2017-03-27 18:14:27 +00:00
|
|
|
.block.start_date.hide-collapsed
|
|
|
|
.title
|
2020-06-03 03:08:23 +00:00
|
|
|
= s_('MilestoneSidebar|Start date')
|
2017-03-27 17:20:07 +00:00
|
|
|
- if @project && can?(current_user, :admin_milestone, @project)
|
2020-06-03 03:08:23 +00:00
|
|
|
= link_to s_('MilestoneSidebar|Edit'), edit_project_milestone_path(@project, @milestone), class: 'js-sidebar-dropdown-toggle edit-link float-right'
|
2017-03-27 18:14:27 +00:00
|
|
|
.value
|
2020-07-03 09:08:53 +00:00
|
|
|
%span.value-content{ data: { qa_selector: 'start_date_content' } }
|
2017-03-27 17:20:07 +00:00
|
|
|
- if milestone.start_date
|
|
|
|
%span.bold= milestone.start_date.to_s(:medium)
|
|
|
|
- else
|
2020-06-03 03:08:23 +00:00
|
|
|
%span.no-value= s_('MilestoneSidebar|No start date')
|
2017-03-27 17:20:07 +00:00
|
|
|
|
|
|
|
.block.due_date
|
|
|
|
.sidebar-collapsed-icon
|
2020-10-15 09:08:41 +00:00
|
|
|
%span{ 'aria-hidden': 'true' }
|
|
|
|
= sprite_icon('calendar')
|
2017-03-27 18:14:27 +00:00
|
|
|
%span.collapsed-milestone-date
|
|
|
|
- if milestone.start_date && milestone.due_date
|
|
|
|
- if milestone.start_date.year == milestone.due_date.year
|
2018-05-24 16:02:42 +00:00
|
|
|
.milestone-date.has-tooltip{ title: milestone_time_for(milestone.start_date, :start), data: { container: 'body', html: 'true', placement: 'left', boundary: 'viewport' } }
|
2018-04-19 14:43:20 +00:00
|
|
|
= milestone.start_date.strftime('%b %-d')
|
2017-03-27 18:14:27 +00:00
|
|
|
- else
|
2018-05-24 16:02:42 +00:00
|
|
|
.milestone-date.has-tooltip{ title: milestone_time_for(milestone.start_date, :start), data: { container: 'body', html: 'true', placement: 'left', boundary: 'viewport' } }
|
2018-04-19 14:43:20 +00:00
|
|
|
= milestone.start_date.strftime('%b %-d %Y')
|
2017-03-27 18:14:27 +00:00
|
|
|
.date-separator -
|
2018-05-24 16:02:42 +00:00
|
|
|
.due_date.has-tooltip{ title: milestone_time_for(milestone.due_date, :end), data: { container: 'body', html: 'true', placement: 'left', boundary: 'viewport' } }
|
2018-04-19 14:43:20 +00:00
|
|
|
= milestone.due_date.strftime('%b %-d %Y')
|
2017-03-27 18:14:27 +00:00
|
|
|
- elsif milestone.start_date
|
2020-06-03 03:08:23 +00:00
|
|
|
= s_('MilestoneSidebar|From')
|
2018-05-24 16:02:42 +00:00
|
|
|
.milestone-date.has-tooltip{ title: milestone_time_for(milestone.start_date, :start), data: { container: 'body', html: 'true', placement: 'left', boundary: 'viewport' } }
|
2018-04-19 14:43:20 +00:00
|
|
|
= milestone.start_date.strftime('%b %-d %Y')
|
2017-03-27 18:14:27 +00:00
|
|
|
- elsif milestone.due_date
|
2020-06-03 03:08:23 +00:00
|
|
|
= s_('MilestoneSidebar|Until')
|
2018-05-24 16:02:42 +00:00
|
|
|
.milestone-date.has-tooltip{ title: milestone_time_for(milestone.due_date, :end), data: { container: 'body', html: 'true', placement: 'left', boundary: 'viewport' } }
|
2018-04-19 14:43:20 +00:00
|
|
|
= milestone.due_date.strftime('%b %-d %Y')
|
2017-03-27 18:14:27 +00:00
|
|
|
- else
|
2018-05-24 16:02:42 +00:00
|
|
|
.has-tooltip{ title: milestone_time_for(milestone.start_date, :start), data: { container: 'body', html: 'true', placement: 'left', boundary: 'viewport' } }
|
2020-06-03 03:08:23 +00:00
|
|
|
= s_('MilestoneSidebar|None')
|
2017-03-27 17:20:07 +00:00
|
|
|
.title.hide-collapsed
|
2020-06-03 03:08:23 +00:00
|
|
|
= s_('MilestoneSidebar|Due date')
|
2017-03-27 17:20:07 +00:00
|
|
|
- if @project && can?(current_user, :admin_milestone, @project)
|
2020-06-03 03:08:23 +00:00
|
|
|
= link_to s_('MilestoneSidebar|Edit'), edit_project_milestone_path(@project, @milestone), class: 'js-sidebar-dropdown-toggle edit-link float-right'
|
2017-03-27 17:20:07 +00:00
|
|
|
.value.hide-collapsed
|
2020-07-03 09:08:53 +00:00
|
|
|
%span.value-content{ data: { qa_selector: 'due_date_content' } }
|
2017-03-27 17:20:07 +00:00
|
|
|
- if milestone.due_date
|
|
|
|
%span.bold= milestone.due_date.to_s(:medium)
|
|
|
|
- else
|
2020-06-03 03:08:23 +00:00
|
|
|
%span.no-value= s_('MilestoneSidebar|No due date')
|
2018-11-30 04:03:35 +00:00
|
|
|
- remaining_days = remaining_days_in_words(milestone.due_date, milestone.start_date)
|
2017-03-27 17:20:07 +00:00
|
|
|
- if remaining_days.present?
|
|
|
|
= surround '(', ')' do
|
|
|
|
%span.remaining-days= remaining_days
|
2017-03-24 17:13:29 +00:00
|
|
|
|
2017-03-24 18:39:33 +00:00
|
|
|
- if !project || can?(current_user, :read_issue, project)
|
2017-04-28 12:29:47 +00:00
|
|
|
.block.issues
|
2018-05-24 16:02:42 +00:00
|
|
|
.sidebar-collapsed-icon.has-tooltip{ title: milestone_issues_tooltip_text(milestone), data: { container: 'body', html: 'true', placement: 'left', boundary: 'viewport' } }
|
2017-03-24 18:39:33 +00:00
|
|
|
%strong
|
2017-08-04 19:37:00 +00:00
|
|
|
= custom_icon('issues')
|
2017-03-29 20:26:24 +00:00
|
|
|
%span= milestone.issues_visible_to_user(current_user).count
|
2017-03-24 18:39:33 +00:00
|
|
|
.title.hide-collapsed
|
2020-06-03 03:08:23 +00:00
|
|
|
= s_('MilestoneSidebar|Issues')
|
2018-05-28 13:25:57 +00:00
|
|
|
%span.badge.badge-pill= milestone.issues_visible_to_user(current_user).count
|
2018-04-10 17:49:26 +00:00
|
|
|
- if show_new_issue_link?(project)
|
2020-06-03 03:08:23 +00:00
|
|
|
= link_to new_project_issue_path(project, issue: { milestone_id: milestone.id }), class: "float-right", title: s_('MilestoneSidebar|New Issue') do
|
|
|
|
= s_('MilestoneSidebar|New issue')
|
2017-03-27 17:10:30 +00:00
|
|
|
.value.hide-collapsed.bold
|
2017-03-27 17:06:48 +00:00
|
|
|
%span.milestone-stat
|
|
|
|
= link_to milestones_browse_issuables_path(milestone, type: :issues) do
|
2020-06-03 03:08:23 +00:00
|
|
|
= s_('MilestoneSidebar|Open:')
|
2017-03-29 20:26:24 +00:00
|
|
|
= milestone.issues_visible_to_user(current_user).opened.count
|
2017-03-27 17:06:48 +00:00
|
|
|
%span.milestone-stat
|
|
|
|
= link_to milestones_browse_issuables_path(milestone, type: :issues, state: 'closed') do
|
2020-06-03 03:08:23 +00:00
|
|
|
= s_('MilestoneSidebar|Closed:')
|
2017-03-29 20:26:24 +00:00
|
|
|
= milestone.issues_visible_to_user(current_user).closed.count
|
2017-03-24 18:39:33 +00:00
|
|
|
|
2018-02-21 17:20:56 +00:00
|
|
|
.block
|
2020-04-03 15:09:56 +00:00
|
|
|
#issuable-time-tracker{ data: { time_estimate: @milestone.total_time_estimate,
|
|
|
|
time_spent: @milestone.total_time_spent,
|
|
|
|
human_time_estimate: @milestone.human_total_time_estimate,
|
|
|
|
human_time_spent: @milestone.human_total_time_spent,
|
2019-06-11 10:40:01 +00:00
|
|
|
limit_to_hours: Gitlab::CurrentSettings.time_tracking_limit_to_hours.to_s } }
|
2017-10-29 20:58:49 +00:00
|
|
|
|
2018-05-28 13:25:57 +00:00
|
|
|
= render_if_exists 'shared/milestones/weight', milestone: milestone
|
|
|
|
|
2019-12-03 18:06:49 +00:00
|
|
|
- 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
|
2020-06-03 03:08:23 +00:00
|
|
|
= s_('MilestoneSidebar|Merge requests')
|
2019-12-03 18:06:49 +00:00
|
|
|
%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
|
2020-06-03 03:08:23 +00:00
|
|
|
= s_('MilestoneSidebar|Open:')
|
2019-12-03 18:06:49 +00:00
|
|
|
= milestone.merge_requests.opened.count
|
|
|
|
%span.milestone-stat
|
|
|
|
= link_to milestones_browse_issuables_path(milestone, type: :merge_requests, state: 'closed') do
|
2020-06-03 03:08:23 +00:00
|
|
|
= s_('MilestoneSidebar|Closed:')
|
2019-12-03 18:06:49 +00:00
|
|
|
= milestone.merge_requests.closed.count
|
|
|
|
%span.milestone-stat
|
|
|
|
= link_to milestones_browse_issuables_path(milestone, type: :merge_requests, state: 'merged') do
|
2020-06-03 03:08:23 +00:00
|
|
|
= s_('MilestoneSidebar|Merged:')
|
2019-12-03 18:06:49 +00:00
|
|
|
= milestone.merge_requests.merged.count
|
|
|
|
- else
|
|
|
|
%span.milestone-stat
|
2020-06-03 03:08:23 +00:00
|
|
|
= s_('MilestoneSidebar|Open:')
|
2017-03-29 20:26:24 +00:00
|
|
|
= milestone.merge_requests.opened.count
|
2019-12-03 18:06:49 +00:00
|
|
|
%span.milestone-stat
|
2020-06-03 03:08:23 +00:00
|
|
|
= s_('MilestoneSidebar|Closed:')
|
2017-03-29 20:26:24 +00:00
|
|
|
= milestone.merge_requests.closed.count
|
2019-12-03 18:06:49 +00:00
|
|
|
%span.milestone-stat
|
2020-06-03 03:08:23 +00:00
|
|
|
= s_('MilestoneSidebar|Merged:')
|
2017-03-29 20:26:24 +00:00
|
|
|
= milestone.merge_requests.merged.count
|
2017-03-24 18:39:33 +00:00
|
|
|
|
2019-11-06 15:06:23 +00:00
|
|
|
- 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
|
2020-08-10 18:09:54 +00:00
|
|
|
= sprite_icon("rocket")
|
2019-11-06 15:06:23 +00:00
|
|
|
%span= total_count
|
|
|
|
.title.hide-collapsed= n_('Release', 'Releases', total_count)
|
|
|
|
.hide-collapsed
|
2020-07-30 18:09:39 +00:00
|
|
|
- if total_count == 0
|
2020-06-03 03:08:23 +00:00
|
|
|
.no-value= s_('MilestoneSidebar|None')
|
2019-11-06 15:06:23 +00:00
|
|
|
- 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-03-24 17:04:46 +00:00
|
|
|
- milestone_ref = milestone.try(:to_reference, full: true)
|
|
|
|
- if milestone_ref.present?
|
2017-03-24 20:29:36 +00:00
|
|
|
.block.reference
|
2017-03-24 17:04:46 +00:00
|
|
|
.sidebar-collapsed-icon.dont-change-state
|
2020-06-03 03:08:23 +00:00
|
|
|
= clipboard_button(text: milestone_ref, title: s_('MilestoneSidebar|Copy reference'), placement: "left", boundary: 'viewport')
|
2017-03-24 17:04:46 +00:00
|
|
|
.cross-project-reference.hide-collapsed
|
|
|
|
%span
|
2020-06-03 03:08:23 +00:00
|
|
|
= s_('MilestoneSidebar|Reference:')
|
2017-03-24 17:04:46 +00:00
|
|
|
%cite{ title: milestone_ref }
|
|
|
|
= milestone_ref
|
2020-06-03 03:08:23 +00:00
|
|
|
= clipboard_button(text: milestone_ref, title: s_('MilestoneSidebar|Copy reference'), placement: "left", boundary: 'viewport')
|