2022-04-22 18:45:10 +03:00
|
|
|
{{template "layout.html" .}}
|
|
|
|
|
|
|
|
{{define "title"}}{{ title .Name }}{{end}}
|
|
|
|
|
|
|
|
{{define "content"}}
|
2022-04-29 15:21:27 +03:00
|
|
|
<h3>{{ title .Name }}</h3>
|
2022-05-05 13:55:33 +03:00
|
|
|
<p>{{ .Type_ }}</p>
|
|
|
|
|
2022-05-08 09:46:27 +03:00
|
|
|
<div class="object-map">
|
|
|
|
<div id="map" style="width: 300px; height: 300px"></div>
|
|
|
|
<!-- <img class="site-map" src="$suburi/sitemap/$site.id" width="300" /> -->
|
|
|
|
</div>
|
|
|
|
{{initMap}}
|
2022-05-08 10:35:57 +03:00
|
|
|
{{ addSite .Id false }}
|
2022-05-08 09:46:27 +03:00
|
|
|
|
2022-05-05 13:55:33 +03:00
|
|
|
<nav>
|
|
|
|
<div class="nav nav-tabs" id="nav-tab" role="tablist">
|
2022-05-06 16:16:16 +03:00
|
|
|
{{ $active := " active"}}
|
2022-05-05 13:55:33 +03:00
|
|
|
{{- if gt (len .Structures) 0 }}
|
2022-05-06 16:16:16 +03:00
|
|
|
<button class="nav-link{{$active}}" data-bs-toggle="tab" data-bs-target="#nav-structures" type="button"
|
|
|
|
role="tab">Structures</button>
|
|
|
|
{{ $active = ""}}{{- end}}
|
2022-05-05 13:55:33 +03:00
|
|
|
{{- if gt (len .SiteProperties) 0 }}
|
2022-05-06 16:16:16 +03:00
|
|
|
<button class="nav-link{{$active}}" data-bs-toggle="tab" data-bs-target="#nav-site-properties" type="button"
|
|
|
|
role="tab">Properties</button>
|
|
|
|
{{ $active = ""}}{{- end}}
|
2022-05-05 13:55:33 +03:00
|
|
|
</div>
|
|
|
|
</nav>
|
|
|
|
<div class="tab-content" id="nav-tabContent">
|
2022-05-06 16:16:16 +03:00
|
|
|
{{ $active := " active"}}
|
2022-05-05 13:55:33 +03:00
|
|
|
{{- if gt (len .Structures) 0 }}
|
2022-05-06 16:16:16 +03:00
|
|
|
<div class="tab-pane{{$active}}" id="nav-structures" role="tabpanel">
|
2022-05-05 13:55:33 +03:00
|
|
|
<table class="table table-hover table-sm table-borderless object-table">
|
|
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
<th width="100%">Type</th>
|
|
|
|
</tr>
|
|
|
|
{{- range .Structures }}
|
|
|
|
<tr>
|
|
|
|
<td>{{ structure $.Id .Id }}</td>
|
2022-05-05 17:55:57 +03:00
|
|
|
<td>{{ .Type }}{{if .Ruin}} (ruin){{end}}</td>
|
2022-05-05 13:55:33 +03:00
|
|
|
</tr>
|
|
|
|
{{- end}}
|
|
|
|
</table>
|
|
|
|
</div>
|
2022-05-06 16:16:16 +03:00
|
|
|
{{ $active = ""}}{{- end}}
|
2022-05-05 13:55:33 +03:00
|
|
|
{{- if gt (len .SiteProperties) 0 }}
|
2022-05-06 16:16:16 +03:00
|
|
|
<div class="tab-pane{{$active}}" id="nav-site-properties" role="tabpanel">
|
2022-05-05 13:55:33 +03:00
|
|
|
<table class="table table-hover table-sm table-borderless object-table">
|
|
|
|
<tr>
|
|
|
|
<th>Type</th>
|
|
|
|
<th width="100%">Name or Owner</th>
|
|
|
|
</tr>
|
|
|
|
{{- range .SiteProperties }}
|
|
|
|
<tr>
|
|
|
|
<td>{{ if ne .StructureId -1 }}{{ structure $.Id .StructureId }}{{else}}{{ .Type_ }}{{end}}</td>
|
|
|
|
<td>{{ if ne .OwnerHfid -1 }}{{ hf .OwnerHfid }}{{else}}no
|
|
|
|
owner{{ end }}</td>
|
|
|
|
</tr>
|
|
|
|
{{- end}}
|
|
|
|
</table>
|
|
|
|
</div>
|
2022-05-06 16:16:16 +03:00
|
|
|
{{ $active = ""}}{{- end}}
|
2022-05-05 13:55:33 +03:00
|
|
|
</div>
|
2022-04-22 18:45:10 +03:00
|
|
|
|
2022-04-29 15:21:27 +03:00
|
|
|
<h5 class="mt-3">Events</h5>
|
2022-04-22 18:45:10 +03:00
|
|
|
{{ template "events.html" events . }}
|
|
|
|
|
|
|
|
<p>{{ json . }}</p>
|
|
|
|
{{- end }}
|