.card-header.p-0
  %ul.nav.nav-tabs.disable-link-generation{ role: 'tablist' }
    %li.nav-item
      = link_to('#comments', class: 'nav-link text-nowrap active', data: { 'bs-toggle': 'tab' }, role: 'tab') do
        Comments for request #{bs_request.number}
        %span.badge.text-bg-primary{ id: "comment-counter-request-#{bs_request.number}" }
          = comments.size
    - superseded_requests.each do |superseded|
      - if superseded.comments.any?
        %li.nav-item
          = link_to("#superseded-#{superseded.number}", title: "This request was superseded by request #{superseded.superseded_by}",
            class: 'nav-link text-nowrap', data: { 'bs-toggle': 'tab' }, role: 'tab') do
            Comments for request #{superseded.number}
            %span.badge.text-bg-primary{ id: "comment-counter-request-#{superseded.number}" }
              = superseded.comments.size
.card-body
  .tab-content
    .tab-pane.fade.show.active#comments
      = render partial: 'webui/comment/show', locals: { commentable: bs_request,
        comment_counter_id: "#comment-counter-request-#{bs_request.number}" }
    - superseded_requests.each do |superseded|
      - if superseded.comments.any?
        .tab-pane.fade.show{ id: "superseded-#{superseded.number}" }
          = render partial: 'webui/comment/show', locals: { commentable: superseded,
            comment_counter_id: "#comment-counter-request-#{superseded.number}" }

- if CommentLockPolicy.new(User.possibly_nobody, bs_request).create?
  = render partial: 'webui/shared/locking_dialog', locals: { commentable: bs_request, entity_type: 'request' }
- if Flipper.enabled?(:content_moderation, User.possibly_nobody)
  = render partial: 'webui/shared/report_modal'
