mirror of
https://github.com/internetee/registry.git
synced 2025-07-05 02:33:35 +02:00
36 lines
1.2 KiB
Text
36 lines
1.2 KiB
Text
- content_for :actions do
|
|
= link_to(t(:add), new_admin_invoice_path, class: 'btn btn-primary')
|
|
= render 'shared/title', name: t(:invoices)
|
|
.row
|
|
.col-md-12
|
|
.table-responsive
|
|
%table.table.table-hover.table-bordered.table-condensed
|
|
%thead
|
|
%tr
|
|
%th{class: 'col-xs-3'}
|
|
= sort_link(@q, :number)
|
|
%th{class: 'col-xs-3'}
|
|
= sort_link(@q, :buyer_name, "Buyer")
|
|
%th{class: 'col-xs-3'}
|
|
= sort_link(@q, :sort_due_date, "Due date")
|
|
%th{class: 'col-xs-3'}
|
|
= sort_link(@q, :sort_receipt_date, "Receipt date")
|
|
%tbody
|
|
- @invoices.each do |x|
|
|
%tr
|
|
%td= link_to(x, [:admin, x])
|
|
%td= link_to(x.buyer_name, admin_registrar_path(x.buyer_id))
|
|
- if x.cancelled?
|
|
%td.text-grey= t(:cancelled)
|
|
- else
|
|
%td= l(x.due_date, format: :date_long)
|
|
|
|
- if x.binded?
|
|
%td= l(x.receipt_date, format: :date_long)
|
|
- elsif x.cancelled?
|
|
%td.text-grey= t(:cancelled)
|
|
- else
|
|
%td.text-danger= t(:unpaid)
|
|
.row
|
|
.col-md-12
|
|
= paginate @invoices
|