42 lines
1.3 KiB
Plaintext
42 lines
1.3 KiB
Plaintext
h1.page-header = t(".page.title")
|
|
|
|
table.table.table-condensed
|
|
thead
|
|
tr
|
|
th = t(".id")
|
|
th = t(".client")
|
|
th = t(".title")
|
|
th = t(".description")
|
|
th = t(".amount")
|
|
th = t(".paid")
|
|
th = t(".e_date")
|
|
th = t(".d_date")
|
|
th
|
|
th
|
|
th
|
|
|
|
tbody
|
|
- @bills.each do |bill|
|
|
tr
|
|
td = link_to("##{bill.id}", bill)
|
|
td = link_to bill.client.name, bill.client
|
|
td = link_to bill.title, bill
|
|
td = bill.description
|
|
td = bill.amount
|
|
td = bill.paid
|
|
td = distance_of_time_in_words_to_now(bill.emission_date) + " - " + bill.emission_date.to_s(:long) if bill.emission_date
|
|
- if bill.due_date < Date.today
|
|
- if bill.paid
|
|
td.bg-success = distance_of_time_in_words_to_now(bill.due_date) + " - " + bill.due_date.to_s(:long)
|
|
- else
|
|
td.bg-danger = distance_of_time_in_words_to_now(bill.due_date) + " - " + bill.due_date.to_s(:long)
|
|
- else
|
|
td.bg-info = distance_of_time_in_words_to_now(bill.due_date).to_s + " - " + bill.due_date.to_s(:long)
|
|
td = link_to t('show'), bill
|
|
td = link_to t('edit'), edit_bill_path(bill)
|
|
td = link_to t('destroy'), bill, data: {:confirm => 'Are you sure?'}, :method => :delete
|
|
|
|
br
|
|
|
|
= link_to t("new"), new_bill_path, class: 'btn btn-sm btn-default'
|