Add additional information field to campsite types

This is actually just to have a fourth column in order to “balance”
lists for types that have a long descriptions.
This commit is contained in:
jordi fita mas 2024-01-15 00:28:34 +01:00
parent 81b6edbc7b
commit dabd197f02
39 changed files with 527 additions and 188 deletions

View File

@ -114,23 +114,23 @@ values (77, 'en', 'Tent')
; ;
alter table campsite_type alter column campsite_type_id restart with 72; alter table campsite_type alter column campsite_type_id restart with 72;
select add_campsite_type(52, 62, 'Parceŀles', '<h3>Acampa enmig de la natura</h3><p>Ubicats al costat muntanya del càmping i amb vista a la natura que ens envolta.</p><p>Parcel·les amples amb serveis a prop don ets per fer allò que vols.</p>', '<h4>Proxo/terrassa (13 m²)</h4><ul><li>Moblat</li></ul><h4>Planta baixa (32 m²)</h4><ul><li>Sala menjador</li><li>Cuina equipada</li><li>Una habitació llit doble (150×200)</li><li>Bany complet</li></ul><h4>Planta altell (16 m²)</h4><ul><li>Tres llits individuals (90×200)</li></ul>', '<h4>El preu inclou</h4><ul><li>Llençols i nòrdic</li><li>Cistella de benvinguda: oli doliva, sal, sucre, cafè i te</li><li>WiFi</li><li>Plaça daparcament per un cotxe</li><li>Kit nadó (bressol, trona i banyera) <em>sota reserva</em></li></ul><p>* Tovalloles: preu extra</p>', '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p><p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p><p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>', 6, true); select add_campsite_type(52, 62, 'Parceŀles', '<h3>Acampa enmig de la natura</h3><p>Ubicats al costat muntanya del càmping i amb vista a la natura que ens envolta.</p><p>Parcel·les amples amb serveis a prop don ets per fer allò que vols.</p>', '<h4>Proxo/terrassa (13 m²)</h4><ul><li>Moblat</li></ul><h4>Planta baixa (32 m²)</h4><ul><li>Sala menjador</li><li>Cuina equipada</li><li>Una habitació llit doble (150×200)</li><li>Bany complet</li></ul><h4>Planta altell (16 m²)</h4><ul><li>Tres llits individuals (90×200)</li></ul>', '<h4>El preu inclou</h4><ul><li>Llençols i nòrdic</li><li>Cistella de benvinguda: oli doliva, sal, sucre, cafè i te</li><li>WiFi</li><li>Plaça daparcament per un cotxe</li><li>Kit nadó (bressol, trona i banyera) <em>sota reserva</em></li></ul><p>* Tovalloles: preu extra</p>', '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p><p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p><p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>', '', 6, true);
select add_campsite_type(52, 63, 'Safari Tents', '<h3>Glàmping a la teva disposició</h3><p>Un luxe de tendes per viure aventures.</p><p>Dues tendes amb terra de fusta, llits, cuina i tot de comoditats per gaudir de les teves vacances.</p>', '<h4>Proxo/terrassa (13 m²)</h4><ul><li>Moblat</li></ul><h4>Planta baixa (32 m²)</h4><ul><li>Sala menjador</li><li>Cuina equipada</li><li>Una habitació llit doble (150×200)</li><li>Bany complet</li></ul><h4>Planta altell (16 m²)</h4><ul><li>Tres llits individuals (90×200)</li></ul>', '<h4>El preu inclou</h4><ul><li>Llençols i nòrdic</li><li>Cistella de benvinguda: oli doliva, sal, sucre, cafè i te</li><li>WiFi</li><li>Plaça daparcament per un cotxe</li><li>Kit nadó (bressol, trona i banyera) <em>sota reserva</em></li></ul><p>* Tovalloles: preu extra</p>', '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p><p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p><p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>', 6, false); select add_campsite_type(52, 63, 'Safari Tents', '<h3>Glàmping a la teva disposició</h3><p>Un luxe de tendes per viure aventures.</p><p>Dues tendes amb terra de fusta, llits, cuina i tot de comoditats per gaudir de les teves vacances.</p>', '<h4>Proxo/terrassa (13 m²)</h4><ul><li>Moblat</li></ul><h4>Planta baixa (32 m²)</h4><ul><li>Sala menjador</li><li>Cuina equipada</li><li>Una habitació llit doble (150×200)</li><li>Bany complet</li></ul><h4>Planta altell (16 m²)</h4><ul><li>Tres llits individuals (90×200)</li></ul>', '<h4>El preu inclou</h4><ul><li>Llençols i nòrdic</li><li>Cistella de benvinguda: oli doliva, sal, sucre, cafè i te</li><li>WiFi</li><li>Plaça daparcament per un cotxe</li><li>Kit nadó (bressol, trona i banyera) <em>sota reserva</em></li></ul><p>* Tovalloles: preu extra</p>', '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p><p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p><p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>', '', 6, false);
select add_campsite_type(52, 64, 'Bungalous', '<h3>Allotjaments de luxe</h3><p>Ubicats al costat muntanya del càmping i amb vista a la natura que ens envolta.</p><p>Dues cabanes de fusta massissa de dues plantes i amb porxo cobert per gaudir entre arbres.</p>', '<h4>Proxo/terrassa (13 m²)</h4><ul><li>Moblat</li></ul><h4>Planta baixa (32 m²)</h4><ul><li>Sala menjador</li><li>Cuina equipada</li><li>Una habitació llit doble (150×200)</li><li>Bany complet</li></ul><h4>Planta altell (16 m²)</h4><ul><li>Tres llits individuals (90×200)</li></ul>', '<h4>El preu inclou</h4><ul><li>Llençols i nòrdic</li><li>Cistella de benvinguda: oli doliva, sal, sucre, cafè i te</li><li>WiFi</li><li>Plaça daparcament per un cotxe</li><li>Kit nadó (bressol, trona i banyera) <em>sota reserva</em></li></ul><p>* Tovalloles: preu extra</p>', '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p><p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p><p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>', 5, false); select add_campsite_type(52, 64, 'Bungalous', '<h3>Allotjaments de luxe</h3><p>Ubicats al costat muntanya del càmping i amb vista a la natura que ens envolta.</p><p>Dues cabanes de fusta massissa de dues plantes i amb porxo cobert per gaudir entre arbres.</p>', '<h4>Proxo/terrassa (13 m²)</h4><ul><li>Moblat</li></ul><h4>Planta baixa (32 m²)</h4><ul><li>Sala menjador</li><li>Cuina equipada</li><li>Una habitació llit doble (150×200)</li><li>Bany complet</li></ul><h4>Planta altell (16 m²)</h4><ul><li>Tres llits individuals (90×200)</li></ul>', '<h4>El preu inclou</h4><ul><li>Llençols i nòrdic</li><li>Cistella de benvinguda: oli doliva, sal, sucre, cafè i te</li><li>WiFi</li><li>Plaça daparcament per un cotxe</li><li>Kit nadó (bressol, trona i banyera) <em>sota reserva</em></li></ul><p>* Tovalloles: preu extra</p>', '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p><p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p><p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>', '', 5, false);
select add_campsite_type(52, 65, 'Bungalous prèmium', '<h3>Allotjaments de luxe</h3><p>Ubicats al costat muntanya del càmping i amb vista a la natura que ens envolta.</p><p>Dues cabanes de fusta massissa de dues plantes i amb porxo cobert per gaudir entre arbres.</p>', '<h4>Proxo/terrassa (13 m²)</h4><ul><li>Moblat</li></ul><h4>Planta baixa (32 m²)</h4><ul><li>Sala menjador</li><li>Cuina equipada</li><li>Una habitació llit doble (150×200)</li><li>Bany complet</li></ul><h4>Planta altell (16 m²)</h4><ul><li>Tres llits individuals (90×200)</li></ul>', '<h4>El preu inclou</h4><ul><li>Llençols i nòrdic</li><li>Cistella de benvinguda: oli doliva, sal, sucre, cafè i te</li><li>WiFi</li><li>Plaça daparcament per un cotxe</li><li>Kit nadó (bressol, trona i banyera) <em>sota reserva</em></li></ul><p>* Tovalloles: preu extra</p>', '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p><p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p><p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>', 5, false); select add_campsite_type(52, 65, 'Bungalous prèmium', '<h3>Allotjaments de luxe</h3><p>Ubicats al costat muntanya del càmping i amb vista a la natura que ens envolta.</p><p>Dues cabanes de fusta massissa de dues plantes i amb porxo cobert per gaudir entre arbres.</p>', '<h4>Proxo/terrassa (13 m²)</h4><ul><li>Moblat</li></ul><h4>Planta baixa (32 m²)</h4><ul><li>Sala menjador</li><li>Cuina equipada</li><li>Una habitació llit doble (150×200)</li><li>Bany complet</li></ul><h4>Planta altell (16 m²)</h4><ul><li>Tres llits individuals (90×200)</li></ul>', '<h4>El preu inclou</h4><ul><li>Llençols i nòrdic</li><li>Cistella de benvinguda: oli doliva, sal, sucre, cafè i te</li><li>WiFi</li><li>Plaça daparcament per un cotxe</li><li>Kit nadó (bressol, trona i banyera) <em>sota reserva</em></li></ul><p>* Tovalloles: preu extra</p>', '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p><p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p><p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>', '', 5, false);
select add_campsite_type(52, 66, 'Cabanes de fusta', '<h3>Allotjaments de luxe</h3><p>Ubicats al costat muntanya del càmping i amb vista a la natura que ens envolta.</p><p>Dues cabanes de fusta massissa de dues plantes i amb porxo cobert per gaudir entre arbres.</p>', '<h4>Proxo/terrassa (13 m²)</h4><ul><li>Moblat</li></ul><h4>Planta baixa (32 m²)</h4><ul><li>Sala menjador</li><li>Cuina equipada</li><li>Una habitació llit doble (150×200)</li><li>Bany complet</li></ul><h4>Planta altell (16 m²)</h4><ul><li>Tres llits individuals (90×200)</li></ul>', '<h4>El preu inclou</h4><ul><li>Llençols i nòrdic</li><li>Cistella de benvinguda: oli doliva, sal, sucre, cafè i te</li><li>WiFi</li><li>Plaça daparcament per un cotxe</li><li>Kit nadó (bressol, trona i banyera) <em>sota reserva</em></li></ul><p>* Tovalloles: preu extra</p>', '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p><p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p><p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>', 5, false); select add_campsite_type(52, 66, 'Cabanes de fusta', '<h3>Allotjaments de luxe</h3><p>Ubicats al costat muntanya del càmping i amb vista a la natura que ens envolta.</p><p>Dues cabanes de fusta massissa de dues plantes i amb porxo cobert per gaudir entre arbres.</p>', '<h4>Proxo/terrassa (13 m²)</h4><ul><li>Moblat</li></ul><h4>Planta baixa (32 m²)</h4><ul><li>Sala menjador</li><li>Cuina equipada</li><li>Una habitació llit doble (150×200)</li><li>Bany complet</li></ul><h4>Planta altell (16 m²)</h4><ul><li>Tres llits individuals (90×200)</li></ul>', '<h4>El preu inclou</h4><ul><li>Llençols i nòrdic</li><li>Cistella de benvinguda: oli doliva, sal, sucre, cafè i te</li><li>WiFi</li><li>Plaça daparcament per un cotxe</li><li>Kit nadó (bressol, trona i banyera) <em>sota reserva</em></li></ul><p>* Tovalloles: preu extra</p>', '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p><p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p><p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>', '', 5, false);
insert into campsite_type_i18n (campsite_type_id, lang_tag, name, spiel, info, facilities, description) insert into campsite_type_i18n (campsite_type_id, lang_tag, name, spiel, info, facilities, description, additional_info)
values (72, 'en', 'Plots', '<h3>Camp in the middle of nature</h3><p>Located on the campgrounds mountain-side and overlooking the nature that surrounds us.</p><p>Large plots with serivces close to where you are to do what you want.</p>', '<h4>Porch/terrace (13 m²)</h4><ul><li>Furnished</li></ul><h4>First floor (32 m²)</h4><ul><li>Dining room</li><li>Equipped kitchen</li><li>One room with a double bed (150×200)</li><li>Full bathroom</li></ul><h4>Loft floor (16 m²)</h4><ul><li>Three individual beds (90×200)</li></ul>', '<h4>Price includes</h4><ul><li>Sheets and duvet</li><li>Welcome basket: olive oil, salt, sugar, coffee, and tea</li><li>WiFi</li><li>Parking space for one car</li><li>Baby Kit (bassinet, high chair, and bathtub) <em>reservation required</em></li></ul><p>* Towels: extra cost</p>', '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p><p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p><p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>') values (72, 'en', 'Plots', '<h3>Camp in the middle of nature</h3><p>Located on the campgrounds mountain-side and overlooking the nature that surrounds us.</p><p>Large plots with serivces close to where you are to do what you want.</p>', '<h4>Porch/terrace (13 m²)</h4><ul><li>Furnished</li></ul><h4>First floor (32 m²)</h4><ul><li>Dining room</li><li>Equipped kitchen</li><li>One room with a double bed (150×200)</li><li>Full bathroom</li></ul><h4>Loft floor (16 m²)</h4><ul><li>Three individual beds (90×200)</li></ul>', '<h4>Price includes</h4><ul><li>Sheets and duvet</li><li>Welcome basket: olive oil, salt, sugar, coffee, and tea</li><li>WiFi</li><li>Parking space for one car</li><li>Baby Kit (bassinet, high chair, and bathtub) <em>reservation required</em></li></ul><p>* Towels: extra cost</p>', '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p><p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p><p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>', '')
, (72, 'es', 'Parcelas', '<h3>Acampa enmedio de la naturaleza</h3><p>Ubicadas al lado montaña del camping y con vista a la naturaleza que nos rodea.</p><p>Parcelas amplias con servicios cerca de donde eres para hacer aquello que quieres.</p>', '<h4>Proche/terraza (13 m²)</h4><ul><li>Moblado</li></ul><h4>Planta baja (32 m²)</h4><ul><li>Sala comedor</li><li>Cocina equipada</li><li>Una habitación cama doble (150×200)</li><li>Baño completo</li></ul><h4>Planta altillo (16 m²)</h4><ul><li>Tres camas individuales (90×200)</li></ul>', '<h4>El precio incluye</h4><ul><li>Sábanas y nórdico</li><li>Cesto de bienvenida: aceite de oliva, sal, azúcar, café y té</li><li>WiFi</li><li>Plaza de aparcamiento para un coche</li><li>Kit bebé (cuna, trona y bañera) <em>bajo reserva</em></li></ul><p>* Toallas: precio extra</p>', '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p><p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p><p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>') , (72, 'es', 'Parcelas', '<h3>Acampa enmedio de la naturaleza</h3><p>Ubicadas al lado montaña del camping y con vista a la naturaleza que nos rodea.</p><p>Parcelas amplias con servicios cerca de donde eres para hacer aquello que quieres.</p>', '<h4>Proche/terraza (13 m²)</h4><ul><li>Moblado</li></ul><h4>Planta baja (32 m²)</h4><ul><li>Sala comedor</li><li>Cocina equipada</li><li>Una habitación cama doble (150×200)</li><li>Baño completo</li></ul><h4>Planta altillo (16 m²)</h4><ul><li>Tres camas individuales (90×200)</li></ul>', '<h4>El precio incluye</h4><ul><li>Sábanas y nórdico</li><li>Cesto de bienvenida: aceite de oliva, sal, azúcar, café y té</li><li>WiFi</li><li>Plaza de aparcamiento para un coche</li><li>Kit bebé (cuna, trona y bañera) <em>bajo reserva</em></li></ul><p>* Toallas: precio extra</p>', '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p><p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p><p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>', '')
, (73, 'en', 'Safari Tents', '<h3>Glamping at your disposal</h3><p>A luxury of tent for unforgettable adventures.</p><p>Two tents with wooden floors, beds, kitchen, and all the amenities to enjoy your vacation.</p>', '<h4>Porch/terrace (13 m²)</h4><ul><li>Furnished</li></ul><h4>First floor (32 m²)</h4><ul><li>Dining room</li><li>Equipped kitchen</li><li>One room with a double bed (150×200)</li><li>Full bathroom</li></ul><h4>Loft floor (16 m²)</h4><ul><li>Three individual beds (90×200)</li></ul>', '<h4>Price includes</h4><ul><li>Sheets and duvet</li><li>Welcome basket: olive oil, salt, sugar, coffee, and tea</li><li>WiFi</li><li>Parking space for one car</li><li>Baby Kit (bassinet, high chair, and bathtub) <em>reservation required</em></li></ul><p>* Towels: extra cost</p>', '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p><p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p><p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>') , (73, 'en', 'Safari Tents', '<h3>Glamping at your disposal</h3><p>A luxury of tent for unforgettable adventures.</p><p>Two tents with wooden floors, beds, kitchen, and all the amenities to enjoy your vacation.</p>', '<h4>Porch/terrace (13 m²)</h4><ul><li>Furnished</li></ul><h4>First floor (32 m²)</h4><ul><li>Dining room</li><li>Equipped kitchen</li><li>One room with a double bed (150×200)</li><li>Full bathroom</li></ul><h4>Loft floor (16 m²)</h4><ul><li>Three individual beds (90×200)</li></ul>', '<h4>Price includes</h4><ul><li>Sheets and duvet</li><li>Welcome basket: olive oil, salt, sugar, coffee, and tea</li><li>WiFi</li><li>Parking space for one car</li><li>Baby Kit (bassinet, high chair, and bathtub) <em>reservation required</em></li></ul><p>* Towels: extra cost</p>', '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p><p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p><p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>', '')
, (73, 'es', 'Tiendas Safari', '<h3>Glamping a tu disposición</h3><p>Un lujo de tiendas para vivir aventuras.</p><p>Dos tiendas con suelo de madera, camas, cocina y todo de comodidades para disfrutar de tus vacanciones.</p>', '<h4>Proche/terraza (13 m²)</h4><ul><li>Moblado</li></ul><h4>Planta baja (32 m²)</h4><ul><li>Sala comedor</li><li>Cocina equipada</li><li>Una habitación cama doble (150×200)</li><li>Baño completo</li></ul><h4>Planta altillo (16 m²)</h4><ul><li>Tres camas individuales (90×200)</li></ul>', '<h4>El precio incluye</h4><ul><li>Sábanas y nórdico</li><li>Cesto de bienvenida: aceite de oliva, sal, azúcar, café y té</li><li>WiFi</li><li>Plaza de aparcamiento para un coche</li><li>Kit bebé (cuna, trona y bañera) <em>bajo reserva</em></li></ul><p>* Toallas: precio extra</p>', '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p><p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p><p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>') , (73, 'es', 'Tiendas Safari', '<h3>Glamping a tu disposición</h3><p>Un lujo de tiendas para vivir aventuras.</p><p>Dos tiendas con suelo de madera, camas, cocina y todo de comodidades para disfrutar de tus vacanciones.</p>', '<h4>Proche/terraza (13 m²)</h4><ul><li>Moblado</li></ul><h4>Planta baja (32 m²)</h4><ul><li>Sala comedor</li><li>Cocina equipada</li><li>Una habitación cama doble (150×200)</li><li>Baño completo</li></ul><h4>Planta altillo (16 m²)</h4><ul><li>Tres camas individuales (90×200)</li></ul>', '<h4>El precio incluye</h4><ul><li>Sábanas y nórdico</li><li>Cesto de bienvenida: aceite de oliva, sal, azúcar, café y té</li><li>WiFi</li><li>Plaza de aparcamiento para un coche</li><li>Kit bebé (cuna, trona y bañera) <em>bajo reserva</em></li></ul><p>* Toallas: precio extra</p>', '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p><p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p><p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>', '')
, (74, 'en', 'Bungalows', '<h3>Luxury accomomdations</h3><p>Located on the campgrounds mountain-side and overlooking the nature that surrounds us.</p><p>Two two-story solid wood cabins with a covered porch to enjoy among the trees.</p>', '<h4>Porch/terrace (13 m²)</h4><ul><li>Furnished</li></ul><h4>First floor (32 m²)</h4><ul><li>Dining room</li><li>Equipped kitchen</li><li>One room with a double bed (150×200)</li><li>Full bathroom</li></ul><h4>Loft floor (16 m²)</h4><ul><li>Three individual beds (90×200)</li></ul>', '<h4>Price includes</h4><ul><li>Sheets and duvet</li><li>Welcome basket: olive oil, salt, sugar, coffee, and tea</li><li>WiFi</li><li>Parking space for one car</li><li>Baby Kit (bassinet, high chair, and bathtub) <em>reservation required</em></li></ul><p>* Towels: extra cost</p>', '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p><p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p><p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>') , (74, 'en', 'Bungalows', '<h3>Luxury accomomdations</h3><p>Located on the campgrounds mountain-side and overlooking the nature that surrounds us.</p><p>Two two-story solid wood cabins with a covered porch to enjoy among the trees.</p>', '<h4>Porch/terrace (13 m²)</h4><ul><li>Furnished</li></ul><h4>First floor (32 m²)</h4><ul><li>Dining room</li><li>Equipped kitchen</li><li>One room with a double bed (150×200)</li><li>Full bathroom</li></ul><h4>Loft floor (16 m²)</h4><ul><li>Three individual beds (90×200)</li></ul>', '<h4>Price includes</h4><ul><li>Sheets and duvet</li><li>Welcome basket: olive oil, salt, sugar, coffee, and tea</li><li>WiFi</li><li>Parking space for one car</li><li>Baby Kit (bassinet, high chair, and bathtub) <em>reservation required</em></li></ul><p>* Towels: extra cost</p>', '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p><p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p><p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>', '')
, (74, 'es', 'Bungalós', '<h3>Alojamientos de lujo</h3><p>Ubicadas al lado montaña del camping y con vista a la naturaleza que nos rodea.</p><p>Dos cabañas de madera maciza de dos plantas y con porche cubierto para disfutrar entre árboles.</p>', '<h4>Proche/terraza (13 m²)</h4><ul><li>Moblado</li></ul><h4>Planta baja (32 m²)</h4><ul><li>Sala comedor</li><li>Cocina equipada</li><li>Una habitación cama doble (150×200)</li><li>Baño completo</li></ul><h4>Planta altillo (16 m²)</h4><ul><li>Tres camas individuales (90×200)</li></ul>', '<h4>El precio incluye</h4><ul><li>Sábanas y nórdico</li><li>Cesto de bienvenida: aceite de oliva, sal, azúcar, café y té</li><li>WiFi</li><li>Plaza de aparcamiento para un coche</li><li>Kit bebé (cuna, trona y bañera) <em>bajo reserva</em></li></ul><p>* Toallas: precio extra</p>', '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p><p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p><p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>') , (74, 'es', 'Bungalós', '<h3>Alojamientos de lujo</h3><p>Ubicadas al lado montaña del camping y con vista a la naturaleza que nos rodea.</p><p>Dos cabañas de madera maciza de dos plantas y con porche cubierto para disfutrar entre árboles.</p>', '<h4>Proche/terraza (13 m²)</h4><ul><li>Moblado</li></ul><h4>Planta baja (32 m²)</h4><ul><li>Sala comedor</li><li>Cocina equipada</li><li>Una habitación cama doble (150×200)</li><li>Baño completo</li></ul><h4>Planta altillo (16 m²)</h4><ul><li>Tres camas individuales (90×200)</li></ul>', '<h4>El precio incluye</h4><ul><li>Sábanas y nórdico</li><li>Cesto de bienvenida: aceite de oliva, sal, azúcar, café y té</li><li>WiFi</li><li>Plaza de aparcamiento para un coche</li><li>Kit bebé (cuna, trona y bañera) <em>bajo reserva</em></li></ul><p>* Toallas: precio extra</p>', '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p><p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p><p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>', '')
, (75, 'en', 'Bungalows premium', '<h3>Luxury accomomdations</h3><p>Located on the campgrounds mountain-side and overlooking the nature that surrounds us.</p><p>Two two-story solid wood cabins with a covered porch to enjoy among the trees.</p>', '<h4>Porch/terrace (13 m²)</h4><ul><li>Furnished</li></ul><h4>First floor (32 m²)</h4><ul><li>Dining room</li><li>Equipped kitchen</li><li>One room with a double bed (150×200)</li><li>Full bathroom</li></ul><h4>Loft floor (16 m²)</h4><ul><li>Three individual beds (90×200)</li></ul>', '<h4>Price includes</h4><ul><li>Sheets and duvet</li><li>Welcome basket: olive oil, salt, sugar, coffee, and tea</li><li>WiFi</li><li>Parking space for one car</li><li>Baby Kit (bassinet, high chair, and bathtub) <em>reservation required</em></li></ul><p>* Towels: extra cost</p>', '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p><p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p><p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>') , (75, 'en', 'Bungalows premium', '<h3>Luxury accomomdations</h3><p>Located on the campgrounds mountain-side and overlooking the nature that surrounds us.</p><p>Two two-story solid wood cabins with a covered porch to enjoy among the trees.</p>', '<h4>Porch/terrace (13 m²)</h4><ul><li>Furnished</li></ul><h4>First floor (32 m²)</h4><ul><li>Dining room</li><li>Equipped kitchen</li><li>One room with a double bed (150×200)</li><li>Full bathroom</li></ul><h4>Loft floor (16 m²)</h4><ul><li>Three individual beds (90×200)</li></ul>', '<h4>Price includes</h4><ul><li>Sheets and duvet</li><li>Welcome basket: olive oil, salt, sugar, coffee, and tea</li><li>WiFi</li><li>Parking space for one car</li><li>Baby Kit (bassinet, high chair, and bathtub) <em>reservation required</em></li></ul><p>* Towels: extra cost</p>', '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p><p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p><p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>', '')
, (75, 'es', 'Bungalós prémium', '<h3>Alojamientos de lujo</h3><p>Ubicadas al lado montaña del camping y con vista a la naturaleza que nos rodea.</p><p>Dos cabañas de madera maciza de dos plantas y con porche cubierto para disfutrar entre árboles.</p>', '<h4>Proche/terraza (13 m²)</h4><ul><li>Moblado</li></ul><h4>Planta baja (32 m²)</h4><ul><li>Sala comedor</li><li>Cocina equipada</li><li>Una habitación cama doble (150×200)</li><li>Baño completo</li></ul><h4>Planta altillo (16 m²)</h4><ul><li>Tres camas individuales (90×200)</li></ul>', '<h4>El precio incluye</h4><ul><li>Sábanas y nórdico</li><li>Cesto de bienvenida: aceite de oliva, sal, azúcar, café y té</li><li>WiFi</li><li>Plaza de aparcamiento para un coche</li><li>Kit bebé (cuna, trona y bañera) <em>bajo reserva</em></li></ul><p>* Toallas: precio extra</p>', '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p><p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p><p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>') , (75, 'es', 'Bungalós prémium', '<h3>Alojamientos de lujo</h3><p>Ubicadas al lado montaña del camping y con vista a la naturaleza que nos rodea.</p><p>Dos cabañas de madera maciza de dos plantas y con porche cubierto para disfutrar entre árboles.</p>', '<h4>Proche/terraza (13 m²)</h4><ul><li>Moblado</li></ul><h4>Planta baja (32 m²)</h4><ul><li>Sala comedor</li><li>Cocina equipada</li><li>Una habitación cama doble (150×200)</li><li>Baño completo</li></ul><h4>Planta altillo (16 m²)</h4><ul><li>Tres camas individuales (90×200)</li></ul>', '<h4>El precio incluye</h4><ul><li>Sábanas y nórdico</li><li>Cesto de bienvenida: aceite de oliva, sal, azúcar, café y té</li><li>WiFi</li><li>Plaza de aparcamiento para un coche</li><li>Kit bebé (cuna, trona y bañera) <em>bajo reserva</em></li></ul><p>* Toallas: precio extra</p>', '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p><p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p><p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>', '')
, (76, 'en', 'Wooden Lodges', '<h3>Luxury accomomdations</h3><p>Located on the campgrounds mountain-side and overlooking the nature that surrounds us.</p><p>Two two-story solid wood cabins with a covered porch to enjoy among the trees.</p>', '<h4>Porch/terrace (13 m²)</h4><ul><li>Furnished</li></ul><h4>First floor (32 m²)</h4><ul><li>Dining room</li><li>Equipped kitchen</li><li>One room with a double bed (150×200)</li><li>Full bathroom</li></ul><h4>Loft floor (16 m²)</h4><ul><li>Three individual beds (90×200)</li></ul>', '<h4>Price includes</h4><ul><li>Sheets and duvet</li><li>Welcome basket: olive oil, salt, sugar, coffee, and tea</li><li>WiFi</li><li>Parking space for one car</li><li>Baby Kit (bassinet, high chair, and bathtub) <em>reservation required</em></li></ul><p>* Towels: extra cost</p>', '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p><p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p><p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>') , (76, 'en', 'Wooden Lodges', '<h3>Luxury accomomdations</h3><p>Located on the campgrounds mountain-side and overlooking the nature that surrounds us.</p><p>Two two-story solid wood cabins with a covered porch to enjoy among the trees.</p>', '<h4>Porch/terrace (13 m²)</h4><ul><li>Furnished</li></ul><h4>First floor (32 m²)</h4><ul><li>Dining room</li><li>Equipped kitchen</li><li>One room with a double bed (150×200)</li><li>Full bathroom</li></ul><h4>Loft floor (16 m²)</h4><ul><li>Three individual beds (90×200)</li></ul>', '<h4>Price includes</h4><ul><li>Sheets and duvet</li><li>Welcome basket: olive oil, salt, sugar, coffee, and tea</li><li>WiFi</li><li>Parking space for one car</li><li>Baby Kit (bassinet, high chair, and bathtub) <em>reservation required</em></li></ul><p>* Towels: extra cost</p>', '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p><p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p><p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>', '')
, (76, 'es', 'Cabañas de madera', '<h3>Alojamientos de lujo</h3><p>Ubicadas al lado montaña del camping y con vista a la naturaleza que nos rodea.</p><p>Dos cabañas de madera maciza de dos plantas y con porche cubierto para disfutrar entre árboles.</p>', '<h4>Proche/terraza (13 m²)</h4><ul><li>Moblado</li></ul><h4>Planta baja (32 m²)</h4><ul><li>Sala comedor</li><li>Cocina equipada</li><li>Una habitación cama doble (150×200)</li><li>Baño completo</li></ul><h4>Planta altillo (16 m²)</h4><ul><li>Tres camas individuales (90×200)</li></ul>', '<h4>El precio incluye</h4><ul><li>Sábanas y nórdico</li><li>Cesto de bienvenida: aceite de oliva, sal, azúcar, café y té</li><li>WiFi</li><li>Plaza de aparcamiento para un coche</li><li>Kit bebé (cuna, trona y bañera) <em>bajo reserva</em></li></ul><p>* Toallas: precio extra</p>', '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p><p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p><p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>') , (76, 'es', 'Cabañas de madera', '<h3>Alojamientos de lujo</h3><p>Ubicadas al lado montaña del camping y con vista a la naturaleza que nos rodea.</p><p>Dos cabañas de madera maciza de dos plantas y con porche cubierto para disfutrar entre árboles.</p>', '<h4>Proche/terraza (13 m²)</h4><ul><li>Moblado</li></ul><h4>Planta baja (32 m²)</h4><ul><li>Sala comedor</li><li>Cocina equipada</li><li>Una habitación cama doble (150×200)</li><li>Baño completo</li></ul><h4>Planta altillo (16 m²)</h4><ul><li>Tres camas individuales (90×200)</li></ul>', '<h4>El precio incluye</h4><ul><li>Sábanas y nórdico</li><li>Cesto de bienvenida: aceite de oliva, sal, azúcar, café y té</li><li>WiFi</li><li>Plaza de aparcamiento para un coche</li><li>Kit bebé (cuna, trona y bañera) <em>bajo reserva</em></li></ul><p>* Toallas: precio extra</p>', '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p><p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p><p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>', '')
; ;
alter table campsite_type_feature alter column campsite_type_feature_id restart with 82; alter table campsite_type_feature alter column campsite_type_feature_id restart with 82;

View File

@ -8,16 +8,18 @@ begin;
set search_path to camper, public; set search_path to camper, public;
create or replace function add_campsite_type(company integer, media_id integer, name text, spiel text, info text, facilities text, description text, max_campers integer, dogs_allowed boolean) returns uuid as drop function if exists add_campsite_type(integer, integer, text, text, text, text, text, integer, boolean);
create or replace function add_campsite_type(company integer, media_id integer, name text, spiel text, info text, facilities text, description text, additional_info text, max_campers integer, dogs_allowed boolean) returns uuid as
$$ $$
insert into campsite_type (company_id, media_id, name, spiel, info, facilities, description, max_campers, dogs_allowed) insert into campsite_type (company_id, media_id, name, spiel, info, facilities, description, additional_info, max_campers, dogs_allowed)
values (company, media_id, name, xmlparse(content spiel), xmlparse(content info), xmlparse(content facilities), xmlparse(content description), max_campers, dogs_allowed) values (company, media_id, name, xmlparse(content spiel), xmlparse(content info), xmlparse(content facilities), xmlparse(content description), xmlparse(content additional_info), max_campers, dogs_allowed)
returning slug; returning slug;
$$ $$
language sql language sql
; ;
revoke execute on function add_campsite_type(integer, integer, text, text, text, text, text, integer, boolean) from public; revoke execute on function add_campsite_type(integer, integer, text, text, text, text, text, text, integer, boolean) from public;
grant execute on function add_campsite_type(integer, integer, text, text, text, text, text, integer, boolean) to admin; grant execute on function add_campsite_type(integer, integer, text, text, text, text, text, text, integer, boolean) to admin;
commit; commit;

View File

@ -0,0 +1,23 @@
-- Deploy camper:add_campsite_type to pg
-- requires: roles
-- requires: schema_camper
-- requires: campsite_type
-- requires: company
begin;
set search_path to camper, public;
create or replace function add_campsite_type(company integer, media_id integer, name text, spiel text, info text, facilities text, description text, max_campers integer, dogs_allowed boolean) returns uuid as
$$
insert into campsite_type (company_id, media_id, name, spiel, info, facilities, description, max_campers, dogs_allowed)
values (company, media_id, name, xmlparse(content spiel), xmlparse(content info), xmlparse(content facilities), xmlparse(content description), max_campers, dogs_allowed)
returning slug;
$$
language sql
;
revoke execute on function add_campsite_type(integer, integer, text, text, text, text, text, integer, boolean) from public;
grant execute on function add_campsite_type(integer, integer, text, text, text, text, text, integer, boolean) to admin;
commit;

View File

@ -0,0 +1,10 @@
-- Deploy camper:campsite_type__additional_info to pg
-- requires: campsite_type
begin;
alter table camper.campsite_type
add column additional_info xml not null default ''
;
commit;

View File

@ -0,0 +1,14 @@
-- Deploy camper:campsite_type_i18n__additional_info to pg
-- requires: campsite_type_i18n
begin;
alter table camper.campsite_type_i18n
add column additional_info xml not null default ''
;
alter table camper.campsite_type_i18n
alter column additional_info drop default
;
commit;

View File

@ -8,13 +8,16 @@ begin;
set search_path to camper, public; set search_path to camper, public;
create or replace function edit_campsite_type(slug uuid, media_id integer, name text, spiel text, info text, facilities text, description text, max_campers integer, dogs_allowed boolean, active boolean) returns uuid as drop function if exists edit_campsite_type(uuid, integer, text, text, text, text, text, integer, boolean, boolean);
create or replace function edit_campsite_type(slug uuid, media_id integer, name text, spiel text, info text, facilities text, description text, additional_info text, max_campers integer, dogs_allowed boolean, active boolean) returns uuid as
$$ $$
update campsite_type update campsite_type
set name = edit_campsite_type.name set name = edit_campsite_type.name
, spiel = xmlparse(content edit_campsite_type.spiel) , spiel = xmlparse(content edit_campsite_type.spiel)
, description = xmlparse(content edit_campsite_type.description) , description = xmlparse(content edit_campsite_type.description)
, info = xmlparse(content edit_campsite_type.info) , info = xmlparse(content edit_campsite_type.info)
, additional_info = xmlparse(content edit_campsite_type.additional_info)
, facilities = xmlparse(content edit_campsite_type.facilities) , facilities = xmlparse(content edit_campsite_type.facilities)
, media_id = coalesce(edit_campsite_type.media_id, campsite_type.media_id) , media_id = coalesce(edit_campsite_type.media_id, campsite_type.media_id)
, max_campers = edit_campsite_type.max_campers , max_campers = edit_campsite_type.max_campers
@ -26,7 +29,7 @@ $$
language sql language sql
; ;
revoke execute on function edit_campsite_type(uuid, integer, text, text, text, text, text, integer, boolean, boolean) from public; revoke execute on function edit_campsite_type(uuid, integer, text, text, text, text, text, text, integer, boolean, boolean) from public;
grant execute on function edit_campsite_type(uuid, integer, text, text, text, text, text, integer, boolean, boolean) to admin; grant execute on function edit_campsite_type(uuid, integer, text, text, text, text, text, text, integer, boolean, boolean) to admin;
commit; commit;

View File

@ -0,0 +1,32 @@
-- Deploy camper:edit_campsite_type to pg
-- requires: roles
-- requires: schema_camper
-- requires: campsite_type
-- requires: company
begin;
set search_path to camper, public;
create or replace function edit_campsite_type(slug uuid, media_id integer, name text, spiel text, info text, facilities text, description text, max_campers integer, dogs_allowed boolean, active boolean) returns uuid as
$$
update campsite_type
set name = edit_campsite_type.name
, spiel = xmlparse(content edit_campsite_type.spiel)
, description = xmlparse(content edit_campsite_type.description)
, info = xmlparse(content edit_campsite_type.info)
, facilities = xmlparse(content edit_campsite_type.facilities)
, media_id = coalesce(edit_campsite_type.media_id, campsite_type.media_id)
, max_campers = edit_campsite_type.max_campers
, dogs_allowed = edit_campsite_type.dogs_allowed
, active = edit_campsite_type.active
where slug = edit_campsite_type.slug
returning slug;
$$
language sql
;
revoke execute on function edit_campsite_type(uuid, integer, text, text, text, text, text, integer, boolean, boolean) from public;
grant execute on function edit_campsite_type(uuid, integer, text, text, text, text, text, integer, boolean, boolean) to admin;
commit;

View File

@ -7,10 +7,12 @@ begin;
set search_path to camper, public; set search_path to camper, public;
create or replace function translate_campsite_type (slug uuid, lang_tag text, name text, spiel text, info text, facilities text, description text) returns void as drop function if exists translate_campsite_type (uuid, text, text, text, text, text, text);
create or replace function translate_campsite_type (slug uuid, lang_tag text, name text, spiel text, info text, facilities text, description text, additional_info text) returns void as
$$ $$
insert into campsite_type_i18n (campsite_type_id, lang_tag, name, spiel, info, facilities, description) insert into campsite_type_i18n (campsite_type_id, lang_tag, name, spiel, info, facilities, description, additional_info)
select campsite_type_id, translate_campsite_type.lang_tag, translate_campsite_type.name, xmlparse(content coalesce(translate_campsite_type.spiel, '')), xmlparse(content coalesce(translate_campsite_type.info, '')), xmlparse(content coalesce(translate_campsite_type.facilities, '')), xmlparse(content coalesce(translate_campsite_type.description, '')) select campsite_type_id, translate_campsite_type.lang_tag, translate_campsite_type.name, xmlparse(content coalesce(translate_campsite_type.spiel, '')), xmlparse(content coalesce(translate_campsite_type.info, '')), xmlparse(content coalesce(translate_campsite_type.facilities, '')), xmlparse(content coalesce(translate_campsite_type.description, '')), xmlparse(content coalesce(translate_campsite_type.additional_info, ''))
from campsite_type from campsite_type
where slug = translate_campsite_type.slug where slug = translate_campsite_type.slug
on conflict (campsite_type_id, lang_tag) do update on conflict (campsite_type_id, lang_tag) do update
@ -19,11 +21,12 @@ $$
, info = excluded.info , info = excluded.info
, facilities = excluded.facilities , facilities = excluded.facilities
, description = excluded.description , description = excluded.description
, additional_info = excluded.additional_info
$$ $$
language sql language sql
; ;
revoke execute on function translate_campsite_type (uuid, text, text, text, text, text, text) from public; revoke execute on function translate_campsite_type (uuid, text, text, text, text, text, text, text) from public;
grant execute on function translate_campsite_type(uuid, text, text, text, text, text, text) to admin; grant execute on function translate_campsite_type(uuid, text, text, text, text, text, text, text) to admin;
commit; commit;

View File

@ -0,0 +1,29 @@
-- Deploy camper:translate_campsite_type to pg
-- requires: roles
-- requires: schema_camper
-- requires: campsite_type_i18n
begin;
set search_path to camper, public;
create or replace function translate_campsite_type (slug uuid, lang_tag text, name text, spiel text, info text, facilities text, description text) returns void as
$$
insert into campsite_type_i18n (campsite_type_id, lang_tag, name, spiel, info, facilities, description)
select campsite_type_id, translate_campsite_type.lang_tag, translate_campsite_type.name, xmlparse(content coalesce(translate_campsite_type.spiel, '')), xmlparse(content coalesce(translate_campsite_type.info, '')), xmlparse(content coalesce(translate_campsite_type.facilities, '')), xmlparse(content coalesce(translate_campsite_type.description, ''))
from campsite_type
where slug = translate_campsite_type.slug
on conflict (campsite_type_id, lang_tag) do update
set name = excluded.name
, spiel = excluded.spiel
, info = excluded.info
, facilities = excluded.facilities
, description = excluded.description
$$
language sql
;
revoke execute on function translate_campsite_type (uuid, text, text, text, text, text, text) from public;
grant execute on function translate_campsite_type(uuid, text, text, text, text, text, text) to admin;
commit;

View File

@ -167,14 +167,15 @@ func addType(w http.ResponseWriter, r *http.Request, user *auth.User, company *a
panic(err) panic(err)
} }
processTypeForm(w, r, user, company, conn, f, func(ctx context.Context, tx *database.Tx) error { processTypeForm(w, r, user, company, conn, f, func(ctx context.Context, tx *database.Tx) error {
slug, err := tx.AddCampsiteType(ctx, company.ID, f.Media.Int(), f.Name[f.DefaultLang].Val, f.Spiel[f.DefaultLang].Val, f.Info[f.DefaultLang].Val, f.Facilities[f.DefaultLang].Val, f.Description[f.DefaultLang].Val, f.MaxCampers.Int(), f.DogsAllowed.Checked) var err error
f.Slug, err = tx.AddCampsiteType(ctx, company.ID, f.Media.Int(), f.Name[f.DefaultLang].Val, f.Spiel[f.DefaultLang].Val, f.Info[f.DefaultLang].Val, f.Facilities[f.DefaultLang].Val, f.Description[f.DefaultLang].Val, f.AdditionalInfo[f.DefaultLang].Val, f.MaxCampers.Int(), f.DogsAllowed.Checked)
if err != nil { if err != nil {
return err return err
} }
if err := translateTypes(ctx, tx, company, f); err != nil { if err := translateTypes(ctx, tx, company, f); err != nil {
return err return err
} }
return setTypePrices(ctx, tx, slug, f.Prices) return setTypePrices(ctx, tx, f.Slug, f.Prices)
}) })
} }
@ -184,7 +185,7 @@ func translateTypes(ctx context.Context, tx *database.Tx, company *auth.Company,
if l == f.DefaultLang { if l == f.DefaultLang {
continue continue
} }
if err := tx.TranslateCampsiteType(ctx, f.Slug, lang, f.Name[l].Val, f.Spiel[l].Val, f.Info[l].Val, f.Facilities[l].Val, f.Description[l].Val); err != nil { if err := tx.TranslateCampsiteType(ctx, f.Slug, lang, f.Name[l].Val, f.Spiel[l].Val, f.Info[l].Val, f.Facilities[l].Val, f.Description[l].Val, f.AdditionalInfo[l].Val); err != nil {
return err return err
} }
} }
@ -202,7 +203,7 @@ func setTypePrices(ctx context.Context, tx *database.Tx, slug string, prices map
func editType(w http.ResponseWriter, r *http.Request, user *auth.User, company *auth.Company, conn *database.Conn, f *typeForm) { func editType(w http.ResponseWriter, r *http.Request, user *auth.User, company *auth.Company, conn *database.Conn, f *typeForm) {
processTypeForm(w, r, user, company, conn, f, func(ctx context.Context, tx *database.Tx) error { processTypeForm(w, r, user, company, conn, f, func(ctx context.Context, tx *database.Tx) error {
if _, err := tx.EditCampsiteType(ctx, f.Slug, f.Media.Int(), f.Name[f.DefaultLang].Val, f.Spiel[f.DefaultLang].Val, f.Info[f.DefaultLang].Val, f.Facilities[f.DefaultLang].Val, f.Description[f.DefaultLang].Val, f.MaxCampers.Int(), f.DogsAllowed.Checked, f.Active.Checked); err != nil { if _, err := tx.EditCampsiteType(ctx, f.Slug, f.Media.Int(), f.Name[f.DefaultLang].Val, f.Spiel[f.DefaultLang].Val, f.Info[f.DefaultLang].Val, f.Facilities[f.DefaultLang].Val, f.Description[f.DefaultLang].Val, f.AdditionalInfo[f.DefaultLang].Val, f.MaxCampers.Int(), f.DogsAllowed.Checked, f.Active.Checked); err != nil {
return err return err
} }
if err := translateTypes(ctx, tx, company, f); err != nil { if err := translateTypes(ctx, tx, company, f); err != nil {
@ -281,6 +282,7 @@ type typeForm struct {
Info form.I18nInput Info form.I18nInput
Facilities form.I18nInput Facilities form.I18nInput
Description form.I18nInput Description form.I18nInput
AdditionalInfo form.I18nInput
Prices map[int]*typePriceForm Prices map[int]*typePriceForm
} }
@ -315,6 +317,7 @@ func newTypeForm(ctx context.Context, company *auth.Company, conn *database.Conn
Info: form.NewI18nInput(company.Locales, "info"), Info: form.NewI18nInput(company.Locales, "info"),
Facilities: form.NewI18nInput(company.Locales, "facilities"), Facilities: form.NewI18nInput(company.Locales, "facilities"),
Description: form.NewI18nInput(company.Locales, "description"), Description: form.NewI18nInput(company.Locales, "description"),
AdditionalInfo: form.NewI18nInput(company.Locales, "additional_info"),
} }
rows, err := conn.Query(ctx, "select season_id, name from season where active and company_id = $1", company.ID) rows, err := conn.Query(ctx, "select season_id, name from season where active and company_id = $1", company.ID)
@ -353,12 +356,14 @@ func (f *typeForm) FillFromDatabase(ctx context.Context, conn *database.Conn, sl
var info database.RecordArray var info database.RecordArray
var facilities database.RecordArray var facilities database.RecordArray
var description database.RecordArray var description database.RecordArray
var additionalInfo database.RecordArray
row := conn.QueryRow(ctx, ` row := conn.QueryRow(ctx, `
select campsite_type.name select campsite_type.name
, campsite_type.spiel::text , campsite_type.spiel::text
, campsite_type.info::text , campsite_type.info::text
, campsite_type.facilities::text , campsite_type.facilities::text
, campsite_type.description::text , campsite_type.description::text
, campsite_type.additional_info::text
, media_id::text , media_id::text
, max_campers::text , max_campers::text
, dogs_allowed , dogs_allowed
@ -368,6 +373,7 @@ func (f *typeForm) FillFromDatabase(ctx context.Context, conn *database.Conn, sl
, array_agg((lang_tag, i18n.info::text)) , array_agg((lang_tag, i18n.info::text))
, array_agg((lang_tag, i18n.facilities::text)) , array_agg((lang_tag, i18n.facilities::text))
, array_agg((lang_tag, i18n.description::text)) , array_agg((lang_tag, i18n.description::text))
, array_agg((lang_tag, i18n.additional_info::text))
from campsite_type from campsite_type
left join campsite_type_i18n as i18n using (campsite_type_id) left join campsite_type_i18n as i18n using (campsite_type_id)
where slug = $1 where slug = $1
@ -376,12 +382,13 @@ func (f *typeForm) FillFromDatabase(ctx context.Context, conn *database.Conn, sl
, campsite_type.info::text , campsite_type.info::text
, campsite_type.facilities::text , campsite_type.facilities::text
, campsite_type.description::text , campsite_type.description::text
, campsite_type.additional_info::text
, media_id::text , media_id::text
, max_campers::text , max_campers::text
, dogs_allowed , dogs_allowed
, active , active
`, pgx.QueryResultFormats{pgx.BinaryFormatCode}, slug) `, pgx.QueryResultFormats{pgx.BinaryFormatCode}, slug)
if err := row.Scan(&f.Name[f.DefaultLang].Val, &f.Spiel[f.DefaultLang].Val, &f.Info[f.DefaultLang].Val, &f.Facilities[f.DefaultLang].Val, &f.Description[f.DefaultLang].Val, &f.Media.Val, &f.MaxCampers.Val, &f.DogsAllowed.Checked, &f.Active.Checked, &name, &spiel, &info, &facilities, &description); err != nil { if err := row.Scan(&f.Name[f.DefaultLang].Val, &f.Spiel[f.DefaultLang].Val, &f.Info[f.DefaultLang].Val, &f.Facilities[f.DefaultLang].Val, &f.Description[f.DefaultLang].Val, &f.AdditionalInfo[f.DefaultLang].Val, &f.Media.Val, &f.MaxCampers.Val, &f.DogsAllowed.Checked, &f.Active.Checked, &name, &spiel, &info, &facilities, &description, &additionalInfo); err != nil {
return err return err
} }
if err := f.Name.FillArray(name); err != nil { if err := f.Name.FillArray(name); err != nil {
@ -399,6 +406,9 @@ func (f *typeForm) FillFromDatabase(ctx context.Context, conn *database.Conn, sl
if err := f.Description.FillArray(description); err != nil { if err := f.Description.FillArray(description); err != nil {
return err return err
} }
if err := f.AdditionalInfo.FillArray(additionalInfo); err != nil {
return err
}
rows, err := conn.Query(ctx, ` rows, err := conn.Query(ctx, `
select season_id select season_id
@ -440,6 +450,7 @@ func (f *typeForm) Parse(r *http.Request) error {
f.Info.FillValue(r) f.Info.FillValue(r)
f.Facilities.FillValue(r) f.Facilities.FillValue(r)
f.Description.FillValue(r) f.Description.FillValue(r)
f.AdditionalInfo.FillValue(r)
f.Media.FillValue(r) f.Media.FillValue(r)
for _, p := range f.Prices { for _, p := range f.Prices {
p.PricePerNight.FillValue(r) p.PricePerNight.FillValue(r)

View File

@ -72,6 +72,7 @@ type publicPage struct {
Info gotemplate.HTML Info gotemplate.HTML
Facilities gotemplate.HTML Facilities gotemplate.HTML
Description gotemplate.HTML Description gotemplate.HTML
AdditionalInfo gotemplate.HTML
} }
type typePrice struct { type typePrice struct {
@ -120,12 +121,13 @@ func newPublicPage(ctx context.Context, company *auth.Company, conn *database.Co
, coalesce(i18n.info, campsite_type.info)::text as l10n_info , coalesce(i18n.info, campsite_type.info)::text as l10n_info
, 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
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); err != nil { if err := row.Scan(&page.Name, &page.Spiel, &page.Info, &page.Facilities, &page.Description, &page.AdditionalInfo); err != nil {
return nil, err return nil, err
} }

View File

@ -11,12 +11,12 @@ import (
"golang.org/x/text/language" "golang.org/x/text/language"
) )
func (tx *Tx) AddCampsiteType(ctx context.Context, companyID int, mediaID int, name string, spiel string, info string, facilities string, description string, maxCampers int, dogsAllowed bool) (string, error) { func (tx *Tx) AddCampsiteType(ctx context.Context, companyID int, mediaID int, name string, spiel string, info string, facilities string, description string, additionalInfo string, maxCampers int, dogsAllowed bool) (string, error) {
return tx.GetText(ctx, "select add_campsite_type($1, $2, $3, $4, $5, $6, $7, $8, $9)", companyID, mediaID, name, spiel, info, facilities, description, maxCampers, dogsAllowed) return tx.GetText(ctx, "select add_campsite_type($1, $2, $3, $4, $5, $6, $7, $8, $9, $10)", companyID, mediaID, name, spiel, info, facilities, description, additionalInfo, maxCampers, dogsAllowed)
} }
func (tx *Tx) EditCampsiteType(ctx context.Context, slug string, mediaID int, name string, spiel string, info string, facilities string, description string, maxCampers int, dogsAllowed bool, active bool) (string, error) { func (tx *Tx) EditCampsiteType(ctx context.Context, slug string, mediaID int, name string, spiel string, info string, facilities string, description string, additionalInfo string, maxCampers int, dogsAllowed bool, active bool) (string, error) {
return tx.GetText(ctx, "select edit_campsite_type($1, $2, $3, $4, $5, $6, $7, $8, $9, $10)", slug, mediaID, name, spiel, info, facilities, description, maxCampers, dogsAllowed, active) return tx.GetText(ctx, "select edit_campsite_type($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11)", slug, mediaID, name, spiel, info, facilities, description, additionalInfo, maxCampers, dogsAllowed, active)
} }
func (c *Conn) OrderCampsiteTypes(ctx context.Context, slugs []string) error { func (c *Conn) OrderCampsiteTypes(ctx context.Context, slugs []string) error {
@ -24,8 +24,8 @@ func (c *Conn) OrderCampsiteTypes(ctx context.Context, slugs []string) error {
return err return err
} }
func (tx *Tx) TranslateCampsiteType(ctx context.Context, slug string, langTag language.Tag, name string, spiel string, info string, facilities string, description string) error { func (tx *Tx) TranslateCampsiteType(ctx context.Context, slug string, langTag language.Tag, name string, spiel string, info string, facilities string, description string, additionalInfo string) error {
_, err := tx.Exec(ctx, "select translate_campsite_type($1, $2, $3, $4, $5, $6, $7)", slug, langTag, name, spiel, info, facilities, description) _, err := tx.Exec(ctx, "select translate_campsite_type($1, $2, $3, $4, $5, $6, $7, $8)", slug, langTag, name, spiel, info, facilities, description, additionalInfo)
return err return err
} }
func (tx *Tx) SetCampsiteTypeCost(ctx context.Context, slug string, seasonID int, minNights int, costPerNight string) error { func (tx *Tx) SetCampsiteTypeCost(ctx context.Context, slug string, seasonID int, minNights int, costPerNight string) error {

View File

@ -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-14 02:01+0100\n" "POT-Creation-Date: 2024-01-15 00:21+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"
@ -170,6 +170,11 @@ msgctxt "title"
msgid "Description" msgid "Description"
msgstr "Descripció" msgstr "Descripció"
#: web/templates/public/campsite/type.gohtml:128
msgctxt "title"
msgid "Additional Information"
msgstr "Informació addicional"
#: web/templates/public/campsite/calendar.gohtml:18 #: web/templates/public/campsite/calendar.gohtml:18
#: web/templates/admin/season/calendar.gohtml:16 #: web/templates/admin/season/calendar.gohtml:16
msgctxt "day" msgctxt "day"
@ -271,7 +276,7 @@ msgid "There are several points where you can go by kayak, from sections of the
msgstr "Hi ha diversos punts on poder anar amb caiac, des de trams del riu Ter com també a la costa…." msgstr "Hi ha diversos punts on poder anar amb caiac, des de trams del riu Ter com també a la costa…."
#: web/templates/public/campground.gohtml:6 #: web/templates/public/campground.gohtml:6
#: web/templates/public/campground.gohtml:11 #: web/templates/public/campground.gohtml:15
#: web/templates/public/layout.gohtml:53 web/templates/public/layout.gohtml:93 #: web/templates/public/layout.gohtml:53 web/templates/public/layout.gohtml:93
msgctxt "title" msgctxt "title"
msgid "Campground" msgid "Campground"
@ -440,7 +445,7 @@ msgstr "Contingut"
#: web/templates/admin/campsite/carousel/form.gohtml:52 #: web/templates/admin/campsite/carousel/form.gohtml:52
#: web/templates/admin/campsite/form.gohtml:70 #: web/templates/admin/campsite/form.gohtml:70
#: web/templates/admin/campsite/option/form.gohtml:83 #: web/templates/admin/campsite/option/form.gohtml:83
#: web/templates/admin/campsite/type/form.gohtml:158 #: web/templates/admin/campsite/type/form.gohtml:171
#: web/templates/admin/season/form.gohtml:69 #: web/templates/admin/season/form.gohtml:69
#: web/templates/admin/services/form.gohtml:80 #: web/templates/admin/services/form.gohtml:80
#: web/templates/admin/media/form.gohtml:35 #: web/templates/admin/media/form.gohtml:35
@ -454,7 +459,7 @@ msgstr "Actualitza"
#: web/templates/admin/campsite/carousel/form.gohtml:54 #: web/templates/admin/campsite/carousel/form.gohtml:54
#: web/templates/admin/campsite/form.gohtml:72 #: web/templates/admin/campsite/form.gohtml:72
#: web/templates/admin/campsite/option/form.gohtml:85 #: web/templates/admin/campsite/option/form.gohtml:85
#: web/templates/admin/campsite/type/form.gohtml:160 #: web/templates/admin/campsite/type/form.gohtml:173
#: web/templates/admin/season/form.gohtml:71 #: web/templates/admin/season/form.gohtml:71
#: web/templates/admin/services/form.gohtml:82 #: web/templates/admin/services/form.gohtml:82
msgctxt "action" msgctxt "action"
@ -791,6 +796,11 @@ msgctxt "input"
msgid "Description" msgid "Description"
msgstr "Descripció" msgstr "Descripció"
#: web/templates/admin/campsite/type/form.gohtml:156
msgctxt "input"
msgid "Additional Information"
msgstr "Informació addicional"
#: web/templates/admin/campsite/type/index.gohtml:6 #: web/templates/admin/campsite/type/index.gohtml:6
#: web/templates/admin/campsite/type/index.gohtml:12 #: web/templates/admin/campsite/type/index.gohtml:12
#: web/templates/admin/layout.gohtml:42 #: web/templates/admin/layout.gohtml:42
@ -1192,13 +1202,13 @@ msgid "Upload Media"
msgstr "Pujada de mèdia" msgstr "Pujada de mèdia"
#: pkg/legal/admin.go:258 pkg/app/user.go:249 pkg/campsite/types/option.go:344 #: pkg/legal/admin.go:258 pkg/app/user.go:249 pkg/campsite/types/option.go:344
#: pkg/campsite/types/feature.go:259 pkg/campsite/types/admin.go:453 #: pkg/campsite/types/feature.go:259 pkg/campsite/types/admin.go:463
#: pkg/season/admin.go:415 pkg/services/admin.go:319 #: pkg/season/admin.go:415 pkg/services/admin.go:319
msgid "Name can not be empty." msgid "Name can not be empty."
msgstr "No podeu deixar el nom en blanc." msgstr "No podeu deixar el nom en blanc."
#: pkg/legal/admin.go:259 pkg/campsite/types/option.go:345 #: pkg/legal/admin.go:259 pkg/campsite/types/option.go:345
#: pkg/campsite/types/feature.go:260 pkg/campsite/types/admin.go:454 #: pkg/campsite/types/feature.go:260 pkg/campsite/types/admin.go:464
msgid "Name must have at least one letter." msgid "Name must have at least one letter."
msgstr "El nom ha de tenir com a mínim una lletra." msgstr "El nom ha de tenir com a mínim una lletra."
@ -1283,15 +1293,15 @@ msgstr "El valor del màxim ha de ser un número enter."
msgid "Maximum must be equal or greater than minimum." msgid "Maximum must be equal or greater than minimum."
msgstr "El valor del màxim ha de ser igual o superir al del mínim." msgstr "El valor del màxim ha de ser igual o superir al del mínim."
#: pkg/campsite/types/option.go:361 pkg/campsite/types/admin.go:467 #: pkg/campsite/types/option.go:361 pkg/campsite/types/admin.go:477
msgid "Price per night can not be empty." msgid "Price per night can not be empty."
msgstr "No podeu deixar el preu per nit en blanc." msgstr "No podeu deixar el preu per nit en blanc."
#: pkg/campsite/types/option.go:362 pkg/campsite/types/admin.go:468 #: pkg/campsite/types/option.go:362 pkg/campsite/types/admin.go:478
msgid "Price per night must be a decimal number." msgid "Price per night must be a decimal number."
msgstr "El preu per nit ha de ser un número decimal." msgstr "El preu per nit ha de ser un número decimal."
#: pkg/campsite/types/option.go:363 pkg/campsite/types/admin.go:469 #: pkg/campsite/types/option.go:363 pkg/campsite/types/admin.go:479
msgid "Price per night must be zero or greater." msgid "Price per night must be zero or greater."
msgstr "El preu per nit ha de ser com a mínim zero." msgstr "El preu per nit ha de ser com a mínim zero."
@ -1299,45 +1309,45 @@ msgstr "El preu per nit ha de ser com a mínim zero."
msgid "Selected icon is not valid." msgid "Selected icon is not valid."
msgstr "La icona escollida no és vàlida." msgstr "La icona escollida no és vàlida."
#: pkg/campsite/types/admin.go:304 #: pkg/campsite/types/admin.go:305
msgctxt "input" msgctxt "input"
msgid "Cover image" msgid "Cover image"
msgstr "Imatge de portada" msgstr "Imatge de portada"
#: pkg/campsite/types/admin.go:305 #: pkg/campsite/types/admin.go:306
msgctxt "action" msgctxt "action"
msgid "Set campsite type cover" msgid "Set campsite type cover"
msgstr "Estableix la portada del tipus dallotjament" msgstr "Estableix la portada del tipus dallotjament"
#: pkg/campsite/types/admin.go:456 #: pkg/campsite/types/admin.go:466
msgid "Cover image can not be empty." msgid "Cover image can not be empty."
msgstr "No podeu deixar la imatge de portada en blanc." msgstr "No podeu deixar la imatge de portada en blanc."
#: pkg/campsite/types/admin.go:457 #: pkg/campsite/types/admin.go:467
msgid "Cover image must be an image media type." msgid "Cover image must be an image media type."
msgstr "La imatge de portada ha de ser un mèdia de tipus imatge." msgstr "La imatge de portada ha de ser un mèdia de tipus imatge."
#: pkg/campsite/types/admin.go:461 #: pkg/campsite/types/admin.go:471
msgid "Maximum number of campers can not be empty." msgid "Maximum number of campers can not be empty."
msgstr "No podeu deixar el número màxim de persones en blanc." msgstr "No podeu deixar el número màxim de persones en blanc."
#: pkg/campsite/types/admin.go:462 #: pkg/campsite/types/admin.go:472
msgid "Maximum number of campers must be an integer number." msgid "Maximum number of campers must be an integer number."
msgstr "El número màxim de persones ha de ser enter." msgstr "El número màxim de persones ha de ser enter."
#: pkg/campsite/types/admin.go:463 #: pkg/campsite/types/admin.go:473
msgid "Maximum number of campers must be one or greater." msgid "Maximum number of campers must be one or greater."
msgstr "El número màxim de persones no pot ser zero." msgstr "El número màxim de persones no pot ser zero."
#: pkg/campsite/types/admin.go:472 #: pkg/campsite/types/admin.go:482
msgid "Minimum number of nights can not be empty." msgid "Minimum number of nights can not be empty."
msgstr "No podeu deixar el número mínim de nits en blanc." msgstr "No podeu deixar el número mínim de nits en blanc."
#: pkg/campsite/types/admin.go:473 #: pkg/campsite/types/admin.go:483
msgid "Minimum number of nights must be an integer." msgid "Minimum number of nights must be an integer."
msgstr "El número mínim de nits ha de ser enter." msgstr "El número mínim de nits ha de ser enter."
#: pkg/campsite/types/admin.go:474 #: pkg/campsite/types/admin.go:484
msgid "Minimum number of nights must be one or greater." msgid "Minimum number of nights must be one or greater."
msgstr "El número mínim de nits no pot ser zero." msgstr "El número mínim de nits no pot ser zero."

View File

@ -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-14 02:01+0100\n" "POT-Creation-Date: 2024-01-15 00:21+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"
@ -163,13 +163,18 @@ msgstr "Información"
#: web/templates/public/campsite/type.gohtml:120 #: web/templates/public/campsite/type.gohtml:120
msgctxt "title" msgctxt "title"
msgid "Facilities" msgid "Facilities"
msgstr "Equipamento" msgstr "Equipamiento"
#: web/templates/public/campsite/type.gohtml:124 #: web/templates/public/campsite/type.gohtml:124
msgctxt "title" msgctxt "title"
msgid "Description" msgid "Description"
msgstr "Descripción" msgstr "Descripción"
#: web/templates/public/campsite/type.gohtml:128
msgctxt "title"
msgid "Additional Information"
msgstr "Información adicional"
#: web/templates/public/campsite/calendar.gohtml:18 #: web/templates/public/campsite/calendar.gohtml:18
#: web/templates/admin/season/calendar.gohtml:16 #: web/templates/admin/season/calendar.gohtml:16
msgctxt "day" msgctxt "day"
@ -271,7 +276,7 @@ msgid "There are several points where you can go by kayak, from sections of the
msgstr "Hay diversos puntos dónde podéis ir en kayak, desde tramos del río Ter como también en la costa…." msgstr "Hay diversos puntos dónde podéis ir en kayak, desde tramos del río Ter como también en la costa…."
#: web/templates/public/campground.gohtml:6 #: web/templates/public/campground.gohtml:6
#: web/templates/public/campground.gohtml:11 #: web/templates/public/campground.gohtml:15
#: web/templates/public/layout.gohtml:53 web/templates/public/layout.gohtml:93 #: web/templates/public/layout.gohtml:53 web/templates/public/layout.gohtml:93
msgctxt "title" msgctxt "title"
msgid "Campground" msgid "Campground"
@ -440,7 +445,7 @@ msgstr "Contenido"
#: web/templates/admin/campsite/carousel/form.gohtml:52 #: web/templates/admin/campsite/carousel/form.gohtml:52
#: web/templates/admin/campsite/form.gohtml:70 #: web/templates/admin/campsite/form.gohtml:70
#: web/templates/admin/campsite/option/form.gohtml:83 #: web/templates/admin/campsite/option/form.gohtml:83
#: web/templates/admin/campsite/type/form.gohtml:158 #: web/templates/admin/campsite/type/form.gohtml:171
#: web/templates/admin/season/form.gohtml:69 #: web/templates/admin/season/form.gohtml:69
#: web/templates/admin/services/form.gohtml:80 #: web/templates/admin/services/form.gohtml:80
#: web/templates/admin/media/form.gohtml:35 #: web/templates/admin/media/form.gohtml:35
@ -454,7 +459,7 @@ msgstr "Actualizar"
#: web/templates/admin/campsite/carousel/form.gohtml:54 #: web/templates/admin/campsite/carousel/form.gohtml:54
#: web/templates/admin/campsite/form.gohtml:72 #: web/templates/admin/campsite/form.gohtml:72
#: web/templates/admin/campsite/option/form.gohtml:85 #: web/templates/admin/campsite/option/form.gohtml:85
#: web/templates/admin/campsite/type/form.gohtml:160 #: web/templates/admin/campsite/type/form.gohtml:173
#: web/templates/admin/season/form.gohtml:71 #: web/templates/admin/season/form.gohtml:71
#: web/templates/admin/services/form.gohtml:82 #: web/templates/admin/services/form.gohtml:82
msgctxt "action" msgctxt "action"
@ -791,6 +796,11 @@ msgctxt "input"
msgid "Description" msgid "Description"
msgstr "Descripción" msgstr "Descripción"
#: web/templates/admin/campsite/type/form.gohtml:156
msgctxt "input"
msgid "Additional Information"
msgstr "Información adicional"
#: web/templates/admin/campsite/type/index.gohtml:6 #: web/templates/admin/campsite/type/index.gohtml:6
#: web/templates/admin/campsite/type/index.gohtml:12 #: web/templates/admin/campsite/type/index.gohtml:12
#: web/templates/admin/layout.gohtml:42 #: web/templates/admin/layout.gohtml:42
@ -1192,13 +1202,13 @@ msgid "Upload Media"
msgstr "Subida de medio" msgstr "Subida de medio"
#: pkg/legal/admin.go:258 pkg/app/user.go:249 pkg/campsite/types/option.go:344 #: pkg/legal/admin.go:258 pkg/app/user.go:249 pkg/campsite/types/option.go:344
#: pkg/campsite/types/feature.go:259 pkg/campsite/types/admin.go:453 #: pkg/campsite/types/feature.go:259 pkg/campsite/types/admin.go:463
#: pkg/season/admin.go:415 pkg/services/admin.go:319 #: pkg/season/admin.go:415 pkg/services/admin.go:319
msgid "Name can not be empty." msgid "Name can not be empty."
msgstr "No podéis dejar el nombre en blanco." msgstr "No podéis dejar el nombre en blanco."
#: pkg/legal/admin.go:259 pkg/campsite/types/option.go:345 #: pkg/legal/admin.go:259 pkg/campsite/types/option.go:345
#: pkg/campsite/types/feature.go:260 pkg/campsite/types/admin.go:454 #: pkg/campsite/types/feature.go:260 pkg/campsite/types/admin.go:464
msgid "Name must have at least one letter." msgid "Name must have at least one letter."
msgstr "El nombre tiene que tener como mínimo una letra." msgstr "El nombre tiene que tener como mínimo una letra."
@ -1283,15 +1293,15 @@ msgstr "El valor del máximo tiene que ser un número entero."
msgid "Maximum must be equal or greater than minimum." msgid "Maximum must be equal or greater than minimum."
msgstr "El valor del máximo tiene que ser igual o mayor al del mínimo." msgstr "El valor del máximo tiene que ser igual o mayor al del mínimo."
#: pkg/campsite/types/option.go:361 pkg/campsite/types/admin.go:467 #: pkg/campsite/types/option.go:361 pkg/campsite/types/admin.go:477
msgid "Price per night can not be empty." msgid "Price per night can not be empty."
msgstr "No podéis dejar el precio por noche en blanco." msgstr "No podéis dejar el precio por noche en blanco."
#: pkg/campsite/types/option.go:362 pkg/campsite/types/admin.go:468 #: pkg/campsite/types/option.go:362 pkg/campsite/types/admin.go:478
msgid "Price per night must be a decimal number." msgid "Price per night must be a decimal number."
msgstr "El precio por noche tiene que ser un número decimal." msgstr "El precio por noche tiene que ser un número decimal."
#: pkg/campsite/types/option.go:363 pkg/campsite/types/admin.go:469 #: pkg/campsite/types/option.go:363 pkg/campsite/types/admin.go:479
msgid "Price per night must be zero or greater." msgid "Price per night must be zero or greater."
msgstr "El precio por noche tiene que ser como mínimo cero." msgstr "El precio por noche tiene que ser como mínimo cero."
@ -1299,45 +1309,45 @@ msgstr "El precio por noche tiene que ser como mínimo cero."
msgid "Selected icon is not valid." msgid "Selected icon is not valid."
msgstr "El icono escogido no es válido." msgstr "El icono escogido no es válido."
#: pkg/campsite/types/admin.go:304 #: pkg/campsite/types/admin.go:305
msgctxt "input" msgctxt "input"
msgid "Cover image" msgid "Cover image"
msgstr "Imagen de portada" msgstr "Imagen de portada"
#: pkg/campsite/types/admin.go:305 #: pkg/campsite/types/admin.go:306
msgctxt "action" msgctxt "action"
msgid "Set campsite type cover" msgid "Set campsite type cover"
msgstr "Establecer la portada del tipo de alojamiento" msgstr "Establecer la portada del tipo de alojamiento"
#: pkg/campsite/types/admin.go:456 #: pkg/campsite/types/admin.go:466
msgid "Cover image can not be empty." msgid "Cover image can not be empty."
msgstr "No podéis dejar la imagen de portada en blanco." msgstr "No podéis dejar la imagen de portada en blanco."
#: pkg/campsite/types/admin.go:457 #: pkg/campsite/types/admin.go:467
msgid "Cover image must be an image media type." msgid "Cover image must be an image media type."
msgstr "La imagen de portada tiene que ser un medio de tipo imagen." msgstr "La imagen de portada tiene que ser un medio de tipo imagen."
#: pkg/campsite/types/admin.go:461 #: pkg/campsite/types/admin.go:471
msgid "Maximum number of campers can not be empty." msgid "Maximum number of campers can not be empty."
msgstr "No podéis dejar el número máximo de personas en blanco." msgstr "No podéis dejar el número máximo de personas en blanco."
#: pkg/campsite/types/admin.go:462 #: pkg/campsite/types/admin.go:472
msgid "Maximum number of campers must be an integer number." msgid "Maximum number of campers must be an integer number."
msgstr "El número máximo de personas tiene que ser entero." msgstr "El número máximo de personas tiene que ser entero."
#: pkg/campsite/types/admin.go:463 #: pkg/campsite/types/admin.go:473
msgid "Maximum number of campers must be one or greater." msgid "Maximum number of campers must be one or greater."
msgstr "El número máximo de personas no puede ser cero." msgstr "El número máximo de personas no puede ser cero."
#: pkg/campsite/types/admin.go:472 #: pkg/campsite/types/admin.go:482
msgid "Minimum number of nights can not be empty." msgid "Minimum number of nights can not be empty."
msgstr "No podéis dejar el número mínimo de noches en blanco." msgstr "No podéis dejar el número mínimo de noches en blanco."
#: pkg/campsite/types/admin.go:473 #: pkg/campsite/types/admin.go:483
msgid "Minimum number of nights must be an integer." msgid "Minimum number of nights must be an integer."
msgstr "El número mínimo de noches tiene que ser entero." msgstr "El número mínimo de noches tiene que ser entero."
#: pkg/campsite/types/admin.go:474 #: pkg/campsite/types/admin.go:484
msgid "Minimum number of nights must be one or greater." msgid "Minimum number of nights must be one or greater."
msgstr "El número mínimo de noches no puede ser cero." msgstr "El número mínimo de noches no puede ser cero."

View File

@ -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-14 02:01+0100\n" "POT-Creation-Date: 2024-01-15 00:21+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"
@ -171,6 +171,11 @@ msgctxt "title"
msgid "Description" msgid "Description"
msgstr "Description" msgstr "Description"
#: web/templates/public/campsite/type.gohtml:128
msgctxt "title"
msgid "Additional Information"
msgstr "Informations Complémentaires"
#: web/templates/public/campsite/calendar.gohtml:18 #: web/templates/public/campsite/calendar.gohtml:18
#: web/templates/admin/season/calendar.gohtml:16 #: web/templates/admin/season/calendar.gohtml:16
msgctxt "day" msgctxt "day"
@ -272,7 +277,7 @@ msgid "There are several points where you can go by kayak, from sections of the
msgstr "Il y a plusieurs points où vous pouvez aller en kayak, à partir de sections de la rivière Ter ainsi que sur la côte…." msgstr "Il y a plusieurs points où vous pouvez aller en kayak, à partir de sections de la rivière Ter ainsi que sur la côte…."
#: web/templates/public/campground.gohtml:6 #: web/templates/public/campground.gohtml:6
#: web/templates/public/campground.gohtml:11 #: web/templates/public/campground.gohtml:15
#: web/templates/public/layout.gohtml:53 web/templates/public/layout.gohtml:93 #: web/templates/public/layout.gohtml:53 web/templates/public/layout.gohtml:93
msgctxt "title" msgctxt "title"
msgid "Campground" msgid "Campground"
@ -441,7 +446,7 @@ msgstr "Contenu"
#: web/templates/admin/campsite/carousel/form.gohtml:52 #: web/templates/admin/campsite/carousel/form.gohtml:52
#: web/templates/admin/campsite/form.gohtml:70 #: web/templates/admin/campsite/form.gohtml:70
#: web/templates/admin/campsite/option/form.gohtml:83 #: web/templates/admin/campsite/option/form.gohtml:83
#: web/templates/admin/campsite/type/form.gohtml:158 #: web/templates/admin/campsite/type/form.gohtml:171
#: web/templates/admin/season/form.gohtml:69 #: web/templates/admin/season/form.gohtml:69
#: web/templates/admin/services/form.gohtml:80 #: web/templates/admin/services/form.gohtml:80
#: web/templates/admin/media/form.gohtml:35 #: web/templates/admin/media/form.gohtml:35
@ -455,7 +460,7 @@ msgstr "Mettre à jour"
#: web/templates/admin/campsite/carousel/form.gohtml:54 #: web/templates/admin/campsite/carousel/form.gohtml:54
#: web/templates/admin/campsite/form.gohtml:72 #: web/templates/admin/campsite/form.gohtml:72
#: web/templates/admin/campsite/option/form.gohtml:85 #: web/templates/admin/campsite/option/form.gohtml:85
#: web/templates/admin/campsite/type/form.gohtml:160 #: web/templates/admin/campsite/type/form.gohtml:173
#: web/templates/admin/season/form.gohtml:71 #: web/templates/admin/season/form.gohtml:71
#: web/templates/admin/services/form.gohtml:82 #: web/templates/admin/services/form.gohtml:82
msgctxt "action" msgctxt "action"
@ -792,6 +797,11 @@ msgctxt "input"
msgid "Description" msgid "Description"
msgstr "Description" msgstr "Description"
#: web/templates/admin/campsite/type/form.gohtml:156
msgctxt "input"
msgid "Additional Information"
msgstr "Informations Complémentaires"
#: web/templates/admin/campsite/type/index.gohtml:6 #: web/templates/admin/campsite/type/index.gohtml:6
#: web/templates/admin/campsite/type/index.gohtml:12 #: web/templates/admin/campsite/type/index.gohtml:12
#: web/templates/admin/layout.gohtml:42 #: web/templates/admin/layout.gohtml:42
@ -1193,13 +1203,13 @@ msgid "Upload Media"
msgstr "Envoyer un fichier" msgstr "Envoyer un fichier"
#: pkg/legal/admin.go:258 pkg/app/user.go:249 pkg/campsite/types/option.go:344 #: pkg/legal/admin.go:258 pkg/app/user.go:249 pkg/campsite/types/option.go:344
#: pkg/campsite/types/feature.go:259 pkg/campsite/types/admin.go:453 #: pkg/campsite/types/feature.go:259 pkg/campsite/types/admin.go:463
#: pkg/season/admin.go:415 pkg/services/admin.go:319 #: pkg/season/admin.go:415 pkg/services/admin.go:319
msgid "Name can not be empty." msgid "Name can not be empty."
msgstr "Le nom ne peut pas être laissé vide." msgstr "Le nom ne peut pas être laissé vide."
#: pkg/legal/admin.go:259 pkg/campsite/types/option.go:345 #: pkg/legal/admin.go:259 pkg/campsite/types/option.go:345
#: pkg/campsite/types/feature.go:260 pkg/campsite/types/admin.go:454 #: pkg/campsite/types/feature.go:260 pkg/campsite/types/admin.go:464
msgid "Name must have at least one letter." msgid "Name must have at least one letter."
msgstr "Le nom doit comporter au moins une lettre." msgstr "Le nom doit comporter au moins une lettre."
@ -1284,15 +1294,15 @@ msgstr "Le maximum doit être un nombre entier."
msgid "Maximum must be equal or greater than minimum." msgid "Maximum must be equal or greater than minimum."
msgstr "Le maximum doit être égal ou supérieur au minimum." msgstr "Le maximum doit être égal ou supérieur au minimum."
#: pkg/campsite/types/option.go:361 pkg/campsite/types/admin.go:467 #: pkg/campsite/types/option.go:361 pkg/campsite/types/admin.go:477
msgid "Price per night can not be empty." msgid "Price per night can not be empty."
msgstr "Le prix par nuit ne peut pas être vide." msgstr "Le prix par nuit ne peut pas être vide."
#: pkg/campsite/types/option.go:362 pkg/campsite/types/admin.go:468 #: pkg/campsite/types/option.go:362 pkg/campsite/types/admin.go:478
msgid "Price per night must be a decimal number." msgid "Price per night must be a decimal number."
msgstr "Le prix par nuit doit être un nombre décimal." msgstr "Le prix par nuit doit être un nombre décimal."
#: pkg/campsite/types/option.go:363 pkg/campsite/types/admin.go:469 #: pkg/campsite/types/option.go:363 pkg/campsite/types/admin.go:479
msgid "Price per night must be zero or greater." msgid "Price per night must be zero or greater."
msgstr "Le prix par nuit doit être égal ou supérieur." msgstr "Le prix par nuit doit être égal ou supérieur."
@ -1300,45 +1310,45 @@ msgstr "Le prix par nuit doit être égal ou supérieur."
msgid "Selected icon is not valid." msgid "Selected icon is not valid."
msgstr "Licône sélectionnée nest pas valide." msgstr "Licône sélectionnée nest pas valide."
#: pkg/campsite/types/admin.go:304 #: pkg/campsite/types/admin.go:305
msgctxt "input" msgctxt "input"
msgid "Cover image" msgid "Cover image"
msgstr "Image de couverture" msgstr "Image de couverture"
#: pkg/campsite/types/admin.go:305 #: pkg/campsite/types/admin.go:306
msgctxt "action" msgctxt "action"
msgid "Set campsite type cover" msgid "Set campsite type cover"
msgstr "Définir une couverture type camping" msgstr "Définir une couverture type camping"
#: pkg/campsite/types/admin.go:456 #: pkg/campsite/types/admin.go:466
msgid "Cover image can not be empty." msgid "Cover image can not be empty."
msgstr "Limage de couverture ne peut pas être vide." msgstr "Limage de couverture ne peut pas être vide."
#: pkg/campsite/types/admin.go:457 #: pkg/campsite/types/admin.go:467
msgid "Cover image must be an image media type." msgid "Cover image must be an image media type."
msgstr "Limage de couverture doit être de type média dimage." msgstr "Limage de couverture doit être de type média dimage."
#: pkg/campsite/types/admin.go:461 #: pkg/campsite/types/admin.go:471
msgid "Maximum number of campers can not be empty." msgid "Maximum number of campers can not be empty."
msgstr "Le nombre maximum de campeurs ne peut pas être vide." msgstr "Le nombre maximum de campeurs ne peut pas être vide."
#: pkg/campsite/types/admin.go:462 #: pkg/campsite/types/admin.go:472
msgid "Maximum number of campers must be an integer number." msgid "Maximum number of campers must be an integer number."
msgstr "Le nombre maximum de campeurs doit être un nombre entier." msgstr "Le nombre maximum de campeurs doit être un nombre entier."
#: pkg/campsite/types/admin.go:463 #: pkg/campsite/types/admin.go:473
msgid "Maximum number of campers must be one or greater." msgid "Maximum number of campers must be one or greater."
msgstr "Le nombre maximum de campeurs doit être égal ou supérieur à un campeur." msgstr "Le nombre maximum de campeurs doit être égal ou supérieur à un campeur."
#: pkg/campsite/types/admin.go:472 #: pkg/campsite/types/admin.go:482
msgid "Minimum number of nights can not be empty." msgid "Minimum number of nights can not be empty."
msgstr "Le nombre minimum de nuits ne peut pas être vide." msgstr "Le nombre minimum de nuits ne peut pas être vide."
#: pkg/campsite/types/admin.go:473 #: pkg/campsite/types/admin.go:483
msgid "Minimum number of nights must be an integer." msgid "Minimum number of nights must be an integer."
msgstr "Le nombre minimum de nuits doit être un entier." msgstr "Le nombre minimum de nuits doit être un entier."
#: pkg/campsite/types/admin.go:474 #: pkg/campsite/types/admin.go:484
msgid "Minimum number of nights must be one or greater." msgid "Minimum number of nights must be one or greater."
msgstr "Le nombre minimum de nuits doit être supérieur ou égal à une nuit." msgstr "Le nombre minimum de nuits doit être supérieur ou égal à une nuit."

View File

@ -1,7 +1,25 @@
-- Revert camper:add_campsite_type from pg -- Deploy camper:add_campsite_type to pg
-- requires: roles
-- requires: schema_camper
-- requires: campsite_type
-- requires: company
begin; begin;
drop function if exists camper.add_campsite_type(integer, integer, text, text, text, text, text, integer, boolean); set search_path to camper, public;
drop function if exists add_campsite_type(integer, integer, text, text, text, text, text, text, integer, boolean);
create or replace function add_campsite_type(company integer, media_id integer, name text, spiel text, info text, facilities text, description text, max_campers integer, dogs_allowed boolean) returns uuid as
$$
insert into campsite_type (company_id, media_id, name, spiel, info, facilities, description, max_campers, dogs_allowed)
values (company, media_id, name, xmlparse(content spiel), xmlparse(content info), xmlparse(content facilities), xmlparse(content description), max_campers, dogs_allowed)
returning slug;
$$
language sql
;
revoke execute on function add_campsite_type(integer, integer, text, text, text, text, text, integer, boolean) from public;
grant execute on function add_campsite_type(integer, integer, text, text, text, text, text, integer, boolean) to admin;
commit; commit;

View File

@ -0,0 +1,7 @@
-- Revert camper:add_campsite_type from pg
begin;
drop function if exists camper.add_campsite_type(integer, integer, text, text, text, text, text, integer, boolean);
commit;

View File

@ -0,0 +1,9 @@
-- Revert camper:campsite_type__additional_info from pg
begin;
alter table camper.campsite_type
drop column if exists additional_info
;
commit;

View File

@ -0,0 +1,9 @@
-- Revert camper:campsite_type_i18n__additional_info from pg
begin;
alter table camper.campsite_type_i18n
drop column if exists additional_info
;
commit;

View File

@ -1,7 +1,34 @@
-- Revert camper:edit_campsite_type from pg -- Deploy camper:edit_campsite_type to pg
-- requires: roles
-- requires: schema_camper
-- requires: campsite_type
-- requires: company
begin; begin;
drop function if exists camper.edit_campsite_type(uuid, integer, text, text, text, text, text, integer, boolean, boolean); set search_path to camper, public;
drop function if exists edit_campsite_type(uuid, integer, text, text, text, text, text, text, integer, boolean, boolean);
create or replace function edit_campsite_type(slug uuid, media_id integer, name text, spiel text, info text, facilities text, description text, max_campers integer, dogs_allowed boolean, active boolean) returns uuid as
$$
update campsite_type
set name = edit_campsite_type.name
, spiel = xmlparse(content edit_campsite_type.spiel)
, description = xmlparse(content edit_campsite_type.description)
, info = xmlparse(content edit_campsite_type.info)
, facilities = xmlparse(content edit_campsite_type.facilities)
, media_id = coalesce(edit_campsite_type.media_id, campsite_type.media_id)
, max_campers = edit_campsite_type.max_campers
, dogs_allowed = edit_campsite_type.dogs_allowed
, active = edit_campsite_type.active
where slug = edit_campsite_type.slug
returning slug;
$$
language sql
;
revoke execute on function edit_campsite_type(uuid, integer, text, text, text, text, text, integer, boolean, boolean) from public;
grant execute on function edit_campsite_type(uuid, integer, text, text, text, text, text, integer, boolean, boolean) to admin;
commit; commit;

View File

@ -0,0 +1,7 @@
-- Revert camper:edit_campsite_type from pg
begin;
drop function if exists camper.edit_campsite_type(uuid, integer, text, text, text, text, text, integer, boolean, boolean);
commit;

View File

@ -1,7 +1,31 @@
-- Revert camper:translate_campsite_type from pg -- Deploy camper:translate_campsite_type to pg
-- requires: roles
-- requires: schema_camper
-- requires: campsite_type_i18n
begin; begin;
drop function if exists camper.translate_campsite_type(uuid, text, text, text, text, text, text); set search_path to camper, public;
drop function if exists translate_campsite_type (uuid, text, text, text, text, text, text, text);
create or replace function translate_campsite_type (slug uuid, lang_tag text, name text, spiel text, info text, facilities text, description text) returns void as
$$
insert into campsite_type_i18n (campsite_type_id, lang_tag, name, spiel, info, facilities, description)
select campsite_type_id, translate_campsite_type.lang_tag, translate_campsite_type.name, xmlparse(content coalesce(translate_campsite_type.spiel, '')), xmlparse(content coalesce(translate_campsite_type.info, '')), xmlparse(content coalesce(translate_campsite_type.facilities, '')), xmlparse(content coalesce(translate_campsite_type.description, ''))
from campsite_type
where slug = translate_campsite_type.slug
on conflict (campsite_type_id, lang_tag) do update
set name = excluded.name
, spiel = excluded.spiel
, info = excluded.info
, facilities = excluded.facilities
, description = excluded.description
$$
language sql
;
revoke execute on function translate_campsite_type (uuid, text, text, text, text, text, text) from public;
grant execute on function translate_campsite_type(uuid, text, text, text, text, text, text) to admin;
commit; commit;

View File

@ -0,0 +1,7 @@
-- Revert camper:translate_campsite_type from pg
begin;
drop function if exists camper.translate_campsite_type(uuid, text, text, text, text, text, text);
commit;

View File

@ -136,3 +136,8 @@ add_services_carousel_slide [add_services_carousel_slide@v0] 2024-01-12T18:17:33
service__position [service] 2024-01-12T23:47:29Z jordi fita mas <jordi@tandem.blog> # Add position column to service service__position [service] 2024-01-12T23:47:29Z jordi fita mas <jordi@tandem.blog> # Add position column to service
order_services [schema_camper roles service service__position] 2024-01-12T23:52:24Z jordi fita mas <jordi@tandem.blog> # Add function to order services order_services [schema_camper roles service service__position] 2024-01-12T23:52:24Z jordi fita mas <jordi@tandem.blog> # Add function to order services
company__tourist_tax [company] 2024-01-14T00:06:26Z jordi fita mas <jordi@tandem.blog> # Add tourist_tax to company company__tourist_tax [company] 2024-01-14T00:06:26Z jordi fita mas <jordi@tandem.blog> # Add tourist_tax to company
campsite_type__additional_info [campsite_type] 2024-01-14T21:59:50Z jordi fita mas <jordi@tandem.blog> # Add additional_info column to campsite_type
campsite_type_i18n__additional_info [campsite_type_i18n] 2024-01-14T22:03:03Z jordi fita mas <jordi@tandem.blog> # Add additional_info column to campsite_type_i18n
add_campsite_type [add_campsite_type@v0 campsite_type__additional_info] 2024-01-14T22:06:19Z jordi fita mas <jordi@tandem.blog> # Add additional_info parameter to add_campsite_type
edit_campsite_type [edit_campsite_type@v0 campsite_type__additional_info] 2024-01-14T22:09:40Z jordi fita mas <jordi@tandem.blog> # Add additional_info parameter to edit_campsite_type
translate_campsite_type [translate_campsite_type@v0 campsite_type_i18n__additional_info] 2024-01-14T22:12:08Z jordi fita mas <jordi@tandem.blog> # Add additional_info parameter to translate_campsite_type

View File

@ -9,15 +9,15 @@ set search_path to camper, public;
select plan(13); select plan(13);
select has_function('camper', 'add_campsite_type', array ['integer', 'integer', 'text', 'text', 'text', 'text', 'text', 'integer', 'boolean']); select has_function('camper', 'add_campsite_type', array ['integer', 'integer', 'text', 'text', 'text', 'text', 'text', 'text', 'integer', 'boolean']);
select function_lang_is('camper', 'add_campsite_type', array ['integer', 'integer', 'text', 'text', 'text', 'text', 'text', 'integer', 'boolean'], 'sql'); select function_lang_is('camper', 'add_campsite_type', array ['integer', 'integer', 'text', 'text', 'text', 'text', 'text', 'text', 'integer', 'boolean'], 'sql');
select function_returns('camper', 'add_campsite_type', array ['integer', 'integer', 'text', 'text', 'text', 'text', 'text', 'integer', 'boolean'], 'uuid'); select function_returns('camper', 'add_campsite_type', array ['integer', 'integer', 'text', 'text', 'text', 'text', 'text', 'text', 'integer', 'boolean'], 'uuid');
select isnt_definer('camper', 'add_campsite_type', array ['integer', 'integer', 'text', 'text', 'text', 'text', 'text', 'integer', 'boolean']); select isnt_definer('camper', 'add_campsite_type', array ['integer', 'integer', 'text', 'text', 'text', 'text', 'text', 'text', 'integer', 'boolean']);
select volatility_is('camper', 'add_campsite_type', array ['integer', 'integer', 'text', 'text', 'text', 'text', 'text', 'integer', 'boolean'], 'volatile'); select volatility_is('camper', 'add_campsite_type', array ['integer', 'integer', 'text', 'text', 'text', 'text', 'text', 'text', 'integer', 'boolean'], 'volatile');
select function_privs_are('camper', 'add_campsite_type', array ['integer', 'integer', 'text', 'text', 'text', 'text', 'text', 'integer', 'boolean'], 'guest', array[]::text[]); select function_privs_are('camper', 'add_campsite_type', array ['integer', 'integer', 'text', 'text', 'text', 'text', 'text', 'text', 'integer', 'boolean'], 'guest', array[]::text[]);
select function_privs_are('camper', 'add_campsite_type', array ['integer', 'integer', 'text', 'text', 'text', 'text', 'text', 'integer', 'boolean'], 'employee', array[]::text[]); select function_privs_are('camper', 'add_campsite_type', array ['integer', 'integer', 'text', 'text', 'text', 'text', 'text', 'text', 'integer', 'boolean'], 'employee', array[]::text[]);
select function_privs_are('camper', 'add_campsite_type', array ['integer', 'integer', 'text', 'text', 'text', 'text', 'text', 'integer', 'boolean'], 'admin', array['EXECUTE']); select function_privs_are('camper', 'add_campsite_type', array ['integer', 'integer', 'text', 'text', 'text', 'text', 'text', 'text', 'integer', 'boolean'], 'admin', array['EXECUTE']);
select function_privs_are('camper', 'add_campsite_type', array ['integer', 'integer', 'text', 'text', 'text', 'text', 'text', 'integer', 'boolean'], 'authenticator', array[]::text[]); select function_privs_are('camper', 'add_campsite_type', array ['integer', 'integer', 'text', 'text', 'text', 'text', 'text', 'text', 'integer', 'boolean'], 'authenticator', array[]::text[]);
set client_min_messages to warning; set client_min_messages to warning;
@ -44,19 +44,19 @@ values (3, 1, 'cover2.xpm', sha256('static char *s[]={"1 1 1 1","a c #ffffff","a
; ;
select lives_ok( select lives_ok(
$$ select add_campsite_type(1, 3, 'Type A', '', '<p>Features</p>', '', '<!-- block --><h2>This is what, exactly?</h2><!-- /block --><p>Dunno</p>', 5, true) $$, $$ select add_campsite_type(1, 3, 'Type A', '', '<p>Features</p>', '', '<!-- block --><h2>This is what, exactly?</h2><!-- /block --><p>Dunno</p>', '', 5, true) $$,
'Should be able to add a campsite type to the first company' 'Should be able to add a campsite type to the first company'
); );
select lives_ok( select lives_ok(
$$ select add_campsite_type(2, 4, 'Type B', '<p>One</p><p>Two</p>', '', '<p>Pricing</p>', '', 2, false) $$, $$ select add_campsite_type(2, 4, 'Type B', '<p>One</p><p>Two</p>', '', '<p>Pricing</p>', '', '<p>More</p>', 2, false) $$,
'Should be able to add a campsite type to the second company' 'Should be able to add a campsite type to the second company'
); );
select bag_eq( select bag_eq(
$$ select company_id, media_id, name, spiel::text, info::text, facilities::text, description::text, active, max_campers, dogs_allowed from campsite_type $$, $$ select company_id, media_id, name, spiel::text, info::text, facilities::text, description::text, additional_info::text, active, max_campers, dogs_allowed from campsite_type $$,
$$ values (1, 3, 'Type A', '', '<p>Features</p>', '', '<!-- block --><h2>This is what, exactly?</h2><!-- /block --><p>Dunno</p>', true, 5, true) $$ values (1, 3, 'Type A', '', '<p>Features</p>', '', '<!-- block --><h2>This is what, exactly?</h2><!-- /block --><p>Dunno</p>', '', true, 5, true)
, (2, 4, 'Type B', '<p>One</p><p>Two</p>', '', '<p>Pricing</p>', '', true, 2, false) , (2, 4, 'Type B', '<p>One</p><p>Two</p>', '', '<p>Pricing</p>', '', '<p>More</p>', true, 2, false)
$$, $$,
'Should have added all two campsite type' 'Should have added all two campsite type'
); );

View File

@ -5,7 +5,7 @@ reset client_min_messages;
begin; begin;
select plan(82); select plan(86);
set search_path to camper, public; set search_path to camper, public;
@ -72,6 +72,12 @@ select col_not_null('campsite_type', 'description');
select col_has_default('campsite_type', 'description'); select col_has_default('campsite_type', 'description');
--select col_default_is('campsite_type', 'description', ''); --select col_default_is('campsite_type', 'description', '');
select has_column('campsite_type', 'additional_info');
select col_type_is('campsite_type', 'additional_info', 'xml');
select col_not_null('campsite_type', 'additional_info');
select col_has_default('campsite_type', 'additional_info');
--select col_default_is('campsite_type', 'additional_info', '');
select has_column('campsite_type', 'max_campers'); select has_column('campsite_type', 'max_campers');
select col_type_is('campsite_type', 'max_campers', 'integer'); select col_type_is('campsite_type', 'max_campers', 'integer');
select col_not_null('campsite_type', 'max_campers'); select col_not_null('campsite_type', 'max_campers');

View File

@ -5,7 +5,7 @@ reset client_min_messages;
begin; begin;
select plan(39); select plan(43);
set search_path to camper, public; set search_path to camper, public;
@ -56,6 +56,11 @@ select col_type_is('campsite_type_i18n', 'description', 'xml');
select col_not_null('campsite_type_i18n', 'description'); select col_not_null('campsite_type_i18n', 'description');
select col_hasnt_default('campsite_type_i18n', 'description'); select col_hasnt_default('campsite_type_i18n', 'description');
select has_column('campsite_type_i18n', 'additional_info');
select col_type_is('campsite_type_i18n', 'additional_info', 'xml');
select col_not_null('campsite_type_i18n', 'additional_info');
select col_hasnt_default('campsite_type_i18n', 'additional_info');
select * select *
from finish(); from finish();

View File

@ -9,15 +9,15 @@ set search_path to camper, public;
select plan(12); select plan(12);
select has_function('camper', 'edit_campsite_type', array ['uuid', 'integer', 'text', 'text', 'text', 'text', 'text', 'integer', 'boolean', 'boolean']); select has_function('camper', 'edit_campsite_type', array ['uuid', 'integer', 'text', 'text', 'text', 'text', 'text', 'text', 'integer', 'boolean', 'boolean']);
select function_lang_is('camper', 'edit_campsite_type', array ['uuid', 'integer', 'text', 'text', 'text', 'text', 'text', 'integer', 'boolean', 'boolean'], 'sql'); select function_lang_is('camper', 'edit_campsite_type', array ['uuid', 'integer', 'text', 'text', 'text', 'text', 'text', 'text', 'integer', 'boolean', 'boolean'], 'sql');
select function_returns('camper', 'edit_campsite_type', array ['uuid', 'integer', 'text', 'text', 'text', 'text', 'text', 'integer', 'boolean', 'boolean'], 'uuid'); select function_returns('camper', 'edit_campsite_type', array ['uuid', 'integer', 'text', 'text', 'text', 'text', 'text', 'text', 'integer', 'boolean', 'boolean'], 'uuid');
select isnt_definer('camper', 'edit_campsite_type', array ['uuid', 'integer', 'text', 'text', 'text', 'text', 'text', 'integer', 'boolean', 'boolean']); select isnt_definer('camper', 'edit_campsite_type', array ['uuid', 'integer', 'text', 'text', 'text', 'text', 'text', 'text', 'integer', 'boolean', 'boolean']);
select volatility_is('camper', 'edit_campsite_type', array ['uuid', 'integer', 'text', 'text', 'text', 'text', 'text', 'integer', 'boolean', 'boolean'], 'volatile'); select volatility_is('camper', 'edit_campsite_type', array ['uuid', 'integer', 'text', 'text', 'text', 'text', 'text', 'text', 'integer', 'boolean', 'boolean'], 'volatile');
select function_privs_are('camper', 'edit_campsite_type', array ['uuid', 'integer', 'text', 'text', 'text', 'text', 'text', 'integer', 'boolean', 'boolean'], 'guest', array[]::text[]); select function_privs_are('camper', 'edit_campsite_type', array ['uuid', 'integer', 'text', 'text', 'text', 'text', 'text', 'text', 'integer', 'boolean', 'boolean'], 'guest', array[]::text[]);
select function_privs_are('camper', 'edit_campsite_type', array ['uuid', 'integer', 'text', 'text', 'text', 'text', 'text', 'integer', 'boolean', 'boolean'], 'employee', array[]::text[]); select function_privs_are('camper', 'edit_campsite_type', array ['uuid', 'integer', 'text', 'text', 'text', 'text', 'text', 'text', 'integer', 'boolean', 'boolean'], 'employee', array[]::text[]);
select function_privs_are('camper', 'edit_campsite_type', array ['uuid', 'integer', 'text', 'text', 'text', 'text', 'text', 'integer', 'boolean', 'boolean'], 'admin', array['EXECUTE']); select function_privs_are('camper', 'edit_campsite_type', array ['uuid', 'integer', 'text', 'text', 'text', 'text', 'text', 'text', 'integer', 'boolean', 'boolean'], 'admin', array['EXECUTE']);
select function_privs_are('camper', 'edit_campsite_type', array ['uuid', 'integer', 'text', 'text', 'text', 'text', 'text', 'integer', 'boolean', 'boolean'], 'authenticator', array[]::text[]); select function_privs_are('camper', 'edit_campsite_type', array ['uuid', 'integer', 'text', 'text', 'text', 'text', 'text', 'text', 'integer', 'boolean', 'boolean'], 'authenticator', array[]::text[]);
set client_min_messages to warning; set client_min_messages to warning;
truncate campsite_type cascade; truncate campsite_type cascade;
@ -43,25 +43,25 @@ values (2, 1, 'cover2.xpm', sha256('static char *s[]={"1 1 1 1","a c #ffffff","a
, (4, 1, 'cover4.xpm', sha256('static char *s[]={"1 1 1 1","a c #ffff00","a"};')) , (4, 1, 'cover4.xpm', sha256('static char *s[]={"1 1 1 1","a c #ffff00","a"};'))
; ;
insert into campsite_type (company_id, slug, media_id, name, spiel, info, facilities, description, max_campers, dogs_allowed, active) insert into campsite_type (company_id, slug, media_id, name, spiel, info, facilities, description, additional_info, max_campers, dogs_allowed, active)
values (1, '87452b88-b48f-48d3-bb6c-0296de64164e', 2, 'Type A', '<h1>1</h1>', '<p>info 1</p>', '<p>facilities A</p>', '<p>A</p>', 5, false, true) values (1, '87452b88-b48f-48d3-bb6c-0296de64164e', 2, 'Type A', '<h1>1</h1>', '<p>info 1</p>', '<p>facilities A</p>', '<p>A</p>', '<p>Additional A</p>', 5, false, true)
, (1, '9b6370f7-f941-46f2-bc6e-de455675bd0a', 3, 'Type B', '<h2>2</h2>', '<p>info 2</p>', '<p>facilities B</p>', '<p>B</p>', 4, true, false) , (1, '9b6370f7-f941-46f2-bc6e-de455675bd0a', 3, 'Type B', '<h2>2</h2>', '<p>info 2</p>', '<p>facilities B</p>', '<p>B</p>', '<p>Additional B</p>', 4, true, false)
; ;
select lives_ok( select lives_ok(
$$ select edit_campsite_type('87452b88-b48f-48d3-bb6c-0296de64164e', 4, 'Type 1', '<h3>A</h3>', '<p>Features A</p>', '<p>Pricing 1</p>', '<p>1</p>', 2, true, false) $$, $$ select edit_campsite_type('87452b88-b48f-48d3-bb6c-0296de64164e', 4, 'Type 1', '<h3>A</h3>', '<p>Features A</p>', '<p>Pricing 1</p>', '<p>1</p>', '<p>Additional 1</p>', 2, true, false) $$,
'Should be able to edit the first type' 'Should be able to edit the first type'
); );
select lives_ok( select lives_ok(
$$ select edit_campsite_type('9b6370f7-f941-46f2-bc6e-de455675bd0a', null, 'Type 2', '<h1>B</h1>', '<p>Features B</p>', '<p>Pricing 2</p>', '<p>2</p>', 9, false, true) $$, $$ select edit_campsite_type('9b6370f7-f941-46f2-bc6e-de455675bd0a', null, 'Type 2', '<h1>B</h1>', '<p>Features B</p>', '<p>Pricing 2</p>', '<p>2</p>', '<p>Additional 2</p>', 9, false, true) $$,
'Should be able to edit the second type' 'Should be able to edit the second type'
); );
select bag_eq( select bag_eq(
$$ select slug::text, media_id, name, spiel::text, info::text, facilities::text, description::text, max_campers, dogs_allowed, active from campsite_type $$, $$ select slug::text, media_id, name, spiel::text, info::text, facilities::text, description::text, additional_info::text, max_campers, dogs_allowed, active from campsite_type $$,
$$ values ('87452b88-b48f-48d3-bb6c-0296de64164e', 4, 'Type 1', '<h3>A</h3>', '<p>Features A</p>', '<p>Pricing 1</p>', '<p>1</p>', 2, true, false) $$ values ('87452b88-b48f-48d3-bb6c-0296de64164e', 4, 'Type 1', '<h3>A</h3>', '<p>Features A</p>', '<p>Pricing 1</p>', '<p>1</p>', '<p>Additional 1</p>', 2, true, false)
, ('9b6370f7-f941-46f2-bc6e-de455675bd0a', 3, 'Type 2', '<h1>B</h1>', '<p>Features B</p>', '<p>Pricing 2</p>', '<p>2</p>', 9, false, true) , ('9b6370f7-f941-46f2-bc6e-de455675bd0a', 3, 'Type 2', '<h1>B</h1>', '<p>Features B</p>', '<p>Pricing 2</p>', '<p>2</p>', '<p>Additional 2</p>', 9, false, true)
$$, $$,
'Should have updated all campsite types.' 'Should have updated all campsite types.'
); );

View File

@ -9,15 +9,15 @@ select plan(13);
set search_path to camper, public; set search_path to camper, public;
select has_function('camper', 'translate_campsite_type', array['uuid', 'text', 'text', 'text', 'text', 'text', 'text']); select has_function('camper', 'translate_campsite_type', array['uuid', 'text', 'text', 'text', 'text', 'text', 'text', 'text']);
select function_lang_is('camper', 'translate_campsite_type', array['uuid', 'text', 'text', 'text', 'text', 'text', 'text'], 'sql'); select function_lang_is('camper', 'translate_campsite_type', array['uuid', 'text', 'text', 'text', 'text', 'text', 'text', 'text'], 'sql');
select function_returns('camper', 'translate_campsite_type', array['uuid', 'text', 'text', 'text', 'text', 'text', 'text'], 'void'); select function_returns('camper', 'translate_campsite_type', array['uuid', 'text', 'text', 'text', 'text', 'text', 'text', 'text'], 'void');
select isnt_definer('camper', 'translate_campsite_type', array['uuid', 'text', 'text', 'text', 'text', 'text', 'text']); select isnt_definer('camper', 'translate_campsite_type', array['uuid', 'text', 'text', 'text', 'text', 'text', 'text', 'text']);
select volatility_is('camper', 'translate_campsite_type', array['uuid', 'text', 'text', 'text', 'text', 'text', 'text'], 'volatile'); select volatility_is('camper', 'translate_campsite_type', array['uuid', 'text', 'text', 'text', 'text', 'text', 'text', 'text'], 'volatile');
select function_privs_are('camper', 'translate_campsite_type', array['uuid', 'text', 'text', 'text', 'text', 'text', 'text'], 'guest', array[]::text[]); select function_privs_are('camper', 'translate_campsite_type', array['uuid', 'text', 'text', 'text', 'text', 'text', 'text', 'text'], 'guest', array[]::text[]);
select function_privs_are('camper', 'translate_campsite_type', array['uuid', 'text', 'text', 'text', 'text', 'text', 'text'], 'employee', array[]::text[]); select function_privs_are('camper', 'translate_campsite_type', array['uuid', 'text', 'text', 'text', 'text', 'text', 'text', 'text'], 'employee', array[]::text[]);
select function_privs_are('camper', 'translate_campsite_type', array['uuid', 'text', 'text', 'text', 'text', 'text', 'text'], 'admin', array['EXECUTE']); select function_privs_are('camper', 'translate_campsite_type', array['uuid', 'text', 'text', 'text', 'text', 'text', 'text', 'text'], 'admin', array['EXECUTE']);
select function_privs_are('camper', 'translate_campsite_type', array['uuid', 'text', 'text', 'text', 'text', 'text', 'text'], 'authenticator', array[]::text[]); select function_privs_are('camper', 'translate_campsite_type', array['uuid', 'text', 'text', 'text', 'text', 'text', 'text', 'text'], 'authenticator', array[]::text[]);
set client_min_messages to warning; set client_min_messages to warning;
@ -43,36 +43,36 @@ values (2, 1, 'cover2.xpm', sha256('static char *s[]={"1 1 1 1","a c #ffffff","a
, (4, 1, 'cover4.xpm', sha256('static char *s[]={"1 1 1 1","a c #ffff00","a"};')) , (4, 1, 'cover4.xpm', sha256('static char *s[]={"1 1 1 1","a c #ffff00","a"};'))
; ;
insert into campsite_type (company_id, slug, media_id, name, spiel, info, facilities, description, active, dogs_allowed, max_campers) insert into campsite_type (company_id, slug, media_id, name, spiel, info, facilities, description, additional_info, active, dogs_allowed, max_campers)
values (1, '87452b88-b48f-48d3-bb6c-0296de64164e', 2, 'Type A', '<h2>One</h2>', '<p>Features A</p>', '<p>Pricing A</p>', '<p>A</p>', true, false, 4) values (1, '87452b88-b48f-48d3-bb6c-0296de64164e', 2, 'Type A', '<h2>One</h2>', '<p>Features A</p>', '<p>Pricing A</p>', '<p>A</p>', '<p>Additional A</p>', true, false, 4)
, (1, '9b6370f7-f941-46f2-bc6e-de455675bd0a', 3, 'Type B', '<h2>Two</h2>', '<p>Features B</p>', '<p>Pricing B</p>', '<p>B</p>', false, true, 5) , (1, '9b6370f7-f941-46f2-bc6e-de455675bd0a', 3, 'Type B', '<h2>Two</h2>', '<p>Features B</p>', '<p>Pricing B</p>', '<p>B</p>', '<p>Additional B</p>', false, true, 5)
; ;
insert into campsite_type_i18n (campsite_type_id, lang_tag, name, spiel, info, facilities, description) insert into campsite_type_i18n (campsite_type_id, lang_tag, name, spiel, info, facilities, description, additional_info)
select campsite_type_id, 'ca', 'tipusb', '<h2>dos</h2>', '<p>característiques b</p>', '<p>preus b</p>', '<p>B</p>' from campsite_type select campsite_type_id, 'ca', 'tipusb', '<h2>dos</h2>', '<p>característiques b</p>', '<p>preus b</p>', '<p>B</p>', '<p>B addicional</p>' from campsite_type
where slug = '9b6370f7-f941-46f2-bc6e-de455675bd0a' where slug = '9b6370f7-f941-46f2-bc6e-de455675bd0a'
; ;
select lives_ok( select lives_ok(
$$ select translate_campsite_type('87452b88-b48f-48d3-bb6c-0296de64164e', 'ca', 'Tipus A', null, '<p>Característiques A</p>', null, '<p>a</p>') $$, $$ select translate_campsite_type('87452b88-b48f-48d3-bb6c-0296de64164e', 'ca', 'Tipus A', null, '<p>Característiques A</p>', null, '<p>a</p>', null) $$,
'Should be able to translate the first type' 'Should be able to translate the first type'
); );
select lives_ok( select lives_ok(
$$ select translate_campsite_type('9b6370f7-f941-46f2-bc6e-de455675bd0a', 'es', 'Tipo B', '<h2>Dos</h2>', null, '<p>Precios B</p>', null) $$, $$ select translate_campsite_type('9b6370f7-f941-46f2-bc6e-de455675bd0a', 'es', 'Tipo B', '<h2>Dos</h2>', null, '<p>Precios B</p>', null, '<p>B adicional</p>') $$,
'Should be able to translate the second type' 'Should be able to translate the second type'
); );
select lives_ok( select lives_ok(
$$ select translate_campsite_type('9b6370f7-f941-46f2-bc6e-de455675bd0a', 'ca', 'Tipus B', '<h2>Dos</h2>', '<p>Característiques B</p>', '<p>Preus B</p>', '<p>2</p>') $$, $$ select translate_campsite_type('9b6370f7-f941-46f2-bc6e-de455675bd0a', 'ca', 'Tipus B', '<h2>Dos</h2>', '<p>Característiques B</p>', '<p>Preus B</p>', '<p>2</p>', '<p>2 addicional</p>') $$,
'Should be able to overwrite the catalan translation of the second type' 'Should be able to overwrite the catalan translation of the second type'
); );
select bag_eq( select bag_eq(
$$ select slug::text, lang_tag, i18n.name, i18n.spiel::text, i18n.info::text, i18n.facilities::text, i18n.description::text from campsite_type_i18n as i18n join campsite_type using (campsite_type_id) $$, $$ select slug::text, lang_tag, i18n.name, i18n.spiel::text, i18n.info::text, i18n.facilities::text, i18n.description::text, i18n.additional_info::text from campsite_type_i18n as i18n join campsite_type using (campsite_type_id) $$,
$$ values ('87452b88-b48f-48d3-bb6c-0296de64164e', 'ca', 'Tipus A', '', '<p>Característiques A</p>', '', '<p>a</p>') $$ values ('87452b88-b48f-48d3-bb6c-0296de64164e', 'ca', 'Tipus A', '', '<p>Característiques A</p>', '', '<p>a</p>', '')
, ('9b6370f7-f941-46f2-bc6e-de455675bd0a', 'ca', 'Tipus B', '<h2>Dos</h2>', '<p>Característiques B</p>', '<p>Preus B</p>', '<p>2</p>') , ('9b6370f7-f941-46f2-bc6e-de455675bd0a', 'ca', 'Tipus B', '<h2>Dos</h2>', '<p>Característiques B</p>', '<p>Preus B</p>', '<p>2</p>', '<p>2 addicional</p>')
, ('9b6370f7-f941-46f2-bc6e-de455675bd0a', 'es', 'Tipo B', '<h2>Dos</h2>', '', '<p>Precios B</p>', '') , ('9b6370f7-f941-46f2-bc6e-de455675bd0a', 'es', 'Tipo B', '<h2>Dos</h2>', '', '<p>Precios B</p>', '', '<p>B adicional</p>')
$$, $$,
'Should have added and updated all translations.' 'Should have added and updated all translations.'
); );

View File

@ -2,6 +2,6 @@
begin; begin;
select has_function_privilege('camper.add_campsite_type(integer, integer, text, text, text, text, text, integer, boolean)', 'execute'); select has_function_privilege('camper.add_campsite_type(integer, integer, text, text, text, text, text, text, integer, boolean)', 'execute');
rollback; rollback;

View File

@ -0,0 +1,7 @@
-- Verify camper:add_campsite_type on pg
begin;
select has_function_privilege('camper.add_campsite_type(integer, integer, text, text, text, text, text, integer, boolean)', 'execute');
rollback;

View File

@ -0,0 +1,9 @@
-- Verify camper:campsite_type__additional_info on pg
begin;
select additional_info
from camper.campsite_type
where false;
rollback;

View File

@ -0,0 +1,9 @@
-- Verify camper:campsite_type_i18n__additional_info on pg
begin;
select additional_info
from camper.campsite_type_i18n
where false;
rollback;

View File

@ -2,6 +2,6 @@
begin; begin;
select has_function_privilege('camper.edit_campsite_type(uuid, integer, text, text, text, text, text, integer, boolean, boolean)', 'execute'); select has_function_privilege('camper.edit_campsite_type(uuid, integer, text, text, text, text, text, text, integer, boolean, boolean)', 'execute');
rollback; rollback;

View File

@ -0,0 +1,7 @@
-- Verify camper:edit_campsite_type on pg
begin;
select has_function_privilege('camper.edit_campsite_type(uuid, integer, text, text, text, text, text, integer, boolean, boolean)', 'execute');
rollback;

View File

@ -2,6 +2,6 @@
begin; begin;
select has_function_privilege('camper.translate_campsite_type(uuid, text, text, text, text, text, text)', 'execute'); select has_function_privilege('camper.translate_campsite_type(uuid, text, text, text, text, text, text, text)', 'execute');
rollback; rollback;

View File

@ -0,0 +1,7 @@
-- Verify camper:translate_campsite_type on pg
begin;
select has_function_privilege('camper.translate_campsite_type(uuid, text, text, text, text, text, text)', 'execute');
rollback;

View File

@ -151,6 +151,19 @@
{{ template "error-message" . }} {{ template "error-message" . }}
</fieldset> </fieldset>
{{- end }} {{- end }}
{{ with .AdditionalInfo -}}
<fieldset>
<legend>{{( pgettext "Additional Information" "input" )}}<br></legend>
{{ template "lang-selector" . }}
{{ range $lang, $input := . -}}
<label x-cloak x-show="lang === '{{ $lang }}'"><span>{{ $lang }}</span><br>
<textarea class="html"
name="{{ .Name }}" {{ template "error-attrs" . }}>{{ .Val }}</textarea><br>
</label>
{{- end }}
{{ template "error-message" . }}
</fieldset>
{{- end }}
</fieldset> </fieldset>
<footer> <footer>
<button type="submit"> <button type="submit">

View File

@ -124,6 +124,10 @@
<h3 class="sr-only">{{( pgettext "Description" "title" )}}</h3> <h3 class="sr-only">{{( pgettext "Description" "title" )}}</h3>
{{ .Description }} {{ .Description }}
</section> </section>
<section>
<h3 class="sr-only">{{( pgettext "Additional Information" "title" )}}</h3>
{{ .AdditionalInfo }}
</section>
</article> </article>
{{ template "carouselInit" 3 }} {{ template "carouselInit" 3 }}