2016-08-24 22:44:58 +00:00
|
|
|
- @no_container = true
|
2017-08-17 09:42:04 +00:00
|
|
|
- add_to_breadcrumbs "Milestones", project_milestones_path(@project)
|
|
|
|
- breadcrumb_title @milestone.title
|
2015-12-23 21:56:27 +00:00
|
|
|
- page_title @milestone.title, "Milestones"
|
|
|
|
- page_description @milestone.description
|
|
|
|
|
2016-08-24 22:44:58 +00:00
|
|
|
%div{ class: container_class }
|
2016-07-14 14:36:05 +00:00
|
|
|
.detail-page-header.milestone-page-header
|
2016-08-24 22:44:58 +00:00
|
|
|
.status-box{ class: status_box_class(@milestone) }
|
|
|
|
- if @milestone.closed?
|
|
|
|
Closed
|
|
|
|
- elsif @milestone.expired?
|
|
|
|
Past due
|
2016-11-15 17:48:30 +00:00
|
|
|
- elsif @milestone.upcoming?
|
|
|
|
Upcoming
|
2014-12-27 14:03:02 +00:00
|
|
|
- else
|
2016-08-24 22:44:58 +00:00
|
|
|
Open
|
2016-07-14 14:36:05 +00:00
|
|
|
.header-text-content
|
|
|
|
%span.identifier
|
2017-01-26 17:54:50 +00:00
|
|
|
%strong
|
2017-04-20 15:14:44 +00:00
|
|
|
Milestone
|
2016-11-15 17:48:30 +00:00
|
|
|
- if @milestone.due_date || @milestone.start_date
|
|
|
|
= milestone_date_range(@milestone)
|
2016-07-14 14:36:05 +00:00
|
|
|
.milestone-buttons
|
2016-08-24 22:44:58 +00:00
|
|
|
- if can?(current_user, :admin_milestone, @project)
|
2017-10-31 15:03:52 +00:00
|
|
|
= link_to edit_project_milestone_path(@project, @milestone), class: "btn btn-grouped btn-nr" do
|
|
|
|
Edit
|
|
|
|
|
|
|
|
- if @project.group
|
2018-02-20 19:43:37 +00:00
|
|
|
%button.js-promote-project-milestone-button.btn.btn-grouped{ data: { toggle: 'modal',
|
2018-02-17 00:11:36 +00:00
|
|
|
target: '#promote-milestone-modal',
|
|
|
|
milestone_title: @milestone.title,
|
2018-03-13 16:36:13 +00:00
|
|
|
group_name: @project.group.name,
|
2018-02-17 00:11:36 +00:00
|
|
|
url: promote_project_milestone_path(@milestone.project, @milestone),
|
2018-02-20 19:43:37 +00:00
|
|
|
container: 'body' },
|
2018-03-01 22:09:25 +00:00
|
|
|
disabled: true,
|
|
|
|
type: 'button' }
|
2018-02-17 00:11:36 +00:00
|
|
|
= _('Promote')
|
|
|
|
#promote-milestone-modal
|
2017-10-31 15:03:52 +00:00
|
|
|
|
2016-08-24 22:44:58 +00:00
|
|
|
- if @milestone.active?
|
2017-06-29 17:06:35 +00:00
|
|
|
= link_to 'Close milestone', project_milestone_path(@project, @milestone, milestone: {state_event: :close }), method: :put, class: "btn btn-close btn-nr btn-grouped"
|
2016-08-24 22:44:58 +00:00
|
|
|
- else
|
2017-06-29 17:06:35 +00:00
|
|
|
= 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-02 13:01:20 +00:00
|
|
|
|
2018-01-04 13:15:27 +00:00
|
|
|
%button.js-delete-milestone-button.btn.btn-grouped.btn-danger{ data: { toggle: 'modal',
|
|
|
|
target: '#delete-milestone-modal',
|
|
|
|
milestone_id: @milestone.id,
|
|
|
|
milestone_title: markdown_field(@milestone, :title),
|
|
|
|
milestone_url: project_milestone_path(@project, @milestone),
|
|
|
|
milestone_issue_count: @milestone.issues.count,
|
|
|
|
milestone_merge_request_count: @milestone.merge_requests.count },
|
|
|
|
disabled: true }
|
|
|
|
= _('Delete')
|
|
|
|
= icon('spin spinner', class: 'js-loading-icon hidden' )
|
|
|
|
|
|
|
|
#delete-milestone-modal
|
2016-05-03 11:21:09 +00:00
|
|
|
|
2018-05-10 19:22:56 +00:00
|
|
|
%a.btn.btn-default.btn-grouped.float-right.d-block.d-sm-none.js-sidebar-toggle{ href: "#" }
|
2017-03-23 20:53:51 +00:00
|
|
|
= icon('angle-double-left')
|
|
|
|
|
2017-04-25 17:13:59 +00:00
|
|
|
.detail-page-description.milestone-detail
|
2016-08-24 22:44:58 +00:00
|
|
|
%h2.title
|
|
|
|
= markdown_field(@milestone, :title)
|
2017-10-31 15:03:52 +00:00
|
|
|
|
2016-08-24 22:44:58 +00:00
|
|
|
%div
|
|
|
|
- if @milestone.description.present?
|
|
|
|
.description
|
|
|
|
.wiki
|
2017-04-28 14:57:17 +00:00
|
|
|
= markdown_field(@milestone, :description)
|
2012-12-14 05:34:05 +00:00
|
|
|
|
2017-02-08 20:57:23 +00:00
|
|
|
- if can?(current_user, :read_issue, @project) && @milestone.total_items_count(current_user).zero?
|
2016-08-24 22:44:58 +00:00
|
|
|
.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.
|
2012-12-14 05:34:05 +00:00
|
|
|
|
2016-08-24 22:44:58 +00:00
|
|
|
= render 'shared/milestones/tabs', milestone: @milestone
|
2017-03-24 17:13:29 +00:00
|
|
|
= render 'shared/milestones/sidebar', milestone: @milestone, project: @project, affix_offset: 153
|