2019-12-26 22:10:19 +05:30
|
|
|
.detail-page-header.milestone-page-header
|
|
|
|
.status-box{ class: status_box_class(milestone) }
|
|
|
|
= milestone_status_string(milestone)
|
|
|
|
|
|
|
|
.header-text-content
|
|
|
|
%span.identifier
|
|
|
|
%strong
|
|
|
|
= _('Milestone')
|
|
|
|
- if milestone.due_date || milestone.start_date
|
|
|
|
= milestone_date_range(milestone)
|
|
|
|
|
|
|
|
.milestone-buttons
|
|
|
|
- if can?(current_user, :admin_milestone, @group || @project)
|
2022-08-13 15:12:31 +05:30
|
|
|
= render Pajamas::ButtonComponent.new(href: edit_milestone_path(milestone), button_options: { class: 'btn-grouped' }) do
|
|
|
|
= _('Edit')
|
2019-12-26 22:10:19 +05:30
|
|
|
|
|
|
|
- if milestone.project_milestone? && milestone.project.group
|
2022-08-13 15:12:31 +05:30
|
|
|
= render Pajamas::ButtonComponent.new(button_options: { class: 'js-promote-project-milestone-button btn-grouped', data: { milestone_title: milestone.title, group_name: milestone.project.group.name, url: promote_project_milestone_path(milestone.project, milestone) }, disabled: true }) do
|
2019-12-26 22:10:19 +05:30
|
|
|
= _('Promote')
|
|
|
|
#promote-milestone-modal
|
|
|
|
|
|
|
|
- if milestone.active?
|
2022-08-27 11:52:29 +05:30
|
|
|
= render Pajamas::ButtonComponent.new(href: update_milestone_path(milestone, { state_event: :close }), method: :put, button_options: { class: 'btn-grouped btn-close' }) do
|
2022-08-13 15:12:31 +05:30
|
|
|
= _('Close milestone')
|
2019-12-26 22:10:19 +05:30
|
|
|
- else
|
2022-08-27 11:52:29 +05:30
|
|
|
= render Pajamas::ButtonComponent.new(href: update_milestone_path(milestone, { state_event: :activate }), method: :put, button_options: { class: 'btn-grouped' }) do
|
2022-08-13 15:12:31 +05:30
|
|
|
= _('Reopen milestone')
|
2019-12-26 22:10:19 +05:30
|
|
|
|
2020-06-23 00:09:42 +05:30
|
|
|
= render 'shared/milestones/delete_button'
|
2019-12-26 22:10:19 +05:30
|
|
|
|
2022-08-13 15:12:31 +05:30
|
|
|
= render Pajamas::ButtonComponent.new(icon: 'chevron-double-lg-left', button_options: { 'aria-label' => _('Toggle sidebar'), class: 'btn-grouped gl-float-right! gl-sm-display-none js-sidebar-toggle' })
|