Add the info and facilities fields to campsite type
I wish CKEditor would have support for <dl>, but it is unlikely that they will add any time soon[0], specially when in 2018 they already “forgotten”[1] that this was requested back in 2007[2]. Therefore, in the demo i did it more or less like in the original design, with “extra” <h4>, although i added them under a <h3>, to avoid “gaps” in the outline. [0]: https://github.com/ckeditor/ckeditor5/issues/775 [1]: https://github.com/ckeditor/ckeditor5/issues/775#issuecomment-358591747 [2]: https://dev.ckeditor.com/ticket/1333
This commit is contained in:
parent
59fe8dd131
commit
7fc87b5cb5
|
@ -111,23 +111,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 d’on ets per fer allò que vols.</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 d’on 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 d’oliva, sal, sucre, cafè i te</li><li>WiFi</li><li>Plaça d’aparcament 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>', '<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 d’oliva, sal, sucre, cafè i te</li><li>WiFi</li><li>Plaça d’aparcament 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>', '<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 d’oliva, sal, sucre, cafè i te</li><li>WiFi</li><li>Plaça d’aparcament 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>', '<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 d’oliva, sal, sucre, cafè i te</li><li>WiFi</li><li>Plaça d’aparcament 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>', '<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 d’oliva, sal, sucre, cafè i te</li><li>WiFi</li><li>Plaça d’aparcament 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, description)
|
insert into campsite_type_i18n (campsite_type_id, lang_tag, name, spiel, info, facilities, description)
|
||||||
values (72, 'en', 'Plots', '<h3>Camp in the middle of nature</h3><p>Located on the campground’s 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>', '<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 campground’s 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>', '<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>', '<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>', '<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 campground’s 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>', '<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 campground’s 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>', '<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 campground’s 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>', '<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 campground’s 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>', '<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 campground’s 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>', '<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 campground’s 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>', '<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 alter column campsite_id restart with 82;
|
alter table campsite alter column campsite_id restart with 82;
|
||||||
|
|
|
@ -8,16 +8,16 @@ 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, description text, max_campers integer, dogs_allowed boolean) returns uuid as
|
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, description, max_campers, dogs_allowed)
|
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 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;
|
returning slug;
|
||||||
$$
|
$$
|
||||||
language sql
|
language sql
|
||||||
;
|
;
|
||||||
|
|
||||||
revoke execute on function add_campsite_type(integer, integer, text, text, text, integer, boolean) from public;
|
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, integer, boolean) to admin;
|
grant execute on function add_campsite_type(integer, integer, text, text, text, text, text, integer, boolean) to admin;
|
||||||
|
|
||||||
commit;
|
commit;
|
||||||
|
|
|
@ -16,6 +16,8 @@ create table campsite_type (
|
||||||
name text not null constraint name_not_empty check(length(trim(name)) > 0),
|
name text not null constraint name_not_empty check(length(trim(name)) > 0),
|
||||||
media_id integer not null references media,
|
media_id integer not null references media,
|
||||||
spiel xml not null default ''::xml,
|
spiel xml not null default ''::xml,
|
||||||
|
info xml not null default ''::xml,
|
||||||
|
facilities xml not null default ''::xml,
|
||||||
description xml not null default ''::xml,
|
description xml not null default ''::xml,
|
||||||
max_campers integer not null constraint at_least_one_camper check(max_campers > 0),
|
max_campers integer not null constraint at_least_one_camper check(max_campers > 0),
|
||||||
dogs_allowed boolean not null,
|
dogs_allowed boolean not null,
|
||||||
|
|
|
@ -13,6 +13,8 @@ create table campsite_type_i18n (
|
||||||
lang_tag text not null references language,
|
lang_tag text not null references language,
|
||||||
name text not null,
|
name text not null,
|
||||||
spiel xml not null,
|
spiel xml not null,
|
||||||
|
info xml not null,
|
||||||
|
facilities xml not null,
|
||||||
description xml not null,
|
description xml not null,
|
||||||
primary key (campsite_type_id, lang_tag)
|
primary key (campsite_type_id, lang_tag)
|
||||||
);
|
);
|
||||||
|
|
|
@ -8,12 +8,14 @@ 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, description text, max_campers integer, dogs_allowed boolean, active boolean) returns uuid as
|
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
|
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)
|
||||||
|
, 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
|
||||||
, dogs_allowed = edit_campsite_type.dogs_allowed
|
, dogs_allowed = edit_campsite_type.dogs_allowed
|
||||||
|
@ -24,7 +26,7 @@ $$
|
||||||
language sql
|
language sql
|
||||||
;
|
;
|
||||||
|
|
||||||
revoke execute on function edit_campsite_type(uuid, integer, text, text, text, integer, boolean, boolean) from public;
|
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, integer, boolean, boolean) to admin;
|
grant execute on function edit_campsite_type(uuid, integer, text, text, text, text, text, integer, boolean, boolean) to admin;
|
||||||
|
|
||||||
commit;
|
commit;
|
||||||
|
|
|
@ -7,21 +7,23 @@ 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, description text) returns void as
|
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, description)
|
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.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
|
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
|
||||||
set name = excluded.name
|
set name = excluded.name
|
||||||
, spiel = excluded.spiel
|
, spiel = excluded.spiel
|
||||||
|
, info = excluded.info
|
||||||
|
, facilities = excluded.facilities
|
||||||
, description = excluded.description
|
, description = excluded.description
|
||||||
$$
|
$$
|
||||||
language sql
|
language sql
|
||||||
;
|
;
|
||||||
|
|
||||||
revoke execute on function translate_campsite_type (uuid, text, text, text, text) from public;
|
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) to admin;
|
grant execute on function translate_campsite_type(uuid, text, text, text, text, text, text) to admin;
|
||||||
|
|
||||||
commit;
|
commit;
|
||||||
|
|
|
@ -197,7 +197,7 @@ 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.Val, f.Spiel.Val, f.Description.Val, f.MaxCampers.Int(), f.DogsAllowed.Checked)
|
slug, err := tx.AddCampsiteType(ctx, company.ID, f.Media.Int(), f.Name.Val, f.Spiel.Val, f.Info.Val, f.Facilities.Val, f.Description.Val, f.MaxCampers.Int(), f.DogsAllowed.Checked)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -216,7 +216,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.Val, f.Spiel.Val, f.Description.Val, f.MaxCampers.Int(), f.DogsAllowed.Checked, f.Active.Checked); err != nil {
|
if _, err := tx.EditCampsiteType(ctx, f.Slug, f.Media.Int(), f.Name.Val, f.Spiel.Val, f.Info.Val, f.Facilities.Val, f.Description.Val, f.MaxCampers.Int(), f.DogsAllowed.Checked, f.Active.Checked); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
return setTypePrices(ctx, tx, f.Slug, f.Prices)
|
return setTypePrices(ctx, tx, f.Slug, f.Prices)
|
||||||
|
@ -264,6 +264,8 @@ type typeForm struct {
|
||||||
MaxCampers *form.Input
|
MaxCampers *form.Input
|
||||||
DogsAllowed *form.Checkbox
|
DogsAllowed *form.Checkbox
|
||||||
Spiel *form.Input
|
Spiel *form.Input
|
||||||
|
Info *form.Input
|
||||||
|
Facilities *form.Input
|
||||||
Description *form.Input
|
Description *form.Input
|
||||||
Prices map[int]*typePriceForm
|
Prices map[int]*typePriceForm
|
||||||
}
|
}
|
||||||
|
@ -299,6 +301,12 @@ func newTypeForm(ctx context.Context, company *auth.Company, conn *database.Conn
|
||||||
Spiel: &form.Input{
|
Spiel: &form.Input{
|
||||||
Name: "spiel",
|
Name: "spiel",
|
||||||
},
|
},
|
||||||
|
Info: &form.Input{
|
||||||
|
Name: "info",
|
||||||
|
},
|
||||||
|
Facilities: &form.Input{
|
||||||
|
Name: "facilities",
|
||||||
|
},
|
||||||
Description: &form.Input{
|
Description: &form.Input{
|
||||||
Name: "description",
|
Name: "description",
|
||||||
},
|
},
|
||||||
|
@ -338,6 +346,8 @@ func (f *typeForm) FillFromDatabase(ctx context.Context, conn *database.Conn, sl
|
||||||
row := conn.QueryRow(ctx, `
|
row := conn.QueryRow(ctx, `
|
||||||
select name
|
select name
|
||||||
, spiel::text
|
, spiel::text
|
||||||
|
, info::text
|
||||||
|
, facilities::text
|
||||||
, description::text
|
, description::text
|
||||||
, media_id::text
|
, media_id::text
|
||||||
, max_campers::text
|
, max_campers::text
|
||||||
|
@ -346,7 +356,7 @@ func (f *typeForm) FillFromDatabase(ctx context.Context, conn *database.Conn, sl
|
||||||
from campsite_type
|
from campsite_type
|
||||||
where slug = $1
|
where slug = $1
|
||||||
`, slug)
|
`, slug)
|
||||||
if err := row.Scan(&f.Name.Val, &f.Spiel.Val, &f.Description.Val, &f.Media.Val, &f.MaxCampers.Val, &f.DogsAllowed.Checked, &f.Active.Checked); err != nil {
|
if err := row.Scan(&f.Name.Val, &f.Spiel.Val, &f.Info.Val, &f.Facilities.Val, &f.Description.Val, &f.Media.Val, &f.MaxCampers.Val, &f.DogsAllowed.Checked, &f.Active.Checked); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -387,6 +397,8 @@ func (f *typeForm) Parse(r *http.Request) error {
|
||||||
f.MaxCampers.FillValue(r)
|
f.MaxCampers.FillValue(r)
|
||||||
f.DogsAllowed.FillValue(r)
|
f.DogsAllowed.FillValue(r)
|
||||||
f.Spiel.FillValue(r)
|
f.Spiel.FillValue(r)
|
||||||
|
f.Info.FillValue(r)
|
||||||
|
f.Facilities.FillValue(r)
|
||||||
f.Description.FillValue(r)
|
f.Description.FillValue(r)
|
||||||
f.Media.FillValue(r)
|
f.Media.FillValue(r)
|
||||||
for _, p := range f.Prices {
|
for _, p := range f.Prices {
|
||||||
|
|
|
@ -22,6 +22,8 @@ type typeL10nForm struct {
|
||||||
Slug string
|
Slug string
|
||||||
Name *form.L10nInput
|
Name *form.L10nInput
|
||||||
Spiel *form.L10nInput
|
Spiel *form.L10nInput
|
||||||
|
Info *form.L10nInput
|
||||||
|
Facilities *form.L10nInput
|
||||||
Description *form.L10nInput
|
Description *form.L10nInput
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,6 +33,8 @@ func newTypeL10nForm(f *typeForm, loc *locale.Locale) *typeL10nForm {
|
||||||
Slug: f.Slug,
|
Slug: f.Slug,
|
||||||
Name: f.Name.L10nInput(),
|
Name: f.Name.L10nInput(),
|
||||||
Spiel: f.Spiel.L10nInput(),
|
Spiel: f.Spiel.L10nInput(),
|
||||||
|
Info: f.Info.L10nInput(),
|
||||||
|
Facilities: f.Facilities.L10nInput(),
|
||||||
Description: f.Description.L10nInput(),
|
Description: f.Description.L10nInput(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -39,12 +43,14 @@ func (l10n *typeL10nForm) FillFromDatabase(ctx context.Context, conn *database.C
|
||||||
row := conn.QueryRow(ctx, `
|
row := conn.QueryRow(ctx, `
|
||||||
select coalesce(i18n.name, '') as l10n_name
|
select coalesce(i18n.name, '') as l10n_name
|
||||||
, coalesce(i18n.spiel, '') as l10n_spiel
|
, coalesce(i18n.spiel, '') as l10n_spiel
|
||||||
|
, coalesce(i18n.info, '') as l10n_info
|
||||||
|
, coalesce(i18n.facilities, '') as l10n_facilities
|
||||||
, coalesce(i18n.description, '') as l10n_description
|
, coalesce(i18n.description, '') 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
|
||||||
`, l10n.Locale.Language, l10n.Slug)
|
`, l10n.Locale.Language, l10n.Slug)
|
||||||
return row.Scan(&l10n.Name.Val, &l10n.Spiel.Val, &l10n.Description.Val)
|
return row.Scan(&l10n.Name.Val, &l10n.Spiel.Val, &l10n.Info.Val, &l10n.Facilities.Val, &l10n.Description.Val)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (l10n *typeL10nForm) MustRender(w http.ResponseWriter, r *http.Request, user *auth.User, company *auth.Company) {
|
func (l10n *typeL10nForm) MustRender(w http.ResponseWriter, r *http.Request, user *auth.User, company *auth.Company) {
|
||||||
|
@ -58,7 +64,7 @@ func editTypeL10n(w http.ResponseWriter, r *http.Request, user *auth.User, compa
|
||||||
l10n.MustRender(w, r, user, company)
|
l10n.MustRender(w, r, user, company)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if err := conn.TranslateCampsiteType(r.Context(), l10n.Slug, l10n.Locale.Language, l10n.Name.Val, l10n.Spiel.Val, l10n.Description.Val); err != nil {
|
if err := conn.TranslateCampsiteType(r.Context(), l10n.Slug, l10n.Locale.Language, l10n.Name.Val, l10n.Spiel.Val, l10n.Info.Val, l10n.Facilities.Val, l10n.Description.Val); err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
httplib.Redirect(w, r, "/admin/campsites/types", http.StatusSeeOther)
|
httplib.Redirect(w, r, "/admin/campsites/types", http.StatusSeeOther)
|
||||||
|
@ -70,6 +76,8 @@ func (l10n *typeL10nForm) Parse(r *http.Request) error {
|
||||||
}
|
}
|
||||||
l10n.Name.FillValue(r)
|
l10n.Name.FillValue(r)
|
||||||
l10n.Spiel.FillValue(r)
|
l10n.Spiel.FillValue(r)
|
||||||
|
l10n.Info.FillValue(r)
|
||||||
|
l10n.Facilities.FillValue(r)
|
||||||
l10n.Description.FillValue(r)
|
l10n.Description.FillValue(r)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,6 +55,8 @@ type publicPage struct {
|
||||||
Carousel []*carousel.Slide
|
Carousel []*carousel.Slide
|
||||||
Prices []*typePrice
|
Prices []*typePrice
|
||||||
Spiel gotemplate.HTML
|
Spiel gotemplate.HTML
|
||||||
|
Info gotemplate.HTML
|
||||||
|
Facilities gotemplate.HTML
|
||||||
Description gotemplate.HTML
|
Description gotemplate.HTML
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -79,13 +81,15 @@ func newPublicPage(ctx context.Context, conn *database.Conn, loc *locale.Locale,
|
||||||
row := conn.QueryRow(ctx, `
|
row := conn.QueryRow(ctx, `
|
||||||
select coalesce(i18n.name, campsite_type.name) as l10n_name
|
select coalesce(i18n.name, campsite_type.name) as l10n_name
|
||||||
, coalesce(i18n.spiel, campsite_type.spiel)::text as l10n_description
|
, coalesce(i18n.spiel, campsite_type.spiel)::text as l10n_description
|
||||||
|
, coalesce(i18n.info, campsite_type.info)::text as l10n_info
|
||||||
|
, 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
|
||||||
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.Description); err != nil {
|
if err := row.Scan(&page.Name, &page.Spiel, &page.Info, &page.Facilities, &page.Description); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,16 +11,16 @@ 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, 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, maxCampers int, dogsAllowed bool) (string, error) {
|
||||||
return tx.GetText(ctx, "select add_campsite_type($1, $2, $3, $4, $5, $6, $7)", companyID, mediaID, name, spiel, description, maxCampers, dogsAllowed)
|
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)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (tx *Tx) EditCampsiteType(ctx context.Context, slug string, mediaID int, name string, spiel 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, maxCampers int, dogsAllowed bool, active bool) (string, error) {
|
||||||
return tx.GetText(ctx, "select edit_campsite_type($1, $2, $3, $4, $5, $6, $7, $8)", slug, mediaID, name, spiel, description, maxCampers, dogsAllowed, active)
|
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)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Conn) TranslateCampsiteType(ctx context.Context, slug string, langTag language.Tag, name string, spiel string, description string) error {
|
func (c *Conn) TranslateCampsiteType(ctx context.Context, slug string, langTag language.Tag, name string, spiel string, info string, facilities string, description string) error {
|
||||||
_, err := c.Exec(ctx, "select translate_campsite_type($1, $2, $3, $4, $5)", slug, langTag, name, spiel, description)
|
_, err := c.Exec(ctx, "select translate_campsite_type($1, $2, $3, $4, $5, $6, $7)", slug, langTag, name, spiel, info, facilities, description)
|
||||||
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 {
|
||||||
|
|
97
po/ca.po
97
po/ca.po
|
@ -8,7 +8,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: camper\n"
|
"Project-Id-Version: camper\n"
|
||||||
"Report-Msgid-Bugs-To: jordi@tandem.blog\n"
|
"Report-Msgid-Bugs-To: jordi@tandem.blog\n"
|
||||||
"POT-Creation-Date: 2023-10-12 18:41+0200\n"
|
"POT-Creation-Date: 2023-10-13 18:05+0200\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"
|
||||||
|
@ -77,25 +77,40 @@ msgstr "Descobreix l’entorn"
|
||||||
msgid "Come and enjoy!"
|
msgid "Come and enjoy!"
|
||||||
msgstr "Vine a gaudir!"
|
msgstr "Vine a gaudir!"
|
||||||
|
|
||||||
#: web/templates/public/campsite/type.gohtml:40
|
#: web/templates/public/campsite/type.gohtml:38
|
||||||
#: web/templates/admin/campsite/option/form.gohtml:58
|
#: web/templates/admin/campsite/option/form.gohtml:58
|
||||||
#: web/templates/admin/campsite/type/form.gohtml:73
|
#: web/templates/admin/campsite/type/form.gohtml:73
|
||||||
msgctxt "title"
|
msgctxt "title"
|
||||||
msgid "Prices"
|
msgid "Prices"
|
||||||
msgstr "Preus"
|
msgstr "Preus"
|
||||||
|
|
||||||
#: web/templates/public/campsite/type.gohtml:50
|
#: web/templates/public/campsite/type.gohtml:47
|
||||||
msgid "%s €/night"
|
msgid "%s €/night"
|
||||||
msgstr "%s €/nit"
|
msgstr "%s €/nit"
|
||||||
|
|
||||||
#: web/templates/public/campsite/type.gohtml:52
|
#: web/templates/public/campsite/type.gohtml:49
|
||||||
msgid "%s: %s €/night"
|
msgid "%s: %s €/night"
|
||||||
msgstr "%s: %s €/nit"
|
msgstr "%s: %s €/nit"
|
||||||
|
|
||||||
#: web/templates/public/campsite/type.gohtml:55
|
#: web/templates/public/campsite/type.gohtml:52
|
||||||
msgid "*Minimum %d nights per stay"
|
msgid "*Minimum %d nights per stay"
|
||||||
msgstr "*Mínim %d nits per estada"
|
msgstr "*Mínim %d nits per estada"
|
||||||
|
|
||||||
|
#: web/templates/public/campsite/type.gohtml:61
|
||||||
|
msgctxt "title"
|
||||||
|
msgid "Info"
|
||||||
|
msgstr "Informació"
|
||||||
|
|
||||||
|
#: web/templates/public/campsite/type.gohtml:65
|
||||||
|
msgctxt "title"
|
||||||
|
msgid "Facilities"
|
||||||
|
msgstr "Equipaments"
|
||||||
|
|
||||||
|
#: web/templates/public/campsite/type.gohtml:69
|
||||||
|
msgctxt "title"
|
||||||
|
msgid "Description"
|
||||||
|
msgstr "Descripció"
|
||||||
|
|
||||||
#: web/templates/public/surroundings.gohtml:13
|
#: web/templates/public/surroundings.gohtml:13
|
||||||
msgctxt "title"
|
msgctxt "title"
|
||||||
msgid "What to Do Outside the Campsite?"
|
msgid "What to Do Outside the Campsite?"
|
||||||
|
@ -213,7 +228,7 @@ msgstr "Llegenda"
|
||||||
#: web/templates/admin/campsite/carousel/form.gohtml:47
|
#: web/templates/admin/campsite/carousel/form.gohtml:47
|
||||||
#: web/templates/admin/campsite/form.gohtml:70
|
#: web/templates/admin/campsite/form.gohtml:70
|
||||||
#: web/templates/admin/campsite/option/form.gohtml:78
|
#: web/templates/admin/campsite/option/form.gohtml:78
|
||||||
#: web/templates/admin/campsite/type/form.gohtml:115
|
#: web/templates/admin/campsite/type/form.gohtml:129
|
||||||
#: web/templates/admin/season/form.gohtml:64
|
#: web/templates/admin/season/form.gohtml:64
|
||||||
#: web/templates/admin/services/form.gohtml:69
|
#: web/templates/admin/services/form.gohtml:69
|
||||||
#: web/templates/admin/media/form.gohtml:35
|
#: web/templates/admin/media/form.gohtml:35
|
||||||
|
@ -225,7 +240,7 @@ msgstr "Actualitza"
|
||||||
#: web/templates/admin/campsite/carousel/form.gohtml:49
|
#: web/templates/admin/campsite/carousel/form.gohtml:49
|
||||||
#: web/templates/admin/campsite/form.gohtml:72
|
#: web/templates/admin/campsite/form.gohtml:72
|
||||||
#: web/templates/admin/campsite/option/form.gohtml:80
|
#: web/templates/admin/campsite/option/form.gohtml:80
|
||||||
#: web/templates/admin/campsite/type/form.gohtml:117
|
#: web/templates/admin/campsite/type/form.gohtml:131
|
||||||
#: web/templates/admin/season/form.gohtml:66
|
#: web/templates/admin/season/form.gohtml:66
|
||||||
#: web/templates/admin/services/form.gohtml:71
|
#: web/templates/admin/services/form.gohtml:71
|
||||||
msgctxt "action"
|
msgctxt "action"
|
||||||
|
@ -244,6 +259,8 @@ msgstr "Traducció de la diapositiva del carrusel a %s"
|
||||||
#: web/templates/admin/campsite/type/l10n.gohtml:21
|
#: web/templates/admin/campsite/type/l10n.gohtml:21
|
||||||
#: web/templates/admin/campsite/type/l10n.gohtml:33
|
#: web/templates/admin/campsite/type/l10n.gohtml:33
|
||||||
#: web/templates/admin/campsite/type/l10n.gohtml:46
|
#: web/templates/admin/campsite/type/l10n.gohtml:46
|
||||||
|
#: web/templates/admin/campsite/type/l10n.gohtml:59
|
||||||
|
#: web/templates/admin/campsite/type/l10n.gohtml:72
|
||||||
#: web/templates/admin/season/l10n.gohtml:21
|
#: web/templates/admin/season/l10n.gohtml:21
|
||||||
#: web/templates/admin/services/l10n.gohtml:21
|
#: web/templates/admin/services/l10n.gohtml:21
|
||||||
#: web/templates/admin/services/l10n.gohtml:33
|
#: web/templates/admin/services/l10n.gohtml:33
|
||||||
|
@ -256,6 +273,8 @@ msgstr "Origen:"
|
||||||
#: web/templates/admin/campsite/type/l10n.gohtml:23
|
#: web/templates/admin/campsite/type/l10n.gohtml:23
|
||||||
#: web/templates/admin/campsite/type/l10n.gohtml:36
|
#: web/templates/admin/campsite/type/l10n.gohtml:36
|
||||||
#: web/templates/admin/campsite/type/l10n.gohtml:49
|
#: web/templates/admin/campsite/type/l10n.gohtml:49
|
||||||
|
#: web/templates/admin/campsite/type/l10n.gohtml:62
|
||||||
|
#: web/templates/admin/campsite/type/l10n.gohtml:75
|
||||||
#: web/templates/admin/season/l10n.gohtml:23
|
#: web/templates/admin/season/l10n.gohtml:23
|
||||||
#: web/templates/admin/services/l10n.gohtml:23
|
#: web/templates/admin/services/l10n.gohtml:23
|
||||||
#: web/templates/admin/services/l10n.gohtml:36
|
#: web/templates/admin/services/l10n.gohtml:36
|
||||||
|
@ -266,7 +285,7 @@ msgstr "Traducció:"
|
||||||
#: web/templates/admin/carousel/l10n.gohtml:32
|
#: web/templates/admin/carousel/l10n.gohtml:32
|
||||||
#: web/templates/admin/campsite/carousel/l10n.gohtml:32
|
#: web/templates/admin/campsite/carousel/l10n.gohtml:32
|
||||||
#: web/templates/admin/campsite/option/l10n.gohtml:32
|
#: web/templates/admin/campsite/option/l10n.gohtml:32
|
||||||
#: web/templates/admin/campsite/type/l10n.gohtml:58
|
#: web/templates/admin/campsite/type/l10n.gohtml:84
|
||||||
#: web/templates/admin/season/l10n.gohtml:32
|
#: web/templates/admin/season/l10n.gohtml:32
|
||||||
#: web/templates/admin/services/l10n.gohtml:45
|
#: web/templates/admin/services/l10n.gohtml:45
|
||||||
msgctxt "action"
|
msgctxt "action"
|
||||||
|
@ -530,6 +549,18 @@ msgstr "Introducció"
|
||||||
|
|
||||||
#: web/templates/admin/campsite/type/form.gohtml:106
|
#: web/templates/admin/campsite/type/form.gohtml:106
|
||||||
#: web/templates/admin/campsite/type/l10n.gohtml:45
|
#: web/templates/admin/campsite/type/l10n.gohtml:45
|
||||||
|
msgctxt "input"
|
||||||
|
msgid "Info"
|
||||||
|
msgstr "Informació"
|
||||||
|
|
||||||
|
#: web/templates/admin/campsite/type/form.gohtml:113
|
||||||
|
#: web/templates/admin/campsite/type/l10n.gohtml:58
|
||||||
|
msgctxt "input"
|
||||||
|
msgid "Facilities"
|
||||||
|
msgstr "Equipaments"
|
||||||
|
|
||||||
|
#: web/templates/admin/campsite/type/form.gohtml:120
|
||||||
|
#: web/templates/admin/campsite/type/l10n.gohtml:71
|
||||||
#: web/templates/admin/services/form.gohtml:60
|
#: web/templates/admin/services/form.gohtml:60
|
||||||
#: web/templates/admin/services/l10n.gohtml:32
|
#: web/templates/admin/services/l10n.gohtml:32
|
||||||
msgctxt "input"
|
msgctxt "input"
|
||||||
|
@ -989,9 +1020,9 @@ msgctxt "language option"
|
||||||
msgid "Automatic"
|
msgid "Automatic"
|
||||||
msgstr "Automàtic"
|
msgstr "Automàtic"
|
||||||
|
|
||||||
#: pkg/app/user.go:249 pkg/campsite/types/l10n.go:77
|
#: pkg/app/user.go:249 pkg/campsite/types/l10n.go:87
|
||||||
#: pkg/campsite/types/l10n.go:132 pkg/campsite/types/option.go:336
|
#: pkg/campsite/types/l10n.go:142 pkg/campsite/types/option.go:336
|
||||||
#: pkg/campsite/types/admin.go:397 pkg/season/l10n.go:69
|
#: pkg/campsite/types/admin.go:413 pkg/season/l10n.go:69
|
||||||
#: pkg/season/admin.go:382 pkg/services/l10n.go:73 pkg/services/admin.go:266
|
#: pkg/season/admin.go:382 pkg/services/l10n.go:73 pkg/services/admin.go:266
|
||||||
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."
|
||||||
|
@ -1012,7 +1043,7 @@ msgstr "El fitxer has de ser una imatge PNG o JPEG vàlida."
|
||||||
msgid "Access forbidden"
|
msgid "Access forbidden"
|
||||||
msgstr "Accés prohibit"
|
msgstr "Accés prohibit"
|
||||||
|
|
||||||
#: pkg/campsite/types/option.go:337 pkg/campsite/types/admin.go:398
|
#: pkg/campsite/types/option.go:337 pkg/campsite/types/admin.go:414
|
||||||
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."
|
||||||
|
|
||||||
|
@ -1040,57 +1071,57 @@ 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:353 pkg/campsite/types/admin.go:411
|
#: pkg/campsite/types/option.go:353 pkg/campsite/types/admin.go:427
|
||||||
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:354 pkg/campsite/types/admin.go:412
|
#: pkg/campsite/types/option.go:354 pkg/campsite/types/admin.go:428
|
||||||
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:355 pkg/campsite/types/admin.go:413
|
#: pkg/campsite/types/option.go:355 pkg/campsite/types/admin.go:429
|
||||||
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."
|
||||||
|
|
||||||
#: pkg/campsite/types/admin.go:283
|
#: pkg/campsite/types/admin.go:289
|
||||||
msgctxt "input"
|
msgctxt "input"
|
||||||
msgid "Cover image"
|
msgid "Cover image"
|
||||||
msgstr "Imatge de portada"
|
msgstr "Imatge de portada"
|
||||||
|
|
||||||
#: pkg/campsite/types/admin.go:284
|
#: pkg/campsite/types/admin.go:290
|
||||||
msgctxt "action"
|
msgctxt "action"
|
||||||
msgid "Set campsite type cover"
|
msgid "Set campsite type cover"
|
||||||
msgstr "Estableix la portada del tipus d’allotjament"
|
msgstr "Estableix la portada del tipus d’allotjament"
|
||||||
|
|
||||||
#: pkg/campsite/types/admin.go:400
|
#: pkg/campsite/types/admin.go:416
|
||||||
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:401
|
#: pkg/campsite/types/admin.go:417
|
||||||
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:405
|
#: pkg/campsite/types/admin.go:421
|
||||||
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:406
|
#: pkg/campsite/types/admin.go:422
|
||||||
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:407
|
#: pkg/campsite/types/admin.go:423
|
||||||
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:416
|
#: pkg/campsite/types/admin.go:432
|
||||||
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:417
|
#: pkg/campsite/types/admin.go:433
|
||||||
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:418
|
#: pkg/campsite/types/admin.go:434
|
||||||
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."
|
||||||
|
|
||||||
|
@ -1267,6 +1298,22 @@ msgstr "No podeu deixar el fitxer del mèdia en blanc."
|
||||||
msgid "Filename can not be empty."
|
msgid "Filename can not be empty."
|
||||||
msgstr "No podeu deixar el nom del fitxer en blanc."
|
msgstr "No podeu deixar el nom del fitxer en blanc."
|
||||||
|
|
||||||
|
#~ msgctxt "title"
|
||||||
|
#~ msgid "Pricing"
|
||||||
|
#~ msgstr "Preus"
|
||||||
|
|
||||||
|
#~ msgctxt "input"
|
||||||
|
#~ msgid "Pricing"
|
||||||
|
#~ msgstr "Preus"
|
||||||
|
|
||||||
|
#~ msgctxt "title"
|
||||||
|
#~ msgid "Features"
|
||||||
|
#~ msgstr "Característiques"
|
||||||
|
|
||||||
|
#~ msgctxt "input"
|
||||||
|
#~ msgid "Features"
|
||||||
|
#~ msgstr "Característiques"
|
||||||
|
|
||||||
#~ msgid "Singular Lodges"
|
#~ msgid "Singular Lodges"
|
||||||
#~ msgstr "Allotjaments singulars"
|
#~ msgstr "Allotjaments singulars"
|
||||||
|
|
||||||
|
|
97
po/es.po
97
po/es.po
|
@ -8,7 +8,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: camper\n"
|
"Project-Id-Version: camper\n"
|
||||||
"Report-Msgid-Bugs-To: jordi@tandem.blog\n"
|
"Report-Msgid-Bugs-To: jordi@tandem.blog\n"
|
||||||
"POT-Creation-Date: 2023-10-12 18:41+0200\n"
|
"POT-Creation-Date: 2023-10-13 18:05+0200\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"
|
||||||
|
@ -77,25 +77,40 @@ msgstr "Descubre el entorno"
|
||||||
msgid "Come and enjoy!"
|
msgid "Come and enjoy!"
|
||||||
msgstr "¡Ven a disfrutar!"
|
msgstr "¡Ven a disfrutar!"
|
||||||
|
|
||||||
#: web/templates/public/campsite/type.gohtml:40
|
#: web/templates/public/campsite/type.gohtml:38
|
||||||
#: web/templates/admin/campsite/option/form.gohtml:58
|
#: web/templates/admin/campsite/option/form.gohtml:58
|
||||||
#: web/templates/admin/campsite/type/form.gohtml:73
|
#: web/templates/admin/campsite/type/form.gohtml:73
|
||||||
msgctxt "title"
|
msgctxt "title"
|
||||||
msgid "Prices"
|
msgid "Prices"
|
||||||
msgstr "Precios"
|
msgstr "Precios"
|
||||||
|
|
||||||
#: web/templates/public/campsite/type.gohtml:50
|
#: web/templates/public/campsite/type.gohtml:47
|
||||||
msgid "%s €/night"
|
msgid "%s €/night"
|
||||||
msgstr "%s €/noche"
|
msgstr "%s €/noche"
|
||||||
|
|
||||||
#: web/templates/public/campsite/type.gohtml:52
|
#: web/templates/public/campsite/type.gohtml:49
|
||||||
msgid "%s: %s €/night"
|
msgid "%s: %s €/night"
|
||||||
msgstr ":%s: %s €/noche"
|
msgstr ":%s: %s €/noche"
|
||||||
|
|
||||||
#: web/templates/public/campsite/type.gohtml:55
|
#: web/templates/public/campsite/type.gohtml:52
|
||||||
msgid "*Minimum %d nights per stay"
|
msgid "*Minimum %d nights per stay"
|
||||||
msgstr "*Mínimo %d noches por estancia"
|
msgstr "*Mínimo %d noches por estancia"
|
||||||
|
|
||||||
|
#: web/templates/public/campsite/type.gohtml:61
|
||||||
|
msgctxt "title"
|
||||||
|
msgid "Info"
|
||||||
|
msgstr "Información"
|
||||||
|
|
||||||
|
#: web/templates/public/campsite/type.gohtml:65
|
||||||
|
msgctxt "title"
|
||||||
|
msgid "Facilities"
|
||||||
|
msgstr "Equipamento"
|
||||||
|
|
||||||
|
#: web/templates/public/campsite/type.gohtml:69
|
||||||
|
msgctxt "title"
|
||||||
|
msgid "Description"
|
||||||
|
msgstr "Descripción"
|
||||||
|
|
||||||
#: web/templates/public/surroundings.gohtml:13
|
#: web/templates/public/surroundings.gohtml:13
|
||||||
msgctxt "title"
|
msgctxt "title"
|
||||||
msgid "What to Do Outside the Campsite?"
|
msgid "What to Do Outside the Campsite?"
|
||||||
|
@ -213,7 +228,7 @@ msgstr "Leyenda"
|
||||||
#: web/templates/admin/campsite/carousel/form.gohtml:47
|
#: web/templates/admin/campsite/carousel/form.gohtml:47
|
||||||
#: web/templates/admin/campsite/form.gohtml:70
|
#: web/templates/admin/campsite/form.gohtml:70
|
||||||
#: web/templates/admin/campsite/option/form.gohtml:78
|
#: web/templates/admin/campsite/option/form.gohtml:78
|
||||||
#: web/templates/admin/campsite/type/form.gohtml:115
|
#: web/templates/admin/campsite/type/form.gohtml:129
|
||||||
#: web/templates/admin/season/form.gohtml:64
|
#: web/templates/admin/season/form.gohtml:64
|
||||||
#: web/templates/admin/services/form.gohtml:69
|
#: web/templates/admin/services/form.gohtml:69
|
||||||
#: web/templates/admin/media/form.gohtml:35
|
#: web/templates/admin/media/form.gohtml:35
|
||||||
|
@ -225,7 +240,7 @@ msgstr "Actualizar"
|
||||||
#: web/templates/admin/campsite/carousel/form.gohtml:49
|
#: web/templates/admin/campsite/carousel/form.gohtml:49
|
||||||
#: web/templates/admin/campsite/form.gohtml:72
|
#: web/templates/admin/campsite/form.gohtml:72
|
||||||
#: web/templates/admin/campsite/option/form.gohtml:80
|
#: web/templates/admin/campsite/option/form.gohtml:80
|
||||||
#: web/templates/admin/campsite/type/form.gohtml:117
|
#: web/templates/admin/campsite/type/form.gohtml:131
|
||||||
#: web/templates/admin/season/form.gohtml:66
|
#: web/templates/admin/season/form.gohtml:66
|
||||||
#: web/templates/admin/services/form.gohtml:71
|
#: web/templates/admin/services/form.gohtml:71
|
||||||
msgctxt "action"
|
msgctxt "action"
|
||||||
|
@ -244,6 +259,8 @@ msgstr "Traducción de la diapositiva de carrusel a %s"
|
||||||
#: web/templates/admin/campsite/type/l10n.gohtml:21
|
#: web/templates/admin/campsite/type/l10n.gohtml:21
|
||||||
#: web/templates/admin/campsite/type/l10n.gohtml:33
|
#: web/templates/admin/campsite/type/l10n.gohtml:33
|
||||||
#: web/templates/admin/campsite/type/l10n.gohtml:46
|
#: web/templates/admin/campsite/type/l10n.gohtml:46
|
||||||
|
#: web/templates/admin/campsite/type/l10n.gohtml:59
|
||||||
|
#: web/templates/admin/campsite/type/l10n.gohtml:72
|
||||||
#: web/templates/admin/season/l10n.gohtml:21
|
#: web/templates/admin/season/l10n.gohtml:21
|
||||||
#: web/templates/admin/services/l10n.gohtml:21
|
#: web/templates/admin/services/l10n.gohtml:21
|
||||||
#: web/templates/admin/services/l10n.gohtml:33
|
#: web/templates/admin/services/l10n.gohtml:33
|
||||||
|
@ -256,6 +273,8 @@ msgstr "Origen:"
|
||||||
#: web/templates/admin/campsite/type/l10n.gohtml:23
|
#: web/templates/admin/campsite/type/l10n.gohtml:23
|
||||||
#: web/templates/admin/campsite/type/l10n.gohtml:36
|
#: web/templates/admin/campsite/type/l10n.gohtml:36
|
||||||
#: web/templates/admin/campsite/type/l10n.gohtml:49
|
#: web/templates/admin/campsite/type/l10n.gohtml:49
|
||||||
|
#: web/templates/admin/campsite/type/l10n.gohtml:62
|
||||||
|
#: web/templates/admin/campsite/type/l10n.gohtml:75
|
||||||
#: web/templates/admin/season/l10n.gohtml:23
|
#: web/templates/admin/season/l10n.gohtml:23
|
||||||
#: web/templates/admin/services/l10n.gohtml:23
|
#: web/templates/admin/services/l10n.gohtml:23
|
||||||
#: web/templates/admin/services/l10n.gohtml:36
|
#: web/templates/admin/services/l10n.gohtml:36
|
||||||
|
@ -266,7 +285,7 @@ msgstr "Traducción"
|
||||||
#: web/templates/admin/carousel/l10n.gohtml:32
|
#: web/templates/admin/carousel/l10n.gohtml:32
|
||||||
#: web/templates/admin/campsite/carousel/l10n.gohtml:32
|
#: web/templates/admin/campsite/carousel/l10n.gohtml:32
|
||||||
#: web/templates/admin/campsite/option/l10n.gohtml:32
|
#: web/templates/admin/campsite/option/l10n.gohtml:32
|
||||||
#: web/templates/admin/campsite/type/l10n.gohtml:58
|
#: web/templates/admin/campsite/type/l10n.gohtml:84
|
||||||
#: web/templates/admin/season/l10n.gohtml:32
|
#: web/templates/admin/season/l10n.gohtml:32
|
||||||
#: web/templates/admin/services/l10n.gohtml:45
|
#: web/templates/admin/services/l10n.gohtml:45
|
||||||
msgctxt "action"
|
msgctxt "action"
|
||||||
|
@ -530,6 +549,18 @@ msgstr "Introducción"
|
||||||
|
|
||||||
#: web/templates/admin/campsite/type/form.gohtml:106
|
#: web/templates/admin/campsite/type/form.gohtml:106
|
||||||
#: web/templates/admin/campsite/type/l10n.gohtml:45
|
#: web/templates/admin/campsite/type/l10n.gohtml:45
|
||||||
|
msgctxt "input"
|
||||||
|
msgid "Info"
|
||||||
|
msgstr "Información"
|
||||||
|
|
||||||
|
#: web/templates/admin/campsite/type/form.gohtml:113
|
||||||
|
#: web/templates/admin/campsite/type/l10n.gohtml:58
|
||||||
|
msgctxt "input"
|
||||||
|
msgid "Facilities"
|
||||||
|
msgstr "Equipamento"
|
||||||
|
|
||||||
|
#: web/templates/admin/campsite/type/form.gohtml:120
|
||||||
|
#: web/templates/admin/campsite/type/l10n.gohtml:71
|
||||||
#: web/templates/admin/services/form.gohtml:60
|
#: web/templates/admin/services/form.gohtml:60
|
||||||
#: web/templates/admin/services/l10n.gohtml:32
|
#: web/templates/admin/services/l10n.gohtml:32
|
||||||
msgctxt "input"
|
msgctxt "input"
|
||||||
|
@ -989,9 +1020,9 @@ msgctxt "language option"
|
||||||
msgid "Automatic"
|
msgid "Automatic"
|
||||||
msgstr "Automático"
|
msgstr "Automático"
|
||||||
|
|
||||||
#: pkg/app/user.go:249 pkg/campsite/types/l10n.go:77
|
#: pkg/app/user.go:249 pkg/campsite/types/l10n.go:87
|
||||||
#: pkg/campsite/types/l10n.go:132 pkg/campsite/types/option.go:336
|
#: pkg/campsite/types/l10n.go:142 pkg/campsite/types/option.go:336
|
||||||
#: pkg/campsite/types/admin.go:397 pkg/season/l10n.go:69
|
#: pkg/campsite/types/admin.go:413 pkg/season/l10n.go:69
|
||||||
#: pkg/season/admin.go:382 pkg/services/l10n.go:73 pkg/services/admin.go:266
|
#: pkg/season/admin.go:382 pkg/services/l10n.go:73 pkg/services/admin.go:266
|
||||||
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."
|
||||||
|
@ -1012,7 +1043,7 @@ msgstr "El archivo tiene que ser una imagen PNG o JPEG válida."
|
||||||
msgid "Access forbidden"
|
msgid "Access forbidden"
|
||||||
msgstr "Acceso prohibido"
|
msgstr "Acceso prohibido"
|
||||||
|
|
||||||
#: pkg/campsite/types/option.go:337 pkg/campsite/types/admin.go:398
|
#: pkg/campsite/types/option.go:337 pkg/campsite/types/admin.go:414
|
||||||
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."
|
||||||
|
|
||||||
|
@ -1040,57 +1071,57 @@ 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:353 pkg/campsite/types/admin.go:411
|
#: pkg/campsite/types/option.go:353 pkg/campsite/types/admin.go:427
|
||||||
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:354 pkg/campsite/types/admin.go:412
|
#: pkg/campsite/types/option.go:354 pkg/campsite/types/admin.go:428
|
||||||
msgid "Price per night must be a decimal number."
|
msgid "Price per night must be a decimal number."
|
||||||
msgstr "El precio por noche tien que ser un número decimal."
|
msgstr "El precio por noche tien que ser un número decimal."
|
||||||
|
|
||||||
#: pkg/campsite/types/option.go:355 pkg/campsite/types/admin.go:413
|
#: pkg/campsite/types/option.go:355 pkg/campsite/types/admin.go:429
|
||||||
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."
|
||||||
|
|
||||||
#: pkg/campsite/types/admin.go:283
|
#: pkg/campsite/types/admin.go:289
|
||||||
msgctxt "input"
|
msgctxt "input"
|
||||||
msgid "Cover image"
|
msgid "Cover image"
|
||||||
msgstr "Imagen de portada"
|
msgstr "Imagen de portada"
|
||||||
|
|
||||||
#: pkg/campsite/types/admin.go:284
|
#: pkg/campsite/types/admin.go:290
|
||||||
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:400
|
#: pkg/campsite/types/admin.go:416
|
||||||
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:401
|
#: pkg/campsite/types/admin.go:417
|
||||||
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:405
|
#: pkg/campsite/types/admin.go:421
|
||||||
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:406
|
#: pkg/campsite/types/admin.go:422
|
||||||
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:407
|
#: pkg/campsite/types/admin.go:423
|
||||||
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:416
|
#: pkg/campsite/types/admin.go:432
|
||||||
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:417
|
#: pkg/campsite/types/admin.go:433
|
||||||
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:418
|
#: pkg/campsite/types/admin.go:434
|
||||||
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."
|
||||||
|
|
||||||
|
@ -1267,6 +1298,22 @@ msgstr "No podéis dejar el archivo del medio en blanco."
|
||||||
msgid "Filename can not be empty."
|
msgid "Filename can not be empty."
|
||||||
msgstr "No podéis dejar el nombre del archivo en blanco."
|
msgstr "No podéis dejar el nombre del archivo en blanco."
|
||||||
|
|
||||||
|
#~ msgctxt "title"
|
||||||
|
#~ msgid "Pricing"
|
||||||
|
#~ msgstr "Precios"
|
||||||
|
|
||||||
|
#~ msgctxt "input"
|
||||||
|
#~ msgid "Pricing"
|
||||||
|
#~ msgstr "Precios"
|
||||||
|
|
||||||
|
#~ msgctxt "title"
|
||||||
|
#~ msgid "Features"
|
||||||
|
#~ msgstr "Características"
|
||||||
|
|
||||||
|
#~ msgctxt "input"
|
||||||
|
#~ msgid "Features"
|
||||||
|
#~ msgstr "Características"
|
||||||
|
|
||||||
#~ msgid "Singular Lodges"
|
#~ msgid "Singular Lodges"
|
||||||
#~ msgstr "Alojamientos singulares"
|
#~ msgstr "Alojamientos singulares"
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,6 @@
|
||||||
|
|
||||||
begin;
|
begin;
|
||||||
|
|
||||||
drop function if exists camper.add_campsite_type(integer, integer, text, text, text, integer, boolean);
|
drop function if exists camper.add_campsite_type(integer, integer, text, text, text, text, text, integer, boolean);
|
||||||
|
|
||||||
commit;
|
commit;
|
||||||
|
|
|
@ -2,6 +2,6 @@
|
||||||
|
|
||||||
begin;
|
begin;
|
||||||
|
|
||||||
drop function if exists camper.edit_campsite_type(uuid, integer, text, text, text, integer, boolean, boolean);
|
drop function if exists camper.edit_campsite_type(uuid, integer, text, text, text, text, text, integer, boolean, boolean);
|
||||||
|
|
||||||
commit;
|
commit;
|
||||||
|
|
|
@ -2,6 +2,6 @@
|
||||||
|
|
||||||
begin;
|
begin;
|
||||||
|
|
||||||
drop function if exists camper.translate_campsite_type(uuid, text, text, text, text);
|
drop function if exists camper.translate_campsite_type(uuid, text, text, text, text, text, text);
|
||||||
|
|
||||||
commit;
|
commit;
|
||||||
|
|
|
@ -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', 'integer', 'boolean']);
|
select has_function('camper', 'add_campsite_type', array ['integer', 'integer', 'text', 'text', 'text', 'text', 'text', 'integer', 'boolean']);
|
||||||
select function_lang_is('camper', 'add_campsite_type', array ['integer', 'integer', 'text', 'text', 'text', 'integer', 'boolean'], 'sql');
|
select function_lang_is('camper', 'add_campsite_type', array ['integer', 'integer', 'text', 'text', 'text', 'text', 'text', 'integer', 'boolean'], 'sql');
|
||||||
select function_returns('camper', 'add_campsite_type', array ['integer', 'integer', 'text', 'text', 'text', 'integer', 'boolean'], 'uuid');
|
select function_returns('camper', 'add_campsite_type', array ['integer', 'integer', 'text', 'text', 'text', 'text', 'text', 'integer', 'boolean'], 'uuid');
|
||||||
select isnt_definer('camper', 'add_campsite_type', array ['integer', 'integer', 'text', 'text', 'text', 'integer', 'boolean']);
|
select isnt_definer('camper', 'add_campsite_type', array ['integer', 'integer', 'text', 'text', 'text', 'text', 'text', 'integer', 'boolean']);
|
||||||
select volatility_is('camper', 'add_campsite_type', array ['integer', 'integer', 'text', 'text', 'text', 'integer', 'boolean'], 'volatile');
|
select volatility_is('camper', 'add_campsite_type', array ['integer', 'integer', 'text', 'text', 'text', 'text', 'text', 'integer', 'boolean'], 'volatile');
|
||||||
select function_privs_are('camper', 'add_campsite_type', array ['integer', 'integer', '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'], 'guest', array[]::text[]);
|
||||||
select function_privs_are('camper', 'add_campsite_type', array ['integer', 'integer', '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'], 'employee', array[]::text[]);
|
||||||
select function_privs_are('camper', 'add_campsite_type', array ['integer', 'integer', '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'], 'admin', array['EXECUTE']);
|
||||||
select function_privs_are('camper', 'add_campsite_type', array ['integer', 'integer', 'text', 'text', 'text', 'integer', 'boolean'], 'authenticator', array[]::text[]);
|
select function_privs_are('camper', 'add_campsite_type', array ['integer', 'integer', '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', '', '<!-- 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>', '', 2, false) $$,
|
$$ select add_campsite_type(2, 4, 'Type B', '<p>One</p><p>Two</p>', '', '<p>Pricing</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, description::text, active, max_campers, dogs_allowed from campsite_type $$,
|
$$ select company_id, media_id, name, spiel::text, info::text, facilities::text, description::text, active, max_campers, dogs_allowed from campsite_type $$,
|
||||||
$$ values (1, 3, 'Type A', '', '<!-- 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>', '', true, 2, false)
|
, (2, 4, 'Type B', '<p>One</p><p>Two</p>', '', '<p>Pricing</p>', '', true, 2, false)
|
||||||
$$,
|
$$,
|
||||||
'Should have added all two campsite type'
|
'Should have added all two campsite type'
|
||||||
);
|
);
|
||||||
|
|
|
@ -5,7 +5,7 @@ reset client_min_messages;
|
||||||
|
|
||||||
begin;
|
begin;
|
||||||
|
|
||||||
select plan(69);
|
select plan(77);
|
||||||
|
|
||||||
set search_path to camper, public;
|
set search_path to camper, public;
|
||||||
|
|
||||||
|
@ -54,6 +54,18 @@ select col_not_null('campsite_type', 'spiel');
|
||||||
select col_has_default('campsite_type', 'spiel');
|
select col_has_default('campsite_type', 'spiel');
|
||||||
--select col_default_is('campsite_type', 'spiel', '');
|
--select col_default_is('campsite_type', 'spiel', '');
|
||||||
|
|
||||||
|
select has_column('campsite_type', 'info');
|
||||||
|
select col_type_is('campsite_type', 'info', 'xml');
|
||||||
|
select col_not_null('campsite_type', 'info');
|
||||||
|
select col_has_default('campsite_type', 'info');
|
||||||
|
--select col_default_is('campsite_type', 'info', '');
|
||||||
|
|
||||||
|
select has_column('campsite_type', 'facilities');
|
||||||
|
select col_type_is('campsite_type', 'facilities', 'xml');
|
||||||
|
select col_not_null('campsite_type', 'facilities');
|
||||||
|
select col_has_default('campsite_type', 'facilities');
|
||||||
|
--select col_default_is('campsite_type', 'facilities', '');
|
||||||
|
|
||||||
select has_column('campsite_type', 'description');
|
select has_column('campsite_type', 'description');
|
||||||
select col_type_is('campsite_type', 'description', 'xml');
|
select col_type_is('campsite_type', 'description', 'xml');
|
||||||
select col_not_null('campsite_type', 'description');
|
select col_not_null('campsite_type', 'description');
|
||||||
|
|
|
@ -5,7 +5,7 @@ reset client_min_messages;
|
||||||
|
|
||||||
begin;
|
begin;
|
||||||
|
|
||||||
select plan(31);
|
select plan(39);
|
||||||
|
|
||||||
set search_path to camper, public;
|
set search_path to camper, public;
|
||||||
|
|
||||||
|
@ -41,6 +41,16 @@ select col_type_is('campsite_type_i18n', 'spiel', 'xml');
|
||||||
select col_not_null('campsite_type_i18n', 'spiel');
|
select col_not_null('campsite_type_i18n', 'spiel');
|
||||||
select col_hasnt_default('campsite_type_i18n', 'spiel');
|
select col_hasnt_default('campsite_type_i18n', 'spiel');
|
||||||
|
|
||||||
|
select has_column('campsite_type_i18n', 'info');
|
||||||
|
select col_type_is('campsite_type_i18n', 'info', 'xml');
|
||||||
|
select col_not_null('campsite_type_i18n', 'info');
|
||||||
|
select col_hasnt_default('campsite_type_i18n', 'info');
|
||||||
|
|
||||||
|
select has_column('campsite_type_i18n', 'facilities');
|
||||||
|
select col_type_is('campsite_type_i18n', 'facilities', 'xml');
|
||||||
|
select col_not_null('campsite_type_i18n', 'facilities');
|
||||||
|
select col_hasnt_default('campsite_type_i18n', 'facilities');
|
||||||
|
|
||||||
select has_column('campsite_type_i18n', 'description');
|
select has_column('campsite_type_i18n', 'description');
|
||||||
select col_type_is('campsite_type_i18n', 'description', 'xml');
|
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');
|
||||||
|
|
|
@ -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', 'integer', 'boolean', 'boolean']);
|
select has_function('camper', 'edit_campsite_type', array ['uuid', 'integer', 'text', 'text', 'text', 'text', 'text', 'integer', 'boolean', 'boolean']);
|
||||||
select function_lang_is('camper', 'edit_campsite_type', array ['uuid', 'integer', 'text', 'text', 'text', 'integer', 'boolean', 'boolean'], 'sql');
|
select function_lang_is('camper', 'edit_campsite_type', array ['uuid', 'integer', 'text', 'text', 'text', 'text', 'text', 'integer', 'boolean', 'boolean'], 'sql');
|
||||||
select function_returns('camper', 'edit_campsite_type', array ['uuid', 'integer', 'text', 'text', 'text', 'integer', 'boolean', 'boolean'], 'uuid');
|
select function_returns('camper', 'edit_campsite_type', array ['uuid', 'integer', 'text', 'text', 'text', 'text', 'text', 'integer', 'boolean', 'boolean'], 'uuid');
|
||||||
select isnt_definer('camper', 'edit_campsite_type', array ['uuid', 'integer', 'text', 'text', 'text', 'integer', 'boolean', 'boolean']);
|
select isnt_definer('camper', 'edit_campsite_type', array ['uuid', 'integer', 'text', 'text', 'text', 'text', 'text', 'integer', 'boolean', 'boolean']);
|
||||||
select volatility_is('camper', 'edit_campsite_type', array ['uuid', 'integer', 'text', 'text', 'text', 'integer', 'boolean', 'boolean'], 'volatile');
|
select volatility_is('camper', 'edit_campsite_type', array ['uuid', 'integer', 'text', 'text', 'text', 'text', 'text', 'integer', 'boolean', 'boolean'], 'volatile');
|
||||||
select function_privs_are('camper', 'edit_campsite_type', array ['uuid', 'integer', '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'], 'guest', array[]::text[]);
|
||||||
select function_privs_are('camper', 'edit_campsite_type', array ['uuid', 'integer', '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'], 'employee', array[]::text[]);
|
||||||
select function_privs_are('camper', 'edit_campsite_type', array ['uuid', 'integer', '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'], 'admin', array['EXECUTE']);
|
||||||
select function_privs_are('camper', 'edit_campsite_type', array ['uuid', 'integer', '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', '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, description, max_campers, dogs_allowed, active)
|
insert into campsite_type (company_id, slug, media_id, name, spiel, info, facilities, description, max_campers, dogs_allowed, active)
|
||||||
values (1, '87452b88-b48f-48d3-bb6c-0296de64164e', 2, 'Type A', '<h1>1</h1>', '<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>', 5, false, true)
|
||||||
, (1, '9b6370f7-f941-46f2-bc6e-de455675bd0a', 3, 'Type B', '<h2>2</h2>', '<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>', 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>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>', 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>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>', 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, description::text, max_campers, dogs_allowed, active from campsite_type $$,
|
$$ select slug::text, media_id, name, spiel::text, info::text, facilities::text, description::text, max_campers, dogs_allowed, active from campsite_type $$,
|
||||||
$$ values ('87452b88-b48f-48d3-bb6c-0296de64164e', 4, 'Type 1', '<h3>A</h3>', '<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>', 2, true, false)
|
||||||
, ('9b6370f7-f941-46f2-bc6e-de455675bd0a', 3, 'Type 2', '<h1>B</h1>', '<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>', 9, false, true)
|
||||||
$$,
|
$$,
|
||||||
'Should have updated all campsite types.'
|
'Should have updated all campsite types.'
|
||||||
);
|
);
|
||||||
|
|
|
@ -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']);
|
select has_function('camper', 'translate_campsite_type', array['uuid', 'text', 'text', 'text', 'text', 'text', 'text']);
|
||||||
select function_lang_is('camper', 'translate_campsite_type', array['uuid', 'text', 'text', 'text', 'text'], 'sql');
|
select function_lang_is('camper', 'translate_campsite_type', array['uuid', 'text', 'text', 'text', 'text', 'text', 'text'], 'sql');
|
||||||
select function_returns('camper', 'translate_campsite_type', array['uuid', 'text', 'text', 'text', 'text'], 'void');
|
select function_returns('camper', 'translate_campsite_type', array['uuid', 'text', 'text', 'text', 'text', 'text', 'text'], 'void');
|
||||||
select isnt_definer('camper', 'translate_campsite_type', array['uuid', 'text', 'text', 'text', 'text']);
|
select isnt_definer('camper', 'translate_campsite_type', array['uuid', 'text', 'text', 'text', 'text', 'text', 'text']);
|
||||||
select volatility_is('camper', 'translate_campsite_type', array['uuid', 'text', 'text', 'text', 'text'], 'volatile');
|
select volatility_is('camper', 'translate_campsite_type', array['uuid', 'text', 'text', 'text', 'text', 'text', 'text'], 'volatile');
|
||||||
select function_privs_are('camper', 'translate_campsite_type', array['uuid', 'text', 'text', 'text', 'text'], 'guest', array[]::text[]);
|
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'], 'employee', 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'], 'admin', array['EXECUTE']);
|
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'], 'authenticator', array[]::text[]);
|
select function_privs_are('camper', 'translate_campsite_type', array['uuid', '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, description, active, dogs_allowed, max_campers)
|
insert into campsite_type (company_id, slug, media_id, name, spiel, info, facilities, description, active, dogs_allowed, max_campers)
|
||||||
values (1, '87452b88-b48f-48d3-bb6c-0296de64164e', 2, 'Type A', '<h2>One</h2>', '<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>', true, false, 4)
|
||||||
, (1, '9b6370f7-f941-46f2-bc6e-de455675bd0a', 3, 'Type B', '<h2>Two</h2>', '<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>', false, true, 5)
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into campsite_type_i18n (campsite_type_id, lang_tag, name, spiel, description)
|
insert into campsite_type_i18n (campsite_type_id, lang_tag, name, spiel, info, facilities, description)
|
||||||
select campsite_type_id, 'ca', 'tipusb', '<h2>dos</h2>', '<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>' 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', '<h2>Un</h2>', '<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>') $$,
|
||||||
'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>', '<p>b</p>') $$,
|
$$ select translate_campsite_type('9b6370f7-f941-46f2-bc6e-de455675bd0a', 'es', 'Tipo B', '<h2>Dos</h2>', null, '<p>Precios B</p>', null) $$,
|
||||||
'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', null, null) $$,
|
$$ 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>') $$,
|
||||||
'Should be able to overwrite the catalan translation of the second type, with no description nor spiel'
|
'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.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 from campsite_type_i18n as i18n join campsite_type using (campsite_type_id) $$,
|
||||||
$$ values ('87452b88-b48f-48d3-bb6c-0296de64164e', 'ca', 'Tipus A', '<h2>Un</h2>', '<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', '', '')
|
, ('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', 'es', 'Tipo B', '<h2>Dos</h2>', '<p>b</p>')
|
, ('9b6370f7-f941-46f2-bc6e-de455675bd0a', 'es', 'Tipo B', '<h2>Dos</h2>', '', '<p>Precios B</p>', '')
|
||||||
$$,
|
$$,
|
||||||
'Should have added and updated all translations.'
|
'Should have added and updated all translations.'
|
||||||
);
|
);
|
||||||
|
|
|
@ -2,6 +2,6 @@
|
||||||
|
|
||||||
begin;
|
begin;
|
||||||
|
|
||||||
select has_function_privilege('camper.add_campsite_type(integer, integer, text, text, text, integer, boolean)', 'execute');
|
select has_function_privilege('camper.add_campsite_type(integer, integer, text, text, text, text, text, integer, boolean)', 'execute');
|
||||||
|
|
||||||
rollback;
|
rollback;
|
||||||
|
|
|
@ -8,6 +8,8 @@ select campsite_type_id
|
||||||
, name
|
, name
|
||||||
, media_id
|
, media_id
|
||||||
, spiel
|
, spiel
|
||||||
|
, info
|
||||||
|
, facilities
|
||||||
, description
|
, description
|
||||||
, max_campers
|
, max_campers
|
||||||
, dogs_allowed
|
, dogs_allowed
|
||||||
|
|
|
@ -6,6 +6,8 @@ select campsite_type_id
|
||||||
, lang_tag
|
, lang_tag
|
||||||
, name
|
, name
|
||||||
, spiel
|
, spiel
|
||||||
|
, info
|
||||||
|
, facilities
|
||||||
, description
|
, description
|
||||||
from camper.campsite_type_i18n
|
from camper.campsite_type_i18n
|
||||||
where false;
|
where false;
|
||||||
|
|
|
@ -2,6 +2,6 @@
|
||||||
|
|
||||||
begin;
|
begin;
|
||||||
|
|
||||||
select has_function_privilege('camper.edit_campsite_type(uuid, integer, text, text, text, integer, boolean, boolean)', 'execute');
|
select has_function_privilege('camper.edit_campsite_type(uuid, integer, text, text, text, text, text, integer, boolean, boolean)', 'execute');
|
||||||
|
|
||||||
rollback;
|
rollback;
|
||||||
|
|
|
@ -2,6 +2,6 @@
|
||||||
|
|
||||||
begin;
|
begin;
|
||||||
|
|
||||||
select has_function_privilege('camper.translate_campsite_type(uuid, text, text, text, text)', 'execute');
|
select has_function_privilege('camper.translate_campsite_type(uuid, text, text, text, text, text, text)', 'execute');
|
||||||
|
|
||||||
rollback;
|
rollback;
|
||||||
|
|
|
@ -101,6 +101,20 @@
|
||||||
</label>
|
</label>
|
||||||
{{ template "error-message" . }}
|
{{ template "error-message" . }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{ with .Info -}}
|
||||||
|
<label>
|
||||||
|
{{( pgettext "Info" "input")}}<br>
|
||||||
|
<textarea class="html" name="{{ .Name }}" {{ template "error-attrs" . }}>{{ .Val }}</textarea><br>
|
||||||
|
</label>
|
||||||
|
{{ template "error-message" . }}
|
||||||
|
{{- end }}
|
||||||
|
{{ with .Facilities -}}
|
||||||
|
<label>
|
||||||
|
{{( pgettext "Facilities" "input")}}<br>
|
||||||
|
<textarea class="html" name="{{ .Name }}" {{ template "error-attrs" . }}>{{ .Val }}</textarea><br>
|
||||||
|
</label>
|
||||||
|
{{ template "error-message" . }}
|
||||||
|
{{- end }}
|
||||||
{{ with .Description -}}
|
{{ with .Description -}}
|
||||||
<label>
|
<label>
|
||||||
{{( pgettext "Description" "input")}}<br>
|
{{( pgettext "Description" "input")}}<br>
|
||||||
|
|
|
@ -40,6 +40,32 @@
|
||||||
{{ template "error-message" . }}
|
{{ template "error-message" . }}
|
||||||
</fieldset>
|
</fieldset>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{ with .Info -}}
|
||||||
|
<fieldset>
|
||||||
|
<legend{{( pgettext "Info" "input")}}></legend>
|
||||||
|
{{( gettext "Source:" )}}<br>
|
||||||
|
{{ .Source | raw }}<br>
|
||||||
|
<label>
|
||||||
|
{{( pgettext "Translation:" "input" )}}
|
||||||
|
<textarea class="html"
|
||||||
|
name="{{ .Name }}" {{ template "error-attrs" . }}>{{ .Val }}</textarea><br>
|
||||||
|
</label>
|
||||||
|
{{ template "error-message" . }}
|
||||||
|
</fieldset>
|
||||||
|
{{- end }}
|
||||||
|
{{ with .Facilities -}}
|
||||||
|
<fieldset>
|
||||||
|
<legend{{( pgettext "Facilities" "input")}}></legend>
|
||||||
|
{{( gettext "Source:" )}}<br>
|
||||||
|
{{ .Source | raw }}<br>
|
||||||
|
<label>
|
||||||
|
{{( pgettext "Translation:" "input" )}}
|
||||||
|
<textarea class="html"
|
||||||
|
name="{{ .Name }}" {{ template "error-attrs" . }}>{{ .Val }}</textarea><br>
|
||||||
|
</label>
|
||||||
|
{{ template "error-message" . }}
|
||||||
|
</fieldset>
|
||||||
|
{{- end }}
|
||||||
{{ with .Description -}}
|
{{ with .Description -}}
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend{{( pgettext "Description" "input")}}></legend>
|
<legend{{( pgettext "Description" "input")}}></legend>
|
||||||
|
|
|
@ -33,8 +33,6 @@
|
||||||
</div>
|
</div>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{ .Description }}
|
|
||||||
|
|
||||||
{{ with .Prices -}}
|
{{ with .Prices -}}
|
||||||
<article>
|
<article>
|
||||||
<h3>{{( pgettext "Prices" "title" )}}</h3>
|
<h3>{{( pgettext "Prices" "title" )}}</h3>
|
||||||
|
@ -58,6 +56,21 @@
|
||||||
</article>
|
</article>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
|
<article>
|
||||||
|
<section>
|
||||||
|
<h3>{{( pgettext "Info" "title" )}}</h3>
|
||||||
|
{{ .Info }}
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<h3>{{( pgettext "Facilities" "title" )}}</h3>
|
||||||
|
{{ .Facilities }}
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<h3>{{( pgettext "Description" "title" )}}</h3>
|
||||||
|
{{ .Description }}
|
||||||
|
</section>
|
||||||
|
</article>
|
||||||
|
|
||||||
{{ template "carouselInit" }}
|
{{ template "carouselInit" }}
|
||||||
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
Loading…
Reference in New Issue