redact locations in location view
This commit is contained in:
parent
07c6aa6d45
commit
8f593203b5
3 changed files with 12 additions and 9 deletions
|
@ -4,4 +4,5 @@ date: 2024-02-13
|
||||||
layout: locations
|
layout: locations
|
||||||
---
|
---
|
||||||
|
|
||||||
Test
|
This page shows a geospatial visualisation of where the various things recorded
|
||||||
|
on this site took place.
|
||||||
|
|
|
@ -2,13 +2,13 @@
|
||||||
{{- $location := .Params.location }}
|
{{- $location := .Params.location }}
|
||||||
|
|
||||||
{{- range $k, $v := $locations -}}
|
{{- range $k, $v := $locations -}}
|
||||||
{{- if ( isset $v "lat" ) -}}
|
{{- if ( isset $v "lat" ) -}}
|
||||||
{{- partialCached "util/get_location_by_index.html" ( dict "locations" $v "location" $location ) $location -}}
|
{{- partialCached "util/get_location_by_index.html" ( dict "locations" $v "location" $location ) $location -}}
|
||||||
{{- else if ( eq $k $location ) -}}
|
{{- else if ( eq $k $location ) -}}
|
||||||
{{- with $v -}}
|
{{- with $v -}}
|
||||||
{{- return . -}}
|
{{- return . -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- warnf "Location %q has no co-ordinates set" $k -}}
|
{{- warnf "Location %q has no co-ordinates set" $k -}}
|
||||||
{{- end -}}
|
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
|
@ -41,12 +41,14 @@
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{- range $k, $v := .items -}}
|
{{- range $k, $v := .items -}}
|
||||||
|
{{- if not ( isset $v "redact" ) -}}
|
||||||
<li itemscope itemtype="https://schema.org/Place">
|
<li itemscope itemtype="https://schema.org/Place">
|
||||||
{{- $k -}}
|
{{- $k -}}
|
||||||
{{- if ( not ( isset $v "lat" ) ) -}}
|
{{- if ( not ( isset $v "lat" ) ) -}}
|
||||||
{{- partial "util/render_recursive_list.html" ( dict "sc" $.sc "pc" $.pc "items" $v "schemaType" $schemaType "listType" $listType ) -}}
|
{{- partial "util/render_recursive_list.html" ( dict "sc" $.sc "pc" $.pc "items" $v "schemaType" $schemaType "listType" $listType ) -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
</li>
|
</li>
|
||||||
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{- if ( eq $listType "unordered" ) -}}
|
{{- if ( eq $listType "unordered" ) -}}
|
||||||
|
|
Loading…
Add table
Reference in a new issue