_milestone.html.haml 1.36 KB
Newer Older
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
%li{class: "milestone milestone-#{milestone.closed? ? 'closed' : 'open'}", id: dom_id(milestone.milestones.first) }
  .pull-right
    - if can?(current_user, :manage_group, @group)
      - if milestone.closed?
        = link_to 'Reopen Milestone', group_milestone_path(@group, milestone.safe_title, title: milestone.title, milestone: {state_event: :activate }), method: :put, class: "btn btn-sm btn-grouped btn-reopen"
      - else
        = link_to 'Close Milestone', group_milestone_path(@group, milestone.safe_title, title: milestone.title, milestone: {state_event: :close }), method: :put, class: "btn btn-sm btn-close"
  %h4
    = link_to_gfm truncate(milestone.title, length: 100), group_milestone_path(@group, milestone.safe_title, title: milestone.title)
  .row
    .col-sm-6
      = link_to group_milestone_path(@group, milestone.safe_title, title: milestone.title) do
        = pluralize milestone.issue_count, 'Issue'
       
      = link_to group_milestone_path(@group, milestone.safe_title, title: milestone.title) do
        = pluralize milestone.merge_requests_count, 'Merge Request'
       
      %span.light #{milestone.percent_complete}% complete
    .col-sm-6
      = milestone_progress_bar(milestone)
  %div
    - milestone.milestones.each do |milestone|
      = link_to milestone_path(milestone) do
        %span.label.label-gray
          = milestone.project.name