h1.page-header = t '.page.title' table.table.table-condensed thead tr th ID th = t '.title' th = t '.description' th = t '.amount' th = t '.paid' th = t '.emission_date' th = t '.due_date' th th th tbody - @bills.each do |bill| tr td = link_to("##{bill.id}", client_bill_path(bill)) td = link_to bill.title, client_bill_path(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 'Show', client_bill_url(bill) br