Add the campsite type’s name in front of price if it has options

Customer wants to explicitly show that the first price, the one on top
of the options, is for the campsite type.
This commit is contained in:
jordi fita mas 2024-01-13 01:37:11 +01:00
parent 6a2158e179
commit a226d17aa7
1 changed files with 7 additions and 1 deletions

View File

@ -80,7 +80,13 @@
</svg>
{{ .SeasonName }}
</dt>
<dd x-show="open">{{ printf (gettext "%s €/night") .PricePerNight }}</dd>
<dd x-show="open">
{{- if .Options -}}
{{ printf (gettext "%s: %s €/night") $.Name .PricePerNight }}
{{- else -}}
{{ printf (gettext "%s €/night") .PricePerNight }}
{{- end -}}
</dd>
{{ range .Options }}
<dd x-show="open">{{ printf (gettext "%s: %s €/night") .OptionName .PricePerNight }}</dd>
{{- end }}