show.html.haml 1.94 KB
Newer Older
1 2 3
- page_title       @milestone.title, "Milestones"
- page_description @milestone.description

4 5
= render "header_title"

6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
.detail-page-header
  .status-box{ class: status_box_class(@milestone) }
    - if @milestone.closed?
      Closed
    - elsif @milestone.expired?
      Expired
    - else
      Open
  %span.identifier
    Milestone ##{@milestone.iid}
  - if @milestone.expires_at
    %span.creator
      ·
      = @milestone.expires_at
  .pull-right
    - if can?(current_user, :admin_milestone, @project)
      - if @milestone.active?
23
        = 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"
24
      - else
25
        = 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"
26

27
      = link_to namespace_project_milestone_path(@project.namespace, @project, @milestone), data: { confirm: 'Are you sure?' }, method: :delete, class: "btn btn-grouped btn-nr" do
28
        = icon('trash-o')
29
        Delete
30

31 32
      = link_to edit_namespace_project_milestone_path(@project.namespace, @project, @milestone), class: "btn btn-grouped btn-nr" do
        = icon('pencil-square-o')
33 34
        Edit

35
.detail-page-description.milestone-detail.second-block
36 37 38 39 40 41 42 43
  %h2.title
    = markdown escape_once(@milestone.title), pipeline: :single_line
  %div
    - if @milestone.description.present?
      .description
        .wiki
          = preserve do
            = markdown @milestone.description
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
44

45
- if @milestone.complete?(current_user) && @milestone.active?
46
  .alert.alert-success.prepend-top-default
47
    %span All issues for this milestone are closed. You may close milestone now.
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
48

49 50
= render 'shared/milestones/summary', milestone: @milestone, project: @project
= render 'shared/milestones/tabs', milestone: @milestone