56 lines
2.0 KiB
Plaintext
56 lines
2.0 KiB
Plaintext
{{ define "title" -}}
|
|
{{( pgettext "Contacts" "title" )}}
|
|
{{- end }}
|
|
|
|
{{ define "breadcrumbs" -}}
|
|
{{- /*gotype: dev.tandem.ws/tandem/numerus/pkg.ContactsIndexPage*/ -}}
|
|
<nav>
|
|
<p>
|
|
<a href="{{ companyURI "/" }}">{{( pgettext "Home" "title" )}}</a> /
|
|
<a>{{( pgettext "Contacts" "title" )}}</a>
|
|
</p>
|
|
<p>
|
|
<a class="primary button"
|
|
data-hx-push-url="false" data-hx-swap="beforeend" data-hx-boost="true"
|
|
href="{{ companyURI "/contacts/new" }}">{{( pgettext "New contact" "action" )}}</a>
|
|
</p>
|
|
</nav>
|
|
{{- end }}
|
|
|
|
{{ define "content" }}
|
|
{{- /*gotype: dev.tandem.ws/tandem/numerus/pkg.ContactsIndexPage*/ -}}
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>{{( pgettext "All" "contact" )}}</th>
|
|
<th>{{( pgettext "Customer" "title" )}}</th>
|
|
<th>{{( pgettext "Email" "title" )}}</th>
|
|
<th>{{( pgettext "Phone" "title" )}}</th>
|
|
<th>{{( pgettext "Tags" "title" )}}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody data-hx-push-url="false" data-hx-swap="beforeend">
|
|
{{ with .Contacts }}
|
|
{{- range $contact := . }}
|
|
<tr>
|
|
<td></td>
|
|
<td><a href="{{ companyURI "/contacts/"}}{{ .Slug }}" data-hx-boost="true">{{ .Name }}</a></td>
|
|
<td><a href="mailto:{{ .Email }}">{{ .Email }}</a></td>
|
|
<td><a href="tel:{{ .Phone }}">{{ .Phone }}</a></td>
|
|
<td>
|
|
{{- range $index, $tag := .Tags }}
|
|
{{- if gt $index 0 }}, {{ end -}}
|
|
<a href="?tag={{ . }}">{{ . }}</a>
|
|
{{- end }}
|
|
</td>
|
|
</tr>
|
|
{{- end }}
|
|
{{ else }}
|
|
<tr>
|
|
<td colspan="5">{{( gettext "No contacts added yet." )}}</td>
|
|
</tr>
|
|
{{ end }}
|
|
</tbody>
|
|
</table>
|
|
{{- end }}
|