imio.smartweb.core 1.1.24__py3-none-any.whl → 1.1.25__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/contents/sections/external_content/configure.zcml +8 -0
- imio/smartweb/core/contents/sections/external_content/view.pt +6 -1
- imio/smartweb/core/contents/sections/external_content/view_arcgis.pt +149 -0
- imio/smartweb/core/contents/sections/external_content/views.py +98 -7
- imio/smartweb/core/interfaces.py +7 -0
- imio/smartweb/core/profiles/default/types/imio.smartweb.SectionExternalContent.xml +1 -0
- imio/smartweb/core/tests/test_section_external_content.py +6 -6
- imio/smartweb/core/tests/test_sections.py +1 -1
- imio/smartweb/core/viewlets/arcgis_header.pt +143 -0
- imio/smartweb/core/viewlets/configure.zcml +11 -0
- imio/smartweb/core/viewlets/external_content.py +14 -0
- {imio.smartweb.core-1.1.24.dist-info → imio.smartweb.core-1.1.25.dist-info}/METADATA +8 -1
- {imio.smartweb.core-1.1.24.dist-info → imio.smartweb.core-1.1.25.dist-info}/RECORD +19 -16
- /imio.smartweb.core-1.1.24-py3.10-nspkg.pth → /imio.smartweb.core-1.1.25-py3.10-nspkg.pth +0 -0
- {imio.smartweb.core-1.1.24.dist-info → imio.smartweb.core-1.1.25.dist-info}/LICENSE.GPL +0 -0
- {imio.smartweb.core-1.1.24.dist-info → imio.smartweb.core-1.1.25.dist-info}/LICENSE.rst +0 -0
- {imio.smartweb.core-1.1.24.dist-info → imio.smartweb.core-1.1.25.dist-info}/WHEEL +0 -0
- {imio.smartweb.core-1.1.24.dist-info → imio.smartweb.core-1.1.25.dist-info}/namespace_packages.txt +0 -0
- {imio.smartweb.core-1.1.24.dist-info → imio.smartweb.core-1.1.25.dist-info}/top_level.txt +0 -0
@@ -11,4 +11,12 @@
|
|
11
11
|
layer="imio.smartweb.core.interfaces.IImioSmartwebCoreLayer"
|
12
12
|
/>
|
13
13
|
|
14
|
+
<browser:page
|
15
|
+
name="view_arcgis"
|
16
|
+
for="*"
|
17
|
+
class="imio.smartweb.core.contents.sections.external_content.views.ArcgisView"
|
18
|
+
template="view_arcgis.pt"
|
19
|
+
permission="zope2.View"
|
20
|
+
layer="imio.smartweb.core.interfaces.IImioSmartwebCoreLayer"
|
21
|
+
/>
|
14
22
|
</configure>
|
@@ -10,10 +10,15 @@
|
|
10
10
|
<metal:main fill-slot="content-core">
|
11
11
|
<metal:content-core define-macro="content-core">
|
12
12
|
<metal:macro use-macro="context/@@sections_macros/section_edition" />
|
13
|
-
<div class="container section-container section-
|
13
|
+
<div class="container section-container section-external-content"
|
14
14
|
id=""
|
15
15
|
tal:attributes="id string:container-section-${context/id}">
|
16
16
|
|
17
|
+
|
18
|
+
<tal:check tal:condition="view/has_leadimage">
|
19
|
+
<img tal:attributes="src view/image" />
|
20
|
+
</tal:check>
|
21
|
+
|
17
22
|
<metal:macro use-macro="context/@@sections_macros/section_title" />
|
18
23
|
|
19
24
|
<p tal:replace="structure context/@@description" />
|
@@ -0,0 +1,149 @@
|
|
1
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
|
2
|
+
xmlns:tal="http://xml.zope.org/namespaces/tal"
|
3
|
+
xmlns:metal="http://xml.zope.org/namespaces/metal"
|
4
|
+
xmlns:i18n="http://xml.zope.org/namespaces/i18n"
|
5
|
+
lang="en"
|
6
|
+
metal:use-macro="context/@@main_template/macros/master"
|
7
|
+
i18n:domain="plone">
|
8
|
+
|
9
|
+
<body>
|
10
|
+
<metal:main fill-slot="content-core">
|
11
|
+
<!-- Master Header -->
|
12
|
+
<nav class="navbar navbar-expand-lg sticky-top bg-body-tertiary rounded">
|
13
|
+
<!--div class="container-fluid">
|
14
|
+
<img src="../assets/img/navapp.png" width="100%" height="100%" />
|
15
|
+
</div-->
|
16
|
+
</nav>
|
17
|
+
|
18
|
+
<div id="viewDiv"></div>
|
19
|
+
|
20
|
+
<div id="titleDiv" class="esri-widget">
|
21
|
+
<div id="titleText"><b>Les voiries vicinales</b></div>
|
22
|
+
<div>Date de la donnée : 2014</div>
|
23
|
+
</div>
|
24
|
+
|
25
|
+
<div id="backbar">
|
26
|
+
<div id="linkBack"><a href=".."><i class="fa-solid fa-arrow-left fa-fade"></i>Retour</a></div>
|
27
|
+
</div>
|
28
|
+
|
29
|
+
<div id="arcgis_item" tal:attributes="data-id view/get_portal_item_id;"></div>
|
30
|
+
|
31
|
+
<script src="https://js.arcgis.com/4.27/"></script>
|
32
|
+
<script language="JavaScript">
|
33
|
+
require(["esri/views/MapView", "esri/widgets/Legend", "esri/widgets/Expand", "esri/widgets/Home", "esri/widgets/Search","esri/widgets/BasemapGallery", "esri/widgets/Print", "esri/widgets/LayerList", "esri/WebMap"],
|
34
|
+
(
|
35
|
+
MapView,
|
36
|
+
Legend,
|
37
|
+
Expand,
|
38
|
+
Home,
|
39
|
+
Search,
|
40
|
+
BasemapGallery,
|
41
|
+
Print,
|
42
|
+
LayerList,
|
43
|
+
WebMap
|
44
|
+
) => {
|
45
|
+
const webmap = new WebMap({
|
46
|
+
portalItem: {
|
47
|
+
// autocasts as new PortalItem()
|
48
|
+
id: document.querySelector("#arcgis_item").dataset.id
|
49
|
+
}
|
50
|
+
});
|
51
|
+
|
52
|
+
const view = new MapView({
|
53
|
+
container: "viewDiv",
|
54
|
+
map: webmap
|
55
|
+
});
|
56
|
+
|
57
|
+
/* Legend */
|
58
|
+
|
59
|
+
const legend = new Expand({
|
60
|
+
content: new Legend({
|
61
|
+
view: view,
|
62
|
+
style: "classic" // other styles include 'classic'
|
63
|
+
}),
|
64
|
+
view: view,
|
65
|
+
expanded: true
|
66
|
+
});
|
67
|
+
|
68
|
+
view.ui.add(legend, "bottom-left");
|
69
|
+
|
70
|
+
/* Home */
|
71
|
+
const homeBtn = new Home({
|
72
|
+
view: view,
|
73
|
+
expanded: true
|
74
|
+
});
|
75
|
+
|
76
|
+
view.ui.add(homeBtn, "top-left");
|
77
|
+
|
78
|
+
|
79
|
+
/* Search */
|
80
|
+
const searchWidget = new Search({
|
81
|
+
view: view
|
82
|
+
});
|
83
|
+
|
84
|
+
SearchExpand = new Expand({
|
85
|
+
expandIcon: "search", // see https://developers.arcgis.com/calcite-design-system/icons/
|
86
|
+
// expandTooltip: "Expand LayerList", // optional, defaults to "Expand" for English locale
|
87
|
+
view: view,
|
88
|
+
content: searchWidget
|
89
|
+
});
|
90
|
+
|
91
|
+
/* Basemap Gallery */
|
92
|
+
const basemapGallery = new BasemapGallery({
|
93
|
+
view: view
|
94
|
+
});
|
95
|
+
|
96
|
+
BasemapGalleryExpand = new Expand({
|
97
|
+
expandIcon: "basemap", // see https://developers.arcgis.com/calcite-design-system/icons/
|
98
|
+
// expandTooltip: "Expand LayerList", // optional, defaults to "Expand" for English locale
|
99
|
+
view: view,
|
100
|
+
content: basemapGallery
|
101
|
+
});
|
102
|
+
|
103
|
+
/* Print */
|
104
|
+
const print = new Print({
|
105
|
+
view: view,
|
106
|
+
// specify your own print service
|
107
|
+
printServiceUrl:
|
108
|
+
"https://utility.arcgisonline.com/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task"
|
109
|
+
});
|
110
|
+
|
111
|
+
PrintExpand = new Expand({
|
112
|
+
expandIcon: "print", // see https://developers.arcgis.com/calcite-design-system/icons/
|
113
|
+
// expandTooltip: "Expand LayerList", // optional, defaults to "Expand" for English locale
|
114
|
+
view: view,
|
115
|
+
content: print
|
116
|
+
});
|
117
|
+
|
118
|
+
/* Layers List */
|
119
|
+
const layerList = new LayerList({
|
120
|
+
view: view,
|
121
|
+
listItemCreatedFunction: (event) => {
|
122
|
+
const item = event.item;
|
123
|
+
if (item.layer.type != "group") {
|
124
|
+
// don't show legend twice
|
125
|
+
item.panel = {
|
126
|
+
content: "legend",
|
127
|
+
open: true
|
128
|
+
};
|
129
|
+
}
|
130
|
+
}
|
131
|
+
});
|
132
|
+
|
133
|
+
layerListExpand = new Expand({
|
134
|
+
expandIcon: "layers", // see https://developers.arcgis.com/calcite-design-system/icons/
|
135
|
+
// expandTooltip: "Expand LayerList", // optional, defaults to "Expand" for English locale
|
136
|
+
view: view,
|
137
|
+
content: layerList,
|
138
|
+
expanded: false
|
139
|
+
});
|
140
|
+
|
141
|
+
view.ui.add([SearchExpand, BasemapGalleryExpand, PrintExpand, layerListExpand], "top-right");
|
142
|
+
|
143
|
+
view.ui.add("titleDiv", "bottom-right");
|
144
|
+
});
|
145
|
+
</script>
|
146
|
+
</metal:main>
|
147
|
+
</body>
|
148
|
+
|
149
|
+
</html>
|
@@ -3,31 +3,63 @@
|
|
3
3
|
from embeddify import Embedder
|
4
4
|
from embeddify import Plugin
|
5
5
|
from imio.smartweb.core.contents.sections.views import SectionView
|
6
|
+
from imio.smartweb.core.interfaces import IArcgisViewUtils
|
6
7
|
from imio.smartweb.locales import SmartwebMessageFactory as _
|
7
8
|
from json.decoder import JSONDecodeError
|
9
|
+
from plone import api
|
10
|
+
from plone.app.contenttypes.behaviors.leadimage import ILeadImage
|
11
|
+
from Products.Five.browser import BrowserView
|
12
|
+
from zope.i18n import translate
|
13
|
+
from zope.interface import implementer
|
8
14
|
|
9
15
|
import json
|
10
16
|
|
11
17
|
|
12
18
|
class ExternalContentView(SectionView):
|
13
19
|
def get_embed_external_content(self, width="100%", height=600):
|
20
|
+
current_lang = api.portal.get_current_language()[:2]
|
14
21
|
plugins = [
|
15
22
|
EaglebePlugin(),
|
16
23
|
EllohaPlugin(),
|
17
24
|
CognitoformPlugin(),
|
25
|
+
ArcgisPlugin(),
|
18
26
|
UnknowServicePlugin(),
|
19
27
|
]
|
20
28
|
extra_params = self.context.external_content_params
|
21
29
|
plugin_config = {
|
22
30
|
"eaglebeplugin": {"width": width},
|
23
|
-
"ellohaplugin": {
|
24
|
-
|
25
|
-
|
31
|
+
"ellohaplugin": {
|
32
|
+
"width": width,
|
33
|
+
"current_lang": current_lang,
|
34
|
+
"extra_params": extra_params,
|
35
|
+
},
|
36
|
+
"cognitoformplugin": {
|
37
|
+
"width": width,
|
38
|
+
"current_lang": current_lang,
|
39
|
+
"extra_params": extra_params,
|
40
|
+
},
|
41
|
+
"arcgisplugin": {
|
42
|
+
"width": width,
|
43
|
+
"url": self.context.absolute_url(),
|
44
|
+
"current_lang": current_lang,
|
45
|
+
"extra_params": extra_params,
|
46
|
+
},
|
47
|
+
"unknowserviceplugin": {"width": width, "current_lang": current_lang},
|
26
48
|
}
|
27
49
|
embedder = Embedder(plugins=plugins, plugin_config=plugin_config)
|
28
50
|
url = self.context.external_content_url
|
29
51
|
return embedder(url, config={"width": width})
|
30
52
|
|
53
|
+
def has_leadimage(self):
|
54
|
+
if ILeadImage.providedBy(self.context) and getattr(
|
55
|
+
self.context, "image", False
|
56
|
+
):
|
57
|
+
return True
|
58
|
+
return False
|
59
|
+
|
60
|
+
def image(self):
|
61
|
+
return f"{self.context.absolute_url()}/@@download/image"
|
62
|
+
|
31
63
|
|
32
64
|
class EaglebePlugin(Plugin):
|
33
65
|
def __call__(self, parts, config={}):
|
@@ -45,8 +77,12 @@ class EllohaPlugin(Plugin):
|
|
45
77
|
# "ConstellationWidgetContainer": "917c4c52-c997-4077-9135-873a0b2e0c85",
|
46
78
|
# "Idoi": "195ea849-1732-4a69-a051-e7911001cd09"
|
47
79
|
# }
|
80
|
+
current_lang = config["current_lang"]
|
48
81
|
extra_params = config["extra_params"]
|
49
|
-
|
82
|
+
|
83
|
+
error_message = "With an elloha plugin, extra params must contain a dictionary with two keys : ConstellationWidgetContainer, Idoi"
|
84
|
+
error_message = translate(_(error_message), target_language=current_lang)
|
85
|
+
error_message = f'<div class="elloha elloha_error">{error_message}</div>'
|
50
86
|
|
51
87
|
if (
|
52
88
|
extra_params is None
|
@@ -85,9 +121,16 @@ class EllohaPlugin(Plugin):
|
|
85
121
|
|
86
122
|
class CognitoformPlugin(Plugin):
|
87
123
|
def __call__(self, parts, config={}):
|
88
|
-
extra_params = config["extra_params"]
|
89
|
-
error_message = '<div class="cognitoform">With a cognitoform plugin, extra params can be void but if you complete it you must specify : scrolling:(yes/no) and overflow:(hidden/scroll/auto)</div>'
|
90
124
|
if "cognitoforms" in parts.netloc:
|
125
|
+
current_lang = config["current_lang"]
|
126
|
+
extra_params = config["extra_params"]
|
127
|
+
|
128
|
+
error_message = "With a cognitoform plugin, extra params can be void but if you complete it you must specify : scrolling:(yes/no) and overflow:(hidden/scroll/auto)"
|
129
|
+
error_message = translate(_(error_message), target_language=current_lang)
|
130
|
+
error_message = (
|
131
|
+
f'<div class="cognitoform cognitoform_error">{error_message}</div>'
|
132
|
+
)
|
133
|
+
|
91
134
|
if extra_params is None:
|
92
135
|
return f'<iframe src="{parts.geturl()}" style="border: 0px none; width: {config["width"]}%; overflow: auto;" scrolling="yes"></iframe>'
|
93
136
|
else:
|
@@ -108,6 +151,54 @@ class CognitoformPlugin(Plugin):
|
|
108
151
|
return None
|
109
152
|
|
110
153
|
|
154
|
+
class ArcgisPlugin(Plugin):
|
155
|
+
def __call__(self, parts, config={}):
|
156
|
+
if "arcgis" in parts.netloc:
|
157
|
+
# url : https://developers.arcgis.com/
|
158
|
+
# extra_params : {"portal_item_id":"27a432b0835149e6acd3ac39d0e4349c"}
|
159
|
+
current_lang = config["current_lang"]
|
160
|
+
extra_params = config["extra_params"]
|
161
|
+
url = config["url"]
|
162
|
+
|
163
|
+
error_message = "With arcgis plugin, extra params must contain a dictionary with one key : portal_item_id"
|
164
|
+
error_message = translate(_(error_message), target_language=current_lang)
|
165
|
+
error_message = f'<div class="arcgis arcgis_error">{error_message}</div>'
|
166
|
+
|
167
|
+
if (
|
168
|
+
extra_params is None
|
169
|
+
or extra_params[0] != "{"
|
170
|
+
or extra_params[-1] != "}"
|
171
|
+
):
|
172
|
+
return error_message
|
173
|
+
try:
|
174
|
+
res = json.loads(extra_params.lower())
|
175
|
+
except JSONDecodeError:
|
176
|
+
return error_message
|
177
|
+
if res.get("portal_item_id") is None:
|
178
|
+
return error_message
|
179
|
+
|
180
|
+
portal_item_id = res.get("portal_item_id")
|
181
|
+
msg = "Consult the map"
|
182
|
+
msg = translate(_(msg), target_language=current_lang)
|
183
|
+
return (
|
184
|
+
f'<a href="{url}/view_arcgis?portal_item_id={portal_item_id}">{msg}</a>'
|
185
|
+
)
|
186
|
+
#
|
187
|
+
return None
|
188
|
+
|
189
|
+
|
111
190
|
class UnknowServicePlugin(Plugin):
|
112
191
|
def __call__(self, parts, config={}):
|
113
|
-
|
192
|
+
current_lang = config["current_lang"]
|
193
|
+
msg = "Unknow service"
|
194
|
+
msg = translate(_(msg), target_language=current_lang)
|
195
|
+
return f'<p class="unknow_service">{msg}</p>'
|
196
|
+
|
197
|
+
|
198
|
+
@implementer(IArcgisViewUtils)
|
199
|
+
class ArcgisView(BrowserView):
|
200
|
+
_footer = None
|
201
|
+
|
202
|
+
@property
|
203
|
+
def get_portal_item_id(self):
|
204
|
+
return self.request.portal_item_id
|
imio/smartweb/core/interfaces.py
CHANGED
@@ -27,6 +27,7 @@
|
|
27
27
|
<!-- Enabled behaviors -->
|
28
28
|
<property name="behaviors" purge="false">
|
29
29
|
<element value="plone.namefromtitle"/>
|
30
|
+
<element value="plone.leadimage"/>
|
30
31
|
<element value="plone.locking"/>
|
31
32
|
<element value="plone.shortname"/>
|
32
33
|
<element value="imio.smartweb.topics"/>
|
@@ -29,7 +29,7 @@ class TestSectionExternalContent(ImioSmartwebTestCase):
|
|
29
29
|
section_view = queryMultiAdapter((sec, self.request), name="view")
|
30
30
|
self.assertEqual(
|
31
31
|
section_view.get_embed_external_content(),
|
32
|
-
|
32
|
+
'<p class="unknow_service">Unknow service</p>',
|
33
33
|
)
|
34
34
|
|
35
35
|
def test_eaglebe_plugin(self):
|
@@ -41,7 +41,7 @@ class TestSectionExternalContent(ImioSmartwebTestCase):
|
|
41
41
|
section_view = queryMultiAdapter((sec, self.request), name="view")
|
42
42
|
self.assertEqual(
|
43
43
|
section_view.get_embed_external_content(),
|
44
|
-
|
44
|
+
'<p class="unknow_service">Unknow service</p>',
|
45
45
|
)
|
46
46
|
|
47
47
|
sec.external_content_url = "https://app.eaglebe.com/auth/start"
|
@@ -63,7 +63,7 @@ class TestSectionExternalContent(ImioSmartwebTestCase):
|
|
63
63
|
section_view = queryMultiAdapter((sec, self.request), name="view")
|
64
64
|
self.assertEqual(
|
65
65
|
section_view.get_embed_external_content(),
|
66
|
-
'<div class="elloha">With an elloha plugin, extra params must contain a dictionary with two keys : ConstellationWidgetContainer, Idoi</div>',
|
66
|
+
'<div class="elloha elloha_error">With an elloha plugin, extra params must contain a dictionary with two keys : ConstellationWidgetContainer, Idoi</div>',
|
67
67
|
)
|
68
68
|
|
69
69
|
# with good extra params
|
@@ -87,14 +87,14 @@ class TestSectionExternalContent(ImioSmartwebTestCase):
|
|
87
87
|
# with bad params
|
88
88
|
sec.external_content_params = "kamoulox"
|
89
89
|
section_view = queryMultiAdapter((sec, self.request), name="view")
|
90
|
-
result = '<div class="elloha">With an elloha plugin, extra params must contain a dictionary with two keys : ConstellationWidgetContainer, Idoi</div>'
|
90
|
+
result = '<div class="elloha elloha_error">With an elloha plugin, extra params must contain a dictionary with two keys : ConstellationWidgetContainer, Idoi</div>'
|
91
91
|
self.assertEqual(section_view.get_embed_external_content(), result)
|
92
92
|
|
93
93
|
sec.external_content_params = """{
|
94
94
|
"ConstellationWidgetContainer" : "11111111-1111-1111-1111-111111111111"
|
95
95
|
}"""
|
96
96
|
section_view = queryMultiAdapter((sec, self.request), name="view")
|
97
|
-
result = '<div class="elloha">With an elloha plugin, extra params must contain a dictionary with two keys : ConstellationWidgetContainer, Idoi</div>'
|
97
|
+
result = '<div class="elloha elloha_error">With an elloha plugin, extra params must contain a dictionary with two keys : ConstellationWidgetContainer, Idoi</div>'
|
98
98
|
self.assertEqual(section_view.get_embed_external_content(), result)
|
99
99
|
|
100
100
|
sec.external_content_params = """{
|
@@ -102,5 +102,5 @@ class TestSectionExternalContent(ImioSmartwebTestCase):
|
|
102
102
|
"IDOI" : "22222222-2222-2222-2222-222222222222"
|
103
103
|
"""
|
104
104
|
section_view = queryMultiAdapter((sec, self.request), name="view")
|
105
|
-
result = '<div class="elloha">With an elloha plugin, extra params must contain a dictionary with two keys : ConstellationWidgetContainer, Idoi</div>'
|
105
|
+
result = '<div class="elloha elloha_error">With an elloha plugin, extra params must contain a dictionary with two keys : ConstellationWidgetContainer, Idoi</div>'
|
106
106
|
self.assertEqual(section_view.get_embed_external_content(), result)
|
@@ -142,7 +142,7 @@ class TestSections(ImioSmartwebTestCase):
|
|
142
142
|
embedded_content = view.get_embed_external_content()
|
143
143
|
self.assertNotIn("iframe", embedded_content)
|
144
144
|
self.assertNotIn("class='eaglebe'", embedded_content)
|
145
|
-
self.assertIn(
|
145
|
+
self.assertIn('<p class="unknow_service">Unknow service</p>', embedded_content)
|
146
146
|
|
147
147
|
def test_map_section(self):
|
148
148
|
section = api.content.create(
|
@@ -0,0 +1,143 @@
|
|
1
|
+
<!-- Required meta tags -->
|
2
|
+
<meta charset="utf-8">
|
3
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
4
|
+
|
5
|
+
<!-- FontAwesome CSS -->
|
6
|
+
<link rel="stylesheet" href="../assets/fontawesome-free-6.4.0-web/css/all.css" rel="stylesheet">
|
7
|
+
|
8
|
+
<!-- Bootstrap CSS -->
|
9
|
+
<!--link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-9ndCyUaIbzAi2FUVXJi0CjmCapSmO7SnpJef0486qhLnuZ2cdeRhO02iuK6FUUVM" crossorigin="anonymous"-->
|
10
|
+
<!-- Latest compiled and minified CSS -->
|
11
|
+
<!--script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js" integrity="sha384-geWF76RCwLtnZ8qwWowPQNguL3RmwHVBC9FhGdlKrxdiJJigb/j/68SIy3Te4Bkz" crossorigin="anonymous"></script-->
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="https://js.arcgis.com/4.27/esri/themes/light/main.css" />
|
14
|
+
<!--link rel="stylesheet" href="https://www.brabantwallon.be/carto/portail/viewer/assets/css/style.css" /-->
|
15
|
+
<style>
|
16
|
+
#viewDiv {
|
17
|
+
top: 71px;
|
18
|
+
height: calc(100% - 71px);
|
19
|
+
width: 100%;
|
20
|
+
padding: 0;
|
21
|
+
margin: 0;
|
22
|
+
position: absolute;
|
23
|
+
}
|
24
|
+
|
25
|
+
.navbar-viewer {
|
26
|
+
height: 71px;
|
27
|
+
width: 100%;
|
28
|
+
padding: 0;
|
29
|
+
margin: 0;
|
30
|
+
position: absolute;
|
31
|
+
background-image: url('../../../assets/img/navapp.png');
|
32
|
+
background-size: cover;
|
33
|
+
overflow: hidden;
|
34
|
+
}
|
35
|
+
|
36
|
+
.container-fluid{
|
37
|
+
overflow: hidden;
|
38
|
+
}
|
39
|
+
|
40
|
+
.action-button {
|
41
|
+
font-size: 16px;
|
42
|
+
background-color: transparent;
|
43
|
+
border: 1px solid #d3d3d3;
|
44
|
+
color: #6e6e6e;
|
45
|
+
height: 32px;
|
46
|
+
width: 32px;
|
47
|
+
text-align: center;
|
48
|
+
box-shadow: 0 0 1px rgba(0, 0, 0, 0.3);
|
49
|
+
}
|
50
|
+
|
51
|
+
.action-button:hover,
|
52
|
+
.action-button:focus {
|
53
|
+
background: #0079c1;
|
54
|
+
color: #e4e4e4;
|
55
|
+
}
|
56
|
+
|
57
|
+
.active {
|
58
|
+
background: #0079c1;
|
59
|
+
color: #e4e4e4;
|
60
|
+
}
|
61
|
+
|
62
|
+
#toolbar {
|
63
|
+
height: 50px;
|
64
|
+
width: 100%;
|
65
|
+
padding: 0;
|
66
|
+
margin: 0;
|
67
|
+
display: flex;
|
68
|
+
justify-content: end;
|
69
|
+
}
|
70
|
+
|
71
|
+
#backbar {
|
72
|
+
position: fixed;
|
73
|
+
height: 35px;
|
74
|
+
width: 100%;
|
75
|
+
padding: 0;
|
76
|
+
margin: 0;
|
77
|
+
display: flex;
|
78
|
+
justify-content: center;
|
79
|
+
bottom: 0;
|
80
|
+
}
|
81
|
+
|
82
|
+
#backbar a {
|
83
|
+
padding: 0;
|
84
|
+
margin: 0;
|
85
|
+
color: #ffffff;
|
86
|
+
text-decoration: none;
|
87
|
+
}
|
88
|
+
|
89
|
+
#linkBack {
|
90
|
+
width: 250px;
|
91
|
+
height: 100%;
|
92
|
+
padding: 5px 20px;
|
93
|
+
background-color: #006F7F;
|
94
|
+
border-radius: 20px 20px 0 0;
|
95
|
+
}
|
96
|
+
|
97
|
+
#linkBack i {
|
98
|
+
margin-right: 15px;
|
99
|
+
}
|
100
|
+
|
101
|
+
#disciplines-filter {
|
102
|
+
height: 240px;
|
103
|
+
width: 150px;
|
104
|
+
visibility: hidden;
|
105
|
+
overflow: scroll;
|
106
|
+
}
|
107
|
+
|
108
|
+
.discipline-item {
|
109
|
+
width: 100%;
|
110
|
+
padding: 12px;
|
111
|
+
text-align: center;
|
112
|
+
vertical-align: baseline;
|
113
|
+
cursor: pointer;
|
114
|
+
height: 40px;
|
115
|
+
background-color: #ffffff;
|
116
|
+
}
|
117
|
+
|
118
|
+
.discipline-item:focus {
|
119
|
+
background-color: dimgrey;
|
120
|
+
}
|
121
|
+
|
122
|
+
.discipline-item:hover {
|
123
|
+
background-color: dimgrey;
|
124
|
+
}
|
125
|
+
|
126
|
+
#titleDiv {
|
127
|
+
padding: 20px;
|
128
|
+
background-color: #006F7F;
|
129
|
+
color: #FFFFFF;
|
130
|
+
border-radius: 5px;
|
131
|
+
}
|
132
|
+
|
133
|
+
#titleText {
|
134
|
+
font-size: 20pt;
|
135
|
+
font-weight: 100;
|
136
|
+
padding-bottom: 10px;
|
137
|
+
}
|
138
|
+
</style>
|
139
|
+
<!--script src="https://js.arcgis.com/4.27/"></script-->
|
140
|
+
<!-- src="https://www.brabantwallon.be/carto/portail/viewer/assets/js/data_voiriesv.js" -->
|
141
|
+
|
142
|
+
|
143
|
+
<title>Portail CADPAT - Cellule Cartographie (s32)</title>
|
@@ -25,6 +25,17 @@
|
|
25
25
|
permission="zope2.View"
|
26
26
|
/>
|
27
27
|
|
28
|
+
<browser:viewlet
|
29
|
+
name="imio.smartweb.arcgis_header"
|
30
|
+
for="*"
|
31
|
+
view="imio.smartweb.core.interfaces.IArcgisViewUtils"
|
32
|
+
manager="plone.app.layout.viewlets.interfaces.IHTTPHeaders"
|
33
|
+
layer="imio.smartweb.core.interfaces.IImioSmartwebCoreLayer"
|
34
|
+
template="arcgis_header.pt"
|
35
|
+
class=".external_content.ArcgisHeaderViewlet"
|
36
|
+
permission="zope.Public"
|
37
|
+
/>
|
38
|
+
|
28
39
|
<browser:viewlet
|
29
40
|
name="imio.smartweb.header_actions"
|
30
41
|
for="*"
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
|
3
|
+
from plone.app.layout.viewlets.httpheaders import HeaderViewlet
|
4
|
+
|
5
|
+
|
6
|
+
class ArcgisHeaderViewlet(HeaderViewlet):
|
7
|
+
def update(self):
|
8
|
+
super(ArcgisHeaderViewlet, self).update()
|
9
|
+
|
10
|
+
# def getHeaders(self):
|
11
|
+
# import pdb;pdb.set_trace()
|
12
|
+
# result = super(ArcgisHeaderViewlet, self).getHeaders()
|
13
|
+
# result.append(("prefix", "og: http://ogp.me/ns#"))
|
14
|
+
# return result
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: imio.smartweb.core
|
3
|
-
Version: 1.1.
|
3
|
+
Version: 1.1.25
|
4
4
|
Summary: Core product for iMio websites
|
5
5
|
Home-page: https://github.com/imio/imio.smartweb.core
|
6
6
|
Author: Christophe Boulanger
|
@@ -189,6 +189,13 @@ Changelog
|
|
189
189
|
=========
|
190
190
|
|
191
191
|
|
192
|
+
1.1.25 (2023-10-09)
|
193
|
+
-------------------
|
194
|
+
|
195
|
+
- SUP-32169 : Add new external content plugins : ArcgisPlugin
|
196
|
+
[boulch]
|
197
|
+
|
198
|
+
|
192
199
|
1.1.24 (2023-10-09)
|
193
200
|
-------------------
|
194
201
|
|
@@ -1,10 +1,10 @@
|
|
1
|
-
imio.smartweb.core-1.1.
|
1
|
+
imio.smartweb.core-1.1.25-py3.10-nspkg.pth,sha256=wnCUSUElqssZ5FI3x-9HqwD229HQ-bAuPoDUNJHmMtU,1684
|
2
2
|
imio/smartweb/core/__init__.py,sha256=iwhKnzeBJLKxpRVjvzwiRE63_zNpIBfaKLITauVph-0,24
|
3
3
|
imio/smartweb/core/config.py,sha256=BUgfvh4hCaw0onCYAG4gQI1O4hZ-GzXWEltdHi4YLIs,337
|
4
4
|
imio/smartweb/core/configure.zcml,sha256=G_Txh8wh0Mt5g2nDrJUjec_qFd5l9A8ZEUFzv4cjUcA,1429
|
5
5
|
imio/smartweb/core/indexers.py,sha256=Lv1lHWFzM71ju822N8y7w61GDOyi6qmUbveZNI1tCz4,3887
|
6
6
|
imio/smartweb/core/indexers.zcml,sha256=XHvKTkNcF5mkX-dVwRbjNsrBwIwwqa2Cm81PoXBqtow,968
|
7
|
-
imio/smartweb/core/interfaces.py,sha256=
|
7
|
+
imio/smartweb/core/interfaces.py,sha256=8FxcXLjS915SZSL41JGsAWFDQNBAtSTsLnGiPmboU3g,971
|
8
8
|
imio/smartweb/core/permissions.zcml,sha256=ZyBEARyO8NAq7tKFTb3G1FqEWERT1mQQ6vCVzji1ci8,1777
|
9
9
|
imio/smartweb/core/profiles.zcml,sha256=ck-C0RgJLnxFB0BSJfZ3C6Exn2-vQXK_bhi84RVD_Io,2028
|
10
10
|
imio/smartweb/core/setuphandlers.py,sha256=k1K8-ezP2gELwCNM5An2bBwQJjAKeS0rYtr2-q_InK8,932
|
@@ -238,10 +238,11 @@ imio/smartweb/core/contents/sections/events/content.py,sha256=Xm8atH3oGrVXN3HXG4
|
|
238
238
|
imio/smartweb/core/contents/sections/events/macros.pt,sha256=llSq-xstFiOXctseKDwvhVCM7A1_Z1Jq-_cUgNiBe10,1522
|
239
239
|
imio/smartweb/core/contents/sections/events/view.py,sha256=nTwRUB4KRYHGejG0AVD7auDuLE1ghnaMHTL9QS4md3w,3576
|
240
240
|
imio/smartweb/core/contents/sections/external_content/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
241
|
-
imio/smartweb/core/contents/sections/external_content/configure.zcml,sha256=
|
241
|
+
imio/smartweb/core/contents/sections/external_content/configure.zcml,sha256=fv5_EgtBz4Ecnia8zgxwASnuxRmh6dXLJPncmR0BC-U,727
|
242
242
|
imio/smartweb/core/contents/sections/external_content/content.py,sha256=apHtfPwxkHkLQJVFVXs4F8O0gE09uI49AFQ8xRFrXgo,1096
|
243
|
-
imio/smartweb/core/contents/sections/external_content/view.pt,sha256=
|
244
|
-
imio/smartweb/core/contents/sections/external_content/
|
243
|
+
imio/smartweb/core/contents/sections/external_content/view.pt,sha256=ejEDippSIyEZN4QbjnMgPUk89D6eGkf3DMpwqTlDHjk,1245
|
244
|
+
imio/smartweb/core/contents/sections/external_content/view_arcgis.pt,sha256=cmbp4PcgFu963t_p2llIoYQKjmDHjUr2T5Wp9DA4Kc0,4841
|
245
|
+
imio/smartweb/core/contents/sections/external_content/views.py,sha256=8VlUjJZQFRZd48I45iiUCMgTKv-Bf8-CxKRGULmH1FQ,8049
|
245
246
|
imio/smartweb/core/contents/sections/files/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
246
247
|
imio/smartweb/core/contents/sections/files/configure.zcml,sha256=DyyHzDEKLWmOywbV08Zf7bvf0At5jyAeDfZ8PCK5Rog,501
|
247
248
|
imio/smartweb/core/contents/sections/files/content.py,sha256=3WHAdqNxV_L30EdtCpfHjlnaKIjZunZFRLpwmREJFi0,868
|
@@ -333,7 +334,7 @@ imio/smartweb/core/profiles/default/types/imio.smartweb.Procedure.xml,sha256=8s2
|
|
333
334
|
imio/smartweb/core/profiles/default/types/imio.smartweb.SectionCollection.xml,sha256=Okd45BhcK1hEWCtgfwD_YM29BgAeyf123iq1jylMkqk,1457
|
334
335
|
imio/smartweb/core/profiles/default/types/imio.smartweb.SectionContact.xml,sha256=e_iHdxm4vFYb0hhlfnjn8vJ_CBZ-L-nspW6W4pvy5qo,1134
|
335
336
|
imio/smartweb/core/profiles/default/types/imio.smartweb.SectionEvents.xml,sha256=GvMIrrHNZ2o1tuN8cv6XUsVO0ogWy3c0bMfdRCDdJHE,1435
|
336
|
-
imio/smartweb/core/profiles/default/types/imio.smartweb.SectionExternalContent.xml,sha256=
|
337
|
+
imio/smartweb/core/profiles/default/types/imio.smartweb.SectionExternalContent.xml,sha256=C1BFq3Kn52p4xLfYgiJg9B1AOimq5lPd-3IyNUtjtZI,1284
|
337
338
|
imio/smartweb/core/profiles/default/types/imio.smartweb.SectionFiles.xml,sha256=XTprZ_LTzgFabYRu-w99u30HHs3tgIgUsCSOSL1S3UA,1490
|
338
339
|
imio/smartweb/core/profiles/default/types/imio.smartweb.SectionGallery.xml,sha256=8CPXF2CBF-9cz13jowiU0eUqLxzph6ic4Ly6GzVD0NQ,1349
|
339
340
|
imio/smartweb/core/profiles/default/types/imio.smartweb.SectionHTML.xml,sha256=TIRqfDunNo2WIbPbQXSZQuM8LJbLvgJeXc_Dhe937cs,1232
|
@@ -384,10 +385,10 @@ imio/smartweb/core/tests/test_robot.py,sha256=NQ7AkN4tEva3bgGjMxmyqY0zIo4pJPnPOw
|
|
384
385
|
imio/smartweb/core/tests/test_search.py,sha256=VryeRI4_5CvnStKOoNoG95M2WTy7Lyy_AhHIDG40M14,2182
|
385
386
|
imio/smartweb/core/tests/test_section_contact.py,sha256=C1pSm49aKaOeCEEfeWkM5DEwP4gk02l0GQHp8yqDYpU,21264
|
386
387
|
imio/smartweb/core/tests/test_section_events.py,sha256=H7vw84NAUgBr3Cnbb0ZMLdi1xvg8_mU2Y2E2JQEAV5c,5609
|
387
|
-
imio/smartweb/core/tests/test_section_external_content.py,sha256=
|
388
|
+
imio/smartweb/core/tests/test_section_external_content.py,sha256=sWamDvmJIyFTM__u23isQglO0uaFXNHHLZxXm0yS9HQ,6840
|
388
389
|
imio/smartweb/core/tests/test_section_news.py,sha256=FhuerS1a4sppGwswUXaQ6hw_BOMjb79_pzrF5B5FciY,5760
|
389
390
|
imio/smartweb/core/tests/test_section_sendinblue.py,sha256=UmmKo33T9feelumxqeejM4HG4oLRPKJkbB8hkLO144E,2661
|
390
|
-
imio/smartweb/core/tests/test_sections.py,sha256=
|
391
|
+
imio/smartweb/core/tests/test_sections.py,sha256=WZm0k2fyGAPNcnKUsjGjoHBsOBjcRPU5BuM3vszpxWI,23669
|
391
392
|
imio/smartweb/core/tests/test_setup.py,sha256=JcbMnXTNCuB_8grFh5E1kZ0uALdATlKMbahAdGfToZI,2092
|
392
393
|
imio/smartweb/core/tests/test_social.py,sha256=THsk3PrUrjV4nPK-DDRRBnItMBr3TVuXExSucd0n79k,3030
|
393
394
|
imio/smartweb/core/tests/test_subsite.py,sha256=wiD8Ke4_-ArstSYNLCs8ArqOuDx2xxUR6Wac3GXfnbE,9016
|
@@ -515,14 +516,16 @@ imio/smartweb/core/upgrades/profiles/1041_to_1042/types/imio.smartweb.SectionSen
|
|
515
516
|
imio/smartweb/core/upgrades/profiles/1041_to_1042/types/imio.smartweb.SectionVideo.xml,sha256=DKAu1exRRMoJeuQqRh9NcGJ0yLkNbky-uzqS9Ve9x9k,441
|
516
517
|
imio/smartweb/core/viewlets/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
517
518
|
imio/smartweb/core/viewlets/actions.py,sha256=QWj_pLNxH4223XPk4b4Dc79DiajF0HHfaXlUmXTwJ8k,661
|
519
|
+
imio/smartweb/core/viewlets/arcgis_header.pt,sha256=iQc5ZG3g1Cmap963OG-wPotllr7oWmVSMoAnA7tctrQ,3428
|
518
520
|
imio/smartweb/core/viewlets/banner.pt,sha256=fFhT7paFQ8bO-BioOnh2Rwtl_dW4GfMs-HGpJgWs1C8,1277
|
519
521
|
imio/smartweb/core/viewlets/banner.py,sha256=u-RI3m0j3XmCgu3b-NJhgrNcqUHqKIzM8nAM7wmnbdA,2302
|
520
522
|
imio/smartweb/core/viewlets/category.pt,sha256=JElI8UGE7Lk-Uhf2KsKlTlX3EvqPdjmgk0c5IeJBv2o,103
|
521
523
|
imio/smartweb/core/viewlets/category.py,sha256=F8Vqxy3686-jY6ymjvZJFtK1Kj2a8Sqj8tAC37ZsCOU,308
|
522
524
|
imio/smartweb/core/viewlets/chatbot.pt,sha256=ataC2OtLpEawvrIZnM9vR8ChLfwkeMl78tOieSGpvSM,611
|
523
525
|
imio/smartweb/core/viewlets/chatbot.py,sha256=WgY4PQ7hZAuMRdACxRmwAs7-71Vl-h1Jk7CM1YPc6b0,329
|
524
|
-
imio/smartweb/core/viewlets/configure.zcml,sha256=
|
526
|
+
imio/smartweb/core/viewlets/configure.zcml,sha256=rbIU0801fD-fHxb6OpSRL5tf-wnNTezmg49LuNcwrRI,12313
|
525
527
|
imio/smartweb/core/viewlets/default_page_warning.pt,sha256=nw1G01jkmyY776NMmSxg-7ZHuNcZkzbrrZirTaRVyXY,531
|
528
|
+
imio/smartweb/core/viewlets/external_content.py,sha256=b9Qpxvzd5cEfwUOnS9Cp19wPplsUfDrolIwocm7Wx9A,421
|
526
529
|
imio/smartweb/core/viewlets/footer.pt,sha256=PbbXe2krY6DvCFWidShbo5XU9PATf8smpGM3N33vhkw,872
|
527
530
|
imio/smartweb/core/viewlets/footer.py,sha256=bqPwKNSE4zhKEjM6I8S-QWZYhDZejGpsHnISWBVfJuM,3216
|
528
531
|
imio/smartweb/core/viewlets/header.py,sha256=QcKtG0KJjLMyChOQblwyTcCc3Qj7_bOzHTmvVRS8lJg,367
|
@@ -658,10 +661,10 @@ imio/smartweb/core/webcomponents/src/hooks/useAxios.js,sha256=MsRpT8p9bZTp2Hk2sc
|
|
658
661
|
imio/smartweb/core/webcomponents/src/hooks/useFilterQuery.js,sha256=fGxgxCI22ERSlVLCYmD0-nztnGUIz-VkUNyLtj5HSuo,223
|
659
662
|
imio/smartweb/core/webcomponents/src/utils/translation.js,sha256=bsTZTvRlBaCImAchnuhZLtLQYC06bM539cPLoAgBMP0,2694
|
660
663
|
imio/smartweb/core/webcomponents/src/utils/url.js,sha256=iyl_1QXfPBgUn0LEbZYT_zMEEjmj5DMiEz44Z6AKLcg,244
|
661
|
-
imio.smartweb.core-1.1.
|
662
|
-
imio.smartweb.core-1.1.
|
663
|
-
imio.smartweb.core-1.1.
|
664
|
-
imio.smartweb.core-1.1.
|
665
|
-
imio.smartweb.core-1.1.
|
666
|
-
imio.smartweb.core-1.1.
|
667
|
-
imio.smartweb.core-1.1.
|
664
|
+
imio.smartweb.core-1.1.25.dist-info/LICENSE.GPL,sha256=gXf5dRMhNSbfLPYYTY_5hsZ1r7UU1OaKQEAQUhuIBkM,18092
|
665
|
+
imio.smartweb.core-1.1.25.dist-info/LICENSE.rst,sha256=RzkMFz6AX3-cHd531zd2YQcXai8RIbjFWTs6m66Y5u4,653
|
666
|
+
imio.smartweb.core-1.1.25.dist-info/METADATA,sha256=7A1QMRlDv7cATLa1Hj_LJPbLLVyMoCa-fhPU7HswvvA,41322
|
667
|
+
imio.smartweb.core-1.1.25.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
|
668
|
+
imio.smartweb.core-1.1.25.dist-info/namespace_packages.txt,sha256=Pg8AH8t9viMMW1hJbNZvTy_n2jXG2igIYUpon5RA4Js,19
|
669
|
+
imio.smartweb.core-1.1.25.dist-info/top_level.txt,sha256=ZktC0EGzThvMTAin9_q_41rzvvfMT2FYbP8pbhSLMSA,5
|
670
|
+
imio.smartweb.core-1.1.25.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{imio.smartweb.core-1.1.24.dist-info → imio.smartweb.core-1.1.25.dist-info}/namespace_packages.txt
RENAMED
File without changes
|
File without changes
|