41 lines
2.0 KiB
Plaintext
41 lines
2.0 KiB
Plaintext
{{- range $invoice := .Invoices }}
|
|
<tr>
|
|
{{ $title := .Number | printf (pgettext "Select invoice %v" "action") }}
|
|
<td><input type="checkbox" form="batch-form"
|
|
name="invoice" value="{{ .Slug }}"
|
|
aria-label="{{ $title }}"
|
|
title="{{ $title }}"/></td>
|
|
<td>{{ .Date|formatDate }}</td>
|
|
<td><a href="/admin/invoices/{{ .Slug }}">{{ .Number }}</a></td>
|
|
<td>{{ .CustomerName }}</td>
|
|
<td class="invoice-status-{{ .Status }}">
|
|
<details class="invoice-status menu">
|
|
<summary>{{ .StatusLabel }}</summary>
|
|
<form data-hx-put="/admin/invoices/{{ .Slug }}">
|
|
{{ CSRFInput }}
|
|
<input type="hidden" name="quick" value="status">
|
|
<ul role="menu">
|
|
{{- range $status, $name := $.InvoiceStatuses }}
|
|
{{- if ne $status $invoice.Status }}
|
|
<li role="presentation">
|
|
<button role="menuitem" type="submit"
|
|
name="invoice_status" value="{{ $status }}"
|
|
class="invoice-status-{{ $status }}"
|
|
>{{ $name }}</button>
|
|
</li>
|
|
{{- end }}
|
|
{{- end }}
|
|
</ul>
|
|
</form>
|
|
</details>
|
|
</td>
|
|
{{- $title = .Number | printf (pgettext "Download invoice %s" "action") -}}
|
|
<td class="invoice-download"><a href="/admin/invoices/{{ .Slug }}.pdf"
|
|
download="{{ .Number}}-{{ .CustomerName | slugify }}.pdf"
|
|
title="{{( pgettext "Download invoice" "action" )}}"
|
|
aria-label="{{ $title }}">⤓</a></td>
|
|
<td class="numeric">{{ .Total|formatPrice }}</td>
|
|
</tr>
|
|
{{- end }}
|
|
{{ template "pagination" .Filters.Cursor | colspan 7 }}
|