2024-08-22 10:13:16 +02:00
|
|
|
{{define "page:content"}}
|
2024-11-21 18:14:12 +01:00
|
|
|
<div id="modal" class="modal">
|
|
|
|
<div class="modal-content w3-round-large">
|
2024-10-17 18:53:03 +02:00
|
|
|
<header class="w3-container" style="margin-bottom: 20px; font-weight: bold;">
|
2024-08-22 10:13:16 +02:00
|
|
|
<span _="on click remove #modal"
|
|
|
|
class="w3-button w3-round-large w3-display-topright" style="margin-top: 2px; margin-right: 2px;"><i class='bi bi-x-circle-fill'></i></span>
|
|
|
|
<h5><i class="{{.item.Type_icon}}" title="{{.item.Type_title}}"></i> {{.item.Type_title}} : {{.item.Title}}</h5>
|
|
|
|
</header>
|
|
|
|
|
|
|
|
<div class="w3-container" style="max-height:600px; overflow: auto;">
|
|
|
|
{{ if gt (len .item.Summary) 0}}
|
|
|
|
<span style="font-weight: bold;">Summary</span>
|
|
|
|
<div class="summary">
|
|
|
|
{{.item.Summary_rendered | safeHTML}}
|
|
|
|
</div>
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
{{.item.Description_rendered | safeHTML}}
|
|
|
|
|
|
|
|
{{ if gt (len .fields) 0}}
|
2024-11-17 20:12:20 +01:00
|
|
|
<ul class="fields">
|
2024-08-22 10:13:16 +02:00
|
|
|
{{ range .fields }}
|
|
|
|
<li><span style="font-weight: bold;">{{.Title}}</span> : {{ renderFieldValue .Value .Widget}}</li>
|
|
|
|
{{ end }}
|
|
|
|
</ul>
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
{{ template "item:relations_view" .}}
|
|
|
|
|
2024-11-21 18:14:12 +01:00
|
|
|
<div class="row" style="margin-bottom: 20px">
|
|
|
|
<div class="col half">
|
2024-08-22 10:13:16 +02:00
|
|
|
<strong>Categories</strong>
|
|
|
|
{{ range (stringToArray .item.Categories "|")}}
|
|
|
|
{{ $category_name := index $.categoriesMap .}}
|
|
|
|
<div class="tag" style="padding: 3px">
|
|
|
|
<a
|
|
|
|
hx-post="/items"
|
|
|
|
hx-target="#page-content"
|
|
|
|
hx-push-url="true"
|
|
|
|
href="#"
|
|
|
|
hx-vals="{category_id" : "{{ . }}"}">{{ $category_name }}</a
|
|
|
|
>
|
|
|
|
</div>
|
|
|
|
{{ end }}
|
|
|
|
</div>
|
2024-11-21 18:14:12 +01:00
|
|
|
<div class="col half">
|
2024-08-22 10:13:16 +02:00
|
|
|
{{ if gt (len .item.Tags) 0 }}
|
|
|
|
<strong>Tags</strong> {{ range (stringToArray .item.Tags ",")}}
|
|
|
|
<div class="tag" style="padding: 3px">
|
|
|
|
<a
|
|
|
|
hx-post="/items"
|
|
|
|
hx-target="#page-content"
|
|
|
|
hx-push-url="true"
|
|
|
|
href="#"
|
|
|
|
hx-vals="{Tags" : "{{.}}"}"
|
|
|
|
>{{ . }}</a
|
|
|
|
>
|
|
|
|
</div>
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2024-11-21 18:14:12 +01:00
|
|
|
<div class="row" style="margin-bottom: 20px">
|
2024-08-22 10:13:16 +02:00
|
|
|
<a
|
2024-11-21 18:14:12 +01:00
|
|
|
class="button main"
|
2024-08-22 10:13:16 +02:00
|
|
|
hx-get="/item/update/{{.item.Id}}"
|
|
|
|
hx-push-url="true"
|
|
|
|
hx-target="#page-content"
|
|
|
|
_="on click remove #modal"
|
|
|
|
href="/item/update/{{.item.Id}}"><i class="bi bi-pencil"></i> Edit</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{ end }}
|