<%= tag.code @job.job_class %>
Queue
<%= tag.strong @job.queue_name %>
Priority
<%= tag.strong @job.priority %>
<% if @job.status.in? [:scheduled, :retried, :queued] %>
<%= button_to reschedule_job_path(@job.id), method: :put,
class: "btn btn-sm btn-outline-primary",
form_class: "d-inline-block",
aria: { label: "Reschedule job" },
title: "Reschedule job",
data: { confirm: "Confirm reschedule" } do %>
<%= render_icon "skip_forward" %>
Reschedule
<% end %>
<% end %>
<% if @job.status.in? [:scheduled, :retried, :queued] %>
<%= button_to discard_job_path(@job.id), method: :put, class: "btn btn-sm btn-outline-primary", form_class: "d-inline-block", aria: { label: "Discard job" }, title: "Discard job", data: { confirm: "Confirm discard" } do %>
<%= render_icon "stop" %>
Discard
<% end %>
<% end %>
<% if @job.status == :discarded %>
<%= button_to retry_job_path(@job.id), method: :put, class: "btn btn-sm btn-outline-primary", form_class: "d-inline-block", aria: { label: "Retry job" }, title: "Retry job", data: { confirm: "Confirm retry" } do %>
<%= render_icon "arrow_clockwise" %>
Retry
<% end %>
<% end %>
<% if @job.status.in? [:discarded, :finished] %>
<%= button_to job_path(@job.id), method: :delete, class: "btn btn-sm btn-outline-primary", form_class: "d-inline-block", aria: { label: "Destroy job" }, title: "Destroy job", data: { confirm: "Confirm destroy" } do %>
<%= render_icon "trash" %>
Destroy
<% end %>
<% end %>