2016-08-24 18:44:58 -04:00
|
|
|
- @no_container = true
|
2015-12-23 16:56:27 -05:00
|
|
|
- page_title @milestone.title, "Milestones"
|
|
|
|
- page_description @milestone.description
|
2016-08-24 18:44:58 -04:00
|
|
|
= render "projects/issues/head"
|
2015-12-23 16:56:27 -05:00
|
|
|
|
2016-08-24 18:44:58 -04:00
|
|
|
%div{ class: container_class }
|
2016-07-14 10:36:05 -04:00
|
|
|
.detail-page-header.milestone-page-header
|
2016-08-24 18:44:58 -04:00
|
|
|
.status-box{ class: status_box_class(@milestone) }
|
|
|
|
- if @milestone.closed?
|
|
|
|
Closed
|
|
|
|
- elsif @milestone.expired?
|
|
|
|
Past due
|
2016-11-15 12:48:30 -05:00
|
|
|
- elsif @milestone.upcoming?
|
|
|
|
Upcoming
|
2014-12-27 09:03:02 -05:00
|
|
|
- else
|
2016-08-24 18:44:58 -04:00
|
|
|
Open
|
2016-07-14 10:36:05 -04:00
|
|
|
.header-text-content
|
|
|
|
%span.identifier
|
2017-01-26 12:54:50 -05:00
|
|
|
%strong
|
2017-03-14 12:50:32 -04:00
|
|
|
Milestone #{@milestone.to_reference}
|
2016-11-15 12:48:30 -05:00
|
|
|
- if @milestone.due_date || @milestone.start_date
|
|
|
|
= milestone_date_range(@milestone)
|
2016-07-14 10:36:05 -04:00
|
|
|
.milestone-buttons
|
2016-08-24 18:44:58 -04:00
|
|
|
- if can?(current_user, :admin_milestone, @project)
|
|
|
|
- if @milestone.active?
|
|
|
|
= link_to 'Close Milestone', namespace_project_milestone_path(@project.namespace, @project, @milestone, milestone: {state_event: :close }), method: :put, class: "btn btn-close btn-nr btn-grouped"
|
|
|
|
- else
|
|
|
|
= link_to 'Reopen Milestone', namespace_project_milestone_path(@project.namespace, @project, @milestone, milestone: {state_event: :activate }), method: :put, class: "btn btn-reopen btn-nr btn-grouped"
|
2015-12-02 08:01:20 -05:00
|
|
|
|
2016-08-24 18:44:58 -04:00
|
|
|
= link_to edit_namespace_project_milestone_path(@project.namespace, @project, @milestone), class: "btn btn-grouped btn-nr" do
|
|
|
|
Edit
|
2015-12-16 10:13:22 -05:00
|
|
|
|
2016-08-24 18:44:58 -04:00
|
|
|
= link_to namespace_project_milestone_path(@project.namespace, @project, @milestone), data: { confirm: 'Are you sure?' }, method: :delete, class: "btn btn-grouped btn-danger" do
|
|
|
|
Delete
|
2016-05-03 07:21:09 -04:00
|
|
|
|
2017-03-23 16:53:51 -04:00
|
|
|
%a.btn.btn-default.btn-grouped.pull-right.visible-xs-block.js-sidebar-toggle{ href: "#" }
|
|
|
|
= icon('angle-double-left')
|
|
|
|
|
2016-10-24 03:58:46 -04:00
|
|
|
.detail-page-description.milestone-detail{ class: ('hide-bottom-border' unless @milestone.description.present? ) }
|
2016-08-24 18:44:58 -04:00
|
|
|
%h2.title
|
|
|
|
= markdown_field(@milestone, :title)
|
|
|
|
%div
|
|
|
|
- if @milestone.description.present?
|
|
|
|
.description
|
|
|
|
.wiki
|
|
|
|
= preserve do
|
|
|
|
= markdown_field(@milestone, :description)
|
2012-12-14 00:34:05 -05:00
|
|
|
|
2017-02-08 15:57:23 -05:00
|
|
|
- if can?(current_user, :read_issue, @project) && @milestone.total_items_count(current_user).zero?
|
2016-08-24 18:44:58 -04: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 00:34:05 -05:00
|
|
|
|
2016-08-24 18:44:58 -04:00
|
|
|
= render 'shared/milestones/tabs', milestone: @milestone
|
2017-03-24 13:13:29 -04:00
|
|
|
= render 'shared/milestones/sidebar', milestone: @milestone, project: @project, affix_offset: 153
|