64 lines
2.6 KiB
Plaintext
64 lines
2.6 KiB
Plaintext
<tr id="<%= dom_id job %>" class="bg-status-<%= job.status %>-light odd:bg-opacity-25 even:bg-opacity-10 text-hsrm-gray whitespace-nowrap hover:bg-opacity-30" data-stream-enter-class="animate-flash-increase">
|
|
<td class="p-2 py-3 text-center">
|
|
<%= link_to operator_job_path(job), target: "_top" do %>
|
|
<span class="badge badge-xl text-status-<%= job.status %> bg-status-<%= job.status %>-light">
|
|
<%= job.id %>
|
|
</span>
|
|
<% end %>
|
|
</td>
|
|
<td class="p-2 py-3">
|
|
<%= link_to_if job.customer, job.customer_firstname, ( job.customer ? admin_user_path(job.customer) : ""), target: "_top" %>
|
|
</td>
|
|
<td class="p-2 py-3">
|
|
<%= link_to_if job.customer, job.customer_lastname, ( job.customer ? admin_user_path(job.customer) : ""), target: "_top" %>
|
|
</td>
|
|
<td class="p-2 py-3">
|
|
<% if job.pdf.attached? %>
|
|
<%#= link_to job.pdf.filename, rails_blob_path(job.pdf, disposition: "attachment") %>
|
|
<%= link_to truncate(job.pdf.filename.to_s, length: 45), job.pdf, download:true, target: "_top" %>
|
|
<% if job.pdf.previewable? %>
|
|
<%= link_to job.pdf, target: "_blank", target: "_top" do %>
|
|
<span class="badge badge-hover mr-1"><%= icon("eye", class:"icon text-hsrm-gray size-6 inline") %></span>
|
|
<% end %>
|
|
<% end %>
|
|
<%= link_to job.pdf, download:true, target: "_top" do %>
|
|
<span class="badge badge-hover">
|
|
<%= icon("document-arrow-down", class: "text-hsrm-gray size-6 inline", title: "Download") %>
|
|
<%=number_to_human_size job.pdf.blob.byte_size%>
|
|
</span>
|
|
<% end %>
|
|
<% end %>
|
|
</td>
|
|
<% Job::AVAILABLE_PAGE_FORMATS.each do |din| %>
|
|
<td class="p-1 py-3">
|
|
<%= job.public_send("number_of_plans_#{din}") if job.respond_to? "number_of_plans_#{din}" %>
|
|
</td>
|
|
<% end %>
|
|
<td class="p-2 py-3 text-right">
|
|
<%= number_with_delimiter job.costum_qm_plan.round(2) %> m²
|
|
</td>
|
|
<td class="w-24 p-2 py-3 text-right">
|
|
<%= number_to_currency job.cost, locale: :de %>
|
|
</td>
|
|
<td class="p-2 py-3 text-center">
|
|
<%= l job.created_at.localtime.to_date %>
|
|
</td>
|
|
<td class="p-2 py-3 text-center">
|
|
<% if job.created_by_operator %>
|
|
<%= link_to admin_user_path(job.creator) do %>
|
|
<span class="badge badge-status">Operator</span>
|
|
<% end %>
|
|
<% else %>
|
|
<%= link_to admin_user_path(job.creator) do %>
|
|
<span class="badge badge-status badge-hover">Kunden</span>
|
|
<% end %>
|
|
<% end %>
|
|
</span>
|
|
</td>
|
|
<td class="p-2 py-3">
|
|
<span class="badge badge-status text-status-<%= job.status.to_sym %> bg-status-<%= job.status %>-light">
|
|
<%= job.status %>
|
|
</span>
|
|
</td>
|
|
</tr>
|