%ul.bordered-list.manage-labels-list
  - labels.each do |label|
    - options = { milestone_title: @milestone.title, label_name: label.title }

    %li
      %span.label-row
        %span.label-name
          = link_to milestones_label_path(options) do
            - render_colored_label(label, tooltip: false)
        %span.prepend-description-left
          = markdown(label.description, pipeline: :single_line)

      .pull-info-right
        %span.append-right-20
          = link_to milestones_label_path(options.merge(state: 'opened')) do
            - pluralize milestone_issues_by_label_count(@milestone, label, state: :opened), 'open issue'
        %span.append-right-20
          = link_to milestones_label_path(options.merge(state: 'closed')) do
            - pluralize milestone_issues_by_label_count(@milestone, label, state: :closed), 'closed issue'
