summaryrefslogtreecommitdiff
path: root/app/views/dashboard/milestones/show.html.haml
blob: 3810267577c1a0cd0e0677cf18300252a3960ffc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
- page_title @milestone.title, "Milestones"
- header_title "Milestones", dashboard_milestones_path

.detail-page-header
  .status-box{ class: "status-box-#{@milestone.closed? ? 'closed' : 'open'}" }
    - if @milestone.closed?
      Closed
    - else
      Open
  %span.identifier
    Milestone #{@milestone.title}

.detail-page-description.gray-content-block.second-block
  %h2.title
    = markdown escape_once(@milestone.title), pipeline: :single_line

- if @milestone.complete? && @milestone.active?
  .alert.alert-success.prepend-top-default
    %span All issues for this milestone are closed. Navigate to the project to close the milestone.

.table-holder
  %table.table
    %thead
      %tr
        %th Project
        %th Open issues
        %th State
        %th Due date
    - @milestone.milestones.each do |milestone|
      %tr
        %td
          = link_to "#{milestone.project.name_with_namespace}", 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

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

%ul.nav-links.no-top.no-bottom
  %li.active
    = link_to '#tab-issues', 'data-toggle' => 'tab' do
      Issues
      %span.badge= @milestone.issue_count
  %li
    = link_to '#tab-merge-requests', 'data-toggle' => 'tab' do
      Merge Requests
      %span.badge= @milestone.merge_requests_count
  %li
    = link_to '#tab-participants', 'data-toggle' => 'tab' do
      Participants
      %span.badge= @milestone.participants.count

.tab-content
  .tab-pane.active#tab-issues
    .gray-content-block.middle-block
      .pull-right
        = link_to 'Browse Issues', issues_dashboard_path(milestone_title: @milestone.title), class: "btn btn-grouped"

      .oneline
        All issues in this milestone

    .row.prepend-top-default
      .col-md-6
        = render 'issues', title: "Open", issues: @milestone.opened_issues
      .col-md-6
        = render 'issues', title: "Closed", issues: @milestone.closed_issues

  .tab-pane#tab-merge-requests
    .gray-content-block.middle-block
      .pull-right
        = link_to 'Browse Merge Requests', merge_requests_dashboard_path(milestone_title: @milestone.title), class: "btn btn-grouped"

      .oneline
        All merge requests in this milestone

    .row.prepend-top-default
      .col-md-6
        = render 'merge_requests', title: "Open", merge_requests: @milestone.opened_merge_requests
      .col-md-6
        = render 'merge_requests', title: "Closed", merge_requests: @milestone.closed_merge_requests

  .tab-pane#tab-participants
    .gray-content-block.middle-block
      .oneline
        All participants to this milestone
    %ul.bordered-list
      - @milestone.participants.each do |user|
        %li
          = link_to user, title: user.name, class: "darken" do
            = image_tag avatar_icon(user, 32), class: "avatar s32"
            %strong= truncate(user.name, lenght: 40)
            %br
            %small.cgray= user.username