show.html.haml 3.63 KB
Newer Older
1
- page_title @milestone.title, "Milestones"
2 3
= render "header_title"

4 5 6 7 8
.issuable-details
  .page-title
    .issue-box{ class: "issue-box-#{@milestone.closed? ? 'closed' : 'open'}" }
      - if @milestone.closed?
        Closed
9
      - else
10 11 12 13 14 15 16 17 18 19 20 21
        Open
    Milestone #{@milestone.title}
    .pull-right
      - if can?(current_user, :admin_milestones, @group)
        - if @milestone.active?
          = link_to 'Close Milestone', group_milestone_path(@group, @milestone.safe_title, title: @milestone.title, milestone: {state_event: :close }), method: :put, class: "btn btn-grouped btn-close"
        - else
          = link_to 'Reopen Milestone', group_milestone_path(@group, @milestone.safe_title, title: @milestone.title, milestone: {state_event: :activate }), method: :put, class: "btn btn-grouped btn-reopen"

  .gray-content-block.middle-block
    %h2.issue-title
      = gfm escape_once(@milestone.title)
22

23
- if @milestone.complete? && @milestone.active?
24
  .alert.alert-success.prepend-top-default
25 26
    %span All issues for this milestone are closed. You may close the milestone now.

Douwe Maan's avatar
Douwe Maan committed
27 28 29 30 31 32 33 34
.table-holder
  %table.table
    %thead
      %tr
        %th Project
        %th Open issues
        %th State
        %th Due date
35
    - @milestone.milestones.each do |milestone|
Douwe Maan's avatar
Douwe Maan committed
36 37 38 39 40 41 42 43 44 45 46 47
      %tr
        %td
          = link_to "#{milestone.project.name}", namespace_project_milestone_path(milestone.project.namespace, milestone.project, milestone)
        %td
          = milestone.issues.opened.count
        %td
          - if milestone.closed?
            Closed
          - else
            Open
        %td
          = milestone.expires_at
48 49 50 51

.context
  %p.lead
    Progress:
52
    #{@milestone.closed_items_count} closed
53
    –
54 55
    #{@milestone.open_items_count} open
  = milestone_progress_bar(@milestone)
56

57
%ul.center-top-menu.no-top.no-bottom
58 59 60
  %li.active
    = link_to '#tab-issues', 'data-toggle' => 'tab' do
      Issues
61
      %span.badge= @milestone.issue_count
62 63 64
  %li
    = link_to '#tab-merge-requests', 'data-toggle' => 'tab' do
      Merge Requests
65
      %span.badge= @milestone.merge_requests_count
66 67 68
  %li
    = link_to '#tab-participants', 'data-toggle' => 'tab' do
      Participants
69
      %span.badge= @milestone.participants.count
70 71 72

.tab-content
  .tab-pane.active#tab-issues
73 74 75 76 77 78 79 80
    .gray-content-block.middle-block
      .pull-right
        = link_to 'Browse Issues', issues_group_path(@group, milestone_title: @milestone.title), class: "btn btn-grouped"

      .oneline
        All issues in this milestone

    .row.prepend-top-default
81
      .col-md-6
82
        = render 'issues', title: "Open", issues: @milestone.opened_issues
83
      .col-md-6
84
        = render 'issues', title: "Closed", issues: @milestone.closed_issues
85 86

  .tab-pane#tab-merge-requests
87 88 89 90 91 92 93 94
    .gray-content-block.middle-block
      .pull-right
        = link_to 'Browse Merge Requests', merge_requests_group_path(@group, milestone_title: @milestone.title), class: "btn btn-grouped"

      .oneline
        All merge requests in this milestone

    .row.prepend-top-default
95
      .col-md-6
96
        = render 'merge_requests', title: "Open", merge_requests: @milestone.opened_merge_requests
97
      .col-md-6
98
        = render 'merge_requests', title: "Closed", merge_requests: @milestone.closed_merge_requests
99 100

  .tab-pane#tab-participants
101 102 103 104
    .gray-content-block.middle-block
      .oneline
        All participants to this milestone

105
    %ul.bordered-list
106
      - @milestone.participants.each do |user|
107 108
        %li
          = link_to user, title: user.name, class: "darken" do
109
            = image_tag avatar_icon(user, 32), class: "avatar s32"
110 111 112
            %strong= truncate(user.name, lenght: 40)
            %br
            %small.cgray= user.username