imio.smartweb.core 1.2.88__py3-none-any.whl → 1.2.89__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.
@@ -12,11 +12,12 @@
12
12
  <metal:macro use-macro="context/@@sections_macros/section_edition" />
13
13
  <div class="container section-container section-contact"
14
14
  id=""
15
- tal:define="batch view/contacts | nothing"
15
+ tal:define="batch view/contacts | nothing;
16
+ number_of_contacts view/get_number_of_contacts"
16
17
  tal:attributes="id string:container-section-${context/id}"
17
18
  i18n:domain="imio.smartweb">
18
19
  <metal:macro use-macro="context/@@sections_macros/section_title" />
19
- <div class="row"
20
+ <div tal:attributes="class string:row nb-contact-by-line-${context/nb_contact_by_line} number-of-contacts-${number_of_contacts}"
20
21
  tal:repeat="items batch">
21
22
  <tal:loop tal:repeat="item items">
22
23
  <metal:macro use-macro="context/@@contact_macros/contact_body"
@@ -11,6 +11,17 @@ from zope.component import queryMultiAdapter
11
11
  class ContactView(HashableJsonSectionView):
12
12
  """Contact Section view"""
13
13
 
14
+ def get_number_of_contacts(self):
15
+ """
16
+ Returns the number of related contacts.
17
+ """
18
+ related_contacts = (
19
+ self.context.related_contacts
20
+ ) # Assurez-vous que 'related_contacts' est une liste
21
+ if related_contacts:
22
+ return len(related_contacts)
23
+ return 0
24
+
14
25
  def contacts(self):
15
26
  # Firstly, try to get contact from the container view
16
27
  container_view = queryMultiAdapter(
@@ -9,8 +9,6 @@
9
9
  template="../common_templates/table.pt"
10
10
  permission="zope2.View"
11
11
  layer="imio.smartweb.core.interfaces.IImioSmartwebCoreLayer"
12
- menu="plone_displayviews"
13
- title="Table view"
14
12
  />
15
13
 
16
14
  </configure>
@@ -7,16 +7,7 @@ from imio.smartweb.locales import SmartwebMessageFactory as _
7
7
  from plone.autoform import directives
8
8
  from plone.supermodel import model
9
9
  from zope import schema
10
- from zope.globalrequest import getRequest
11
- from zope.i18n import translate
12
10
  from zope.interface import implementer
13
- from zope.interface import provider
14
- from zope.schema.interfaces import IContextAwareDefaultFactory
15
-
16
-
17
- @provider(IContextAwareDefaultFactory)
18
- def see_all_default(context):
19
- return translate(_("See all news"), context=getRequest())
20
11
 
21
12
 
22
13
  class ISectionTimestampedPublications(ISection):
@@ -61,5 +52,7 @@ class ISectionTimestampedPublications(ISection):
61
52
  class SectionTimestampedPublications(Section):
62
53
  """SectionTimestampedPublications class"""
63
54
 
64
- manage_display = True
55
+ # We don't need to manage display on timestamped publications
56
+ # only common table view / don't need common carousel view
57
+ manage_display = False
65
58
  show_items_date = True
@@ -32,13 +32,4 @@
32
32
  <element value="imio.smartweb.orientation"/>
33
33
  </property>
34
34
 
35
- <!-- View information -->
36
- <property name="default_view">carousel_view</property>
37
- <property name="default_view_fallback">False</property>
38
- <property name="immediate_view">view</property>
39
- <property name="view_methods">
40
- <element value="carousel_view"/>
41
- <element value="table_view"/>
42
- </property>
43
-
44
35
  </object>
@@ -36,13 +36,4 @@
36
36
  <element value="imio.smartweb.orientation"/>
37
37
  </property>
38
38
 
39
- <!-- View information -->
40
- <property name="default_view">carousel_view</property>
41
- <property name="default_view_fallback">False</property>
42
- <property name="immediate_view">view</property>
43
- <property name="view_methods">
44
- <element value="carousel_view"/>
45
- <element value="table_view"/>
46
- </property>
47
-
48
39
  </object>
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: imio.smartweb.core
3
- Version: 1.2.88
3
+ Version: 1.2.89
4
4
  Summary: Core product for iMio websites
5
5
  Home-page: https://github.com/imio/imio.smartweb.core
6
6
  Author: Christophe Boulanger
@@ -203,6 +203,16 @@ Changelog
203
203
  =========
204
204
 
205
205
 
206
+ 1.2.89 (2025-02-18)
207
+ -------------------
208
+
209
+ - WEB-4225 : Added classes to contact sections to differentiate the type of contact (multiple or single)
210
+ [thomlamb]
211
+
212
+ - Fix issue : We don't need carousel view in timestamped publications
213
+ [boulch]
214
+
215
+
206
216
  1.2.88 (2025-02-14)
207
217
  -------------------
208
218
 
@@ -1,4 +1,4 @@
1
- imio.smartweb.core-1.2.88-py3.12-nspkg.pth,sha256=XZ3YhlzwpUCC8tXtelHRqxVxo3NWomIiMsUfUshrbeE,1011
1
+ imio.smartweb.core-1.2.89-py3.12-nspkg.pth,sha256=XZ3YhlzwpUCC8tXtelHRqxVxo3NWomIiMsUfUshrbeE,1011
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
@@ -254,8 +254,8 @@ imio/smartweb/core/contents/sections/contact/content.py,sha256=MdhY6QPMdCseThddj
254
254
  imio/smartweb/core/contents/sections/contact/forms.py,sha256=VlN_jse8tYxE9RCro2RgHlZRDDIyZA8Bjr-dNePZYwU,1387
255
255
  imio/smartweb/core/contents/sections/contact/macros.pt,sha256=wU-wXeHzq6gvm-q2RmnjE53H1AMkVYhq2YyYZU1speM,10857
256
256
  imio/smartweb/core/contents/sections/contact/utils.py,sha256=4OlmRHwvR_lUiR1DAuFbSaRhqBboZHdrPVRJz1wZN9s,5778
257
- imio/smartweb/core/contents/sections/contact/view.pt,sha256=CyNoSxzf9kNQdjN2iCp77zpFeXfC1KGgQlx_UeTSQ6M,1170
258
- imio/smartweb/core/contents/sections/contact/view.py,sha256=7zTN6JPUaeomzfiaE5eUyvFIqfyPNg2UJDOVpzt6vJ8,1962
257
+ imio/smartweb/core/contents/sections/contact/view.pt,sha256=yw_SXUiSXmRwCOvghsW4fduiAR-5eDi1myYYne-FyDw,1333
258
+ imio/smartweb/core/contents/sections/contact/view.py,sha256=ZNjRtE-LMSZADLBVpwF2ILi5tiepFOFtlMAciDS8RBo,2294
259
259
  imio/smartweb/core/contents/sections/events/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
260
260
  imio/smartweb/core/contents/sections/events/configure.zcml,sha256=FCDIf6w-2qCPqq0QUodw8-xyAopq7l6O8zoU_uMHNwg,1117
261
261
  imio/smartweb/core/contents/sections/events/content.py,sha256=aolTpBgOCKu4EHLQUFjOkFN7YpJId0Wpj_iH5AZ9Vvk,3246
@@ -321,8 +321,8 @@ imio/smartweb/core/contents/sections/text/forms.py,sha256=BHPxF-LbODbVoVTq6b-Mx1
321
321
  imio/smartweb/core/contents/sections/text/view.pt,sha256=vzvOIboG-aBRAgcNW9P8XUl09G9XRgYl6Ls5SLSWTgo,1802
322
322
  imio/smartweb/core/contents/sections/text/views.py,sha256=J1Vy4AEzM7AahtDKc5cY23N3-7Yv4oHxzJJWc0huPcM,526
323
323
  imio/smartweb/core/contents/sections/timestamped_publications/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
324
- imio/smartweb/core/contents/sections/timestamped_publications/configure.zcml,sha256=M5ORzCGHiWzrdbB9x2mWS_jsq14Wr1wfVe6kpY1wcdw,556
325
- imio/smartweb/core/contents/sections/timestamped_publications/content.py,sha256=TejZ1taInw57z-GJfkxswjhWB636Sdc5OTOy9SD84OQ,2055
324
+ imio/smartweb/core/contents/sections/timestamped_publications/configure.zcml,sha256=89simBx4TA1uzAONzVe6eVXl74xi8cMDqbpRrqCQZhs,499
325
+ imio/smartweb/core/contents/sections/timestamped_publications/content.py,sha256=z7zsTNHVxzN-5gpYkKlE03egdQT-GA8ZWJc2mA1-DIo,1879
326
326
  imio/smartweb/core/contents/sections/timestamped_publications/view.py,sha256=ZDvAtRDuoNyXj1CvTsocVKaoweI3Gqpw-3-YaRARNRg,2827
327
327
  imio/smartweb/core/contents/sections/video/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
328
328
  imio/smartweb/core/contents/sections/video/configure.zcml,sha256=fB2sr0jyVajOXCIuQuDVzAGm-KV5yRpxFvEyrLm3CEE,418
@@ -382,7 +382,7 @@ imio/smartweb/core/profiles/default/types/imio.smartweb.SectionSelections.xml,sh
382
382
  imio/smartweb/core/profiles/default/types/imio.smartweb.SectionSendinblue.xml,sha256=p0EQnnc9B28iMocTrKBdr_zzmDECQWcjDrJKH_hFYs4,1142
383
383
  imio/smartweb/core/profiles/default/types/imio.smartweb.SectionSlide.xml,sha256=Fd_TzGY_OS5OTH_hubkg-bQUmNIO1zGgaKs2jLyhrJY,1127
384
384
  imio/smartweb/core/profiles/default/types/imio.smartweb.SectionText.xml,sha256=1rU_Z0h-ghzt_wcCvLlt2A5HsuZ5Ey_OvHaFRJwHB3E,1241
385
- imio/smartweb/core/profiles/default/types/imio.smartweb.SectionTimestampedPublications.xml,sha256=AMQIebQvs-ON7E64NVjkYFGXoO0CKuRz6a5Z8-VHnaU,1628
385
+ imio/smartweb/core/profiles/default/types/imio.smartweb.SectionTimestampedPublications.xml,sha256=gShZ1Ozg7asts4OUJwKh-pTG0WFkQEazCoeoKY86Y3o,1316
386
386
  imio/smartweb/core/profiles/default/types/imio.smartweb.SectionVideo.xml,sha256=SizWFzAer6gHpUKaNfGcKZe246eVLnFcra50fff2qAc,1167
387
387
  imio/smartweb/core/profiles/icons/basic/registry.xml,sha256=mSsx5FJZi9A6az0Hk1Otg3D2an5uUST8YnrZKrMiLvc,23211
388
388
  imio/smartweb/core/profiles/icons/contenttypes/registry.xml,sha256=nYHOYa4R1KZZh75n9gaMhHaPXAaXjCKX2tW5t7afFhg,8766
@@ -620,7 +620,7 @@ imio/smartweb/core/upgrades/profiles/1061_to_1062/workflows.xml,sha256=agyIkvKVC
620
620
  imio/smartweb/core/upgrades/profiles/1061_to_1062/types/imio.smartweb.Page.xml,sha256=N0nbLh52uUc7uzDEImsmigFdU0O6XMh_tjozjHyV1jI,323
621
621
  imio/smartweb/core/upgrades/profiles/1061_to_1062/types/imio.smartweb.PortalPage.xml,sha256=N0nbLh52uUc7uzDEImsmigFdU0O6XMh_tjozjHyV1jI,323
622
622
  imio/smartweb/core/upgrades/profiles/1061_to_1062/types/imio.smartweb.SectionFiles.xml,sha256=mHnNszcRlhohtz2GiA5b9sIws1Tj7JL_TDXEX2lFqGI,290
623
- imio/smartweb/core/upgrades/profiles/1061_to_1062/types/imio.smartweb.SectionTimestampedPublications.xml,sha256=2edI7m6XU9uwHIus1SwFay6VkZw3uIhJBNhj2iMpgjA,1756
623
+ imio/smartweb/core/upgrades/profiles/1061_to_1062/types/imio.smartweb.SectionTimestampedPublications.xml,sha256=4XBwOL0WkRW3WL9lnkDVdqcC64ki2ydUxUaVdb_7T7o,1444
624
624
  imio/smartweb/core/viewlets/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
625
625
  imio/smartweb/core/viewlets/actions.py,sha256=QWj_pLNxH4223XPk4b4Dc79DiajF0HHfaXlUmXTwJ8k,661
626
626
  imio/smartweb/core/viewlets/arcgis_header.pt,sha256=iQc5ZG3g1Cmap963OG-wPotllr7oWmVSMoAnA7tctrQ,3428
@@ -769,10 +769,10 @@ imio/smartweb/core/webcomponents/src/utils/Map.jsx,sha256=cYuZykMIaLjr4KiLvmS4aY
769
769
  imio/smartweb/core/webcomponents/src/utils/Map.scss,sha256=xXWz0O-JBwSZrzz2XeQdN4nZEOjppU2sVFtlLQOitQ8,77
770
770
  imio/smartweb/core/webcomponents/src/utils/translation.js,sha256=5YDHwdaRNWFWOgyNd7YejoAdcDvnvAENo3Xn0GDT8P8,8941
771
771
  imio/smartweb/core/webcomponents/src/utils/url.js,sha256=iyl_1QXfPBgUn0LEbZYT_zMEEjmj5DMiEz44Z6AKLcg,244
772
- imio.smartweb.core-1.2.88.dist-info/LICENSE.GPL,sha256=gXf5dRMhNSbfLPYYTY_5hsZ1r7UU1OaKQEAQUhuIBkM,18092
773
- imio.smartweb.core-1.2.88.dist-info/LICENSE.rst,sha256=RzkMFz6AX3-cHd531zd2YQcXai8RIbjFWTs6m66Y5u4,653
774
- imio.smartweb.core-1.2.88.dist-info/METADATA,sha256=lyvX2dtYFHO4EI0SJkEfVBcccBUt-PZfqPP9AbJ6guQ,60864
775
- imio.smartweb.core-1.2.88.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
776
- imio.smartweb.core-1.2.88.dist-info/namespace_packages.txt,sha256=Pg8AH8t9viMMW1hJbNZvTy_n2jXG2igIYUpon5RA4Js,19
777
- imio.smartweb.core-1.2.88.dist-info/top_level.txt,sha256=ZktC0EGzThvMTAin9_q_41rzvvfMT2FYbP8pbhSLMSA,5
778
- imio.smartweb.core-1.2.88.dist-info/RECORD,,
772
+ imio.smartweb.core-1.2.89.dist-info/LICENSE.GPL,sha256=gXf5dRMhNSbfLPYYTY_5hsZ1r7UU1OaKQEAQUhuIBkM,18092
773
+ imio.smartweb.core-1.2.89.dist-info/LICENSE.rst,sha256=RzkMFz6AX3-cHd531zd2YQcXai8RIbjFWTs6m66Y5u4,653
774
+ imio.smartweb.core-1.2.89.dist-info/METADATA,sha256=mlf9G_CeVfm-mbkL0eb-VbNkAGfMoYXD1jscNz2JsQY,61107
775
+ imio.smartweb.core-1.2.89.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
776
+ imio.smartweb.core-1.2.89.dist-info/namespace_packages.txt,sha256=Pg8AH8t9viMMW1hJbNZvTy_n2jXG2igIYUpon5RA4Js,19
777
+ imio.smartweb.core-1.2.89.dist-info/top_level.txt,sha256=ZktC0EGzThvMTAin9_q_41rzvvfMT2FYbP8pbhSLMSA,5
778
+ imio.smartweb.core-1.2.89.dist-info/RECORD,,