BigW Consortium Gitlab

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

4 5 6 7 8
.detail-page-header
  .status-box{ class: status_box_class(@milestone) }
    - if @milestone.closed?
      Closed
    - elsif @milestone.expired?
Fatih Acet committed
9
      Past due
10 11 12 13 14 15 16 17 18 19 20
    - 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?
21
        = 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"
22
      - else
23
        = 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"
24

25
      = link_to edit_namespace_project_milestone_path(@project.namespace, @project, @milestone), class: "btn btn-grouped btn-nr" do
26 27
        Edit

28 29 30 31
      = 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

.detail-page-description.milestone-detail
32 33 34 35 36 37 38 39
  %h2.title
    = markdown escape_once(@milestone.title), pipeline: :single_line
  %div
    - if @milestone.description.present?
      .description
        .wiki
          = preserve do
            = markdown @milestone.description
40

41
- if @milestone.total_items_count(current_user).zero?
42
  .alert.alert-success.prepend-top-default
43 44 45 46
    %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.
47

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