imio.smartweb.core 1.2.75__py3-none-any.whl → 1.2.77__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/browser/static/smartweb-view-compiled.css +1 -1
- imio/smartweb/core/browser/static/src/view.less +106 -57
- imio/smartweb/core/contents/pages/views.py +4 -1
- imio/smartweb/core/contents/sections/contact/macros.pt +28 -3
- imio/smartweb/core/subscribers.py +24 -0
- imio/smartweb/core/subscribers.zcml +8 -0
- imio/smartweb/core/tests/test_section_external_content.py +25 -0
- imio/smartweb/core/webcomponents/src/components/Annuaire/Annuaire.scss +364 -378
- imio/smartweb/core/webcomponents/src/components/Events/Events.scss +401 -417
- imio/smartweb/core/webcomponents/src/components/Filters/MainFilter.scss +174 -172
- imio/smartweb/core/webcomponents/src/components/News/News.scss +145 -130
- imio/smartweb/core/webcomponents/src/components/News/NewsContent/NewsContent.jsx +35 -14
- imio/smartweb/core/webcomponents/src/components/Search/Search.scss +117 -118
- {imio.smartweb.core-1.2.75.dist-info → imio.smartweb.core-1.2.77.dist-info}/METADATA +21 -1
- {imio.smartweb.core-1.2.75.dist-info → imio.smartweb.core-1.2.77.dist-info}/RECORD +21 -21
- /imio.smartweb.core-1.2.75-py3.12-nspkg.pth → /imio.smartweb.core-1.2.77-py3.12-nspkg.pth +0 -0
- {imio.smartweb.core-1.2.75.dist-info → imio.smartweb.core-1.2.77.dist-info}/LICENSE.GPL +0 -0
- {imio.smartweb.core-1.2.75.dist-info → imio.smartweb.core-1.2.77.dist-info}/LICENSE.rst +0 -0
- {imio.smartweb.core-1.2.75.dist-info → imio.smartweb.core-1.2.77.dist-info}/WHEEL +0 -0
- {imio.smartweb.core-1.2.75.dist-info → imio.smartweb.core-1.2.77.dist-info}/namespace_packages.txt +0 -0
- {imio.smartweb.core-1.2.75.dist-info → imio.smartweb.core-1.2.77.dist-info}/top_level.txt +0 -0
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
@import url(https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.5/font/bootstrap-icons.css);*{background-position:50%;background-size:cover}body,html{max-width:100%}body{overflow-x:hidden}.table_schedule--active{display:block!important}.card-img-top{padding-top:56.25%}.template-folder_contents table .actionmenu a.action.set-default-page{display:none}#banner{background-size:cover;grid-column-end:-1;grid-column-start:1;height:200px}.hidden-banner{height:55px!important}.pat-structure .pagination>.active>a{z-index:0}.carousel-image{padding-bottom:50%}.swiper-slide .swiper-image{padding-bottom:60%}.swiper-wrapper{padding-bottom:50px}.template-taxonomy-edit-data .taxonomy-tree{border:0 solid #fff}.template-taxonomy-edit-data .taxonomy-tree>.tree-view>.tree-view_item{border:none;font-size:1.25rem;padding:0 0 1rem;text-transform:uppercase}.template-taxonomy-edit-data .super-text{display:none}.template-taxonomy-edit-data .editable-divs{display:none!important}.template-taxonomy-edit-data div.info .super-text+.editable-divs:nth-child(2),.template-taxonomy-edit-data span .super-text+.editable-divs:nth-child(2){display:inline!important}.template-taxonomy-edit-data .taxonomy-tree>.tree-view>.tree-view_children>.info,.template-taxonomy-edit-data .taxonomy-tree>.tree-view>.tree-view_children>.tree-view>.tree-view_item{border-bottom:2px solid #555}.template-taxonomy-edit-data .info,.template-taxonomy-edit-data .tree-view_item{border-bottom:1px dashed #d2d2d2}.template-taxonomy-edit-data .taxonomy-tree>.tree-view>.tree-view_children>.info input,.template-taxonomy-edit-data .taxonomy-tree>.tree-view>.tree-view_children>.tree-view>.tree-view_item input{color:#303030;padding-top:.5rem!important;text-shadow:0 1px 0 #303030}.template-taxonomy-edit-data .taxonomy-tree>.tree-view>.tree-view_children>.tree-view>.tree-view_children>.info:before,.template-taxonomy-edit-data .taxonomy-tree>.tree-view>.tree-view_children>.tree-view>.tree-view_children>.tree-view>.tree-view_item:before{content:"⤷";float:left;font-weight:700;margin-top:.3rem}.template-taxonomy-edit-data .taxonomy-tree>.tree-view>.tree-view_children>.tree-view>.tree-view_children>.tree-view>.tree-view_children>.info:before,.template-taxonomy-edit-data .taxonomy-tree>.tree-view>.tree-view_children>.tree-view>.tree-view_children>.tree-view>.tree-view_children>.tree-view>.tree-view_item:before{content:"•";float:left;font-size:1.5rem;font-weight:700;margin-top:1px}.template-taxonomy-edit-data .taxonomy-tree .tree-view_arrow{display:none}.template-taxonomy-edit-data .taxonomy-tree .tree-view_children{margin-left:2rem}.smartweb_herobanner .section-slide,.smartweb_herobanner .section-slide .swiper-banner-image{height:100%}#portal-globalnav-collapse .nav_index_html,#subsite-navigation .nav_index_html{display:none}.block-menu-element,.list-menu-element{list-style:none}.contact_informations_social{display:flex;flex-wrap:wrap;gap:8px}.contact_informations_social .website{width:100%}
|
@@ -1,18 +1,21 @@
|
|
1
|
-
|
1
|
+
@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.5/font/bootstrap-icons.css");
|
2
|
+
|
3
|
+
* {
|
2
4
|
background-size: cover;
|
3
5
|
background-position: center;
|
4
6
|
}
|
5
|
-
html,
|
7
|
+
html,
|
8
|
+
body {
|
6
9
|
max-width: 100%;
|
7
10
|
}
|
8
|
-
body{
|
11
|
+
body {
|
9
12
|
overflow-x: hidden;
|
10
13
|
}
|
11
|
-
.table_schedule--active{
|
12
|
-
display: block!important;
|
14
|
+
.table_schedule--active {
|
15
|
+
display: block !important;
|
13
16
|
}
|
14
17
|
|
15
|
-
.card-img-top{
|
18
|
+
.card-img-top {
|
16
19
|
padding-top: 56.25%;
|
17
20
|
}
|
18
21
|
// for edition
|
@@ -21,14 +24,14 @@ body{
|
|
21
24
|
}
|
22
25
|
//
|
23
26
|
// banner
|
24
|
-
#banner{
|
27
|
+
#banner {
|
25
28
|
grid-column-start: 1;
|
26
29
|
grid-column-end: -1;
|
27
|
-
height:200px;
|
30
|
+
height: 200px;
|
28
31
|
background-size: cover;
|
29
32
|
}
|
30
|
-
.hidden-banner{
|
31
|
-
height: 55px!important;
|
33
|
+
.hidden-banner {
|
34
|
+
height: 55px !important;
|
32
35
|
}
|
33
36
|
|
34
37
|
.pat-structure .pagination > .active > a {
|
@@ -38,86 +41,132 @@ body{
|
|
38
41
|
//// slidier
|
39
42
|
|
40
43
|
.carousel-image {
|
41
|
-
|
44
|
+
padding-bottom: 50%;
|
42
45
|
}
|
43
46
|
|
44
|
-
.swiper-slide
|
45
|
-
|
47
|
+
.swiper-slide .swiper-image {
|
48
|
+
padding-bottom: 60%;
|
46
49
|
}
|
47
|
-
.swiper-wrapper{
|
48
|
-
|
50
|
+
.swiper-wrapper {
|
51
|
+
padding-bottom: 50px;
|
49
52
|
}
|
50
53
|
|
51
54
|
/* si identifiant numérique on cache l'identifiant */
|
52
|
-
.template-taxonomy-edit-data{
|
55
|
+
.template-taxonomy-edit-data {
|
53
56
|
.taxonomy-tree {
|
54
|
-
border:0px solid white;
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
57
|
+
border: 0px solid white;
|
58
|
+
& > .tree-view > .tree-view_item {
|
59
|
+
font-size: 1.25rem;
|
60
|
+
padding: 0rem 0 1rem;
|
61
|
+
text-transform: uppercase;
|
62
|
+
border: none;
|
60
63
|
}
|
61
64
|
}
|
62
|
-
.super-text{
|
63
|
-
|
65
|
+
.super-text {
|
66
|
+
display: none;
|
64
67
|
}
|
65
68
|
.editable-divs {
|
66
|
-
|
69
|
+
display: none !important;
|
67
70
|
}
|
68
|
-
span .super-text
|
69
|
-
div.info .super-text
|
70
|
-
|
71
|
+
span .super-text + .editable-divs:nth-child(2),
|
72
|
+
div.info .super-text + .editable-divs:nth-child(2) {
|
73
|
+
display: inline !important;
|
71
74
|
}
|
72
75
|
.taxonomy-tree > .tree-view > .tree-view_children > .info,
|
73
|
-
.taxonomy-tree
|
74
|
-
|
76
|
+
.taxonomy-tree
|
77
|
+
> .tree-view
|
78
|
+
> .tree-view_children
|
79
|
+
> .tree-view
|
80
|
+
> .tree-view_item {
|
81
|
+
border-bottom: 2px solid #555;
|
75
82
|
}
|
76
83
|
.tree-view_item,
|
77
84
|
.info {
|
78
|
-
|
85
|
+
border-bottom: 1px dashed #d2d2d2;
|
79
86
|
}
|
80
87
|
.taxonomy-tree > .tree-view > .tree-view_children > .info input,
|
81
|
-
.taxonomy-tree
|
82
|
-
|
83
|
-
|
84
|
-
|
88
|
+
.taxonomy-tree
|
89
|
+
> .tree-view
|
90
|
+
> .tree-view_children
|
91
|
+
> .tree-view
|
92
|
+
> .tree-view_item
|
93
|
+
input {
|
94
|
+
text-shadow: 0px 1px 0px #303030;
|
95
|
+
padding-top: 0.5rem !important;
|
96
|
+
color: #303030;
|
85
97
|
}
|
86
98
|
|
87
|
-
.taxonomy-tree
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
99
|
+
.taxonomy-tree
|
100
|
+
> .tree-view
|
101
|
+
> .tree-view_children
|
102
|
+
> .tree-view
|
103
|
+
> .tree-view_children
|
104
|
+
> .info:before,
|
105
|
+
.taxonomy-tree
|
106
|
+
> .tree-view
|
107
|
+
> .tree-view_children
|
108
|
+
> .tree-view
|
109
|
+
> .tree-view_children
|
110
|
+
> .tree-view
|
111
|
+
> .tree-view_item:before {
|
112
|
+
content: "⤷";
|
113
|
+
font-weight: bold;
|
114
|
+
float: left;
|
115
|
+
margin-top: 0.3rem;
|
93
116
|
}
|
94
|
-
.taxonomy-tree
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
117
|
+
.taxonomy-tree
|
118
|
+
> .tree-view
|
119
|
+
> .tree-view_children
|
120
|
+
> .tree-view
|
121
|
+
> .tree-view_children
|
122
|
+
> .tree-view
|
123
|
+
> .tree-view_children
|
124
|
+
> .info:before,
|
125
|
+
.taxonomy-tree
|
126
|
+
> .tree-view
|
127
|
+
> .tree-view_children
|
128
|
+
> .tree-view
|
129
|
+
> .tree-view_children
|
130
|
+
> .tree-view
|
131
|
+
> .tree-view_children
|
132
|
+
> .tree-view
|
133
|
+
> .tree-view_item:before {
|
134
|
+
font-weight: bold;
|
135
|
+
float: left;
|
136
|
+
margin-top: 1px;
|
137
|
+
content: "•";
|
138
|
+
font-size: 1.5rem;
|
101
139
|
}
|
102
140
|
.taxonomy-tree .tree-view_arrow {
|
103
|
-
|
141
|
+
display: none;
|
104
142
|
}
|
105
143
|
.taxonomy-tree .tree-view_children {
|
106
|
-
|
144
|
+
margin-left: 2rem;
|
107
145
|
}
|
108
146
|
}
|
109
|
-
.smartweb_herobanner{
|
110
|
-
.section-slide{
|
147
|
+
.smartweb_herobanner {
|
148
|
+
.section-slide {
|
111
149
|
height: 100%;
|
112
|
-
.swiper-banner-image{
|
150
|
+
.swiper-banner-image {
|
113
151
|
height: 100%;
|
114
152
|
}
|
115
153
|
}
|
116
154
|
}
|
117
|
-
#portal-globalnav-collapse .nav_index_html,
|
118
|
-
|
155
|
+
#portal-globalnav-collapse .nav_index_html,
|
156
|
+
#subsite-navigation .nav_index_html {
|
157
|
+
display: none;
|
119
158
|
}
|
120
159
|
|
121
|
-
.block-menu-element,
|
160
|
+
.block-menu-element,
|
161
|
+
.list-menu-element {
|
122
162
|
list-style: none;
|
123
|
-
}
|
163
|
+
}
|
164
|
+
|
165
|
+
.contact_informations_social {
|
166
|
+
display: flex;
|
167
|
+
flex-wrap: wrap;
|
168
|
+
gap: 8px;
|
169
|
+
.website {
|
170
|
+
width: 100%;
|
171
|
+
}
|
172
|
+
}
|
@@ -78,7 +78,10 @@ class PagesView(FolderView):
|
|
78
78
|
set(list(itertools.chain.from_iterable(nested_contact_list)))
|
79
79
|
)
|
80
80
|
uids = "&UID=".join(page_contacts)
|
81
|
-
|
81
|
+
bsize = len(page_contacts)
|
82
|
+
url = "{}/@search?UID={}&fullobjects=1&b_size={}".format(
|
83
|
+
DIRECTORY_URL, uids, bsize
|
84
|
+
)
|
82
85
|
current_lang = api.portal.get_current_language()[:2]
|
83
86
|
if current_lang != "fr":
|
84
87
|
url = f"{url}&translated_in_{current_lang}=1"
|
@@ -61,7 +61,8 @@
|
|
61
61
|
i18n:translate="">Contact</h3>
|
62
62
|
|
63
63
|
<span tal:replace="python:contact.vat_number"></span>
|
64
|
-
<ul
|
64
|
+
<ul class="contact_informations_genral"
|
65
|
+
tal:define="phones python:contact.phones;
|
65
66
|
mails python:contact.mails;
|
66
67
|
urls python:contact.urls">
|
67
68
|
<li class="phones"
|
@@ -78,13 +79,37 @@
|
|
78
79
|
<a tal:attributes="href python:'mailto:{}'.format(mail.get('mail_address'))"
|
79
80
|
tal:content="python:'{}'.format(mail.get('mail_address'))" />
|
80
81
|
</li>
|
82
|
+
</ul>
|
83
|
+
<ul class="contact_informations_social"
|
84
|
+
tal:define="urls python:contact.urls">
|
81
85
|
<li class="urls"
|
82
86
|
tal:repeat="url urls"
|
83
87
|
tal:attributes="class python:url.get('type') or ''">
|
84
88
|
<a tal:attributes="href python:url.get('url');
|
85
89
|
title python:contact.get_translated_url_type(url.get('type'))"
|
86
|
-
|
87
|
-
|
90
|
+
target="_blank">
|
91
|
+
<tal:condition tal:condition="python:url.get('type') == 'facebook'">
|
92
|
+
<i class="bi bi-facebook"></i>
|
93
|
+
</tal:condition>
|
94
|
+
<tal:condition tal:condition="python:url.get('type') == 'twitter'">
|
95
|
+
<i class="bi bi-twitter"></i>
|
96
|
+
</tal:condition>
|
97
|
+
<tal:condition tal:condition="python:url.get('type') == 'instagram'">
|
98
|
+
<i class="bi bi-instagram"></i>
|
99
|
+
</tal:condition>
|
100
|
+
<tal:condition tal:condition="python:url.get('type') == 'youtube'">
|
101
|
+
<i class="bi bi-youtube"></i>
|
102
|
+
</tal:condition>
|
103
|
+
<tal:condition tal:condition="python:url.get('type') == 'pinterest'">
|
104
|
+
<i class="bi bi-pinterest"></i>
|
105
|
+
</tal:condition>
|
106
|
+
<tal:condition tal:condition="python:url.get('type') == 'linkedin'">
|
107
|
+
<i class="bi bi-linkedin"></i>
|
108
|
+
</tal:condition>
|
109
|
+
|
110
|
+
<span tal:attributes="class python:'sr-only' if url.get('type') != 'website' else ''"
|
111
|
+
tal:content="python:url.get('url')"/>
|
112
|
+
</a>
|
88
113
|
</li>
|
89
114
|
</ul>
|
90
115
|
</div>
|
@@ -4,6 +4,7 @@ from imio.smartweb.common.faceted.utils import configure_faceted
|
|
4
4
|
from imio.smartweb.common.utils import is_log_active
|
5
5
|
from imio.smartweb.common.utils import remove_cropping
|
6
6
|
from imio.smartweb.core.behaviors.minisite import IImioSmartwebMinisite
|
7
|
+
from imio.smartweb.core.interfaces import IOdwbViewUtils
|
7
8
|
from imio.smartweb.core.utils import get_iadeliberation_institution_from_registry
|
8
9
|
from imio.smartweb.core.utils import get_iadeliberation_json
|
9
10
|
from imio.smartweb.core.utils import safe_html
|
@@ -14,6 +15,8 @@ from plone.app.layout.navigation.interfaces import INavigationRoot
|
|
14
15
|
from plone.namedfile.field import NamedBlobImage
|
15
16
|
from zope.annotation.interfaces import IAnnotations
|
16
17
|
from zope.component import getMultiAdapter
|
18
|
+
from zope.interface import alsoProvides
|
19
|
+
from zope.interface import noLongerProvides
|
17
20
|
from zope.lifecycleevent import ObjectRemovedEvent
|
18
21
|
from zope.lifecycleevent.interfaces import IAttributes
|
19
22
|
from zope.globalrequest import getRequest
|
@@ -130,3 +133,24 @@ def added_publication(obj, event):
|
|
130
133
|
obj.publication_attached_file = json_publication.get("file")
|
131
134
|
except Exception:
|
132
135
|
logger.error(f"Error while trying to get publication data from {url}")
|
136
|
+
|
137
|
+
|
138
|
+
def added_external_content(obj, event):
|
139
|
+
parent = obj.aq_parent
|
140
|
+
if not IOdwbViewUtils.providedBy(parent):
|
141
|
+
alsoProvides(parent, IOdwbViewUtils)
|
142
|
+
parent.reindexObject()
|
143
|
+
|
144
|
+
|
145
|
+
def removed_external_content(obj, event):
|
146
|
+
parent = obj.aq_parent
|
147
|
+
sections_external_content = parent.listFolderContents(
|
148
|
+
contentFilter={
|
149
|
+
"portal_type": [
|
150
|
+
"imio.smartweb.SectionExternalContent",
|
151
|
+
]
|
152
|
+
}
|
153
|
+
)
|
154
|
+
if IOdwbViewUtils.providedBy(parent) and len(sections_external_content) == 0:
|
155
|
+
noLongerProvides(parent, IOdwbViewUtils)
|
156
|
+
parent.reindexObject()
|
@@ -25,4 +25,12 @@
|
|
25
25
|
zope.lifecycleevent.interfaces.IObjectAddedEvent"
|
26
26
|
handler=".subscribers.added_publication" />
|
27
27
|
|
28
|
+
<subscriber for="imio.smartweb.core.contents.ISectionExternalContent
|
29
|
+
zope.lifecycleevent.interfaces.IObjectAddedEvent"
|
30
|
+
handler=".subscribers.added_external_content" />
|
31
|
+
|
32
|
+
<subscriber for="imio.smartweb.core.contents.ISectionExternalContent
|
33
|
+
zope.lifecycleevent.interfaces.IObjectRemovedEvent"
|
34
|
+
handler=".subscribers.removed_external_content" />
|
35
|
+
|
28
36
|
</configure>
|
@@ -1,11 +1,14 @@
|
|
1
1
|
# -*- coding: utf-8 -*-
|
2
2
|
|
3
|
+
from imio.smartweb.core.interfaces import IOdwbViewUtils
|
3
4
|
from imio.smartweb.core.testing import IMIO_SMARTWEB_CORE_FUNCTIONAL_TESTING
|
4
5
|
from imio.smartweb.core.testing import ImioSmartwebTestCase
|
5
6
|
from plone import api
|
6
7
|
from plone.app.testing import setRoles
|
7
8
|
from plone.app.testing import TEST_USER_ID
|
8
9
|
from zope.component import queryMultiAdapter
|
10
|
+
from zope.interface import alsoProvides
|
11
|
+
from zope.interface import noLongerProvides
|
9
12
|
|
10
13
|
|
11
14
|
class TestSectionExternalContent(ImioSmartwebTestCase):
|
@@ -21,6 +24,28 @@ class TestSectionExternalContent(ImioSmartwebTestCase):
|
|
21
24
|
id="page",
|
22
25
|
)
|
23
26
|
|
27
|
+
def test_parent_marker_interface(self):
|
28
|
+
sec1 = api.content.create(
|
29
|
+
container=self.page, type="imio.smartweb.SectionExternalContent", id="sec1"
|
30
|
+
)
|
31
|
+
self.assertTrue(IOdwbViewUtils.providedBy(self.page))
|
32
|
+
|
33
|
+
sec2 = api.content.create(
|
34
|
+
container=self.page, type="imio.smartweb.SectionExternalContent", id="sec2"
|
35
|
+
)
|
36
|
+
api.content.delete(obj=sec1)
|
37
|
+
self.assertTrue(IOdwbViewUtils.providedBy(self.page))
|
38
|
+
|
39
|
+
api.content.delete(obj=sec2)
|
40
|
+
self.assertFalse(IOdwbViewUtils.providedBy(self.page))
|
41
|
+
|
42
|
+
api.content.create(
|
43
|
+
container=self.page,
|
44
|
+
type="imio.smartweb.SectionText",
|
45
|
+
id="not_external_content_section",
|
46
|
+
)
|
47
|
+
self.assertFalse(IOdwbViewUtils.providedBy(self.page))
|
48
|
+
|
24
49
|
def test_unknow_service(self):
|
25
50
|
sec = api.content.create(
|
26
51
|
container=self.page, type="imio.smartweb.SectionExternalContent", id="sec"
|