imio.smartweb.core 1.2.65__py3-none-any.whl → 1.2.67__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. imio/smartweb/core/browser/controlpanel.py +41 -0
  2. imio/smartweb/core/browser/faceted/block_view.pt +4 -4
  3. imio/smartweb/core/browser/faceted/summary_view.pt +4 -4
  4. imio/smartweb/core/browser/static/smartweb-view-compiled.css +1 -1
  5. imio/smartweb/core/browser/static/src/view.less +4 -0
  6. imio/smartweb/core/contents/__init__.py +2 -0
  7. imio/smartweb/core/contents/configure.zcml +1 -0
  8. imio/smartweb/core/contents/folder/block_view.pt +8 -8
  9. imio/smartweb/core/contents/folder/summary_view.pt +4 -4
  10. imio/smartweb/core/contents/publication/__init__.py +0 -0
  11. imio/smartweb/core/contents/publication/configure.zcml +5 -0
  12. imio/smartweb/core/contents/publication/content.py +23 -0
  13. imio/smartweb/core/contents/rest/directory/view.pt +2 -1
  14. imio/smartweb/core/contents/rest/events/view.pt +2 -1
  15. imio/smartweb/core/contents/rest/news/view.pt +2 -1
  16. imio/smartweb/core/contents/rest/view.py +4 -0
  17. imio/smartweb/core/contents/sections/common_templates/table.pt +13 -3
  18. imio/smartweb/core/contents/sections/external_content/view.pt +1 -1
  19. imio/smartweb/core/contents/sections/files/content.py +7 -1
  20. imio/smartweb/core/contents/sections/files/view.py +38 -11
  21. imio/smartweb/core/contents/sections/views.py +19 -6
  22. imio/smartweb/core/profiles/default/metadata.xml +1 -1
  23. imio/smartweb/core/profiles/default/types/imio.smartweb.Publication.xml +38 -0
  24. imio/smartweb/core/profiles/default/types/imio.smartweb.SectionFiles.xml +1 -0
  25. imio/smartweb/core/profiles/default/types.xml +1 -0
  26. imio/smartweb/core/subscribers.py +24 -0
  27. imio/smartweb/core/subscribers.zcml +4 -0
  28. imio/smartweb/core/tests/resources/json_iadeliberations_institutions.json +60 -0
  29. imio/smartweb/core/tests/resources/json_iadeliberations_publication.json +105 -0
  30. imio/smartweb/core/tests/resources/json_iadeliberations_publications.json +270 -0
  31. imio/smartweb/core/tests/test_iadeliberations.py +136 -0
  32. imio/smartweb/core/tests/test_vocabularies.py +54 -0
  33. imio/smartweb/core/upgrades/configure.zcml +37 -1
  34. imio/smartweb/core/upgrades/profiles/1059_to_1060/registry/iadeliberation.xml +9 -0
  35. imio/smartweb/core/upgrades/profiles/1060_to_1061/types/imio.smartweb.Publication.xml +38 -0
  36. imio/smartweb/core/upgrades/profiles/1060_to_1061/types/imio.smartweb.SectionFiles.xml +11 -0
  37. imio/smartweb/core/upgrades/profiles/1060_to_1061/types.xml +4 -0
  38. imio/smartweb/core/upgrades/profiles/1060_to_1061/workflows.xml +6 -0
  39. imio/smartweb/core/utils.py +27 -0
  40. imio/smartweb/core/vocabularies.py +44 -0
  41. imio/smartweb/core/vocabularies.zcml +12 -0
  42. imio/smartweb/core/webcomponents/build/css/smartweb-webcomponents-compiled.css +1 -1
  43. imio/smartweb/core/webcomponents/build/js/373.smartweb-webcomponents-compiled.js +1 -1
  44. imio/smartweb/core/webcomponents/build/js/486.smartweb-webcomponents-compiled.js +1 -1
  45. imio/smartweb/core/webcomponents/build/js/{324.smartweb-webcomponents-compiled.js → 828.smartweb-webcomponents-compiled.js} +2 -2
  46. imio/smartweb/core/webcomponents/build/js/884.smartweb-webcomponents-compiled.js +1 -1
  47. imio/smartweb/core/webcomponents/build/js/919.smartweb-webcomponents-compiled.js +1 -1
  48. imio/smartweb/core/webcomponents/build/js/smartweb-webcomponents-compiled.js +1 -1
  49. imio/smartweb/core/webcomponents/src/components/Annuaire/Annuaire.jsx +12 -2
  50. imio/smartweb/core/webcomponents/src/components/Annuaire/ContactCard/ContactCard.jsx +88 -60
  51. imio/smartweb/core/webcomponents/src/components/Annuaire/ContactContent/ContactContent.jsx +27 -1
  52. imio/smartweb/core/webcomponents/src/components/Annuaire/ContactList/ContactList.jsx +6 -2
  53. imio/smartweb/core/webcomponents/src/components/Events/EventCard/EventCard.jsx +69 -39
  54. imio/smartweb/core/webcomponents/src/components/Events/EventContent/EventContent.jsx +30 -3
  55. imio/smartweb/core/webcomponents/src/components/Events/EventList/EventList.jsx +10 -7
  56. imio/smartweb/core/webcomponents/src/components/Events/Events.jsx +4 -2
  57. imio/smartweb/core/webcomponents/src/components/News/News.jsx +3 -0
  58. imio/smartweb/core/webcomponents/src/components/News/NewsCard/NewsCard.jsx +60 -48
  59. imio/smartweb/core/webcomponents/src/components/News/NewsContent/NewsContent.jsx +30 -3
  60. imio/smartweb/core/webcomponents/src/components/News/NewsList/NewsList.jsx +28 -7
  61. imio/smartweb/core/webcomponents/src/index.scss +188 -174
  62. {imio.smartweb.core-1.2.65.dist-info → imio.smartweb.core-1.2.67.dist-info}/METADATA +27 -1
  63. {imio.smartweb.core-1.2.65.dist-info → imio.smartweb.core-1.2.67.dist-info}/RECORD +70 -57
  64. /imio/smartweb/core/webcomponents/build/js/{324.smartweb-webcomponents-compiled.js.LICENSE.txt → 828.smartweb-webcomponents-compiled.js.LICENSE.txt} +0 -0
  65. /imio.smartweb.core-1.2.65-py3.10-nspkg.pth → /imio.smartweb.core-1.2.67-py3.10-nspkg.pth +0 -0
  66. {imio.smartweb.core-1.2.65.dist-info → imio.smartweb.core-1.2.67.dist-info}/LICENSE.GPL +0 -0
  67. {imio.smartweb.core-1.2.65.dist-info → imio.smartweb.core-1.2.67.dist-info}/LICENSE.rst +0 -0
  68. {imio.smartweb.core-1.2.65.dist-info → imio.smartweb.core-1.2.67.dist-info}/WHEEL +0 -0
  69. {imio.smartweb.core-1.2.65.dist-info → imio.smartweb.core-1.2.67.dist-info}/namespace_packages.txt +0 -0
  70. {imio.smartweb.core-1.2.65.dist-info → imio.smartweb.core-1.2.67.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,105 @@
1
+ {
2
+ "@components": {
3
+ "actions": {
4
+ "@id": "https://conseil.staging.imio.be/liege/publications/ordonnance-concernant-des-mesures-specifiques-en-cas-de-grand-froid/@actions"
5
+ },
6
+ "aliases": {
7
+ "@id": "https://conseil.staging.imio.be/liege/publications/ordonnance-concernant-des-mesures-specifiques-en-cas-de-grand-froid/@aliases"
8
+ },
9
+ "breadcrumbs": {
10
+ "@id": "https://conseil.staging.imio.be/liege/publications/ordonnance-concernant-des-mesures-specifiques-en-cas-de-grand-froid/@breadcrumbs"
11
+ },
12
+ "contextnavigation": {
13
+ "@id": "https://conseil.staging.imio.be/liege/publications/ordonnance-concernant-des-mesures-specifiques-en-cas-de-grand-froid/@contextnavigation"
14
+ },
15
+ "navigation": {
16
+ "@id": "https://conseil.staging.imio.be/liege/publications/ordonnance-concernant-des-mesures-specifiques-en-cas-de-grand-froid/@navigation"
17
+ },
18
+ "navroot": {
19
+ "@id": "https://conseil.staging.imio.be/liege/publications/ordonnance-concernant-des-mesures-specifiques-en-cas-de-grand-froid/@navroot"
20
+ },
21
+ "types": {
22
+ "@id": "https://conseil.staging.imio.be/liege/publications/ordonnance-concernant-des-mesures-specifiques-en-cas-de-grand-froid/@types"
23
+ },
24
+ "workflow": {
25
+ "@id": "https://conseil.staging.imio.be/liege/publications/ordonnance-concernant-des-mesures-specifiques-en-cas-de-grand-froid/@workflow"
26
+ }
27
+ },
28
+ "@id": "https://conseil.staging.imio.be/liege/publications/ordonnance-concernant-des-mesures-specifiques-en-cas-de-grand-froid",
29
+ "@type": "Publication",
30
+ "UID": "33befb1ecea143e4a4e8b2dd548e294f",
31
+ "allow_discussion": false,
32
+ "authority_date": null,
33
+ "category": {
34
+ "title": "Sécurité & Prévention",
35
+ "token": "securit\\xe9"
36
+ },
37
+ "consultation_text": {
38
+ "content-type": "text/html",
39
+ "data": "<p>Hôtel de Ville - Secrétariat du Collège et du Conseil</p>\n<p>place du Marché, 2</p>\n<p>4000 Liège</p>\n<p>du lundi au vendredi  (sauf jours fériés)</p>\n<p>de 9 à 12 heure et de 13.30 à 16.30 heures</p>",
40
+ "encoding": "utf-8"
41
+ },
42
+ "created": "2024-08-14T07:13:42+00:00",
43
+ "decision_date": "2022-12-12",
44
+ "description": "Adopté par M. le Bourgmestre en date 12 décembre 2022",
45
+ "document_type": {
46
+ "title": "Ordonnance de police administrative",
47
+ "token": "ordonnance-police-administrative"
48
+ },
49
+ "effective": "2024-08-14T09:14:31",
50
+ "entry_date": "2022-12-12",
51
+ "expires": null,
52
+ "file": {
53
+ "content-type": "application/pdf",
54
+ "download": "https://conseil.staging.imio.be/liege/publications/ordonnance-concernant-des-mesures-specifiques-en-cas-de-grand-froid/@@download/file",
55
+ "filename": "013400000123949.PDF",
56
+ "size": 120014
57
+ },
58
+ "id": "ordonnance-concernant-des-mesures-specifiques-en-cas-de-grand-froid",
59
+ "is_folderish": true,
60
+ "items": [],
61
+ "items_total": 0,
62
+ "layout": "view",
63
+ "legislative_authority": {
64
+ "title": "Bourgmestre",
65
+ "token": "bourgmestre"
66
+ },
67
+ "lock": {
68
+ "locked": false,
69
+ "stealable": true
70
+ },
71
+ "modified": "2024-08-14T07:14:31+00:00",
72
+ "next_item": {
73
+ "@id": "https://conseil.staging.imio.be/liege/publications/reglement-relatif-a-la-redevance-sur-le-stationnement",
74
+ "@type": "Publication",
75
+ "description": "Adopté par le Conseil communal en date du 19 décembre 2023",
76
+ "title": "Règlement relatif à la redevance sur le stationnement.",
77
+ "type_title": "Publication"
78
+ },
79
+ "parent": {
80
+ "@id": "https://conseil.staging.imio.be/liege/publications",
81
+ "@type": "Folder",
82
+ "description": "",
83
+ "image_field": null,
84
+ "image_scales": {},
85
+ "review_state": "published",
86
+ "title": "Publications",
87
+ "type_title": "Dossier"
88
+ },
89
+ "previous_item": {
90
+ "@id": "https://conseil.staging.imio.be/liege/publications/reglement-relatif-a-loctroi-dune-intervention-financiere-subvention-directe-operateur-pour-lannee-2024-en-faveur-des-commerces-de-detail-et-des-etablissements-horeca-situes-sur-le-territoire-de-la-ville-de-liege-dont-lactivite-economique-est-affectee-par",
91
+ "@type": "Publication",
92
+ "description": "Adopté par le Conseil communal en date du 24 juin 2024",
93
+ "title": "Règlement relatif à l'octroi d’une intervention financière (subvention directe opérateur), pour l'année 2024, en faveur des commerces de détail et des établissements HORECA, situés sur le territoire de la Ville de Liège, dont l’activité économique est affectée par les retards d’exécution du chantier du Tramway de Liège.",
94
+ "type_title": "Publication"
95
+ },
96
+ "relatedItems": [],
97
+ "review_state": "published",
98
+ "table_of_contents": false,
99
+ "text": null,
100
+ "title": "Ordonnance concernant des mesures spécifiques en cas de grand froid.",
101
+ "type_title": "Publication",
102
+ "version": "current",
103
+ "working_copy": null,
104
+ "working_copy_of": null
105
+ }
@@ -0,0 +1,270 @@
1
+ {
2
+ "@id": "https://conseil.staging.imio.be/@search?portal_type=Publication&review_state=published&metadata_fields=UID&metadata_fields=id",
3
+ "items": [
4
+ {
5
+ "@id": "https://conseil.staging.imio.be/belle-ville/publications/exemple-publication",
6
+ "@type": "Publication",
7
+ "UID": "5c642de5dddb4bcbae56163d4cc89079",
8
+ "description": "Ma publication, texte affiché dans le tableau de bord",
9
+ "id": "exemple-publication",
10
+ "image_field": null,
11
+ "image_scales": null,
12
+ "review_state": "published",
13
+ "title": "Exemple publication",
14
+ "type_title": "Publication"
15
+ },
16
+ {
17
+ "@id": "https://conseil.staging.imio.be/liege/publications/reglement-relatif-a-la-gestion-du-parc-sauvage-des-chats",
18
+ "@type": "Publication",
19
+ "UID": "8ea91c2b830b486fb4f78b6a91cee882",
20
+ "description": "Adopté par le Conseil communal en date du X",
21
+ "id": "reglement-relatif-a-la-gestion-du-parc-sauvage-des-chats",
22
+ "image_field": null,
23
+ "image_scales": null,
24
+ "review_state": "published",
25
+ "title": "Règlement relatif à la gestion du parc sauvage des chats",
26
+ "type_title": "Publication"
27
+ },
28
+ {
29
+ "@id": "https://conseil.staging.imio.be/belle-ville/publications/arrete-de-police",
30
+ "@type": "Publication",
31
+ "UID": "37202c2c2aaa42108080ca5a4531ad85",
32
+ "description": "blabla",
33
+ "id": "arrete-de-police",
34
+ "image_field": null,
35
+ "image_scales": null,
36
+ "review_state": "published",
37
+ "title": "arrêté de police",
38
+ "type_title": "Publication"
39
+ },
40
+ {
41
+ "@id": "https://conseil.staging.imio.be/belle-ville/publications/test",
42
+ "@type": "Publication",
43
+ "UID": "1f2929e9dda845c0948f507df8516e71",
44
+ "description": "OPT fermeture voirie",
45
+ "id": "test",
46
+ "image_field": null,
47
+ "image_scales": null,
48
+ "review_state": "published",
49
+ "title": "test",
50
+ "type_title": "Publication"
51
+ },
52
+ {
53
+ "@id": "https://conseil.staging.imio.be/belle-ville/publications/ordonnance-de-police-administrative-generale-de-la-commune-belleville",
54
+ "@type": "Publication",
55
+ "UID": "ef9f2b46b49346aa832194d1415bba27",
56
+ "description": "Adaptation de législations supérieures....",
57
+ "id": "ordonnance-de-police-administrative-generale-de-la-commune-belleville",
58
+ "image_field": null,
59
+ "image_scales": null,
60
+ "review_state": "published",
61
+ "title": "Ordonnance de police administrative générale de la commune BELLEVILLE",
62
+ "type_title": "Publication"
63
+ },
64
+ {
65
+ "@id": "https://conseil.staging.imio.be/belle-ville/publications/police-administrative-circulation-routiere-reglements-complementaires-modification-creation-dun-emplacement-pour-personnes-handicapees-globalisation-rue-de-la-nouvelle-montagne-approbation",
66
+ "@type": "Publication",
67
+ "UID": "eba7a072c3f34e4f9b3c5d946d2a3a3f",
68
+ "description": "Tout est dans le titre",
69
+ "id": "police-administrative-circulation-routiere-reglements-complementaires-modification-creation-dun-emplacement-pour-personnes-handicapees-globalisation-rue-de-la-nouvelle-montagne-approbation",
70
+ "image_field": null,
71
+ "image_scales": null,
72
+ "review_state": "published",
73
+ "title": "POLICE ADMINISTRATIVE - Circulation routière - Règlements complémentaires - Modification - Création d'un emplacement pour personnes handicapées - Globalisation - Rue de la Nouvelle Montagne - Approbation",
74
+ "type_title": "Publication"
75
+ },
76
+ {
77
+ "@id": "https://conseil.staging.imio.be/belle-ville/publications/test-oupeye-ordonnance-de-police",
78
+ "@type": "Publication",
79
+ "UID": "27176be24ee3454ca0be55764bf12ea5",
80
+ "description": "Test Oupeye Description de l'ordonnance: description",
81
+ "id": "test-oupeye-ordonnance-de-police",
82
+ "image_field": null,
83
+ "image_scales": null,
84
+ "review_state": "published",
85
+ "title": "Test Oupeye - Ordonnance de Police TITRE",
86
+ "type_title": "Publication"
87
+ },
88
+ {
89
+ "@id": "https://conseil.staging.imio.be/liege/publications/autorisation-de-deroger-temporairement-aux-normes-de-bruit-foire-du-midi-2023",
90
+ "@type": "Publication",
91
+ "UID": "a3a8c7922b834e54a166761aeb2cbc33",
92
+ "description": "Le Bourgmestre de Bruxelles a accordé une dérogation temporaire aux normes de bruit pour la Foire du Midi 2023, qui se tiendra en plein air sur le Boulevard du Midi du 15 juillet au 20 août 2023.",
93
+ "id": "autorisation-de-deroger-temporairement-aux-normes-de-bruit-foire-du-midi-2023",
94
+ "image_field": null,
95
+ "image_scales": null,
96
+ "review_state": "published",
97
+ "title": "Autorisation de déroger temporairement aux normes de bruit - Foire du Midi 2023",
98
+ "type_title": "Publication"
99
+ },
100
+ {
101
+ "@id": "https://conseil.staging.imio.be/liege/publications/reglement-relatif-a-loctroi-dune-intervention-financiere-specifique-subvention-directe-operateur-pour-lannee-2024-en-faveur-des-commerces-de-detail-et-des-etablissements-horeca-situes-dans-le-pole-de-sclessin-et-alentours",
102
+ "@type": "Publication",
103
+ "UID": "518a437453ce4c2d8d0f8d2d4a545a58",
104
+ "description": "",
105
+ "id": "reglement-relatif-a-loctroi-dune-intervention-financiere-specifique-subvention-directe-operateur-pour-lannee-2024-en-faveur-des-commerces-de-detail-et-des-etablissements-horeca-situes-dans-le-pole-de-sclessin-et-alentours",
106
+ "image_field": null,
107
+ "image_scales": null,
108
+ "review_state": "published",
109
+ "title": "Règlement relatif à l'octroi d’une intervention financière spécifique (subvention directe opérateur), pour l'année 2024, en faveur des commerces de détail et des établissements HORECA, situés dans le pôle de Sclessin et alentours",
110
+ "type_title": "Publication"
111
+ },
112
+ {
113
+ "@id": "https://conseil.staging.imio.be/liege/publications/reglement-complementaire-de-la-police-de-la-circulation-de-la-rue-des-grands-champs-a-4000-liege",
114
+ "@type": "Publication",
115
+ "UID": "966bc618828d45d3ac72da2b58de6a3c",
116
+ "description": "Adopté par le Conseil communal en date du 24/06/2024",
117
+ "id": "reglement-complementaire-de-la-police-de-la-circulation-de-la-rue-des-grands-champs-a-4000-liege",
118
+ "image_field": null,
119
+ "image_scales": null,
120
+ "review_state": "published",
121
+ "title": "Règlement complémentaire de la police de la circulation de la rue des Grands Champs à 4000 Liège",
122
+ "type_title": "Publication"
123
+ },
124
+ {
125
+ "@id": "https://conseil.staging.imio.be/belle-ville/publications/test-avis-de-publication-dun-reglement",
126
+ "@type": "Publication",
127
+ "UID": "27030f9a8e444948be5e5244c4eed345",
128
+ "description": "un peu de tout merci",
129
+ "id": "test-avis-de-publication-dun-reglement",
130
+ "image_field": null,
131
+ "image_scales": null,
132
+ "review_state": "published",
133
+ "title": "Test avis de publication d'un règlement",
134
+ "type_title": "Publication"
135
+ },
136
+ {
137
+ "@id": "https://conseil.staging.imio.be/belle-ville/publications/phase-de-test-op",
138
+ "@type": "Publication",
139
+ "UID": "f76bbd3504ae4743b5809219c37ede32",
140
+ "description": "",
141
+ "id": "phase-de-test-op",
142
+ "image_field": null,
143
+ "image_scales": null,
144
+ "review_state": "published",
145
+ "title": "Phase de test OP",
146
+ "type_title": "Publication"
147
+ },
148
+ {
149
+ "@id": "https://conseil.staging.imio.be/belle-ville/publications/elections-communales-et-provinciales-scrutins-du-13-octobre-2024-arret-du-registre-des-electeurs-avis",
150
+ "@type": "Publication",
151
+ "UID": "b88c062644fb4621b45518795dee09ab",
152
+ "description": "Arrêt par le Collège du 20 août 2024 en date du 1er août 2024- Avis aux électeurs pour réclamations et recours.",
153
+ "id": "elections-communales-et-provinciales-scrutins-du-13-octobre-2024-arret-du-registre-des-electeurs-avis",
154
+ "image_field": null,
155
+ "image_scales": null,
156
+ "review_state": "published",
157
+ "title": "Elections communales et provinciales- Scrutins du 13 octobre 2024- Arrêt du registre des électeurs- Avis",
158
+ "type_title": "Publication"
159
+ },
160
+ {
161
+ "@id": "https://conseil.staging.imio.be/belle-ville/publications/test-op-signee",
162
+ "@type": "Publication",
163
+ "UID": "3af4ff302bbf40839a4b453f3e5346ea",
164
+ "description": "",
165
+ "id": "test-op-signee",
166
+ "image_field": null,
167
+ "image_scales": null,
168
+ "review_state": "published",
169
+ "title": "Test OP Signée",
170
+ "type_title": "Publication"
171
+ },
172
+ {
173
+ "@id": "https://conseil.staging.imio.be/belle-ville/publications/test-decision-du-conseil-du-xxxx-reglement-xxxx",
174
+ "@type": "Publication",
175
+ "UID": "f52f850901504c28a40e646dc3d20eab",
176
+ "description": "Règlement relatif à XXXXXXXXXXXX",
177
+ "id": "test-decision-du-conseil-du-xxxx-reglement-xxxx",
178
+ "image_field": null,
179
+ "image_scales": null,
180
+ "review_state": "published",
181
+ "title": "TEST décision du Conseil du XXXX - Règlement XXXX",
182
+ "type_title": "Publication"
183
+ },
184
+ {
185
+ "@id": "https://conseil.staging.imio.be/charleroi/publications/circulation-routiere-reglement-complementaire-abrogation-de-stationnement-pour-personne-handicapee-rue-paul-pastur-ndeg18-a-ransart",
186
+ "@type": "Publication",
187
+ "UID": "50e6bd1e2a1e4edeaa3efbfeb573733e",
188
+ "description": "",
189
+ "id": "circulation-routiere-reglement-complementaire-abrogation-de-stationnement-pour-personne-handicapee-rue-paul-pastur-ndeg18-a-ransart",
190
+ "image_field": null,
191
+ "image_scales": null,
192
+ "review_state": "published",
193
+ "title": "Circulation routière - Règlement complémentaire - Abrogation de stationnement pour personne handicapée rue Paul Pastur n°18 à Ransart",
194
+ "type_title": "Publication"
195
+ },
196
+ {
197
+ "@id": "https://conseil.staging.imio.be/charleroi/publications/ri-dcs-pa-loi-du-02-10-2017-reglementant-la-securite-privee-et-particuliere-creation-dune-zone-vigilis-sur-le-territoire-de-la-ville-de-charleroi-sur-lesplanade-du-campus-u-charleroi-sise-boulevard-solvay-entre-la-rue-clement-lyon-et-la-rue-lebeau-a-6000",
198
+ "@type": "Publication",
199
+ "UID": "8933725e931a4ca993bbd3324b9c1e2a",
200
+ "description": "Application de l'article 115, 5° de la loi réglementant la sécurité privée et particulière du 02 octobre 2017. Création d'une zone VIGILIS sur l'esplanade du campus U-Charleroi sise boulevard Solvay entre la rue Clément Lyon et la rue Lebeau.",
201
+ "id": "ri-dcs-pa-loi-du-02-10-2017-reglementant-la-securite-privee-et-particuliere-creation-dune-zone-vigilis-sur-le-territoire-de-la-ville-de-charleroi-sur-lesplanade-du-campus-u-charleroi-sise-boulevard-solvay-entre-la-rue-clement-lyon-et-la-rue-lebeau-a-6000",
202
+ "image_field": null,
203
+ "image_scales": null,
204
+ "review_state": "published",
205
+ "title": "RI - DCS - PA - Loi du 02/10/2017 réglementant la sécurité privée et particulière - Création d'une zone VIGILIS sur le territoire de la Ville de Charleroi sur l'esplanade du campus U-Charleroi sise boulevard Solvay entre la rue Clément Lyon et la rue Lebeau à 6000 Charleroi - Application de l'article 115, 5° de la loi - Approbation",
206
+ "type_title": "Publication"
207
+ },
208
+ {
209
+ "@id": "https://conseil.staging.imio.be/liege/publications/modification-du-reglement-de-police-relatif-a-la-proprete-publique-et-a-la-lutte-contre-les-petites-incivilites-urbaines-qui-y-portent-atteinte-du-22-mai-2023",
210
+ "@type": "Publication",
211
+ "UID": "339d756c0b2e4ea585f9548b66943bd9",
212
+ "description": "Modification du règlement de police relatif à la propreté publique et à la lutte contre les petites incivilités urbaines qui y portent atteinte du 22 mai 2023",
213
+ "id": "modification-du-reglement-de-police-relatif-a-la-proprete-publique-et-a-la-lutte-contre-les-petites-incivilites-urbaines-qui-y-portent-atteinte-du-22-mai-2023",
214
+ "image_field": null,
215
+ "image_scales": null,
216
+ "review_state": "published",
217
+ "title": "Modification du règlement de police relatif à la propreté publique et à la lutte contre les petites incivilités urbaines qui y portent atteinte du 22 mai 2023",
218
+ "type_title": "Publication"
219
+ },
220
+ {
221
+ "@id": "https://conseil.staging.imio.be/liege/publications/ordonnance-concernant-des-mesures-specifiques-en-cas-de-grand-froid",
222
+ "@type": "Publication",
223
+ "UID": "33befb1ecea143e4a4e8b2dd548e294f",
224
+ "description": "Adopté par M. le Bourgmestre en date 12 décembre 2022",
225
+ "id": "ordonnance-concernant-des-mesures-specifiques-en-cas-de-grand-froid",
226
+ "image_field": null,
227
+ "image_scales": null,
228
+ "review_state": "published",
229
+ "title": "Ordonnance concernant des mesures spécifiques en cas de grand froid.",
230
+ "type_title": "Publication"
231
+ },
232
+ {
233
+ "@id": "https://conseil.staging.imio.be/liege/publications/autorisation-de-deroger-temporairement-aux-normes-de-bruit-fete-de-la-musique-2023",
234
+ "@type": "Publication",
235
+ "UID": "1eb1d97e162a4fe4be802ccd812fa180",
236
+ "description": "Le Bourgmestre de Bruxelles accorde une autorisation temporaire pour déroger aux normes de bruit établies par l'arrêté du Gouvernement de la Région de Bruxelles-Capitale du 21 novembre 2002, pour la Fête de la Musique 2023 qui se tiendra au Parc du Cinquantenaire les 23 et 24 juin 2023.",
237
+ "id": "autorisation-de-deroger-temporairement-aux-normes-de-bruit-fete-de-la-musique-2023",
238
+ "image_field": null,
239
+ "image_scales": null,
240
+ "review_state": "published",
241
+ "title": "Autorisation de déroger temporairement aux normes de bruit - Fête de la Musique 2023",
242
+ "type_title": "Publication"
243
+ },
244
+ {
245
+ "@id": "https://conseil.staging.imio.be/liege/publications/reglement-relatif-a-loctroi-dune-intervention-financiere-subvention-directe-operateur-pour-lannee-2024-en-faveur-des-commerces-de-detail-et-des-etablissements-horeca-situes-sur-le-territoire-de-la-ville-de-liege-dont-lactivite-economique-est-affectee-par",
246
+ "@type": "Publication",
247
+ "UID": "e07b7cf8dfe148969c4a291c4972750d",
248
+ "description": "Adopté par le Conseil communal en date du 24 juin 2024",
249
+ "id": "reglement-relatif-a-loctroi-dune-intervention-financiere-subvention-directe-operateur-pour-lannee-2024-en-faveur-des-commerces-de-detail-et-des-etablissements-horeca-situes-sur-le-territoire-de-la-ville-de-liege-dont-lactivite-economique-est-affectee-par",
250
+ "image_field": null,
251
+ "image_scales": null,
252
+ "review_state": "published",
253
+ "title": "Règlement relatif à l'octroi d’une intervention financière (subvention directe opérateur), pour l'année 2024, en faveur des commerces de détail et des établissements HORECA, situés sur le territoire de la Ville de Liège, dont l’activité économique est affectée par les retards d’exécution du chantier du Tramway de Liège.",
254
+ "type_title": "Publication"
255
+ },
256
+ {
257
+ "@id": "https://conseil.staging.imio.be/liege/publications/reglement-relatif-a-la-redevance-sur-le-stationnement",
258
+ "@type": "Publication",
259
+ "UID": "0744d361b4b54a71853cd265da739f96",
260
+ "description": "Adopté par le Conseil communal en date du 19 décembre 2023",
261
+ "id": "reglement-relatif-a-la-redevance-sur-le-stationnement",
262
+ "image_field": null,
263
+ "image_scales": null,
264
+ "review_state": "published",
265
+ "title": "Règlement relatif à la redevance sur le stationnement.",
266
+ "type_title": "Publication"
267
+ }
268
+ ],
269
+ "items_total": 22
270
+ }
@@ -0,0 +1,136 @@
1
+ # -*- coding: utf-8 -*-
2
+ from imio.smartweb.core.contents import IPublication
3
+ from imio.smartweb.core.tests.utils import get_json
4
+ from imio.smartweb.core.testing import IMIO_SMARTWEB_CORE_INTEGRATION_TESTING
5
+ from imio.smartweb.core.testing import ImioSmartwebTestCase
6
+ from plone import api
7
+ from plone.app.testing import setRoles
8
+ from plone.app.testing import TEST_USER_ID
9
+ from plone.dexterity.interfaces import IDexterityFTI
10
+ from unittest.mock import patch
11
+ from zope.component import createObject
12
+ from zope.component import queryMultiAdapter
13
+ from zope.component import queryUtility
14
+
15
+
16
+ class TestIADeliberations(ImioSmartwebTestCase):
17
+ layer = IMIO_SMARTWEB_CORE_INTEGRATION_TESTING
18
+
19
+ def setUp(self):
20
+ """Custom shared utility setup for tests."""
21
+ self.portal = self.layer["portal"]
22
+ self.request = self.layer["request"]
23
+ setRoles(self.portal, TEST_USER_ID, ["Manager"])
24
+ self.page = api.content.create(
25
+ container=self.portal,
26
+ type="imio.smartweb.Page",
27
+ title="A Page",
28
+ )
29
+ self.files_section = api.content.create(
30
+ container=self.page,
31
+ type="imio.smartweb.SectionFiles",
32
+ title="My files section",
33
+ )
34
+ self.json_publication_raw_mock = get_json(
35
+ "resources/json_iadeliberations_publication.json"
36
+ )
37
+
38
+ def test_ct_publication_schema(self):
39
+ fti = queryUtility(IDexterityFTI, name="imio.smartweb.Publication")
40
+ schema = fti.lookupSchema()
41
+ self.assertEqual(IPublication, schema)
42
+
43
+ def test_ct_publication_fti(self):
44
+ fti = queryUtility(IDexterityFTI, name="imio.smartweb.Publication")
45
+ self.assertTrue(fti)
46
+
47
+ def test_ct_publication_factory(self):
48
+ fti = queryUtility(IDexterityFTI, name="imio.smartweb.Publication")
49
+ factory = fti.factory
50
+ obj = createObject(factory)
51
+ self.assertTrue(
52
+ IPublication.providedBy(obj),
53
+ "IPublication not provided by {0}!".format(
54
+ obj,
55
+ ),
56
+ )
57
+
58
+ @patch("imio.smartweb.core.subscribers.get_iadeliberation_json")
59
+ @patch(
60
+ "imio.smartweb.core.subscribers.get_iadeliberation_institution_from_registry"
61
+ )
62
+ def test_ct_publication_adding(self, m_get_institution, m_get_publication):
63
+ m_get_institution.return_value = "https://conseil.staging.imio.be/liege"
64
+ m_get_publication.return_value = self.json_publication_raw_mock
65
+ obj = api.content.create(
66
+ container=self.files_section,
67
+ type="imio.smartweb.Publication",
68
+ linked_publication="ordonnance-concernant-des-mesures-specifiques-en-cas-de-grand-froid",
69
+ id="ordonnance-concernant-des-mesures-specifiques-en-cas-de-grand-froid",
70
+ )
71
+ self.assertTrue(
72
+ IPublication.providedBy(obj),
73
+ "IPublication not provided by {0}!".format(
74
+ obj.id,
75
+ ),
76
+ )
77
+ parent = obj.__parent__
78
+ self.assertIn(
79
+ "ordonnance-concernant-des-mesures-specifiques-en-cas-de-grand-froid",
80
+ parent.objectIds(),
81
+ )
82
+ title_resp = (
83
+ "Ordonnance concernant des mesures spécifiques en cas de grand froid."
84
+ )
85
+ self.assertEqual(obj.title, title_resp)
86
+ desc_resp = "Adopté par M. le Bourgmestre en date 12 décembre 2022"
87
+ self.assertEqual(obj.description, desc_resp)
88
+ url_resp = "https://conseil.staging.imio.be/liege/publications/ordonnance-concernant-des-mesures-specifiques-en-cas-de-grand-froid"
89
+ self.assertEqual(obj.publication_url, url_resp)
90
+ self.assertEqual(obj.publication_category, "Sécurité & Prévention")
91
+ self.assertEqual(
92
+ obj.publication_attached_file.get("filename"), "013400000123949.PDF"
93
+ )
94
+
95
+ # check that deleting the object works too
96
+ api.content.delete(obj=obj)
97
+ self.assertNotIn("publication", parent.objectIds())
98
+
99
+ @patch("imio.smartweb.core.subscribers.get_iadeliberation_json")
100
+ @patch(
101
+ "imio.smartweb.core.subscribers.get_iadeliberation_institution_from_registry"
102
+ )
103
+ def test_publication_view(self, m_get_institution, m_get_publication):
104
+ m_get_institution.return_value = "https://conseil.staging.imio.be/liege"
105
+ m_get_publication.return_value = self.json_publication_raw_mock
106
+ obj = api.content.create(
107
+ container=self.files_section,
108
+ type="imio.smartweb.Publication",
109
+ id="18820593",
110
+ )
111
+ obj.reindexObject()
112
+ title_to_get = (
113
+ "Ordonnance concernant des mesures spécifiques en cas de grand froid."
114
+ )
115
+
116
+ view = queryMultiAdapter((self.files_section, self.request), name="full_view")
117
+ self.assertIn(title_to_get, view())
118
+ self.assertNotIn("013400000123949.PDF", view())
119
+
120
+ view = queryMultiAdapter((self.files_section, self.request), name="table_view")
121
+ self.assertIn(title_to_get, [item[0]["title"] for item in view.items()])
122
+ self.assertEqual(
123
+ [
124
+ item[0]["publication_attached_file"].get("filename")
125
+ for item in view.items()
126
+ ][0],
127
+ "013400000123949.PDF",
128
+ )
129
+ self.assertEqual(
130
+ [item[0]["publication_document_type"] for item in view.items()][0],
131
+ "Ordonnance de police administrative",
132
+ )
133
+ self.assertEqual(
134
+ [item[0]["publication_datetime"] for item in view.items()][0],
135
+ "2024-08-14T09:14:31",
136
+ )
@@ -295,3 +295,57 @@ class TestVocabularies(ImioSmartwebTestCase):
295
295
 
296
296
  def test_sendinblue_button_position(self):
297
297
  self.assertVocabularyLen("imio.smartweb.vocabulary.SendInBlueButtonPosition", 2)
298
+
299
+ @patch("imio.smartweb.core.vocabularies.get_iadeliberation_url_from_registry")
300
+ @requests_mock.Mocker()
301
+ def test_remote_iadeliberations_institutions(self, m_url, m):
302
+ json_institutions_raw_mock = get_json(
303
+ "resources/json_iadeliberations_institutions.json"
304
+ )
305
+ m_url.return_value = "https://conseil.staging.imio.be"
306
+ url_institutions = f"{m_url.return_value}/@search?portal_type=Institution&metadata_fields=UID&sort_on=sortable_title"
307
+ m.get(url_institutions, text=json.dumps(json_institutions_raw_mock))
308
+ self.assertVocabularyLen(
309
+ "imio.smartweb.vocabulary.IADeliberationsInstitutions", 6
310
+ )
311
+ vocabulary = get_vocabulary(
312
+ "imio.smartweb.vocabulary.IADeliberationsInstitutions"
313
+ )
314
+ self.assertEqual(
315
+ vocabulary.getTerm("https://conseil.staging.imio.be/waremme").title,
316
+ "Waremme",
317
+ )
318
+
319
+ @patch(
320
+ "imio.smartweb.core.vocabularies.get_iadeliberation_institution_from_registry"
321
+ )
322
+ @patch("imio.smartweb.core.vocabularies.get_iadeliberation_url_from_registry")
323
+ @requests_mock.Mocker()
324
+ def test_remote_iadeliberations_publications(self, m_url, m_institution, m):
325
+ json_institutions_raw_mock = get_json(
326
+ "resources/json_iadeliberations_institutions.json"
327
+ )
328
+ m_url.return_value = "https://conseil.staging.imio.be"
329
+ m_institution.return_value = "https://conseil.staging.imio.be/liege"
330
+ url_institutions = (
331
+ f"{m_url.return_value}/@search?portal_type=Institution&metadata_fields=UID"
332
+ )
333
+ m.get(url_institutions, text=json.dumps(json_institutions_raw_mock))
334
+ json_publications_raw_mock = get_json(
335
+ "resources/json_iadeliberations_publications.json"
336
+ )
337
+ url_institution = m_institution.return_value
338
+ url_publications = f"{url_institution}/@search?portal_type=Publication&metadata_fields=UID&review_state=published"
339
+ m.get(url_publications, text=json.dumps(json_publications_raw_mock))
340
+ self.assertVocabularyLen(
341
+ "imio.smartweb.vocabulary.IADeliberationsPublications", 22
342
+ )
343
+ vocabulary = get_vocabulary(
344
+ "imio.smartweb.vocabulary.IADeliberationsPublications"
345
+ )
346
+ self.assertEqual(
347
+ vocabulary.getTerm(
348
+ "autorisation-de-deroger-temporairement-aux-normes-de-bruit-fete-de-la-musique-2023"
349
+ ).title,
350
+ "Autorisation de déroger temporairement aux normes de bruit - Fête de la Musique 2023",
351
+ )
@@ -251,6 +251,22 @@
251
251
  provides="Products.GenericSetup.interfaces.EXTENSION"
252
252
  />
253
253
 
254
+ <genericsetup:registerProfile
255
+ name="upgrade_1059_to_1060"
256
+ title="Upgrade core from 1059 to 1060"
257
+ directory="profiles/1059_to_1060"
258
+ description="Add ia.deliberations registry key"
259
+ provides="Products.GenericSetup.interfaces.EXTENSION"
260
+ />
261
+
262
+ <genericsetup:registerProfile
263
+ name="upgrade_1060_to_1061"
264
+ title="Upgrade core from 1060 to 1061"
265
+ directory="profiles/1060_to_1061"
266
+ description="Add new content type : imio.smartweb.Publication and authorize it in SectionFiles"
267
+ provides="Products.GenericSetup.interfaces.EXTENSION"
268
+ />
269
+
254
270
  <genericsetup:upgradeStep
255
271
  title="Configure first official release"
256
272
  description="Run needed profiles steps and reindex catalog"
@@ -855,4 +871,24 @@
855
871
  />
856
872
  </genericsetup:upgradeSteps>
857
873
 
858
- </configure>
874
+ <genericsetup:upgradeSteps
875
+ source="1059"
876
+ destination="1060"
877
+ profile="imio.smartweb.core:default">
878
+ <genericsetup:upgradeDepends
879
+ title="Add ia.deliberations registry key"
880
+ import_profile="imio.smartweb.core.upgrades:upgrade_1059_to_1060"
881
+ />
882
+ </genericsetup:upgradeSteps>
883
+
884
+ <genericsetup:upgradeSteps
885
+ source="1060"
886
+ destination="1061"
887
+ profile="imio.smartweb.core:default">
888
+ <genericsetup:upgradeDepends
889
+ title="Add new content type : imio.smartweb.Publication and authorize it in SectionFiles"
890
+ import_profile="imio.smartweb.core.upgrades:upgrade_1060_to_1061"
891
+ />
892
+ </genericsetup:upgradeSteps>
893
+
894
+ </configure>
@@ -0,0 +1,9 @@
1
+ <?xml version="1.0"?>
2
+ <registry
3
+ xmlns:i18n="http://xml.zope.org/namespaces/i18n"
4
+ i18n:domain="imio.smartweb">
5
+
6
+ <records interface="imio.smartweb.core.browser.controlpanel.ISmartwebControlPanel"
7
+ prefix="smartweb" />
8
+
9
+ </registry>