2024-08-22 10:13:16 +02:00
|
|
|
{{define "page:content"}}
|
|
|
|
<div id="modal" class="w3-modal">
|
|
|
|
<div class="w3-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" .}}
|
|
|
|
|
|
|
|
<div class="w3-row" style="margin-bottom: 20px">
|
|
|
|
<div class="w3-half">
|
|
|
|
<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>
|
|
|
|
<div class="w3-half">
|
|
|
|
{{ 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>
|
|
|
|
|
|
|
|
<div class="w3-row" style="margin-bottom: 20px">
|
|
|
|
<a
|
|
|
|
class="w3-btn w3-metro-dark-blue w3-round-large"
|
|
|
|
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 }}
|