From 986bf27899b41d6d1c00d319d213d1dc5128af38 Mon Sep 17 00:00:00 2001 From: roberto Date: Thu, 9 Jan 2025 18:05:08 +0100 Subject: [PATCH] Shares implmnetation progress --- assets/templates/items/form.tmpl | 14 ++++++++++++++ cmd/web/items_handlers.go | 4 ++++ models/item.go | 16 ++++++++++++++++ 3 files changed, 34 insertions(+) diff --git a/assets/templates/items/form.tmpl b/assets/templates/items/form.tmpl index 96294ba..4f1a79c 100644 --- a/assets/templates/items/form.tmpl +++ b/assets/templates/items/form.tmpl @@ -5,6 +5,11 @@ {{ $fields_present = true }} {{ end }} +{{ $shares_present := false }} +{{ if (gt (len (index .item.FieldsSection "fields")) 0) }} + {{ $shares_present = true }} +{{ end }} +
@@ -13,6 +18,7 @@ Fields {{ end }} Relations + Shares
@@ -98,6 +104,14 @@
+ + {{ if $shares_present }} + + {{ end }}