Added note about dogs to the campsite type page
The pets icon is just the same as the notpet but without the diagonal bar. The price is hardcoded in the query for now, as there is no field in the campsite type.
This commit is contained in:
parent
0beb0bb315
commit
0ed6c1b121
|
@ -64,8 +64,10 @@ type publicPage struct {
|
||||||
*template.PublicPage
|
*template.PublicPage
|
||||||
Slug string
|
Slug string
|
||||||
Name string
|
Name string
|
||||||
|
DogsAllowed bool
|
||||||
Carousel []*carousel.Slide
|
Carousel []*carousel.Slide
|
||||||
Prices []*typePrice
|
Prices []*typePrice
|
||||||
|
DogsPrice string
|
||||||
TouristTax string
|
TouristTax string
|
||||||
Features []*typeFeature
|
Features []*typeFeature
|
||||||
Calendar *season.Calendar
|
Calendar *season.Calendar
|
||||||
|
@ -123,12 +125,14 @@ func newPublicPage(ctx context.Context, company *auth.Company, conn *database.Co
|
||||||
, coalesce(i18n.facilities, campsite_type.facilities)::text as l10n_facilities
|
, coalesce(i18n.facilities, campsite_type.facilities)::text as l10n_facilities
|
||||||
, coalesce(i18n.description, campsite_type.description)::text as l10n_description
|
, coalesce(i18n.description, campsite_type.description)::text as l10n_description
|
||||||
, coalesce(i18n.additional_info, campsite_type.additional_info)::text as l10n_description
|
, coalesce(i18n.additional_info, campsite_type.additional_info)::text as l10n_description
|
||||||
|
, dogs_allowed
|
||||||
|
, '3.50' as dogs_prices
|
||||||
from campsite_type
|
from campsite_type
|
||||||
left join campsite_type_i18n as i18n on campsite_type.campsite_type_id = i18n.campsite_type_id and i18n.lang_tag = $1
|
left join campsite_type_i18n as i18n on campsite_type.campsite_type_id = i18n.campsite_type_id and i18n.lang_tag = $1
|
||||||
where slug = $2
|
where slug = $2
|
||||||
and active
|
and active
|
||||||
`, loc.Language, slug)
|
`, loc.Language, slug)
|
||||||
if err := row.Scan(&page.Name, &page.Spiel, &page.Info, &page.Facilities, &page.Description, &page.AdditionalInfo); err != nil {
|
if err := row.Scan(&page.Name, &page.Spiel, &page.Info, &page.Facilities, &page.Description, &page.AdditionalInfo, &page.DogsAllowed, &page.DogsPrice); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
if err := conn.QueryRow(ctx, "select to_price(tourist_tax, $1) from company where company_id = $2", company.DecimalDigits, company.ID).Scan(&page.TouristTax); err != nil {
|
if err := conn.QueryRow(ctx, "select to_price(tourist_tax, $1) from company where company_id = $2", company.DecimalDigits, company.ID).Scan(&page.TouristTax); err != nil {
|
||||||
|
|
28
po/ca.po
28
po/ca.po
|
@ -8,7 +8,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: camper\n"
|
"Project-Id-Version: camper\n"
|
||||||
"Report-Msgid-Bugs-To: jordi@tandem.blog\n"
|
"Report-Msgid-Bugs-To: jordi@tandem.blog\n"
|
||||||
"POT-Creation-Date: 2024-01-15 01:40+0100\n"
|
"POT-Creation-Date: 2024-01-15 02:00+0100\n"
|
||||||
"PO-Revision-Date: 2023-07-22 23:45+0200\n"
|
"PO-Revision-Date: 2023-07-22 23:45+0200\n"
|
||||||
"Last-Translator: jordi fita mas <jordi@tandem.blog>\n"
|
"Last-Translator: jordi fita mas <jordi@tandem.blog>\n"
|
||||||
"Language-Team: Catalan <ca@dodds.net>\n"
|
"Language-Team: Catalan <ca@dodds.net>\n"
|
||||||
|
@ -158,46 +158,54 @@ msgstr "IVA del 10 % inclòs."
|
||||||
msgid "Tourist tax: %s per person aged 16 or over."
|
msgid "Tourist tax: %s per person aged 16 or over."
|
||||||
msgstr "Impost turístic: %s per persona de 16 anys o més."
|
msgstr "Impost turístic: %s per persona de 16 anys o més."
|
||||||
|
|
||||||
#: web/templates/public/campsite/type.gohtml:107
|
#: web/templates/public/campsite/type.gohtml:102
|
||||||
|
msgid "Dogs: %s/night, tied, accompanied, and minimal barking."
|
||||||
|
msgstr "Gossos: %s/night, lligats, acompanyats i el mínim de lladrucs."
|
||||||
|
|
||||||
|
#: web/templates/public/campsite/type.gohtml:104
|
||||||
|
msgid "No dogs allowed."
|
||||||
|
msgstr "No es permeten gossos."
|
||||||
|
|
||||||
|
#: web/templates/public/campsite/type.gohtml:112
|
||||||
msgctxt "title"
|
msgctxt "title"
|
||||||
msgid "Features"
|
msgid "Features"
|
||||||
msgstr "Característiques"
|
msgstr "Característiques"
|
||||||
|
|
||||||
#: web/templates/public/campsite/type.gohtml:118
|
#: web/templates/public/campsite/type.gohtml:123
|
||||||
msgctxt "title"
|
msgctxt "title"
|
||||||
msgid "Info"
|
msgid "Info"
|
||||||
msgstr "Informació"
|
msgstr "Informació"
|
||||||
|
|
||||||
#: web/templates/public/campsite/type.gohtml:122
|
#: web/templates/public/campsite/type.gohtml:127
|
||||||
msgctxt "title"
|
msgctxt "title"
|
||||||
msgid "Facilities"
|
msgid "Facilities"
|
||||||
msgstr "Equipaments"
|
msgstr "Equipaments"
|
||||||
|
|
||||||
#: web/templates/public/campsite/type.gohtml:126
|
#: web/templates/public/campsite/type.gohtml:131
|
||||||
msgctxt "title"
|
msgctxt "title"
|
||||||
msgid "Description"
|
msgid "Description"
|
||||||
msgstr "Descripció"
|
msgstr "Descripció"
|
||||||
|
|
||||||
#: web/templates/public/campsite/type.gohtml:130
|
#: web/templates/public/campsite/type.gohtml:135
|
||||||
msgctxt "title"
|
msgctxt "title"
|
||||||
msgid "Additional Information"
|
msgid "Additional Information"
|
||||||
msgstr "Informació addicional"
|
msgstr "Informació addicional"
|
||||||
|
|
||||||
#: web/templates/public/campsite/type.gohtml:133
|
#: web/templates/public/campsite/type.gohtml:138
|
||||||
msgctxt "time"
|
msgctxt "time"
|
||||||
msgid "Check in"
|
msgid "Check in"
|
||||||
msgstr "Entrada"
|
msgstr "Entrada"
|
||||||
|
|
||||||
#: web/templates/public/campsite/type.gohtml:134
|
#: web/templates/public/campsite/type.gohtml:139
|
||||||
msgid "4 p.m. to 9 p.m."
|
msgid "4 p.m. to 9 p.m."
|
||||||
msgstr "16 h a 21 h"
|
msgstr "16 h a 21 h"
|
||||||
|
|
||||||
#: web/templates/public/campsite/type.gohtml:137
|
#: web/templates/public/campsite/type.gohtml:142
|
||||||
msgctxt "time"
|
msgctxt "time"
|
||||||
msgid "Check out"
|
msgid "Check out"
|
||||||
msgstr "Sortida"
|
msgstr "Sortida"
|
||||||
|
|
||||||
#: web/templates/public/campsite/type.gohtml:138
|
#: web/templates/public/campsite/type.gohtml:143
|
||||||
msgid "10 a.m."
|
msgid "10 a.m."
|
||||||
msgstr "10 h"
|
msgstr "10 h"
|
||||||
|
|
||||||
|
|
28
po/es.po
28
po/es.po
|
@ -8,7 +8,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: camper\n"
|
"Project-Id-Version: camper\n"
|
||||||
"Report-Msgid-Bugs-To: jordi@tandem.blog\n"
|
"Report-Msgid-Bugs-To: jordi@tandem.blog\n"
|
||||||
"POT-Creation-Date: 2024-01-15 01:40+0100\n"
|
"POT-Creation-Date: 2024-01-15 02:00+0100\n"
|
||||||
"PO-Revision-Date: 2023-07-22 23:46+0200\n"
|
"PO-Revision-Date: 2023-07-22 23:46+0200\n"
|
||||||
"Last-Translator: jordi fita mas <jordi@tandem.blog>\n"
|
"Last-Translator: jordi fita mas <jordi@tandem.blog>\n"
|
||||||
"Language-Team: Spanish <es@tp.org.es>\n"
|
"Language-Team: Spanish <es@tp.org.es>\n"
|
||||||
|
@ -158,46 +158,54 @@ msgstr "IVA del 10 % incluido."
|
||||||
msgid "Tourist tax: %s per person aged 16 or over."
|
msgid "Tourist tax: %s per person aged 16 or over."
|
||||||
msgstr "Impuesto turístico: %s por persona de 16 años en adelante."
|
msgstr "Impuesto turístico: %s por persona de 16 años en adelante."
|
||||||
|
|
||||||
#: web/templates/public/campsite/type.gohtml:107
|
#: web/templates/public/campsite/type.gohtml:102
|
||||||
|
msgid "Dogs: %s/night, tied, accompanied, and minimal barking."
|
||||||
|
msgstr "Perros: %s/noche, atados, acompañados y con mínimo de ladrido."
|
||||||
|
|
||||||
|
#: web/templates/public/campsite/type.gohtml:104
|
||||||
|
msgid "No dogs allowed."
|
||||||
|
msgstr "No se permiten perros"
|
||||||
|
|
||||||
|
#: web/templates/public/campsite/type.gohtml:112
|
||||||
msgctxt "title"
|
msgctxt "title"
|
||||||
msgid "Features"
|
msgid "Features"
|
||||||
msgstr "Características"
|
msgstr "Características"
|
||||||
|
|
||||||
#: web/templates/public/campsite/type.gohtml:118
|
#: web/templates/public/campsite/type.gohtml:123
|
||||||
msgctxt "title"
|
msgctxt "title"
|
||||||
msgid "Info"
|
msgid "Info"
|
||||||
msgstr "Información"
|
msgstr "Información"
|
||||||
|
|
||||||
#: web/templates/public/campsite/type.gohtml:122
|
#: web/templates/public/campsite/type.gohtml:127
|
||||||
msgctxt "title"
|
msgctxt "title"
|
||||||
msgid "Facilities"
|
msgid "Facilities"
|
||||||
msgstr "Equipamiento"
|
msgstr "Equipamiento"
|
||||||
|
|
||||||
#: web/templates/public/campsite/type.gohtml:126
|
#: web/templates/public/campsite/type.gohtml:131
|
||||||
msgctxt "title"
|
msgctxt "title"
|
||||||
msgid "Description"
|
msgid "Description"
|
||||||
msgstr "Descripción"
|
msgstr "Descripción"
|
||||||
|
|
||||||
#: web/templates/public/campsite/type.gohtml:130
|
#: web/templates/public/campsite/type.gohtml:135
|
||||||
msgctxt "title"
|
msgctxt "title"
|
||||||
msgid "Additional Information"
|
msgid "Additional Information"
|
||||||
msgstr "Información adicional"
|
msgstr "Información adicional"
|
||||||
|
|
||||||
#: web/templates/public/campsite/type.gohtml:133
|
#: web/templates/public/campsite/type.gohtml:138
|
||||||
msgctxt "time"
|
msgctxt "time"
|
||||||
msgid "Check in"
|
msgid "Check in"
|
||||||
msgstr "Entrada"
|
msgstr "Entrada"
|
||||||
|
|
||||||
#: web/templates/public/campsite/type.gohtml:134
|
#: web/templates/public/campsite/type.gohtml:139
|
||||||
msgid "4 p.m. to 9 p.m."
|
msgid "4 p.m. to 9 p.m."
|
||||||
msgstr "16 h a 21 h"
|
msgstr "16 h a 21 h"
|
||||||
|
|
||||||
#: web/templates/public/campsite/type.gohtml:137
|
#: web/templates/public/campsite/type.gohtml:142
|
||||||
msgctxt "time"
|
msgctxt "time"
|
||||||
msgid "Check out"
|
msgid "Check out"
|
||||||
msgstr "Salida"
|
msgstr "Salida"
|
||||||
|
|
||||||
#: web/templates/public/campsite/type.gohtml:138
|
#: web/templates/public/campsite/type.gohtml:143
|
||||||
msgid "10 a.m."
|
msgid "10 a.m."
|
||||||
msgstr "10 h"
|
msgstr "10 h"
|
||||||
|
|
||||||
|
|
28
po/fr.po
28
po/fr.po
|
@ -8,7 +8,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: camper\n"
|
"Project-Id-Version: camper\n"
|
||||||
"Report-Msgid-Bugs-To: jordi@tandem.blog\n"
|
"Report-Msgid-Bugs-To: jordi@tandem.blog\n"
|
||||||
"POT-Creation-Date: 2024-01-15 01:40+0100\n"
|
"POT-Creation-Date: 2024-01-15 02:00+0100\n"
|
||||||
"PO-Revision-Date: 2023-12-20 10:13+0100\n"
|
"PO-Revision-Date: 2023-12-20 10:13+0100\n"
|
||||||
"Last-Translator: Oriol Carbonell <info@oriolcarbonell.cat>\n"
|
"Last-Translator: Oriol Carbonell <info@oriolcarbonell.cat>\n"
|
||||||
"Language-Team: French <traduc@traduc.org>\n"
|
"Language-Team: French <traduc@traduc.org>\n"
|
||||||
|
@ -159,46 +159,54 @@ msgstr "10 % TVA incluse."
|
||||||
msgid "Tourist tax: %s per person aged 16 or over."
|
msgid "Tourist tax: %s per person aged 16 or over."
|
||||||
msgstr "Taxe touristique: %s par personne de 16 ans ou plus."
|
msgstr "Taxe touristique: %s par personne de 16 ans ou plus."
|
||||||
|
|
||||||
#: web/templates/public/campsite/type.gohtml:107
|
#: web/templates/public/campsite/type.gohtml:102
|
||||||
|
msgid "Dogs: %s/night, tied, accompanied, and minimal barking."
|
||||||
|
msgstr "Chiens : %s/nuit, attachés, accompagnés et aboiements minimes."
|
||||||
|
|
||||||
|
#: web/templates/public/campsite/type.gohtml:104
|
||||||
|
msgid "No dogs allowed."
|
||||||
|
msgstr "Chiens interdits."
|
||||||
|
|
||||||
|
#: web/templates/public/campsite/type.gohtml:112
|
||||||
msgctxt "title"
|
msgctxt "title"
|
||||||
msgid "Features"
|
msgid "Features"
|
||||||
msgstr "Caractéristiques"
|
msgstr "Caractéristiques"
|
||||||
|
|
||||||
#: web/templates/public/campsite/type.gohtml:118
|
#: web/templates/public/campsite/type.gohtml:123
|
||||||
msgctxt "title"
|
msgctxt "title"
|
||||||
msgid "Info"
|
msgid "Info"
|
||||||
msgstr "Info"
|
msgstr "Info"
|
||||||
|
|
||||||
#: web/templates/public/campsite/type.gohtml:122
|
#: web/templates/public/campsite/type.gohtml:127
|
||||||
msgctxt "title"
|
msgctxt "title"
|
||||||
msgid "Facilities"
|
msgid "Facilities"
|
||||||
msgstr "Installations"
|
msgstr "Installations"
|
||||||
|
|
||||||
#: web/templates/public/campsite/type.gohtml:126
|
#: web/templates/public/campsite/type.gohtml:131
|
||||||
msgctxt "title"
|
msgctxt "title"
|
||||||
msgid "Description"
|
msgid "Description"
|
||||||
msgstr "Description"
|
msgstr "Description"
|
||||||
|
|
||||||
#: web/templates/public/campsite/type.gohtml:130
|
#: web/templates/public/campsite/type.gohtml:135
|
||||||
msgctxt "title"
|
msgctxt "title"
|
||||||
msgid "Additional Information"
|
msgid "Additional Information"
|
||||||
msgstr "Informations Complémentaires"
|
msgstr "Informations Complémentaires"
|
||||||
|
|
||||||
#: web/templates/public/campsite/type.gohtml:133
|
#: web/templates/public/campsite/type.gohtml:138
|
||||||
msgctxt "time"
|
msgctxt "time"
|
||||||
msgid "Check in"
|
msgid "Check in"
|
||||||
msgstr "Arrivée"
|
msgstr "Arrivée"
|
||||||
|
|
||||||
#: web/templates/public/campsite/type.gohtml:134
|
#: web/templates/public/campsite/type.gohtml:139
|
||||||
msgid "4 p.m. to 9 p.m."
|
msgid "4 p.m. to 9 p.m."
|
||||||
msgstr "16 h à 21 h"
|
msgstr "16 h à 21 h"
|
||||||
|
|
||||||
#: web/templates/public/campsite/type.gohtml:137
|
#: web/templates/public/campsite/type.gohtml:142
|
||||||
msgctxt "time"
|
msgctxt "time"
|
||||||
msgid "Check out"
|
msgid "Check out"
|
||||||
msgstr "Départ"
|
msgstr "Départ"
|
||||||
|
|
||||||
#: web/templates/public/campsite/type.gohtml:138
|
#: web/templates/public/campsite/type.gohtml:143
|
||||||
msgid "10 a.m."
|
msgid "10 a.m."
|
||||||
msgstr "10 h"
|
msgstr "10 h"
|
||||||
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -916,6 +916,16 @@ dt {
|
||||||
padding: 0 0 0 calc(30px + 1.5rem);
|
padding: 0 0 0 calc(30px + 1.5rem);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.campsite_type_prices .pets_warning {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
min-height: 4.8rem;
|
||||||
|
padding-left: 5.8rem;
|
||||||
|
background-size: 4.8rem;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: left center;
|
||||||
|
}
|
||||||
|
|
||||||
.campsite_type_calendar {
|
.campsite_type_calendar {
|
||||||
padding: 2.5rem 0;
|
padding: 2.5rem 0;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
|
|
|
@ -98,6 +98,11 @@
|
||||||
</dl>
|
</dl>
|
||||||
<p>{{( gettext "10 % VAT included." )}}</p>
|
<p>{{( gettext "10 % VAT included." )}}</p>
|
||||||
<p>{{printf (gettext "Tourist tax: %s per person aged 16 or over.") (formatPrice $.TouristTax)}}</p>
|
<p>{{printf (gettext "Tourist tax: %s per person aged 16 or over.") (formatPrice $.TouristTax)}}</p>
|
||||||
|
{{ if $.DogsAllowed -}}
|
||||||
|
<p class="pets_warning icon_pet">{{printf (gettext "Dogs: %s/night, tied, accompanied, and minimal barking.") (formatPrice $.DogsPrice)}}</p>
|
||||||
|
{{- else -}}
|
||||||
|
<p class="pets_warning icon_nopet">{{( gettext "No dogs allowed." )}}</p>
|
||||||
|
{{- end }}
|
||||||
</article>
|
</article>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue