<commit_before>- @no_container = true
- add_to_breadcrumbs "Milestones", project_milestones_path(@project)
- breadcrumb_title @milestone.title
- page_title       @milestone.title, "Milestones"
- page_description @milestone.description

%div{ class: container_class }
  .detail-page-header.milestone-page-header
    .status-box{ class: status_box_class(@milestone) }
      - if @milestone.closed?
        Closed
      - elsif @milestone.expired?
        Past due
      - elsif @milestone.upcoming?
        Upcoming
      - else
        Open
    .header-text-content
      %span.identifier
        %strong
          Milestone
      - if @milestone.due_date || @milestone.start_date
        = milestone_date_range(@milestone)
    .milestone-buttons
      - if can?(current_user, :admin_milestone, @project)
        = link_to edit_project_milestone_path(@project, @milestone), class: "btn btn-grouped btn-nr" do
          Edit

        - if @project.group
          %button.js-promote-project-milestone-button.btn.btn-grouped{ data: { toggle: 'modal',
            target: '#promote-milestone-modal',
            milestone_title: @milestone.title,
            group_name: @project.group.name,
            url: promote_project_milestone_path(@milestone.project, @milestone),
            container: 'body' },
            disabled: true,
            type: 'button' }
            = _('Promote')
          #promote-milestone-modal

        - if @milestone.active?
          = link_to 'Close milestone', project_milestone_path(@project, @milestone, milestone: {state_event: :close }), method: :put, class: "btn btn-close btn-nr btn-grouped"
        - else
          = link_to 'Reopen milestone', project_milestone_path(@project, @milestone, milestone: {state_event: :activate }), method: :put, class: "btn btn-reopen btn-nr btn-grouped"

        %button.js-delete-milestone-button.btn.btn-grouped.btn-danger{ data: { toggle: 'modal',
          target: '#delete-milestone-modal',
          milestone_id: @milestone.id,
          milestone_title: markdown_field(@milestone, :title),
          milestone_url: project_milestone_path(@project, @milestone),
          milestone_issue_count: @milestone.issues.count,
          milestone_merge_request_count: @milestone.merge_requests.count },
          disabled: true }
          = _('Delete')
          = icon('spin spinner', class: 'js-loading-icon hidden' )

        #delete-milestone-modal

      %a.btn.btn-default.btn-grouped.float-right.d-block.d-sm-none.js-sidebar-toggle{ href: "#" }
        = icon('angle-double-left')

  .detail-page-description.milestone-detail
    %h2.title.qa-milestone-title
      = markdown_field(@milestone, :title)

    %div
      - if @milestone.description.present?
        .description
          .wiki
            = markdown_field(@milestone, :description)

  = render_if_exists 'shared/milestones/burndown', milestone: @milestone, project: @project

  - if can?(current_user, :read_issue, @project) && @milestone.total_items_count(current_user).zero?
    .alert.alert-success.prepend-top-default
      %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.

  = render 'shared/milestones/tabs', milestone: @milestone
  = render 'shared/milestones/sidebar', milestone: @milestone, project: @project, affix_offset: 153<commit_msg>Add milestone tabs deprecation view<commit_after>- @no_container = true
- add_to_breadcrumbs "Milestones", project_milestones_path(@project)
- breadcrumb_title @milestone.title
- page_title       @milestone.title, "Milestones"
- page_description @milestone.description

%div{ class: container_class }
  .detail-page-header.milestone-page-header
    .status-box{ class: status_box_class(@milestone) }
      - if @milestone.closed?
        Closed
      - elsif @milestone.expired?
        Past due
      - elsif @milestone.upcoming?
        Upcoming
      - else
        Open
    .header-text-content
      %span.identifier
        %strong
          Milestone
      - if @milestone.due_date || @milestone.start_date
        = milestone_date_range(@milestone)
    .milestone-buttons
      - if can?(current_user, :admin_milestone, @project)
        = link_to edit_project_milestone_path(@project, @milestone), class: "btn btn-grouped btn-nr" do
          Edit

        - if @project.group
          %button.js-promote-project-milestone-button.btn.btn-grouped{ data: { toggle: 'modal',
            target: '#promote-milestone-modal',
            milestone_title: @milestone.title,
            group_name: @project.group.name,
            url: promote_project_milestone_path(@milestone.project, @milestone),
            container: 'body' },
            disabled: true,
            type: 'button' }
            = _('Promote')
          #promote-milestone-modal

        - if @milestone.active?
          = link_to 'Close milestone', project_milestone_path(@project, @milestone, milestone: {state_event: :close }), method: :put, class: "btn btn-close btn-nr btn-grouped"
        - else
          = link_to 'Reopen milestone', project_milestone_path(@project, @milestone, milestone: {state_event: :activate }), method: :put, class: "btn btn-reopen btn-nr btn-grouped"

        %button.js-delete-milestone-button.btn.btn-grouped.btn-danger{ data: { toggle: 'modal',
          target: '#delete-milestone-modal',
          milestone_id: @milestone.id,
          milestone_title: markdown_field(@milestone, :title),
          milestone_url: project_milestone_path(@project, @milestone),
          milestone_issue_count: @milestone.issues.count,
          milestone_merge_request_count: @milestone.merge_requests.count },
          disabled: true }
          = _('Delete')
          = icon('spin spinner', class: 'js-loading-icon hidden' )

        #delete-milestone-modal

      %a.btn.btn-default.btn-grouped.float-right.d-block.d-sm-none.js-sidebar-toggle{ href: "#" }
        = icon('angle-double-left')

  .detail-page-description.milestone-detail
    %h2.title.qa-milestone-title
      = markdown_field(@milestone, :title)

    %div
      - if @milestone.description.present?
        .description
          .wiki
            = markdown_field(@milestone, :description)

  = render_if_exists 'shared/milestones/burndown', milestone: @milestone, project: @project

  - if can?(current_user, :read_issue, @project) && @milestone.total_items_count(current_user).zero?
    .alert.alert-success.prepend-top-default
      %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.

  = render 'deprecation_message'
  = render 'shared/milestones/tabs', milestone: @milestone
  = render 'shared/milestones/sidebar', milestone: @milestone, project: @project, affix_offset: 153
{'fraction_non_alphanumeric': 0.12018205091736595, 'fraction_numerical': 0.0011378182335371925, 'mean_word_length': 2.902330743618202, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6805485', 'n_tokens_mistral': 2184, 'n_tokens_neox': 2130, 'n_words': 405}