imio.smartweb.core 1.2.58__py3-none-any.whl → 1.2.60__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.
@@ -10,7 +10,11 @@ class SmartwebVocabularyView(TranslatedVocabularyView):
10
10
  def __call__(self):
11
11
  form = self.request.form
12
12
  name = form.get("name")
13
- if name != "imio.smartweb.vocabulary.RemoteContacts":
13
+ if name not in [
14
+ "imio.smartweb.vocabulary.RemoteContacts",
15
+ "imio.smartweb.vocabulary.NewsItemsFromEntity",
16
+ "imio.smartweb.vocabulary.EventsFromEntity",
17
+ ]:
14
18
  return super(SmartwebVocabularyView, self).__call__()
15
19
 
16
20
  self.request.response.setHeader(
@@ -41,7 +41,8 @@ class ISectionEvents(ISection):
41
41
  directives.widget(
42
42
  "specific_related_events",
43
43
  TranslatedAjaxSelectWidget,
44
- source="imio.smartweb.vocabulary.EventsFromEntity",
44
+ vocabulary="imio.smartweb.vocabulary.EventsFromEntity",
45
+ pattern_options={"multiple": True},
45
46
  )
46
47
 
47
48
  directives.widget(
@@ -41,7 +41,8 @@ class ISectionNews(ISection):
41
41
  directives.widget(
42
42
  "specific_related_newsitems",
43
43
  TranslatedAjaxSelectWidget,
44
- source="imio.smartweb.vocabulary.NewsItemsFromEntity",
44
+ vocabulary="imio.smartweb.vocabulary.NewsItemsFromEntity",
45
+ pattern_options={"multiple": True},
45
46
  )
46
47
 
47
48
  directives.widget(
@@ -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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: imio.smartweb.core
3
- Version: 1.2.58
3
+ Version: 1.2.60
4
4
  Summary: Core product for iMio websites
5
5
  Home-page: https://github.com/imio/imio.smartweb.core
6
6
  Author: Christophe Boulanger
@@ -191,6 +191,20 @@ Changelog
191
191
  =========
192
192
 
193
193
 
194
+ 1.2.60 (2024-07-12)
195
+ -------------------
196
+
197
+ - WEB-4125 : Take scale on context leadimage to populate og:image:* tags
198
+ [boulch]
199
+
200
+
201
+ 1.2.59 (2024-07-10)
202
+ -------------------
203
+
204
+ - SUP-36854 : Fix ajax select2 widget when apply a word filtering and populating specific news and specific events
205
+ [boulch]
206
+
207
+
194
208
  1.2.58 (2024-06-26)
195
209
  -------------------
196
210
 
@@ -1,4 +1,4 @@
1
- imio.smartweb.core-1.2.58-py3.10-nspkg.pth,sha256=wnCUSUElqssZ5FI3x-9HqwD229HQ-bAuPoDUNJHmMtU,1684
1
+ imio.smartweb.core-1.2.60-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=PeC4rF--rF6MfVQ0NzggQrZWIl35oPtJdEhvQwGxhhI,1459
@@ -32,7 +32,7 @@ imio/smartweb/core/browser/layout.py,sha256=wvo_Q2dYg1Yd8wOdYSfPg29NPESy9ndAGl6z
32
32
  imio/smartweb/core/browser/redirect_to_main_react_view.py,sha256=vzJwAet0P2uoMhlOtNjMy02e4LQw9DsHb6mRgBXGOB8,1668
33
33
  imio/smartweb/core/browser/sitemap.py,sha256=voch7Bvchz3NTCm9zUC75sShCLD4KunLKyWA6OtaGmE,5962
34
34
  imio/smartweb/core/browser/utils.py,sha256=ccA2DVA994S3t92_fQeMSFIGfAblE9C1vw78ZFUAJiU,3218
35
- imio/smartweb/core/browser/vocabulary.py,sha256=VItGfYrv9NSHiUpEhnLkY4SpW8N2X91BX6A8UtsC8cA,1166
35
+ imio/smartweb/core/browser/vocabulary.py,sha256=OBoU4mxGLKtzGD5mtsN-yV7yeMi4HdAQZVI4n1b9Myo,1312
36
36
  imio/smartweb/core/browser/banner/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
37
37
  imio/smartweb/core/browser/banner/configure.zcml,sha256=Z2M7gkRDdmV4zRekUhyuJ-_jvbIbhgTj2Zq674iKvUE,389
38
38
  imio/smartweb/core/browser/banner/settings.py,sha256=jfD705_q8MAHUJbjjcfcPj1f98Rahiz_Mks2Ctx5kMA,947
@@ -240,7 +240,7 @@ imio/smartweb/core/contents/sections/contact/view.pt,sha256=CyNoSxzf9kNQdjN2iCp7
240
240
  imio/smartweb/core/contents/sections/contact/view.py,sha256=5l5FQLxz-UfFZrttqNsWetuCg-4yT-wIzukIK-QLF6s,1422
241
241
  imio/smartweb/core/contents/sections/events/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
242
242
  imio/smartweb/core/contents/sections/events/configure.zcml,sha256=FCDIf6w-2qCPqq0QUodw8-xyAopq7l6O8zoU_uMHNwg,1117
243
- imio/smartweb/core/contents/sections/events/content.py,sha256=lfu_o-jyDIxNAfmC0GTWubVl7tHVfCmGICiKD8vtZJg,3198
243
+ imio/smartweb/core/contents/sections/events/content.py,sha256=aolTpBgOCKu4EHLQUFjOkFN7YpJId0Wpj_iH5AZ9Vvk,3246
244
244
  imio/smartweb/core/contents/sections/events/macros.pt,sha256=llSq-xstFiOXctseKDwvhVCM7A1_Z1Jq-_cUgNiBe10,1522
245
245
  imio/smartweb/core/contents/sections/events/view.py,sha256=Ylp23caV6ba8y0jjoradXsRnueIABPD4cC7A2maR97c,4528
246
246
  imio/smartweb/core/contents/sections/external_content/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -276,7 +276,7 @@ imio/smartweb/core/contents/sections/map/view.pt,sha256=tEEL2ht3KYKJC87_SaT25Ij6
276
276
  imio/smartweb/core/contents/sections/map/views.py,sha256=3Z5oFis2NIByJCHh8bjAlLutc4Wp8j6rY6bkvShxEm8,614
277
277
  imio/smartweb/core/contents/sections/news/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
278
278
  imio/smartweb/core/contents/sections/news/configure.zcml,sha256=8MOIEeI7Zr_wbNVgiMa_21Ohgv_bkpEi_7gJu6NK380,880
279
- imio/smartweb/core/contents/sections/news/content.py,sha256=3zI0rjAOLhK8HmBN4kRRP3kBRfdFrwCFQVbm4RnA9bs,3213
279
+ imio/smartweb/core/contents/sections/news/content.py,sha256=A79d6gfxiqrrL87VPqFz13NYAfTjHbSFNZlpi1kixzE,3261
280
280
  imio/smartweb/core/contents/sections/news/view.py,sha256=e3gwMlyxevvqHJ1CxSMQ8W_q8KECpB8F5inwbofzhQg,4155
281
281
  imio/smartweb/core/contents/sections/postit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
282
282
  imio/smartweb/core/contents/sections/postit/configure.zcml,sha256=Q0Szs1pmrNP2OiRROpeSQPKLV3tCpyjqZa9vwNFTK9Q,504
@@ -619,7 +619,7 @@ imio/smartweb/core/viewlets/ogptags.py,sha256=3Hgi412JCrRQTGHAgh9tPhSJxguNWPsHro
619
619
  imio/smartweb/core/viewlets/procedure.pt,sha256=gLwNuikgXsWMnBybKdFeKfkfDKnI3SlrU3y2z8sVt5k,602
620
620
  imio/smartweb/core/viewlets/procedure.py,sha256=7nqBU_Sl5tcQaV_UNM-2BPLc8vogCzTO6kQlu4hwofI,633
621
621
  imio/smartweb/core/viewlets/searchbox.pt,sha256=Wv0DbGTKif1z_SDl9-FQKIAPJcfFAHHO1qOtR-LtnR4,403
622
- imio/smartweb/core/viewlets/social.py,sha256=stsP-nhT03xkmP_g0tJLS13ahdgEgHbYfKXb2FNJmQs,207
622
+ imio/smartweb/core/viewlets/social.py,sha256=gau_zEDo1IM9ZeYWPHjNl-eMTwbmO23lxFSWf-DO9uk,1187
623
623
  imio/smartweb/core/viewlets/subsite.py,sha256=2MFX2UukohUDybF7lDklcmgtY2Z0MaFdHU2cFfiBkDo,4218
624
624
  imio/smartweb/core/viewlets/subsite_header_viewlet.pt,sha256=v0sSWJeSdUcsFygVh9UHRaf204abjZniMbaRs3eC9BQ,137
625
625
  imio/smartweb/core/viewlets/subsite_logo.pt,sha256=6htSau-jXv0psDpzSyWc74fePaGk5-yI8sUH46vfoFE,503
@@ -727,10 +727,10 @@ imio/smartweb/core/webcomponents/src/utils/Map.jsx,sha256=cYuZykMIaLjr4KiLvmS4aY
727
727
  imio/smartweb/core/webcomponents/src/utils/Map.scss,sha256=xXWz0O-JBwSZrzz2XeQdN4nZEOjppU2sVFtlLQOitQ8,77
728
728
  imio/smartweb/core/webcomponents/src/utils/translation.js,sha256=5YDHwdaRNWFWOgyNd7YejoAdcDvnvAENo3Xn0GDT8P8,8941
729
729
  imio/smartweb/core/webcomponents/src/utils/url.js,sha256=iyl_1QXfPBgUn0LEbZYT_zMEEjmj5DMiEz44Z6AKLcg,244
730
- imio.smartweb.core-1.2.58.dist-info/LICENSE.GPL,sha256=gXf5dRMhNSbfLPYYTY_5hsZ1r7UU1OaKQEAQUhuIBkM,18092
731
- imio.smartweb.core-1.2.58.dist-info/LICENSE.rst,sha256=RzkMFz6AX3-cHd531zd2YQcXai8RIbjFWTs6m66Y5u4,653
732
- imio.smartweb.core-1.2.58.dist-info/METADATA,sha256=q4e26PQRMzetOvb5H8ePDwH0v7lIooTBbQgK3EFgFjw,54751
733
- imio.smartweb.core-1.2.58.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
734
- imio.smartweb.core-1.2.58.dist-info/namespace_packages.txt,sha256=Pg8AH8t9viMMW1hJbNZvTy_n2jXG2igIYUpon5RA4Js,19
735
- imio.smartweb.core-1.2.58.dist-info/top_level.txt,sha256=ZktC0EGzThvMTAin9_q_41rzvvfMT2FYbP8pbhSLMSA,5
736
- imio.smartweb.core-1.2.58.dist-info/RECORD,,
730
+ imio.smartweb.core-1.2.60.dist-info/LICENSE.GPL,sha256=gXf5dRMhNSbfLPYYTY_5hsZ1r7UU1OaKQEAQUhuIBkM,18092
731
+ imio.smartweb.core-1.2.60.dist-info/LICENSE.rst,sha256=RzkMFz6AX3-cHd531zd2YQcXai8RIbjFWTs6m66Y5u4,653
732
+ imio.smartweb.core-1.2.60.dist-info/METADATA,sha256=TtHQdUqrav0W85kvACxp83LWkpc3JmmPpqKY2TpMA74,55047
733
+ imio.smartweb.core-1.2.60.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
734
+ imio.smartweb.core-1.2.60.dist-info/namespace_packages.txt,sha256=Pg8AH8t9viMMW1hJbNZvTy_n2jXG2igIYUpon5RA4Js,19
735
+ imio.smartweb.core-1.2.60.dist-info/top_level.txt,sha256=ZktC0EGzThvMTAin9_q_41rzvvfMT2FYbP8pbhSLMSA,5
736
+ imio.smartweb.core-1.2.60.dist-info/RECORD,,