2016-11-03 12:29:30 +05:30
|
|
|
- @no_container = true
|
2019-03-02 22:35:43 +05:30
|
|
|
- add_to_breadcrumbs _('Milestones'), project_milestones_path(@project)
|
2018-03-17 18:26:18 +05:30
|
|
|
- breadcrumb_title @milestone.title
|
2019-03-02 22:35:43 +05:30
|
|
|
- page_title @milestone.title, _('Milestones')
|
2016-01-14 18:37:52 +05:30
|
|
|
- page_description @milestone.description
|
|
|
|
|
2016-11-03 12:29:30 +05:30
|
|
|
%div{ class: container_class }
|
2017-08-17 22:00:37 +05:30
|
|
|
.detail-page-header.milestone-page-header
|
2016-11-03 12:29:30 +05:30
|
|
|
.status-box{ class: status_box_class(@milestone) }
|
|
|
|
- if @milestone.closed?
|
2019-03-02 22:35:43 +05:30
|
|
|
= _('Closed')
|
2016-11-03 12:29:30 +05:30
|
|
|
- elsif @milestone.expired?
|
2019-03-02 22:35:43 +05:30
|
|
|
= _('Past due')
|
2017-08-17 22:00:37 +05:30
|
|
|
- elsif @milestone.upcoming?
|
2019-03-02 22:35:43 +05:30
|
|
|
= _('Upcoming')
|
2014-09-02 18:07:02 +05:30
|
|
|
- else
|
2019-03-02 22:35:43 +05:30
|
|
|
= _('Open')
|
2017-08-17 22:00:37 +05:30
|
|
|
.header-text-content
|
|
|
|
%span.identifier
|
|
|
|
%strong
|
2019-03-02 22:35:43 +05:30
|
|
|
= _('Milestone')
|
2017-08-17 22:00:37 +05:30
|
|
|
- if @milestone.due_date || @milestone.start_date
|
|
|
|
= milestone_date_range(@milestone)
|
|
|
|
.milestone-buttons
|
2016-11-03 12:29:30 +05:30
|
|
|
- if can?(current_user, :admin_milestone, @project)
|
2019-03-02 22:35:43 +05:30
|
|
|
= link_to edit_project_milestone_path(@project, @milestone), class: 'btn btn-grouped btn-nr' do
|
|
|
|
= _('Edit')
|
2018-03-17 18:26:18 +05:30
|
|
|
|
|
|
|
- if @project.group
|
2018-03-27 19:54:05 +05:30
|
|
|
%button.js-promote-project-milestone-button.btn.btn-grouped{ data: { toggle: 'modal',
|
|
|
|
target: '#promote-milestone-modal',
|
|
|
|
milestone_title: @milestone.title,
|
2018-05-01 15:08:00 +05:30
|
|
|
group_name: @project.group.name,
|
2018-03-27 19:54:05 +05:30
|
|
|
url: promote_project_milestone_path(@milestone.project, @milestone),
|
|
|
|
container: 'body' },
|
|
|
|
disabled: true,
|
|
|
|
type: 'button' }
|
|
|
|
= _('Promote')
|
|
|
|
#promote-milestone-modal
|
2018-03-17 18:26:18 +05:30
|
|
|
|
2016-11-03 12:29:30 +05:30
|
|
|
- if @milestone.active?
|
2019-03-02 22:35:43 +05:30
|
|
|
= link_to _('Close milestone'), project_milestone_path(@project, @milestone, milestone: {state_event: :close }), method: :put, class: 'btn btn-close btn-nr btn-grouped'
|
2016-11-03 12:29:30 +05:30
|
|
|
- else
|
2019-03-02 22:35:43 +05:30
|
|
|
= link_to _('Reopen milestone'), project_milestone_path(@project, @milestone, milestone: {state_event: :activate }), method: :put, class: 'btn btn-reopen btn-nr btn-grouped'
|
2015-12-23 02:04:40 +05:30
|
|
|
|
2018-11-20 20:47:30 +05:30
|
|
|
= render 'shared/milestones/delete_button'
|
2016-06-02 11:05:42 +05:30
|
|
|
|
2019-03-02 22:35:43 +05:30
|
|
|
%a.btn.btn-default.btn-grouped.float-right.d-block.d-sm-none.js-sidebar-toggle{ href: '#' }
|
2017-08-17 22:00:37 +05:30
|
|
|
= icon('angle-double-left')
|
|
|
|
|
|
|
|
.detail-page-description.milestone-detail
|
2018-11-18 11:00:15 +05:30
|
|
|
%h2.title.qa-milestone-title
|
2016-11-03 12:29:30 +05:30
|
|
|
= markdown_field(@milestone, :title)
|
2018-03-17 18:26:18 +05:30
|
|
|
|
2016-11-03 12:29:30 +05:30
|
|
|
%div
|
|
|
|
- if @milestone.description.present?
|
2019-05-18 00:54:41 +05:30
|
|
|
.description.md
|
|
|
|
= markdown_field(@milestone, :description)
|
2014-09-02 18:07:02 +05:30
|
|
|
|
2018-11-08 19:23:39 +05:30
|
|
|
= render_if_exists 'shared/milestones/burndown', milestone: @milestone, project: @project
|
|
|
|
|
2017-08-17 22:00:37 +05:30
|
|
|
- if can?(current_user, :read_issue, @project) && @milestone.total_items_count(current_user).zero?
|
2016-11-03 12:29:30 +05:30
|
|
|
.alert.alert-success.prepend-top-default
|
2019-03-02 22:35:43 +05:30
|
|
|
%span= _('Assign some issues to this milestone.')
|
2016-11-03 12:29:30 +05:30
|
|
|
- elsif @milestone.complete?(current_user) && @milestone.active?
|
|
|
|
.alert.alert-success.prepend-top-default
|
2019-03-02 22:35:43 +05:30
|
|
|
%span= _('All issues for this milestone are closed. You may close this milestone now.')
|
2016-04-02 18:10:28 +05:30
|
|
|
|
2018-11-20 20:47:30 +05:30
|
|
|
= render 'deprecation_message'
|
2016-11-03 12:29:30 +05:30
|
|
|
= render 'shared/milestones/tabs', milestone: @milestone
|
2017-08-17 22:00:37 +05:30
|
|
|
= render 'shared/milestones/sidebar', milestone: @milestone, project: @project, affix_offset: 153
|