:ruby
  @pagetitle = "Build Reason for #{@project} / #{@package}"
  @metarobots = 'index,nofollow'
  build_reason_breadcrumb(@project, @package, "Build Reason (#{@repository.name} / #{params[:arch]})")

= render partial: 'webui/package/tabs'

%h3= @pagetitle
%h6.subtitle
  Repository / Architecture: #{params[:repository]} / #{params[:arch]}

%p
  = link_to("<= Go back to binaries", { action: :binaries, controller: '/webui/package', project: @project, package: @package, repository: @repository.name })

%p
  %strong
    Build reason:
  = @details.explain
  %br

  %strong
    Build scheduled at:
  = Time.at(@details.time.to_i)

  - if @details.packagechange
    %p
      %strong
        = pluralize(@details.packagechange.size, 'package')
      that got changed and scheduled a build for package
      %strong
        = @package.name
      %br

      %table#changed-packages
        %thead
          %tr
            %th Package
            %th Change
        %tbody
          - @details.packagechange.each do |packagechange|
            %tr
              %td= packagechange['key']
              %td= packagechange['change']
