Sha256: 6bfea2645cdd30c6b939f389f9ea2f923424258564ce8da462c46f5a3e90a361

Contents?: true

Size: 1.89 KB

Versions: 6

Compression:

Stored size: 1.89 KB

Contents

<div class='card mb-2'>
  <div class='card-body d-flex flex-wrap'>

    <div class='me-4'>
      <small>Filter by job class</small>
      <br>
      <% @filter.job_classes.each do |name, count| %>
        <% if params[:job_class] == name %>
          <%= link_to(@filter.to_params(job_class: nil), class: 'btn btn-sm btn-outline-secondary active', role: "button", "aria-pressed": true)  do %>
            <%= name %> (<%= count %>)
          <% end %>
        <% else %>
          <%= link_to(@filter.to_params(job_class: name), class: 'btn btn-sm btn-outline-secondary', role: "button") do %>
            <%= name %> (<%= count %>)
          <% end %>
        <% end %>
      <% end %>
    </div>

    <div class='me-4'>
      <small>Filter by state</small>
      <br>
      <% @filter.states.each do |name, count| %>
        <% if params[:state] == name %>
          <%= link_to(@filter.to_params(state: nil), class: 'btn btn-sm btn-outline-secondary active', role: "button", "aria-pressed": true)  do %>
            <%= name %> (<%= count %>)
          <% end %>
        <% else %>
          <%= link_to(@filter.to_params(state: name), class: 'btn btn-sm btn-outline-secondary', role: "button") do %>
            <%= name %> (<%= count %>)
          <% end %>
        <% end %>
      <% end %>
    </div>

    <div>
      <small>Filter by queue</small>
      <br>
      <% @filter.queues.each do |name, count| %>
        <% if params[:queue_name] == name %>
          <%= link_to(@filter.to_params(queue_name: nil), class: 'btn btn-sm btn-outline-secondary active', role: "button", "aria-pressed": true)  do %>
            <%= name %> (<%= count %>)
          <% end %>
        <% else %>
          <%= link_to(@filter.to_params(queue_name: name), class: 'btn btn-sm btn-outline-secondary', role: "button") do %>
            <%= name %> (<%= count %>)
          <% end %>
        <% end %>
      <% end %>
    </div>
  </div>
</div>

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
good_job-2.5.0 engine/app/views/good_job/shared/_filter.erb
good_job-2.4.2 engine/app/views/good_job/shared/_filter.erb
good_job-2.4.1 engine/app/views/good_job/shared/_filter.erb
good_job-2.4.0 engine/app/views/good_job/shared/_filter.erb
good_job-2.3.1 engine/app/views/good_job/shared/_filter.erb
good_job-2.3.0 engine/app/views/good_job/shared/_filter.erb