Only show individual campsite and “Add campsite” links to admin
Regular users do not need, or can use, those links.
This commit is contained in:
parent
e726bde025
commit
23d16fa162
|
@ -11,7 +11,10 @@
|
|||
|
||||
{{ define "content" -}}
|
||||
{{- /*gotype: dev.tandem.ws/tandem/camper/pkg/campsite.campsiteIndex*/ -}}
|
||||
{{ if isAdmin -}}
|
||||
<a href="/admin/campsites/new">{{( pgettext "Add Campsite" "action" )}}</a>
|
||||
{{- end }}
|
||||
|
||||
<h2>{{( pgettext "Campsites" "title" )}}</h2>
|
||||
{{ if .Campsites -}}
|
||||
<form id="booking-filter">
|
||||
|
@ -63,7 +66,13 @@
|
|||
<tbody>
|
||||
{{ range .Campsites -}}
|
||||
<tr>
|
||||
<th scope="row"><a href="/admin/campsites/{{ .Label }}">{{ .Label }}</a></th>
|
||||
<th scope="row">
|
||||
{{- if isAdmin -}}
|
||||
<a href="/admin/campsites/{{ .Label }}">{{ .Label }}</a>
|
||||
{{- else -}}
|
||||
{{ .Label }}
|
||||
{{- end -}}
|
||||
</th>
|
||||
{{ range $.Months }}
|
||||
{{ range .Days }}
|
||||
<td></td>
|
||||
|
|
Loading…
Reference in New Issue