- @pagetitle = 'Workflow Runs'

.row
  .col-md-4.col-lg-3.px-0.px-md-3.sticky-top#filter-desktop
    .card.mb-3
      %strong.d-block.d-md-none.p-3{ data: { 'bs-toggle': 'collapse', 'bs-target': '#content-selector-filters' },
                                  aria: { expanded: true, controls: 'filters' } }
        Filtered by: #{params[:status]&.humanize}
        %i.float-end.mt-1.fa.fa-chevron-down#workflow-runs-dropdown-trigger
      .collapse#content-selector-filters
        = render WorkflowRunFilterComponent.new(token: @token, selected_filter: @selected_filter,
                                                workflow_runs_relation: @workflow_runs_relation)
  .col-md-8.col-lg-9.px-0.px-md-3.d-none.content-list-loading
    = render partial: 'webui/shared/loading', locals: { text: 'Loading...', wrapper_css: ['loading'] }
  .col-md-8.col-lg-9.px-0.px-md-3.content-list#workflow-run-list
    .card
      .card-body
        - if @workflow_runs.blank?
          .text-center
            %p There are no workflow runs available
        - else
          .text-center
            %span.ms-3= page_entries_info(@workflow_runs)
          .p-3#workflow-runs
            - @workflow_runs.each do |workflow_run|
              .border-bottom.py-2{ id: "workflow-run-heading#{workflow_run.id}" }
                = render(WorkflowRunRowComponent.new(workflow_run: workflow_run, token_id: @token.id))
            = paginate @workflow_runs, views_prefix: 'webui'
