imio.smartweb.core 1.2.38__py3-none-any.whl → 1.2.79__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.
- imio/smartweb/core/behaviors/categorization.py +24 -0
- imio/smartweb/core/behaviors/configure.zcml +7 -0
- imio/smartweb/core/browser/controlpanel.py +43 -0
- imio/smartweb/core/browser/faceted/block_view.pt +4 -4
- imio/smartweb/core/browser/faceted/summary_view.pt +4 -4
- imio/smartweb/core/browser/sitemap.py +10 -3
- imio/smartweb/core/browser/static/icons/action-delete.svg +3 -0
- imio/smartweb/core/browser/static/icons/action-engagement-2.svg +4 -0
- imio/smartweb/core/browser/static/icons/action-panneaux.svg +3 -0
- imio/smartweb/core/browser/static/icons/action-vote.svg +3 -0
- imio/smartweb/core/browser/static/icons/categorie-attention.svg +3 -0
- imio/smartweb/core/browser/static/icons/categorie-infos-travaux-2.svg +4 -0
- imio/smartweb/core/browser/static/icons/categorie-nature.svg +3 -0
- imio/smartweb/core/browser/static/icons/categorie-parcs-a-conteneurs.svg +4 -0
- imio/smartweb/core/browser/static/icons/categorie-plus.svg +3 -0
- imio/smartweb/core/browser/static/icons/categorie-primes-2.svg +5 -0
- imio/smartweb/core/browser/static/icons/categorie-sport-natation.svg +4 -0
- imio/smartweb/core/browser/static/icons/organisation-ecole-sac.svg +4 -0
- imio/smartweb/core/browser/static/icons/organisation-scout.svg +3 -0
- imio/smartweb/core/browser/static/icons/reseausocial-behance.svg +3 -0
- imio/smartweb/core/browser/static/icons/reseausocial-linkedin.svg +3 -0
- imio/smartweb/core/browser/static/smartweb-edit-compiled.css +1 -1
- imio/smartweb/core/browser/static/smartweb-view-compiled.css +1 -1
- imio/smartweb/core/browser/static/src/edit.less +42 -0
- imio/smartweb/core/browser/static/src/view.less +109 -56
- imio/smartweb/core/browser/vocabulary.py +8 -3
- imio/smartweb/core/contents/__init__.py +2 -0
- imio/smartweb/core/contents/configure.zcml +1 -0
- imio/smartweb/core/contents/folder/block_view.pt +8 -8
- imio/smartweb/core/contents/folder/summary_view.pt +4 -4
- imio/smartweb/core/contents/pages/cirkwi/content.py +5 -0
- imio/smartweb/core/contents/pages/cirkwi/view.py +2 -1
- imio/smartweb/core/contents/pages/configure.zcml +1 -0
- imio/smartweb/core/contents/pages/portal_page/view.py +3 -0
- imio/smartweb/core/contents/pages/views.py +47 -1
- imio/smartweb/core/contents/publication/__init__.py +0 -0
- imio/smartweb/core/contents/publication/configure.zcml +5 -0
- imio/smartweb/core/contents/publication/content.py +23 -0
- imio/smartweb/core/contents/rest/base.py +9 -7
- imio/smartweb/core/contents/rest/directory/endpoint.py +2 -2
- imio/smartweb/core/contents/rest/directory/view.pt +2 -1
- imio/smartweb/core/contents/rest/events/content.py +13 -0
- imio/smartweb/core/contents/rest/events/endpoint.py +5 -3
- imio/smartweb/core/contents/rest/events/view.pt +5 -1
- imio/smartweb/core/contents/rest/events/view.py +12 -0
- imio/smartweb/core/contents/rest/news/content.py +6 -0
- imio/smartweb/core/contents/rest/news/endpoint.py +4 -2
- imio/smartweb/core/contents/rest/news/view.pt +4 -1
- imio/smartweb/core/contents/rest/news/view.py +8 -0
- imio/smartweb/core/contents/rest/utils.py +0 -1
- imio/smartweb/core/contents/rest/view.py +4 -0
- imio/smartweb/core/contents/sections/common_templates/carousel.pt +5 -1
- imio/smartweb/core/contents/sections/common_templates/table.pt +18 -4
- imio/smartweb/core/contents/sections/configure.zcml +18 -0
- imio/smartweb/core/contents/sections/contact/content.py +2 -2
- imio/smartweb/core/contents/sections/contact/macros.pt +28 -3
- imio/smartweb/core/contents/sections/contact/utils.py +2 -0
- imio/smartweb/core/contents/sections/contact/view.py +28 -12
- imio/smartweb/core/contents/sections/events/content.py +12 -4
- imio/smartweb/core/contents/sections/events/view.py +20 -2
- imio/smartweb/core/contents/sections/external_content/view.pt +4 -4
- imio/smartweb/core/contents/sections/external_content/views.py +6 -4
- imio/smartweb/core/contents/sections/files/content.py +7 -1
- imio/smartweb/core/contents/sections/files/view.py +43 -12
- imio/smartweb/core/contents/sections/links/view.py +5 -0
- imio/smartweb/core/contents/sections/macros.pt +26 -0
- imio/smartweb/core/contents/sections/news/content.py +11 -3
- imio/smartweb/core/contents/sections/news/view.py +20 -2
- imio/smartweb/core/contents/sections/text/views.py +2 -0
- imio/smartweb/core/contents/sections/views.py +73 -10
- imio/smartweb/core/interfaces.py +4 -0
- imio/smartweb/core/profiles/default/metadata.xml +1 -1
- imio/smartweb/core/profiles/default/taxonomies/page_category.xml +16 -0
- imio/smartweb/core/profiles/default/taxonomies/procedure_category.xml +26 -0
- imio/smartweb/core/profiles/default/types/imio.smartweb.EventsView.xml +1 -0
- imio/smartweb/core/profiles/default/types/imio.smartweb.NewsView.xml +1 -0
- imio/smartweb/core/profiles/default/types/imio.smartweb.Publication.xml +38 -0
- imio/smartweb/core/profiles/default/types/imio.smartweb.SectionEvents.xml +1 -0
- imio/smartweb/core/profiles/default/types/imio.smartweb.SectionFiles.xml +2 -0
- imio/smartweb/core/profiles/default/types/imio.smartweb.SectionNews.xml +1 -0
- imio/smartweb/core/profiles/default/types.xml +1 -0
- imio/smartweb/core/profiles/icons/basic/registry.xml +120 -0
- imio/smartweb/core/rest/authentic_sources.py +17 -2
- imio/smartweb/core/subscribers.py +48 -0
- imio/smartweb/core/subscribers.zcml +12 -0
- imio/smartweb/core/tests/resources/json_iadeliberations_institutions.json +60 -0
- imio/smartweb/core/tests/resources/json_iadeliberations_publication.json +105 -0
- imio/smartweb/core/tests/resources/json_iadeliberations_publications.json +270 -0
- imio/smartweb/core/tests/resources/json_rest_events.json +6 -2
- imio/smartweb/core/tests/resources/json_rest_news.json +2 -2
- imio/smartweb/core/tests/resources/json_rest_specific_events.json +1 -1
- imio/smartweb/core/tests/test_htmx_in_sections.py +131 -0
- imio/smartweb/core/tests/test_iadeliberations.py +136 -0
- imio/smartweb/core/tests/test_icons.py +1 -1
- imio/smartweb/core/tests/test_rest.py +58 -17
- imio/smartweb/core/tests/test_section_contact.py +42 -10
- imio/smartweb/core/tests/test_section_events.py +28 -5
- imio/smartweb/core/tests/test_section_external_content.py +28 -2
- imio/smartweb/core/tests/test_section_news.py +30 -8
- imio/smartweb/core/tests/test_sections.py +17 -0
- imio/smartweb/core/tests/test_vocabularies.py +60 -3
- imio/smartweb/core/tests/test_vocabulary.py +43 -0
- imio/smartweb/core/upgrades/configure.zcml +108 -0
- imio/smartweb/core/upgrades/profiles/1055_to_1056/types/imio.smartweb.SectionFiles.xml +12 -0
- imio/smartweb/core/upgrades/profiles/1056_to_1057/types/imio.smartweb.EventsView.xml +11 -0
- imio/smartweb/core/upgrades/profiles/1056_to_1057/types/imio.smartweb.NewsView.xml +11 -0
- imio/smartweb/core/upgrades/profiles/1056_to_1057/types/imio.smartweb.SectionEvents.xml +11 -0
- imio/smartweb/core/upgrades/profiles/1056_to_1057/types/imio.smartweb.SectionNews.xml +11 -0
- imio/smartweb/core/upgrades/profiles/1057_to_1058/taxonomies/page_category.cfg +9 -0
- imio/smartweb/core/upgrades/profiles/1057_to_1058/taxonomies/page_category.xml +73 -0
- imio/smartweb/core/upgrades/profiles/1057_to_1058/taxonomies/procedure_category.cfg +9 -0
- imio/smartweb/core/upgrades/profiles/1057_to_1058/taxonomies/procedure_category.xml +118 -0
- imio/smartweb/core/upgrades/profiles/1058_to_1059/registry/linkedin-icon.xml +126 -0
- imio/smartweb/core/upgrades/profiles/1059_to_1060/registry/iadeliberation.xml +9 -0
- imio/smartweb/core/upgrades/profiles/1060_to_1061/types/imio.smartweb.Publication.xml +38 -0
- imio/smartweb/core/upgrades/profiles/1060_to_1061/types/imio.smartweb.SectionFiles.xml +11 -0
- imio/smartweb/core/upgrades/profiles/1060_to_1061/types.xml +4 -0
- imio/smartweb/core/upgrades/profiles/1060_to_1061/workflows.xml +6 -0
- imio/smartweb/core/utils.py +33 -2
- imio/smartweb/core/viewlets/configure.zcml +23 -1
- imio/smartweb/core/viewlets/footer.pt +5 -0
- imio/smartweb/core/viewlets/footer.py +5 -0
- imio/smartweb/core/viewlets/htmx.py +15 -0
- imio/smartweb/core/viewlets/htmx_js_header.pt +64 -0
- imio/smartweb/core/viewlets/ogptags.py +4 -3
- imio/smartweb/core/viewlets/social.py +23 -0
- imio/smartweb/core/vocabularies.py +65 -3
- imio/smartweb/core/vocabularies.zcml +18 -0
- imio/smartweb/core/webcomponents/build/1c1605a5fe9a2b10a88f.png +1 -0
- imio/smartweb/core/webcomponents/build/524db40e119aa11f4478.png +1 -0
- imio/smartweb/core/webcomponents/build/57d3b7cb1ab874660b39.svg +1 -0
- imio/smartweb/core/webcomponents/build/6cf03871df23ed2ee8b3.png +1 -0
- imio/smartweb/core/webcomponents/build/css/373.smartweb-webcomponents-compiled.css +1 -1
- imio/smartweb/core/webcomponents/build/css/486.smartweb-webcomponents-compiled.css +1 -1
- imio/smartweb/core/webcomponents/build/css/884.smartweb-webcomponents-compiled.css +1 -0
- imio/smartweb/core/webcomponents/build/css/919.smartweb-webcomponents-compiled.css +1 -1
- imio/smartweb/core/webcomponents/build/css/smartweb-webcomponents-compiled.css +1 -1
- imio/smartweb/core/webcomponents/build/js/218.smartweb-webcomponents-compiled.js +1 -1
- imio/smartweb/core/webcomponents/build/js/218.smartweb-webcomponents-compiled.js.LICENSE.txt +10 -8
- imio/smartweb/core/webcomponents/build/js/373.smartweb-webcomponents-compiled.js +2 -1
- imio/smartweb/core/webcomponents/build/js/{568.smartweb-webcomponents-compiled.js.LICENSE.txt → 373.smartweb-webcomponents-compiled.js.LICENSE.txt} +0 -4
- imio/smartweb/core/webcomponents/build/js/486.smartweb-webcomponents-compiled.js +1 -1
- imio/smartweb/core/webcomponents/build/js/499.smartweb-webcomponents-compiled.js +2 -0
- imio/smartweb/core/webcomponents/build/js/{674.smartweb-webcomponents-compiled.js.LICENSE.txt → 499.smartweb-webcomponents-compiled.js.LICENSE.txt} +1 -8
- imio/smartweb/core/webcomponents/build/js/799.smartweb-webcomponents-compiled.js +1 -1
- imio/smartweb/core/webcomponents/build/js/824.smartweb-webcomponents-compiled.js +2 -0
- imio/smartweb/core/webcomponents/build/js/828.smartweb-webcomponents-compiled.js +2 -0
- imio/smartweb/core/webcomponents/build/js/828.smartweb-webcomponents-compiled.js.LICENSE.txt +32 -0
- imio/smartweb/core/webcomponents/build/js/884.smartweb-webcomponents-compiled.js +1 -0
- imio/smartweb/core/webcomponents/build/js/919.smartweb-webcomponents-compiled.js +1 -1
- imio/smartweb/core/webcomponents/build/js/{568.smartweb-webcomponents-compiled.js → 963.smartweb-webcomponents-compiled.js} +2 -2
- imio/smartweb/core/webcomponents/build/js/963.smartweb-webcomponents-compiled.js.LICENSE.txt +3 -0
- imio/smartweb/core/webcomponents/build/js/smartweb-webcomponents-compiled.js +1 -1
- imio/smartweb/core/webcomponents/build/js/smartweb-webcomponents-compiled.js.LICENSE.txt +11 -14
- imio/smartweb/core/webcomponents/package.json +42 -40
- imio/smartweb/core/webcomponents/src/components/Annuaire/Annuaire.jsx +146 -79
- imio/smartweb/core/webcomponents/src/components/Annuaire/Annuaire.scss +415 -351
- imio/smartweb/core/webcomponents/src/components/Annuaire/ContactCard/ContactCard.jsx +95 -62
- imio/smartweb/core/webcomponents/src/components/Annuaire/ContactContent/ContactContent.jsx +328 -168
- imio/smartweb/core/webcomponents/src/components/Annuaire/ContactList/ContactList.jsx +21 -4
- imio/smartweb/core/webcomponents/src/components/Annuaire/Filters/Filter.jsx +213 -100
- imio/smartweb/core/webcomponents/src/components/Annuaire/index.js +1 -1
- imio/smartweb/core/webcomponents/src/components/Events/EventCard/EventCard.jsx +76 -33
- imio/smartweb/core/webcomponents/src/components/Events/EventContent/EventContent.jsx +604 -377
- imio/smartweb/core/webcomponents/src/components/Events/EventList/EventList.jsx +29 -4
- imio/smartweb/core/webcomponents/src/components/Events/Events.jsx +162 -88
- imio/smartweb/core/webcomponents/src/components/Events/Events.scss +496 -378
- imio/smartweb/core/webcomponents/src/components/Events/Filters/Filter.jsx +259 -91
- imio/smartweb/core/webcomponents/src/components/Filters/DateFilter.jsx +62 -55
- imio/smartweb/core/webcomponents/src/components/Filters/DateFilter.scss +68 -17
- imio/smartweb/core/webcomponents/src/components/Filters/IamData.jsx +42 -0
- imio/smartweb/core/webcomponents/src/components/Filters/MainFilter.scss +229 -0
- imio/smartweb/core/webcomponents/src/components/Filters/PublicTargetData.jsx +94 -0
- imio/smartweb/core/webcomponents/src/components/Filters/SelectStyles.js +58 -0
- imio/smartweb/core/webcomponents/src/components/Filters/TaxonomyFilter.jsx +149 -0
- imio/smartweb/core/webcomponents/src/components/Filters/TaxonomyFilter.scss +70 -0
- imio/smartweb/core/webcomponents/src/components/News/Filters/Filter.jsx +139 -83
- imio/smartweb/core/webcomponents/src/components/News/News.jsx +133 -67
- imio/smartweb/core/webcomponents/src/components/News/News.scss +170 -127
- imio/smartweb/core/webcomponents/src/components/News/NewsCard/NewsCard.jsx +76 -44
- imio/smartweb/core/webcomponents/src/components/News/NewsContent/NewsContent.jsx +261 -188
- imio/smartweb/core/webcomponents/src/components/News/NewsList/NewsList.jsx +48 -9
- imio/smartweb/core/webcomponents/src/components/Search/ContactResult/ContactResult.jsx +21 -10
- imio/smartweb/core/webcomponents/src/components/Search/EventsResult/EventsResult.jsx +21 -10
- imio/smartweb/core/webcomponents/src/components/Search/Filters/Filter.jsx +8 -9
- imio/smartweb/core/webcomponents/src/components/Search/NewsResult/NewsResult.jsx +23 -12
- imio/smartweb/core/webcomponents/src/components/Search/Search.jsx +7 -6
- imio/smartweb/core/webcomponents/src/components/Search/Search.scss +115 -96
- imio/smartweb/core/webcomponents/src/components/Search/WebResult/WebResult.jsx +12 -3
- imio/smartweb/core/webcomponents/src/components/Search/index.js +1 -1
- imio/smartweb/core/webcomponents/src/hooks/ScrollContext.jsx +3 -0
- imio/smartweb/core/webcomponents/src/hooks/useAxios.js +3 -3
- imio/smartweb/core/webcomponents/src/hooks/useFilterQuery.js +1 -2
- imio/smartweb/core/webcomponents/src/index.scss +255 -211
- imio/smartweb/core/webcomponents/src/utils/Map.jsx +26 -19
- imio/smartweb/core/webcomponents/src/utils/Map.scss +2 -2
- imio/smartweb/core/webcomponents/src/utils/translation.js +129 -9
- imio.smartweb.core-1.2.79-py3.8-nspkg.pth +2 -0
- {imio.smartweb.core-1.2.38.dist-info → imio.smartweb.core-1.2.79.dist-info}/METADATA +403 -10
- {imio.smartweb.core-1.2.38.dist-info → imio.smartweb.core-1.2.79.dist-info}/RECORD +206 -160
- {imio.smartweb.core-1.2.38.dist-info → imio.smartweb.core-1.2.79.dist-info}/WHEEL +1 -1
- imio/smartweb/core/webcomponents/build/assets/location-bla.1423bcce16ddcb21141430cac1428dc1.svg +0 -1
- imio/smartweb/core/webcomponents/build/assets/next-react-white.819cb069ac8eec300a9db6a7707712d6.svg +0 -1
- imio/smartweb/core/webcomponents/build/assets/next-react.17bc43ff4a6a86f4520f5782f6a89a72.svg +0 -1
- imio/smartweb/core/webcomponents/build/assets/search.57bdbf5b191499cd77514097d1c4972c.svg +0 -1
- imio/smartweb/core/webcomponents/build/css/686.smartweb-webcomponents-compiled.css +0 -1
- imio/smartweb/core/webcomponents/build/js/209.smartweb-webcomponents-compiled.js +0 -2
- imio/smartweb/core/webcomponents/build/js/40.smartweb-webcomponents-compiled.js +0 -1
- imio/smartweb/core/webcomponents/build/js/674.smartweb-webcomponents-compiled.js +0 -2
- imio/smartweb/core/webcomponents/build/js/686.smartweb-webcomponents-compiled.js +0 -1
- imio/smartweb/core/webcomponents/src/assets/facebook-news.svg +0 -1
- imio/smartweb/core/webcomponents/src/assets/location-bla.svg +0 -1
- imio/smartweb/core/webcomponents/src/assets/next-react.svg +0 -1
- imio/smartweb/core/webcomponents/src/assets/search.svg +0 -1
- imio/smartweb/core/webcomponents/src/assets/skeleton.svg +0 -1
- imio/smartweb/core/webcomponents/src/components/Annuaire/ContactContent/download.svg +0 -1
- imio.smartweb.core-1.2.38-py3.8-nspkg.pth +0 -3
- /imio/smartweb/core/webcomponents/build/js/{209.smartweb-webcomponents-compiled.js.LICENSE.txt → 824.smartweb-webcomponents-compiled.js.LICENSE.txt} +0 -0
- {imio.smartweb.core-1.2.38.dist-info → imio.smartweb.core-1.2.79.dist-info}/LICENSE.GPL +0 -0
- {imio.smartweb.core-1.2.38.dist-info → imio.smartweb.core-1.2.79.dist-info}/LICENSE.rst +0 -0
- {imio.smartweb.core-1.2.38.dist-info → imio.smartweb.core-1.2.79.dist-info}/namespace_packages.txt +0 -0
- {imio.smartweb.core-1.2.38.dist-info → imio.smartweb.core-1.2.79.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,126 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<registry
|
3
|
+
xmlns:i18n="http://xml.zope.org/namespaces/i18n"
|
4
|
+
i18n:domain="imio.smartweb">
|
5
|
+
|
6
|
+
<record name="smartweb.icon.action.delete"
|
7
|
+
interface="imio.smartweb.core.interfaces.ISmartwebIcon">
|
8
|
+
<field type="plone.registry.field.TextLine">
|
9
|
+
<title i18n:translate="">Action - Delete</title>
|
10
|
+
</field>
|
11
|
+
<value key="resource">++plone++imio.smartweb.core/icons/action-delete.svg</value>
|
12
|
+
</record>
|
13
|
+
|
14
|
+
<record name="smartweb.icon.action.hiring-2"
|
15
|
+
interface="imio.smartweb.core.interfaces.ISmartwebIcon">
|
16
|
+
<field type="plone.registry.field.TextLine">
|
17
|
+
<title i18n:translate="">Action - Hiring - 2</title>
|
18
|
+
</field>
|
19
|
+
<value key="resource">++plone++imio.smartweb.core/icons/action-engagement-2.svg</value>
|
20
|
+
</record>
|
21
|
+
|
22
|
+
<record name="smartweb.icon.action.signs"
|
23
|
+
interface="imio.smartweb.core.interfaces.ISmartwebIcon">
|
24
|
+
<field type="plone.registry.field.TextLine">
|
25
|
+
<title i18n:translate="">Action - Signs</title>
|
26
|
+
</field>
|
27
|
+
<value key="resource">++plone++imio.smartweb.core/icons/action-panneaux.svg</value>
|
28
|
+
</record>
|
29
|
+
|
30
|
+
<record name="smartweb.icon.action.vote"
|
31
|
+
interface="imio.smartweb.core.interfaces.ISmartwebIcon">
|
32
|
+
<field type="plone.registry.field.TextLine">
|
33
|
+
<title i18n:translate="">Action - Vote</title>
|
34
|
+
</field>
|
35
|
+
<value key="resource">++plone++imio.smartweb.core/icons/action-vote.svg</value>
|
36
|
+
</record>
|
37
|
+
|
38
|
+
<record name="smartweb.icon.category.attention"
|
39
|
+
interface="imio.smartweb.core.interfaces.ISmartwebIcon">
|
40
|
+
<field type="plone.registry.field.TextLine">
|
41
|
+
<title i18n:translate="">Category - Attention</title>
|
42
|
+
</field>
|
43
|
+
<value key="resource">++plone++imio.smartweb.core/icons/categorie-attention.svg</value>
|
44
|
+
</record>
|
45
|
+
|
46
|
+
<record name="smartweb.icon.category.works-2"
|
47
|
+
interface="imio.smartweb.core.interfaces.ISmartwebIcon">
|
48
|
+
<field type="plone.registry.field.TextLine">
|
49
|
+
<title i18n:translate="">Category - Works - 2</title>
|
50
|
+
</field>
|
51
|
+
<value key="resource">++plone++imio.smartweb.core/icons/categorie-infos-travaux-2.svg</value>
|
52
|
+
</record>
|
53
|
+
|
54
|
+
<record name="smartweb.icon.category.nature"
|
55
|
+
interface="imio.smartweb.core.interfaces.ISmartwebIcon">
|
56
|
+
<field type="plone.registry.field.TextLine">
|
57
|
+
<title i18n:translate="">Category - Nature</title>
|
58
|
+
</field>
|
59
|
+
<value key="resource">++plone++imio.smartweb.core/icons/categorie-nature.svg</value>
|
60
|
+
</record>
|
61
|
+
|
62
|
+
<record name="smartweb.icon.category.containerpark"
|
63
|
+
interface="imio.smartweb.core.interfaces.ISmartwebIcon">
|
64
|
+
<field type="plone.registry.field.TextLine">
|
65
|
+
<title i18n:translate="">Category - Containerpark</title>
|
66
|
+
</field>
|
67
|
+
<value key="resource">++plone++imio.smartweb.core/icons/categorie-parcs-a-conteneurs.svg</value>
|
68
|
+
</record>
|
69
|
+
|
70
|
+
<record name="smartweb.icon.category.more"
|
71
|
+
interface="imio.smartweb.core.interfaces.ISmartwebIcon">
|
72
|
+
<field type="plone.registry.field.TextLine">
|
73
|
+
<title i18n:translate="">Category - More</title>
|
74
|
+
</field>
|
75
|
+
<value key="resource">++plone++imio.smartweb.core/icons/categorie-plus.svg</value>
|
76
|
+
</record>
|
77
|
+
|
78
|
+
<record name="smartweb.icon.category.bonuses-2"
|
79
|
+
interface="imio.smartweb.core.interfaces.ISmartwebIcon">
|
80
|
+
<field type="plone.registry.field.TextLine">
|
81
|
+
<title i18n:translate="">Category - Bonuses 2</title>
|
82
|
+
</field>
|
83
|
+
<value key="resource">++plone++imio.smartweb.core/icons/categorie-primes-2.svg</value>
|
84
|
+
</record>
|
85
|
+
|
86
|
+
<record name="smartweb.icon.category.sport.swim"
|
87
|
+
interface="imio.smartweb.core.interfaces.ISmartwebIcon">
|
88
|
+
<field type="plone.registry.field.TextLine">
|
89
|
+
<title i18n:translate="">Category - Sport - Swim</title>
|
90
|
+
</field>
|
91
|
+
<value key="resource">++plone++imio.smartweb.core/icons/categorie-sport-natation.svg</value>
|
92
|
+
</record>
|
93
|
+
|
94
|
+
<record name="smartweb.icon.organization.school-2"
|
95
|
+
interface="imio.smartweb.core.interfaces.ISmartwebIcon">
|
96
|
+
<field type="plone.registry.field.TextLine">
|
97
|
+
<title i18n:translate="">Organization - School - 2</title>
|
98
|
+
</field>
|
99
|
+
<value key="resource">++plone++imio.smartweb.core/icons/organisation-ecole-sac.svg</value>
|
100
|
+
</record>
|
101
|
+
|
102
|
+
<record name="smartweb.icon.organization.boyscout"
|
103
|
+
interface="imio.smartweb.core.interfaces.ISmartwebIcon">
|
104
|
+
<field type="plone.registry.field.TextLine">
|
105
|
+
<title i18n:translate="">Organization - Boyscout</title>
|
106
|
+
</field>
|
107
|
+
<value key="resource">++plone++imio.smartweb.core/icons/organisation-scout.svg</value>
|
108
|
+
</record>
|
109
|
+
|
110
|
+
<record name="smartweb.icon.socialnetwork.behance"
|
111
|
+
interface="imio.smartweb.core.interfaces.ISmartwebIcon">
|
112
|
+
<field type="plone.registry.field.TextLine">
|
113
|
+
<title i18n:translate="">Social network - Behance</title>
|
114
|
+
</field>
|
115
|
+
<value key="resource">++plone++imio.smartweb.core/icons/reseausocial-behance.svg</value>
|
116
|
+
</record>
|
117
|
+
|
118
|
+
<record name="smartweb.icon.socialnetwork.linkedin"
|
119
|
+
interface="imio.smartweb.core.interfaces.ISmartwebIcon">
|
120
|
+
<field type="plone.registry.field.TextLine">
|
121
|
+
<title i18n:translate="">Social network - Linkedin</title>
|
122
|
+
</field>
|
123
|
+
<value key="resource">++plone++imio.smartweb.core/icons/reseausocial-linkedin.svg</value>
|
124
|
+
</record>
|
125
|
+
|
126
|
+
</registry>
|
@@ -0,0 +1,38 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<object xmlns:i18n="http://xml.zope.org/namespaces/i18n"
|
3
|
+
name="imio.smartweb.Publication"
|
4
|
+
meta_type="Dexterity FTI"
|
5
|
+
i18n:domain="imio.smartweb">
|
6
|
+
|
7
|
+
<!-- Basic properties -->
|
8
|
+
<property
|
9
|
+
i18n:translate=""
|
10
|
+
name="title">Publication</property>
|
11
|
+
<property
|
12
|
+
i18n:translate=""
|
13
|
+
name="description">IA.Deliberations : Publication</property>
|
14
|
+
|
15
|
+
<property name="icon_expr">string:bounding-box-circles</property>
|
16
|
+
|
17
|
+
<!-- Hierarchy control -->
|
18
|
+
<property name="global_allow">False</property>
|
19
|
+
|
20
|
+
<!-- Schema, class and security -->
|
21
|
+
<!-- if we can add a page, we can add a page section -->
|
22
|
+
<property name="add_permission">imio.smartweb.core.AddPage</property>
|
23
|
+
<property name="klass">imio.smartweb.core.contents.Publication</property>
|
24
|
+
<property name="schema">imio.smartweb.core.contents.IPublication</property>
|
25
|
+
|
26
|
+
<!-- Enabled behaviors -->
|
27
|
+
<property name="behaviors" purge="false">
|
28
|
+
<element value="plone.shortname"/>
|
29
|
+
<element value="plone.leadimage"/>
|
30
|
+
<element value="solr.fields" />
|
31
|
+
</property>
|
32
|
+
|
33
|
+
<!-- View information -->
|
34
|
+
<property name="default_view">view</property>
|
35
|
+
<property name="default_view_fallback">False</property>
|
36
|
+
<property name="immediate_view">view</property>
|
37
|
+
|
38
|
+
</object>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<object xmlns:i18n="http://xml.zope.org/namespaces/i18n"
|
3
|
+
name="imio.smartweb.SectionFiles"
|
4
|
+
meta_type="Dexterity FTI"
|
5
|
+
i18n:domain="imio.smartweb">
|
6
|
+
|
7
|
+
<property name="allowed_content_types" purge="false">
|
8
|
+
<element value="imio.smartweb.Publication" />
|
9
|
+
</property>
|
10
|
+
|
11
|
+
</object>
|
imio/smartweb/core/utils.py
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
from Acquisition import aq_parent
|
4
4
|
from collective.taxonomy.interfaces import ITaxonomy
|
5
|
+
from imio.smartweb.common.utils import is_log_active
|
5
6
|
from imio.smartweb.core.config import WCA_URL
|
6
7
|
from imio.smartweb.core.contents import IFolder
|
7
8
|
from more_itertools import chunked
|
@@ -14,6 +15,7 @@ from Products.CMFPlone.utils import base_hasattr
|
|
14
15
|
from zope.component import getSiteManager
|
15
16
|
from zope.component import queryMultiAdapter
|
16
17
|
|
18
|
+
import base64
|
17
19
|
import hashlib
|
18
20
|
import json
|
19
21
|
import logging
|
@@ -69,7 +71,8 @@ def get_json(url, auth=None, timeout=5):
|
|
69
71
|
return None
|
70
72
|
if response.status_code != 200:
|
71
73
|
return None
|
72
|
-
|
74
|
+
if response.text:
|
75
|
+
return json.loads(response.text)
|
73
76
|
|
74
77
|
|
75
78
|
def get_wca_token(client_id, client_secret):
|
@@ -91,6 +94,8 @@ def get_wca_token(client_id, client_secret):
|
|
91
94
|
}
|
92
95
|
response = requests.post(WCA_URL, headers=headers, data=payload)
|
93
96
|
id_token = response.json().get("id_token")
|
97
|
+
if is_log_active():
|
98
|
+
logger.info(f"WCA token retrieved : {id_token}")
|
94
99
|
return "Bearer {0}".format(id_token)
|
95
100
|
|
96
101
|
|
@@ -111,7 +116,7 @@ def batch_results(iterable, batch_size):
|
|
111
116
|
return list(chunked(iterable, batch_size, strict=False))
|
112
117
|
|
113
118
|
|
114
|
-
def reindexParent(obj, event):
|
119
|
+
def reindexParent(obj, event=None):
|
115
120
|
parent = aq_parent(obj)
|
116
121
|
if parent is not None:
|
117
122
|
# in some cases (ex: relation breaking), we do not get the object in
|
@@ -196,3 +201,29 @@ def get_plausible_vars():
|
|
196
201
|
return plausible_vars
|
197
202
|
else:
|
198
203
|
return None
|
204
|
+
|
205
|
+
|
206
|
+
def get_iadeliberation_url_from_registry():
|
207
|
+
iadeliberation_url = api.portal.get_registry_record("smartweb.iadeliberations_url")
|
208
|
+
return iadeliberation_url
|
209
|
+
|
210
|
+
|
211
|
+
def get_iadeliberation_institution_from_registry():
|
212
|
+
iadeliberation_institution = api.portal.get_registry_record(
|
213
|
+
"smartweb.iadeliberations_institution"
|
214
|
+
)
|
215
|
+
return iadeliberation_institution
|
216
|
+
|
217
|
+
|
218
|
+
def get_iadeliberation_json(url):
|
219
|
+
iadeliberation_user = api.portal.get_registry_record(
|
220
|
+
"smartweb.iadeliberations_api_username"
|
221
|
+
)
|
222
|
+
iadeliberation_pwd = api.portal.get_registry_record(
|
223
|
+
"smartweb.iadeliberation_api_password"
|
224
|
+
)
|
225
|
+
usrPass = f"{iadeliberation_user}:{iadeliberation_pwd}".encode("utf-8")
|
226
|
+
b64Val = base64.b64encode(usrPass)
|
227
|
+
json = get_json(url, auth=f"Basic {b64Val.decode('utf-8')}", timeout=20)
|
228
|
+
|
229
|
+
return json
|
@@ -38,7 +38,7 @@
|
|
38
38
|
|
39
39
|
<browser:viewlet
|
40
40
|
name="imio.smartweb.odwb_widget_header"
|
41
|
-
for="
|
41
|
+
for="imio.smartweb.core.interfaces.IOdwbViewUtils"
|
42
42
|
manager="plone.app.layout.viewlets.interfaces.IHTTPHeaders"
|
43
43
|
layer="imio.smartweb.core.interfaces.IImioSmartwebCoreLayer"
|
44
44
|
template="odwb_widget_header.pt"
|
@@ -328,6 +328,28 @@
|
|
328
328
|
/>
|
329
329
|
</configure>
|
330
330
|
|
331
|
+
<browser:viewlet
|
332
|
+
name="smartweb.htmx.js"
|
333
|
+
for="imio.smartweb.core.contents.IPage"
|
334
|
+
view="imio.smartweb.core.interfaces.IHtmxViewUtils"
|
335
|
+
manager="plone.app.layout.viewlets.interfaces.IHtmlHead"
|
336
|
+
layer="imio.smartweb.core.interfaces.IImioSmartwebCoreLayer"
|
337
|
+
template="htmx_js_header.pt"
|
338
|
+
class=".htmx.HtmxViewlet"
|
339
|
+
permission="zope2.View"
|
340
|
+
/>
|
341
|
+
|
342
|
+
<browser:viewlet
|
343
|
+
name="smartweb.htmx.js"
|
344
|
+
for="imio.smartweb.core.contents.IPortalPage"
|
345
|
+
view="imio.smartweb.core.interfaces.IHtmxViewUtils"
|
346
|
+
manager="plone.app.layout.viewlets.interfaces.IHtmlHead"
|
347
|
+
layer="imio.smartweb.core.interfaces.IImioSmartwebCoreLayer"
|
348
|
+
template="htmx_js_header.pt"
|
349
|
+
class=".htmx.HtmxViewlet"
|
350
|
+
permission="zope2.View"
|
351
|
+
/>
|
352
|
+
|
331
353
|
<!-- Overrides to change viewlets managers -->
|
332
354
|
|
333
355
|
<configure package="plone.app.multilingual.browser">
|
@@ -6,6 +6,11 @@
|
|
6
6
|
tal:attributes="id view/css_id;
|
7
7
|
style view/background_style;
|
8
8
|
class string:smartweb-footer ${footer/css_class}">
|
9
|
+
<a class="show-on-focus skip-before-footer"
|
10
|
+
tal:define="url view/current_page_url"
|
11
|
+
tal:attributes="href string:${url}#content-header"
|
12
|
+
i18n:domain="imio.smartweb"
|
13
|
+
i18n:translate="">Skip to navigation</a>
|
9
14
|
<div class="container">
|
10
15
|
<div class="row">
|
11
16
|
<tal:bcl tal:repeat="section view/sections">
|
@@ -8,6 +8,7 @@ from plone.app.layout.navigation.interfaces import INavigationRoot
|
|
8
8
|
from plone.app.layout.viewlets import common
|
9
9
|
from Products.CMFPlone.interfaces.siteroot import IPloneSiteRoot
|
10
10
|
from Products.CMFPlone.utils import parent
|
11
|
+
from zope.component import getMultiAdapter
|
11
12
|
|
12
13
|
|
13
14
|
class BaseFooterViewlet(common.ViewletBase):
|
@@ -28,9 +29,13 @@ class BaseFooterViewlet(common.ViewletBase):
|
|
28
29
|
return " ".join([css_bg_image, css_bg_size])
|
29
30
|
|
30
31
|
def update(self):
|
32
|
+
context_state = getMultiAdapter(
|
33
|
+
(self.context, self.request), name="plone_context_state"
|
34
|
+
)
|
31
35
|
if not self.available():
|
32
36
|
return
|
33
37
|
self.sections = self.footer.listFolderContents()
|
38
|
+
self.current_page_url = context_state.current_page_url
|
34
39
|
|
35
40
|
|
36
41
|
class FooterViewlet(BaseFooterViewlet):
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
|
3
|
+
from plone import api
|
4
|
+
from plone.app.layout.viewlets.httpheaders import HeaderViewlet
|
5
|
+
|
6
|
+
|
7
|
+
class HtmxViewlet(HeaderViewlet):
|
8
|
+
"""htmx"""
|
9
|
+
|
10
|
+
def update(self):
|
11
|
+
super(HtmxViewlet, self).update()
|
12
|
+
|
13
|
+
@property
|
14
|
+
def is_anonymous(self):
|
15
|
+
return api.user.is_anonymous()
|
@@ -0,0 +1,64 @@
|
|
1
|
+
<tal:cond condition="python:not view.is_anonymous">
|
2
|
+
<script src="https://unpkg.com/htmx.org@1.9.10/dist/htmx.js"></script>
|
3
|
+
<script type="text/javascript">
|
4
|
+
document.addEventListener("DOMContentLoaded", function() {
|
5
|
+
/**
|
6
|
+
Manage section size
|
7
|
+
When clicking on link (<a>) with class "section_size", display the form to select the section size
|
8
|
+
*/
|
9
|
+
document.querySelectorAll(".manage-section > a.section_size").forEach(function(element) {
|
10
|
+
element.addEventListener("click", function(event) {
|
11
|
+
event.preventDefault();
|
12
|
+
var clickedElement = event.target;
|
13
|
+
var uid = clickedElement.getAttribute("uid");
|
14
|
+
var sizesForm = document.getElementById("sizesForm_" + uid);
|
15
|
+
// Get <select>
|
16
|
+
var selectElement = document.querySelector("#sizesForm_" + uid + " > select");
|
17
|
+
sizesForm.style.display = "inline-block";
|
18
|
+
sizesForm.style.position = "absolute";
|
19
|
+
sizesForm.style.zIndex = "2";
|
20
|
+
selectElement.selectedIndex = -1;
|
21
|
+
selectElement.size = selectElement.options.length;
|
22
|
+
selectElement.focus();
|
23
|
+
selectElement.addEventListener('focusout', function(event) {
|
24
|
+
sizesForm.style.display = "none";
|
25
|
+
});
|
26
|
+
});
|
27
|
+
});
|
28
|
+
|
29
|
+
/**
|
30
|
+
Manage section size
|
31
|
+
When submitting the form, update the section size and the class of the parent element
|
32
|
+
(to directly resize the section)
|
33
|
+
*/
|
34
|
+
document.querySelectorAll(".manage-section > form").forEach(function(form) {
|
35
|
+
form.addEventListener("htmx:afterRequest", function(event) {
|
36
|
+
event.preventDefault();
|
37
|
+
var response = JSON.parse(event.detail.xhr.response);
|
38
|
+
var currentForm = event.target;
|
39
|
+
var uid = currentForm.getAttribute("hx-boost");
|
40
|
+
var link = document.getElementById("selected_size_" + uid);
|
41
|
+
var parent = currentForm.closest('.sortable-section');
|
42
|
+
var lst_parent_classes = parent.className.split(" ");
|
43
|
+
var new_parent_classes = "";
|
44
|
+
var find = false;
|
45
|
+
for (var i = 0; i < lst_parent_classes.length; i++) {
|
46
|
+
if (lst_parent_classes[i].startsWith("col-")) {
|
47
|
+
find = true;
|
48
|
+
lst_parent_classes[i] = response.id;
|
49
|
+
}
|
50
|
+
new_parent_classes += " " + lst_parent_classes[i];
|
51
|
+
}
|
52
|
+
// "col-" can not be found if there is no section size defined
|
53
|
+
if (!find) {
|
54
|
+
new_parent_classes += " " + response.id;
|
55
|
+
}
|
56
|
+
parent.className = new_parent_classes.trim();
|
57
|
+
currentForm.style.display = "none";
|
58
|
+
link.innerText = response.title;
|
59
|
+
link.style.display = "inline-block";
|
60
|
+
});
|
61
|
+
});
|
62
|
+
});
|
63
|
+
</script>
|
64
|
+
</tal:cond>
|
@@ -59,22 +59,23 @@ class OgpTagsViewlet(HeaderViewlet):
|
|
59
59
|
auth_source_url = ""
|
60
60
|
endpoint = "@search"
|
61
61
|
if IDirectoryView.providedBy(self.context):
|
62
|
+
params = "fullobjects=1"
|
62
63
|
auth_source_url = DIRECTORY_URL
|
63
64
|
client_id = os.environ.get("RESTAPI_DIRECTORY_CLIENT_ID")
|
64
65
|
client_secret = os.environ.get("RESTAPI_DIRECTORY_CLIENT_SECRET")
|
65
66
|
elif IEventsView.providedBy(self.context):
|
67
|
+
params = "metadata_fields=category&metadata_fields=local_category&metadata_fields=container_uid&metadata_fields=topics&metadata_fields=start&metadata_fields=end&metadata_fields=has_leadimage&metadata_fields=UID&fullobjects=1"
|
66
68
|
auth_source_url = EVENTS_URL
|
67
69
|
endpoint = "@events"
|
68
70
|
client_id = os.environ.get("RESTAPI_EVENTS_CLIENT_ID")
|
69
71
|
client_secret = os.environ.get("RESTAPI_EVENTS_CLIENT_SECRET")
|
70
72
|
elif INewsView.providedBy(self.context):
|
73
|
+
params = "fullobjects=1"
|
71
74
|
auth_source_url = NEWS_URL
|
72
75
|
client_id = os.environ.get("RESTAPI_NEWS_CLIENT_ID")
|
73
76
|
client_secret = os.environ.get("RESTAPI_NEWS_CLIENT_SECRET")
|
74
77
|
auth = get_wca_token(client_id, client_secret)
|
75
|
-
auth_source_url =
|
76
|
-
f"{auth_source_url}/{endpoint}?UID={uid}&fullobjects=1&include_items=true"
|
77
|
-
)
|
78
|
+
auth_source_url = f"{auth_source_url}/{endpoint}?UID={uid}&{params}"
|
78
79
|
result_json = get_json(auth_source_url, auth=auth)
|
79
80
|
if result_json:
|
80
81
|
self._item = result_json["items"][0]
|
@@ -1,7 +1,30 @@
|
|
1
1
|
# -*- coding: utf-8 -*-
|
2
2
|
|
3
|
+
# from imio.smartweb.core.contents import IPortalPage
|
3
4
|
from plone.app.layout.viewlets.social import SocialTagsViewlet as BaseSocialTagsViewlet
|
4
5
|
|
5
6
|
|
6
7
|
class SocialTagsViewlet(BaseSocialTagsViewlet):
|
7
8
|
social_image_scale = "paysage_vignette"
|
9
|
+
|
10
|
+
@property
|
11
|
+
def tags(self):
|
12
|
+
tags = super(SocialTagsViewlet, self).tags
|
13
|
+
# if IPortalPage.providedBy(self.context):
|
14
|
+
if getattr(self.context, "image", None) is None:
|
15
|
+
return tags
|
16
|
+
tags = [item for item in tags if "og:image" not in item.get("property", "")]
|
17
|
+
scales = self.context.restrictedTraverse("@@images")
|
18
|
+
scale = scales.scale("image", scale=self.social_image_scale)
|
19
|
+
scale_url = scale.absolute_url()
|
20
|
+
image = self.context.image
|
21
|
+
tags.extend(
|
22
|
+
[
|
23
|
+
dict(property="og:image", content=scale_url),
|
24
|
+
dict(property="og:image:width", content=scale.width),
|
25
|
+
dict(property="og:image:height", content=scale.height),
|
26
|
+
dict(itemprop="image", content=scale_url),
|
27
|
+
dict(property="og:image:type", content=image.contentType),
|
28
|
+
]
|
29
|
+
)
|
30
|
+
return tags
|
@@ -11,6 +11,9 @@ from imio.smartweb.core.interfaces import ISmartwebIcon
|
|
11
11
|
from imio.smartweb.core.utils import concat_voca_term
|
12
12
|
from imio.smartweb.core.utils import concat_voca_title
|
13
13
|
from imio.smartweb.core.utils import get_categories
|
14
|
+
from imio.smartweb.core.utils import get_iadeliberation_url_from_registry
|
15
|
+
from imio.smartweb.core.utils import get_iadeliberation_institution_from_registry
|
16
|
+
from imio.smartweb.core.utils import get_iadeliberation_json
|
14
17
|
from imio.smartweb.core.utils import get_json
|
15
18
|
from imio.smartweb.core.utils import get_wca_token
|
16
19
|
from imio.smartweb.locales import SmartwebMessageFactory as _
|
@@ -118,6 +121,23 @@ class CurrentFolderPagesVocabularyFactory:
|
|
118
121
|
CurrentFolderPagesVocabulary = CurrentFolderPagesVocabularyFactory()
|
119
122
|
|
120
123
|
|
124
|
+
class CategoriesDisplayVocabularyFactory:
|
125
|
+
def __call__(self, context=None):
|
126
|
+
values = [
|
127
|
+
("category", _("Category")),
|
128
|
+
("topic", _("Topic")),
|
129
|
+
("", _("None")),
|
130
|
+
]
|
131
|
+
terms = [
|
132
|
+
SimpleVocabulary.createTerm(value[0], value[0], value[1])
|
133
|
+
for value in values
|
134
|
+
]
|
135
|
+
return SimpleVocabulary(terms)
|
136
|
+
|
137
|
+
|
138
|
+
CategoriesDisplayVocabulary = CategoriesDisplayVocabularyFactory()
|
139
|
+
|
140
|
+
|
121
141
|
class BootstrapCSSVocabularyFactory:
|
122
142
|
def __call__(self, context=None):
|
123
143
|
bootstrap_css = [
|
@@ -204,7 +224,7 @@ class RemoteContactsVocabularyFactory:
|
|
204
224
|
"metadata_fields=breadcrumb",
|
205
225
|
]
|
206
226
|
url = "{}/@search?{}".format(DIRECTORY_URL, "&".join(params))
|
207
|
-
json_contacts = get_json(url, None,
|
227
|
+
json_contacts = get_json(url, None, 12)
|
208
228
|
if json_contacts is None or len(json_contacts.get("items", [])) == 0:
|
209
229
|
return SimpleVocabulary([])
|
210
230
|
return SimpleVocabulary(
|
@@ -505,7 +525,7 @@ class EventsFromEntityVocabularyFactory:
|
|
505
525
|
params = [
|
506
526
|
selected_agendas,
|
507
527
|
"portal_type=imio.events.Event",
|
508
|
-
"metadata_fields=
|
528
|
+
"metadata_fields=category_title",
|
509
529
|
"metadata_fields=topics",
|
510
530
|
"metadata_fields=start",
|
511
531
|
"metadata_fields=end",
|
@@ -545,7 +565,7 @@ class NewsItemsFromEntityVocabularyFactory:
|
|
545
565
|
params = [
|
546
566
|
selected_newsfolders,
|
547
567
|
"portal_type=imio.news.NewsItem",
|
548
|
-
"metadata_fields=
|
568
|
+
"metadata_fields=category_title",
|
549
569
|
"metadata_fields=topics",
|
550
570
|
"metadata_fields=has_leadimage",
|
551
571
|
"metadata_fields=breadcrumb",
|
@@ -611,3 +631,45 @@ class SendInBlueButtonPosVocabularyFactory:
|
|
611
631
|
|
612
632
|
|
613
633
|
SendInBlueButtonPosVocabulary = SendInBlueButtonPosVocabularyFactory()
|
634
|
+
|
635
|
+
|
636
|
+
class RemoteIADeliberationsInstitutionsVocabularyFactory:
|
637
|
+
def __call__(self, context=None):
|
638
|
+
iadeliberation_url = get_iadeliberation_url_from_registry()
|
639
|
+
# What a devilish request... Get institutions from deliberations. Come on !
|
640
|
+
url = f"{iadeliberation_url}/@search?portal_type=Institution&metadata_fields=UID&sort_on=sortable_title&b_size=666"
|
641
|
+
try:
|
642
|
+
json_institutions = get_iadeliberation_json(url)
|
643
|
+
return SimpleVocabulary(
|
644
|
+
[
|
645
|
+
SimpleTerm(
|
646
|
+
value=elem["@id"], token=elem["@id"], title=elem["title"]
|
647
|
+
)
|
648
|
+
for elem in json_institutions.get("items")
|
649
|
+
]
|
650
|
+
)
|
651
|
+
except Exception:
|
652
|
+
return SimpleVocabulary([])
|
653
|
+
|
654
|
+
|
655
|
+
RemoteIADeliberationsInstitutionsVocabulary = (
|
656
|
+
RemoteIADeliberationsInstitutionsVocabularyFactory()
|
657
|
+
)
|
658
|
+
|
659
|
+
|
660
|
+
class RemoteIADeliberationsPublicationsVocabularyFactory:
|
661
|
+
def __call__(self, context=None):
|
662
|
+
iadeliberation_institution = get_iadeliberation_institution_from_registry()
|
663
|
+
url = f"{iadeliberation_institution}/@search?portal_type=Publication&metadata_fields=UID&metadata_fields=id&review_state=published&sort_on=sortable_title"
|
664
|
+
json_publications = get_iadeliberation_json(url)
|
665
|
+
return SimpleVocabulary(
|
666
|
+
[
|
667
|
+
SimpleTerm(value=elem["id"], token=elem["id"], title=elem["title"])
|
668
|
+
for elem in json_publications.get("items")
|
669
|
+
]
|
670
|
+
)
|
671
|
+
|
672
|
+
|
673
|
+
RemoteIADeliberationsPublicationsVocabulary = (
|
674
|
+
RemoteIADeliberationsPublicationsVocabularyFactory()
|
675
|
+
)
|
@@ -19,6 +19,12 @@
|
|
19
19
|
provides="zope.schema.interfaces.IVocabularyFactory"
|
20
20
|
/>
|
21
21
|
|
22
|
+
<utility
|
23
|
+
name="imio.smartweb.vocabulary.CategoriesDisplay"
|
24
|
+
component=".vocabularies.CategoriesDisplayVocabulary"
|
25
|
+
provides="zope.schema.interfaces.IVocabularyFactory"
|
26
|
+
/>
|
27
|
+
|
22
28
|
<utility
|
23
29
|
name="imio.smartweb.vocabulary.BootstrapCSS"
|
24
30
|
component=".vocabularies.BootstrapCSSVocabulary"
|
@@ -163,4 +169,16 @@
|
|
163
169
|
provides="zope.schema.interfaces.IVocabularyFactory"
|
164
170
|
/>
|
165
171
|
|
172
|
+
<utility
|
173
|
+
name="imio.smartweb.vocabulary.IADeliberationsInstitutions"
|
174
|
+
component=".vocabularies.RemoteIADeliberationsInstitutionsVocabulary"
|
175
|
+
provides="zope.schema.interfaces.IVocabularyFactory"
|
176
|
+
/>
|
177
|
+
|
178
|
+
<utility
|
179
|
+
name="imio.smartweb.vocabulary.IADeliberationsPublications"
|
180
|
+
component=".vocabularies.RemoteIADeliberationsPublicationsVocabulary"
|
181
|
+
provides="zope.schema.interfaces.IVocabularyFactory"
|
182
|
+
/>
|
183
|
+
|
166
184
|
</configure>
|
@@ -0,0 +1 @@
|
|
1
|
+
export default __webpack_public_path__ + "assets/layers-2x.8f2c4d11474275fbc1614b9098334eae.png";
|
@@ -0,0 +1 @@
|
|
1
|
+
export default __webpack_public_path__ + "assets/layers.416d91365b44e4b4f4777663e6f009f3.png";
|
@@ -0,0 +1 @@
|
|
1
|
+
export default __webpack_public_path__ + "assets/oeil-big.f32cd1df1274a9593de0c4bd8e344216.svg";
|
@@ -0,0 +1 @@
|
|
1
|
+
export default __webpack_public_path__ + "assets/marker-icon.2b3e1faf89f94a4835397e7a43b4f77d.png";
|