2016-11-03 12:29:30 +05:30
|
|
|
- @no_container = true
|
2018-03-17 18:26:18 +05:30
|
|
|
- add_to_breadcrumbs "Milestones", project_milestones_path(@project)
|
|
|
|
- breadcrumb_title @milestone.title
|
2016-01-14 18:37:52 +05:30
|
|
|
- page_title @milestone.title, "Milestones"
|
|
|
|
- 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?
|
|
|
|
Closed
|
|
|
|
- elsif @milestone.expired?
|
|
|
|
Past due
|
2017-08-17 22:00:37 +05:30
|
|
|
- elsif @milestone.upcoming?
|
|
|
|
Upcoming
|
2014-09-02 18:07:02 +05:30
|
|
|
- else
|
2016-11-03 12:29:30 +05:30
|
|
|
Open
|
2017-08-17 22:00:37 +05:30
|
|
|
.header-text-content
|
|
|
|
%span.identifier
|
|
|
|
%strong
|
|
|
|
Milestone
|
|
|
|
- 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)
|
2018-03-17 18:26:18 +05:30
|
|
|
= link_to edit_project_milestone_path(@project, @milestone), class: "btn btn-grouped btn-nr" do
|
|
|
|
Edit
|
|
|
|
|
|
|
|
- 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?
|
2017-09-10 17:25:29 +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
|
2017-09-10 17:25:29 +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
|
|
|
|
2018-11-08 19:23:39 +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?
|
|
|
|
.description
|
|
|
|
.wiki
|
2017-08-17 22:00:37 +05:30
|
|
|
= 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
|
|
|
|
%span Assign some issues to this milestone.
|
|
|
|
- elsif @milestone.complete?(current_user) && @milestone.active?
|
|
|
|
.alert.alert-success.prepend-top-default
|
|
|
|
%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
|