Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit e179ae7
Author: Roman <roman.kysil@redturtle.it>
Date:   Tue Nov 14 17:26:37 2023 +0100

    Fix changes

commit a635b07
Author: Roman <roman.kysil@redturtle.it>
Date:   Tue Nov 14 17:21:33 2023 +0100

    Extend the email vars list

commit 1e7f38f
Author: Roman <roman.kysil@redturtle.it>
Date:   Tue Nov 14 17:24:39 2023 +0100

    Squashed commit of the following:

    commit 5e0b976
    Author: Roman <roman.kysil@redturtle.it>
    Date:   Mon Oct 30 16:10:06 2023 +0100

        Revert "Squashed commit of the following:"

        This reverts commit 607c341.

    commit 607c341
    Author: Roman <roman.kysil@redturtle.it>
    Date:   Mon Oct 30 14:24:16 2023 +0100

        Squashed commit of the following:

        commit d2b519c
        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 dc5d291
    Merge: 3ee8b9d 932795d
    Author: Roman <roman.kysil@redturtle.it>
    Date:   Mon Oct 16 10:08:36 2023 +0200

        Merge branch 'master' into develop

    commit 3ee8b9d
    Author: Roman <roman.kysil@redturtle.it>
    Date:   Mon Oct 16 10:07:01 2023 +0200

        Formatting fixes

    commit baed96a
    Merge: 77cbfd0 3c64143
    Author: Roman <roman.kysil@redturtle.it>
    Date:   Mon Oct 16 10:06:32 2023 +0200

        Merge branch 'master' into develop

    commit 77cbfd0
    Author: Roman <roman.kysil@redturtle.it>
    Date:   Fri Oct 13 18:04:14 2023 +0200

        Update redturtle.prenotazioni verison to 2.1.3

    commit e4f3034
    Author: Roman <roman.kysil@redturtle.it>
    Date:   Fri Oct 13 17:44:14 2023 +0200

        Fixed imports

    commit 5ec0e3c
    Author: Roman <roman.kysil@redturtle.it>
    Date:   Fri Oct 13 17:28:59 2023 +0200

        Squashed commit of the following:

        commit 3b5583c
        Author: Roman <roman.kysil@redturtle.it>
        Date:   Fri Oct 13 17:27:53 2023 +0200

            Update redturtle.prenotazioni version

        commit ea11622
        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 <mauro.amico@gmail.com>

            * Use python syntax

            * Update src/design/plone/ioprenoto/restapi/services/bookable_list/get.py

            Co-authored-by: Mauro Amico <mauro.amico@gmail.com>

            ---------

            Co-authored-by: Mauro Amico <mauro.amico@gmail.com>

        commit e2ceb8c
        Author: Roman <roman.kysil@redturtle.it>
        Date:   Wed Oct 11 09:37:56 2023 +0200

            Add changelog

        commit 65911f2
        Author: Roman <roman.kysil@redturtle.it>
        Date:   Wed Oct 11 09:05:01 2023 +0200

            Align with redturtle.prenotazioni>=2.0.1 version
  • Loading branch information
folix-01 committed Nov 14, 2023
1 parent 5e0b976 commit 02dd6b8
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
7 changes: 7 additions & 0 deletions src/design/plone/ioprenoto/adapters/configure.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,11 @@
name="booking_operator_url"
/>

<adapter
factory=".stringinterp.BookingUnitaOrganizzativaTitle"
provides="plone.stringinterp.interfaces.IStringSubstitution"
for="*"
name="unita_organizzativa_title"
/>

</configure>
22 changes: 22 additions & 0 deletions src/design/plone/ioprenoto/adapters/stringinterp.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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",
"",
)

0 comments on commit 02dd6b8

Please sign in to comment.