- @pagetitle = @package

.card.mb-3
  = render partial: 'webui/package/tabs', locals: { project: @project, package: @package }
  .card-body
    .patchinfo.row
      .col-md-8
        = patchinfo_header(@patchinfo, @pkg_names)
        #description-text
          = render partial: 'webui/shared/collapsible_text', locals: { text: @patchinfo.description }
      .col-md-4
        = render partial: 'side_elements', locals: { patchinfo: @patchinfo, packager: @packager }

      .col-md-12
        - if User.possibly_nobody.can_modify?(@package)
          %ul.nav
            %li.nav-item
              = link_to(edit_patchinfo_path(project: @project, package: @package), class: 'nav-link') do
                %i.fas.fa-edit.text-secondary
                Edit patchinfo
            %li.nav-item
              = link_to('#', class: 'nav-link', data: { 'bs-toggle': 'modal', 'bs-target': '#delete-patchinfo-modal' }) do
                %i.fas.fa-times-circle.text-danger
                Delete patchinfo
          = render partial: 'delete_patchinfo_modal', locals: { project: @project, package: @package }

.patchinfo.row
  - if @patchinfo.message.present?
    .col-md-12
      .card.mb-3
        %h5.card-header Message
        .card-body
          = sanitize(simple_format(@patchinfo.message), tags: %w[br p])

  .col-md-6
    .card.mb-3
      %h5.card-header Fixed bugs
      .card-body
        - @patchinfo.issues.each do |issue|
          .d-flex
            .flex-shrink-0
              %i.pt-1.me-1.fas.fa-bug.text-danger
            .flex-grow-1.mb-3
              = patchinfo_issue_link(issue[1], issue[0], issue[2])
              - if issue[3].present?
                %div= issue[3]
  .col-md-6
    .card.mb-3
      %h5.card-header Selected Binaries
      .card-body.binaries
        - @patchinfo.binaries.each do |binary|
          %span.badge.text-bg-warning
            %i.me-1.fa.fa-archive
            = binary
