numerus/web/template/invoices/index.gohtml

51 lines
1.7 KiB
Plaintext
Raw Normal View History

2023-02-11 21:16:48 +00:00
{{ define "title" -}}
{{( pgettext "Invoices" "title" )}}
{{- end }}
{{ define "content" }}
<nav>
<p>
<a href="{{ companyURI "/" }}">{{( pgettext "Home" "title" )}}</a> /
<a>{{( pgettext "Invoices" "title" )}}</a>
</p>
<p>
<a class="primary button"
href="{{ companyURI "/invoices/new" }}">{{( pgettext "New invoice" "action" )}}</a>
</p>
</nav>
{{- /*gotype: dev.tandem.ws/tandem/numerus/pkg.InvoicesIndexPage*/ -}}
<table>
<thead>
<tr>
<th>{{( pgettext "All" "invoice" )}}</th>
<th>{{( pgettext "Date" "title" )}}</th>
<th>{{( pgettext "Invoice Num." "title" )}}</th>
<th>{{( pgettext "Customer" "title" )}}</th>
<th>{{( pgettext "Status" "title" )}}</th>
<th>{{( pgettext "Label" "title" )}}</th>
<th>{{( pgettext "Download" "title" )}}</th>
</tr>
</thead>
<tbody>
{{ with .Invoices }}
{{- range $invoice := . }}
<tr>
<td></td>
<td>{{ .Date|formatDate }}</td>
<td><a href="{{ companyURI "/invoices/"}}{{ .Slug }}">{{ .Number }}</a></td>
<td><a href="{{ companyURI "/contacts/"}}{{ .CustomerSlug }}">{{ .CustomerName }}</a></td>
<td class="invoice-status-{{ .Status }}">{{ .StatusLabel }}</td>
<td></td>
<td></td>
</tr>
{{- end }}
{{ else }}
<tr>
<td colspan="7">{{( gettext "No invoices added yet." )}}</td>
</tr>
{{ end }}
2023-02-11 21:16:48 +00:00
</tbody>
</table>
{{- end }}