Skip to content

Commit

Permalink
Merge branch 'main' into v2v3_test
Browse files Browse the repository at this point in the history
  • Loading branch information
cekk committed Jan 29, 2024
2 parents 43e74fa + f328cb6 commit eb4ebc3
Show file tree
Hide file tree
Showing 51 changed files with 2,715 additions and 99 deletions.
1 change: 1 addition & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ jobs:
path: |
~/.cache/pip
eggs
.tox
key: ${{ runner.os }}-pip-${{ matrix.config[0] }}-${{ hashFiles('setup.*', 'tox.ini') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.config[0] }}-
Expand Down
104 changes: 103 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,113 @@
Changelog
=========

6.1.1 (unreleased)
6.1.11 (unreleased)
-------------------

- Added new indexer, catalog index and query operation for canale_digitale_link field of Servizio CT
[deodorhunter]

- Fixed script to update pdc with description
[eikichi18]
- Add getObjSize info in File field serializer.
[cekk]


6.1.10 (2024-01-16)
-------------------

- Added description to PDC fields
[pnicolli]
- Added upgrade step to update PDC fields description
[lucabel]
- Added new widget for event luoghi_correlati
[pnicolli]
- Added UID for all summary obj
[eikichi18]


6.1.9 (2024-01-11)
------------------

- Do not show fieldsets with no visible fields in @types endpoint.
[cekk]
- Add UID to UOJSONSummarySerializer
[eikichi18]


6.1.8 (2023-12-22)
------------------

- Add behavior argomento to Link CT
[lucabel]
- Removed maximumSelectionSize from all fields that had it greater than 0
[pnicolli]


6.1.7 (2023-12-20)
------------------

- Improved "Check notizie" view adding a way to set "a cura di" field
[lucabel]
- Fixed label for tassonomia_evento taxonomies.
[eikichi18]


6.1.6 (2023-12-15)
------------------

- Improved "Buone pratiche" view for Event: checking both for relation with Venue and coordinates.
[daniele]


6.1.5 (2023-12-13)
------------------

- Allow reorder of data grid fields.
[pnicolli]


6.1.4 (2023-12-04)
------------------

- Fix check_persone. When there are no relation.
[mamico]


6.1.3 (2023-11-28)
------------------

- "Buone pratiche" views: fixed check on Competenze field. Excluding expired events and news.
[daniele]

6.1.2 (2023-11-27)
------------------

- Added utility views: @@check-notizie and @@download-check-notizie.
[daniele]
- Fix event for obj parent update.
[eikichi18]

- Added utility views: @@check-eventi and @@download-check-eventi.
[daniele]

- Added utility views for Venue: @@check-luoghi and @@download-check-luoghi.
[daniele]

- Added utility view for Documento: @@check-documenti and @@download-check-documenti.
[daniele]

- Added utils view for UO: @@check-uo and @@download-check-uo.
[daniele]

- Added utility views for Persona: @@check-persone and @@download-check-persone.
[daniele]

6.1.1 (2023-11-21)
------------------

- Update default summary serializer to better handle geolocation information.
[lucabel]


6.1.0 (2023-11-07)
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -373,12 +373,20 @@ Nel pannello di controllo "_Impostazioni Design Plone_" sono presenti diversi ca
- Mostra la data di modifica

A parte gli ultimi tre, gli altri campi sono tutti multilingua. I vocabolari che usano quei valori, ritornano solo i possibili valori a seconda della lingua selezionata dall'utente.

# Gestione modulistica

Agid prevede un tipo di contenuto **Documento** per gestire i moduli scaricabili.

Abbiamo però sviluppato anche un contenuto chiamato **Cartella Modulistica** che ha il compito di raggruppare in modo logico più Documenti e mostrarli all'utente come faceva il vecchio prodotto **cciaa.modulistica**.

# Viste verifica contentuti

Viste di supporto per la verifica sulla compilazione dei contenuti secondo le regole Designers Italia.

I link alle viste sono elencati alla pagina `https://nomesito.it/Plone/@@design-utils`.


# Data di modifica

Esiste una behavior (*design.plone.contenttypes.behavior.show_modified*) abilitata di default solo per i Document (Pagina)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

setup(
name="design.plone.contenttypes",
version="6.1.1.dev0",
version="6.1.11.dev0",
description="DesignItalia contenty types",
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down
42 changes: 41 additions & 1 deletion src/design/plone/contenttypes/behaviors/argomenti.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from design.plone.contenttypes.interfaces.documento import IDocumento
from design.plone.contenttypes.interfaces.servizio import IServizio
from plone.app.contenttypes.interfaces import IDocument
from plone.app.contenttypes.interfaces import ILink
from plone.app.dexterity import textindexer
from plone.app.z3cform.widget import RelatedItemsFieldWidget
from plone.autoform import directives as form
Expand Down Expand Up @@ -54,7 +55,6 @@ class IArgomentiSchema(model.Schema):
RelatedItemsFieldWidget,
vocabulary="plone.app.vocabularies.Catalog",
pattern_options={
"maximumSelectionSize": 20,
"selectableTypes": ["Pagina Argomento"],
},
)
Expand All @@ -68,6 +68,37 @@ class IArgomentiSchema(model.Schema):
textindexer.searchable("tassonomia_argomenti")


@provider(IFormFieldProvider)
class IArgomentiLink(model.Schema):
"""Marker interface for Argomenti"""

tassonomia_argomenti = RelationList(
title=_("tassonomia_argomenti_label", default="Argomenti"),
description=_(
"tassonomia_argomenti_help",
default="Seleziona una lista di argomenti d'interesse per questo"
" contenuto.",
),
value_type=RelationChoice(
title=_("Argomenti correlati"),
vocabulary="plone.app.vocabularies.Catalog",
),
required=False,
default=[],
)

form.widget(
"tassonomia_argomenti",
RelatedItemsFieldWidget,
vocabulary="plone.app.vocabularies.Catalog",
pattern_options={
"selectableTypes": ["Pagina Argomento"],
},
)

textindexer.searchable("tassonomia_argomenti")


@provider(IFormFieldProvider)
class IArgomenti(IArgomentiSchema):
""" """
Expand Down Expand Up @@ -273,3 +304,12 @@ class ArgomentiEvento(object):

def __init__(self, context):
self.context = context


@implementer(IArgomentiLink)
@adapter(ILink)
class ArgomentiLink(object):
""""""

def __init__(self, context):
self.context = context
10 changes: 10 additions & 0 deletions src/design/plone/contenttypes/behaviors/configure.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,16 @@
for="plone.dexterity.interfaces.IDexterityContent"
marker=".argomenti.IArgomentiServizio"
/>
<plone:behavior
name="design.plone.contenttypes.behavior.argomenti_link"
title="Argomenti Link"
description="Tassonomia argomenti"
factory=".argomenti.ArgomentiLink"
provides=".argomenti.IArgomentiLink"
for="plone.dexterity.interfaces.IDexterityContent"
marker=".argomenti.IArgomentiLink"
/>

<plone:behavior
name="design.plone.contenttypes.behavior.luoghi_correlati"
title="Luoghi correlati"
Expand Down
5 changes: 0 additions & 5 deletions src/design/plone/contenttypes/behaviors/contatti.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ class IContattiUnitaOrganizzativa(model.Schema):
RelatedItemsFieldWidget,
vocabulary="plone.app.vocabularies.Catalog",
pattern_options={
"maximumSelectionSize": 10,
"selectableTypes": ["PuntoDiContatto"],
},
)
Expand Down Expand Up @@ -86,7 +85,6 @@ class IContattiPersona(model.Schema):
RelatedItemsFieldWidget,
vocabulary="plone.app.vocabularies.Catalog",
pattern_options={
"maximumSelectionSize": 10,
"selectableTypes": ["PuntoDiContatto"],
},
)
Expand Down Expand Up @@ -120,7 +118,6 @@ class IContattiServizio(model.Schema):
RelatedItemsFieldWidget,
vocabulary="plone.app.vocabularies.Catalog",
pattern_options={
"maximumSelectionSize": 10,
"selectableTypes": ["PuntoDiContatto"],
},
)
Expand Down Expand Up @@ -154,7 +151,6 @@ class IContattiVenue(model.Schema):
RelatedItemsFieldWidget,
vocabulary="plone.app.vocabularies.Catalog",
pattern_options={
"maximumSelectionSize": 10,
"selectableTypes": ["PuntoDiContatto"],
},
)
Expand Down Expand Up @@ -188,7 +184,6 @@ class IContattiEvent(model.Schema):
RelatedItemsFieldWidget,
vocabulary="plone.app.vocabularies.Catalog",
pattern_options={
"maximumSelectionSize": 10,
"selectableTypes": ["PuntoDiContatto"],
},
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ class IDatasetCorrelati(model.Schema):
vocabulary="plone.app.vocabularies.Catalog",
pattern_options={
"selectableTypes": ["Dataset"],
"maximumSelectionSize": 50,
},
)

Expand Down
3 changes: 0 additions & 3 deletions src/design/plone/contenttypes/behaviors/evento.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ class IEvento(model.Schema):
RelatedItemsFieldWidget,
vocabulary="plone.app.vocabularies.Catalog",
pattern_options={
"maximumSelectionSize": 10,
"selectableTypes": ["UnitaOrganizzativa"],
},
)
Expand All @@ -136,7 +135,6 @@ class IEvento(model.Schema):
RelatedItemsFieldWidget,
vocabulary="plone.app.vocabularies.Catalog",
pattern_options={
"maximumSelectionSize": 10,
"selectableTypes": ["Persona", "UnitaOrganizzativa", "Servizio"],
},
)
Expand All @@ -145,7 +143,6 @@ class IEvento(model.Schema):
RelatedItemsFieldWidget,
vocabulary="plone.app.vocabularies.Catalog",
pattern_options={
"maximumSelectionSize": 10,
"selectableTypes": ["Persona"],
},
)
Expand Down
5 changes: 3 additions & 2 deletions src/design/plone/contenttypes/behaviors/luoghi_correlati.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ class ILuoghiCorrelatiSchema(model.Schema):
vocabulary="plone.app.vocabularies.Catalog",
pattern_options={
"selectableTypes": ["Venue"],
"maximumSelectionSize": 50,
},
)

Expand Down Expand Up @@ -66,7 +65,9 @@ class ILuoghiCorrelatiEvento(model.Schema):
vocabulary="plone.app.vocabularies.Catalog",
pattern_options={
"selectableTypes": ["Venue"],
"maximumSelectionSize": 50,
},
frontendOptions={
"widget": "luoghi_correlati_evento",
},
)

Expand Down
1 change: 0 additions & 1 deletion src/design/plone/contenttypes/behaviors/luogo.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,6 @@ class ILuogo(model.Schema):
RelatedItemsFieldWidget,
vocabulary="plone.app.vocabularies.Catalog",
pattern_options={
"maximumSelectionSize": 10,
"selectableTypes": ["UnitaOrganizzativa"],
},
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,13 @@ class INewsAdditionalFields(model.Schema):
vocabulary="plone.app.vocabularies.Catalog",
pattern_options={
"selectableTypes": ["Persona"],
"maximumSelectionSize": 50,
},
)
form.widget(
"notizie_correlate",
RelatedItemsFieldWidget,
vocabulary="plone.app.vocabularies.Catalog",
pattern_options={
"maximumSelectionSize": 10,
"selectableTypes": ["News Item"],
},
)
Expand All @@ -115,7 +113,6 @@ class INewsAdditionalFields(model.Schema):
vocabulary="plone.app.vocabularies.Catalog",
pattern_options={
"selectableTypes": ["Venue"],
"maximumSelectionSize": 50,
},
)
model.fieldset(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ class IServiziCorrelati(model.Schema):
RelatedItemsFieldWidget,
vocabulary="plone.app.vocabularies.Catalog",
pattern_options={
"maximumSelectionSize": 10,
"selectableTypes": ["Servizio"],
},
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ class IStruttureCorrelate(model.Schema):
RelatedItemsFieldWidget,
vocabulary="plone.app.vocabularies.Catalog",
pattern_options={
"maximumSelectionSize": 10,
"selectableTypes": ["UnitaOrganizzativa"],
},
)
Expand Down
2 changes: 0 additions & 2 deletions src/design/plone/contenttypes/behaviors/trasparenza.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,6 @@ class ITrasparenza(model.Schema):
RelatedItemsFieldWidget,
vocabulary="plone.app.vocabularies.Catalog",
pattern_options={
"maximumSelectionSize": 10,
"selectableTypes": ["Persona"],
},
)
Expand All @@ -283,7 +282,6 @@ class ITrasparenza(model.Schema):
RelatedItemsFieldWidget,
vocabulary="plone.app.vocabularies.Catalog",
pattern_options={
"maximumSelectionSize": 10,
"selectableTypes": ["Persona"],
},
)
Expand Down
Loading

0 comments on commit eb4ebc3

Please sign in to comment.