From 02dd6b8c328f24e78e6855a1c6bbc7a604608058 Mon Sep 17 00:00:00 2001 From: Roman Date: Tue, 14 Nov 2023 17:35:59 +0100 Subject: [PATCH] Squashed commit of the following: commit e179ae71374f3b1c1290928a1f5d37a2c5e18d30 Author: Roman Date: Tue Nov 14 17:26:37 2023 +0100 Fix changes commit a635b0754f77ed241568ba2858ea603f0d65b983 Author: Roman Date: Tue Nov 14 17:21:33 2023 +0100 Extend the email vars list commit 1e7f38fbfbcc4e662145a599f28a7c9cafec368e Author: Roman Date: Tue Nov 14 17:24:39 2023 +0100 Squashed commit of the following: commit 5e0b9769e73f3938a90f7e9a1ef8365896626add Author: Roman Date: Mon Oct 30 16:10:06 2023 +0100 Revert "Squashed commit of the following:" This reverts commit 607c341cc046122f9a4ef51144a3e85191c8dc0e. commit 607c341cc046122f9a4ef51144a3e85191c8dc0e Author: Roman Date: Mon Oct 30 14:24:16 2023 +0100 Squashed commit of the following: commit d2b519c987372ab4eed5ee8641809d4f09a35468 Author: Roman <72063601+folix-01@users.noreply.github.com> Date: Thu Oct 26 15:00:05 2023 +0200 Align to redturtle.prenotazioni newest version commit dc5d29186128ad67e4f5fbb671bbe7a8e2b27c3b Merge: 3ee8b9d 932795d Author: Roman Date: Mon Oct 16 10:08:36 2023 +0200 Merge branch 'master' into develop commit 3ee8b9dd5665a8c65d623a33d8904c9760948fce Author: Roman Date: Mon Oct 16 10:07:01 2023 +0200 Formatting fixes commit baed96ab8f90029f63f60a33ca852630eb16db6c Merge: 77cbfd0 3c64143 Author: Roman Date: Mon Oct 16 10:06:32 2023 +0200 Merge branch 'master' into develop commit 77cbfd0696417acaf3697140583cee83be6d8d71 Author: Roman Date: Fri Oct 13 18:04:14 2023 +0200 Update redturtle.prenotazioni verison to 2.1.3 commit e4f30341a4a71b4794da6c277a4fb950a88eb30c Author: Roman Date: Fri Oct 13 17:44:14 2023 +0200 Fixed imports commit 5ec0e3cbf7afeabe0f16d4e88001cd021f5f349e Author: Roman Date: Fri Oct 13 17:28:59 2023 +0200 Squashed commit of the following: commit 3b5583cd145b5601386f0acc5c3a67137dc5125d Author: Roman Date: Fri Oct 13 17:27:53 2023 +0200 Update redturtle.prenotazioni version commit ea1162219182459486ebbd2eaea9724b1bd09ed6 Author: Roman <72063601+folix-01@users.noreply.github.com> Date: Fri Oct 13 14:29:48 2023 +0200 Add the contact info to @bookable-uo-list response (#27) * Add the contact info to @bookable-uo-list response * Update src/design/plone/ioprenoto/restapi/services/bookable_list/get.py Co-authored-by: Mauro Amico * Use python syntax * Update src/design/plone/ioprenoto/restapi/services/bookable_list/get.py Co-authored-by: Mauro Amico --------- Co-authored-by: Mauro Amico commit e2ceb8c2815ab195665c729287d4dcb4606a4031 Author: Roman Date: Wed Oct 11 09:37:56 2023 +0200 Add changelog commit 65911f2d9b34dede6355af721738054017b5ea54 Author: Roman Date: Wed Oct 11 09:05:01 2023 +0200 Align with redturtle.prenotazioni>=2.0.1 version --- CHANGES.rst | 5 +++++ .../plone/ioprenoto/adapters/configure.zcml | 7 ++++++ .../plone/ioprenoto/adapters/stringinterp.py | 22 +++++++++++++++++++ 3 files changed, 34 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 35c223f..d5c058d 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -7,6 +7,11 @@ Changelog - Compatibilize with the 2.0.1 redturtle.prenotazioni version. - Add the UO.contact_info field to @bookable-uo-list response. [folix-01] + [folix-01] +- Add the UO.contact_info field to @bookable-uo-list response. + [folix-01] +- Extend prenotazioni email vars list. + [folix-01] 1.1.10 (2023-10-16) diff --git a/src/design/plone/ioprenoto/adapters/configure.zcml b/src/design/plone/ioprenoto/adapters/configure.zcml index 859b395..5343e88 100644 --- a/src/design/plone/ioprenoto/adapters/configure.zcml +++ b/src/design/plone/ioprenoto/adapters/configure.zcml @@ -22,4 +22,11 @@ name="booking_operator_url" /> + + diff --git a/src/design/plone/ioprenoto/adapters/stringinterp.py b/src/design/plone/ioprenoto/adapters/stringinterp.py index e0f46ee..79b2c44 100644 --- a/src/design/plone/ioprenoto/adapters/stringinterp.py +++ b/src/design/plone/ioprenoto/adapters/stringinterp.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- from plone import api from plone.registry.interfaces import IRegistry +from plone.stringinterp.adapters import BaseSubstitution from plone.volto.interfaces import IVoltoSettings from redturtle.prenotazioni.adapters import stringinterp as base from zope.component import adapter, getUtility @@ -62,3 +63,24 @@ def safe_call(self): booking_folder.getPhysicalPath()[len(portal.getPhysicalPath()) :] # noqa ) return f"{portal_url}/{booking_folder_path}?tab=search&SearchableText={self.context.getBookingCode()}&login=1" + + +@adapter(Interface) +class BookingUnitaOrganizzativaTitle(BaseSubstitution): + def safe_call(self): + return getattr( + getattr( + next( + iter( + getattr( + self.context.getPrenotazioniFolder(), "uffici_correlati", [] + ) + ), + None, + ), + "to_object", + None, + ), + "title", + "", + )