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" -}}
|
{{ define "content" -}}
|
||||||
{{- /*gotype: dev.tandem.ws/tandem/camper/pkg/campsite.campsiteIndex*/ -}}
|
{{- /*gotype: dev.tandem.ws/tandem/camper/pkg/campsite.campsiteIndex*/ -}}
|
||||||
|
{{ if isAdmin -}}
|
||||||
<a href="/admin/campsites/new">{{( pgettext "Add Campsite" "action" )}}</a>
|
<a href="/admin/campsites/new">{{( pgettext "Add Campsite" "action" )}}</a>
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
<h2>{{( pgettext "Campsites" "title" )}}</h2>
|
<h2>{{( pgettext "Campsites" "title" )}}</h2>
|
||||||
{{ if .Campsites -}}
|
{{ if .Campsites -}}
|
||||||
<form id="booking-filter">
|
<form id="booking-filter">
|
||||||
|
@ -63,7 +66,13 @@
|
||||||
<tbody>
|
<tbody>
|
||||||
{{ range .Campsites -}}
|
{{ range .Campsites -}}
|
||||||
<tr>
|
<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 $.Months }}
|
||||||
{{ range .Days }}
|
{{ range .Days }}
|
||||||
<td></td>
|
<td></td>
|
||||||
|
|
Loading…
Reference in New Issue