numerus/web/template/payments/accounts/index.gohtml

56 lines
1.9 KiB
Plaintext

{{ define "title" -}}
{{- /*gotype: dev.tandem.ws/tandem/numerus/pkg.PaymentAccountIndexPage*/ -}}
{{( pgettext "Payment Accounts" "title" )}}
{{- end }}
{{ define "breadcrumbs" -}}
{{- /*gotype: dev.tandem.ws/tandem/numerus/pkg.PaymentAccountIndexPage*/ -}}
<nav>
<p>
<a href="{{ companyURI "/" }}">{{( pgettext "Home" "title" )}}</a> /
<a>{{( pgettext "Payment Accounts" "title" )}}</a>
</p>
<a class="primary button"
href="{{ companyURI "/payment-accounts/new" }}">{{( pgettext "New payment account" "action" )}}</a>
</nav>
{{- end }}
{{ define "content" }}
{{- /*gotype: dev.tandem.ws/tandem/numerus/pkg.PaymentAccountIndexPage*/ -}}
<table>
<thead>
<tr>
<th>{{( pgettext "Name" "title" )}}</th>
<th>{{( pgettext "Type" "title" )}}</th>
<th>{{( pgettext "Number" "title" )}}</th>
<th>{{( pgettext "Expiration Date" "title" )}}</th>
</tr>
</thead>
<tbody>
{{ with .Accounts }}
{{- range . }}
<tr>
<td><a href="{{ companyURI "/payment-accounts/" }}{{ .Slug }}">{{ .Name }}</a></td>
<td>{{ .TypeLabel }}</td>
<td>
{{- if eq .Type "bank" -}}
{{ .IBAN }}
{{- else if eq .Type "card" -}}
•••• •••• •••• {{ .LastFourDigits }}
{{- end -}}
</td>
<td>
{{ .ExpirationDate }}
</td>
</tr>
{{- end }}
{{ else }}
<tr>
<td colspan="3">{{( gettext "No payment accounts added yet." )}}</td>
</tr>
{{ end }}
</tbody>
</table>
{{- end }}