numerus/web/template/contacts/index.gohtml

45 lines
1.4 KiB
Plaintext
Raw Normal View History

{{ define "title" -}}
2023-02-03 12:58:10 +00:00
{{( pgettext "Contacts" "title" )}}
{{- end }}
{{ define "content" }}
2023-02-03 12:58:10 +00:00
<nav>
<p>
<a href="{{ companyURI "/" }}">{{( pgettext "Home" "title" )}}</a> /
<a>{{( pgettext "Contacts" "title" )}}</a>
</p>
<p>
<a class="primary button"
href="{{ companyURI "/contacts/new" }}">{{( pgettext "New contact" "action" )}}</a>
</p>
</nav>
{{- /*gotype: dev.tandem.ws/tandem/numerus/pkg.ContactsIndexPage*/ -}}
2023-02-03 12:58:10 +00:00
<table>
<thead>
<tr>
<th>{{( pgettext "All" "contact" )}}</th>
<th>{{( pgettext "Customer" "title" )}}</th>
<th>{{( pgettext "Email" "title" )}}</th>
<th>{{( pgettext "Phone" "title" )}}</th>
</tr>
</thead>
<tbody>
{{ with .Contacts }}
{{- range $contact := . }}
2023-02-03 12:58:10 +00:00
<tr>
<td></td>
<td><a href="{{ companyURI "/contacts/"}}{{ .Slug }}">{{ .Name }}</a></td>
<td><a href="mailto:{{ .Email }}">{{ .Email }}</a></td>
<td><a href="tel:{{ .Phone }}">{{ .Phone }}</a></td>
</tr>
{{- end }}
{{ else }}
<tr>
<td colspan="4">{{( gettext "No contacts added yet." )}}</td>
</tr>
{{ end }}
</tbody>
</table>
{{- end }}