collective.tiles.carousel 1.0.4__tar.gz → 1.1.1__tar.gz
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.
- {collective_tiles_carousel-1.0.4 → collective_tiles_carousel-1.1.1}/CHANGES.rst +17 -0
- {collective_tiles_carousel-1.0.4 → collective_tiles_carousel-1.1.1}/PKG-INFO +31 -2
- {collective_tiles_carousel-1.0.4 → collective_tiles_carousel-1.1.1}/setup.py +1 -1
- {collective_tiles_carousel-1.0.4 → collective_tiles_carousel-1.1.1}/src/collective/tiles/carousel/tests/robot/test_example.robot +9 -11
- {collective_tiles_carousel-1.0.4 → collective_tiles_carousel-1.1.1}/src/collective/tiles/carousel/tile.pt +4 -5
- {collective_tiles_carousel-1.0.4 → collective_tiles_carousel-1.1.1}/src/collective/tiles/carousel/tile.py +34 -38
- {collective_tiles_carousel-1.0.4 → collective_tiles_carousel-1.1.1}/src/collective.tiles.carousel.egg-info/PKG-INFO +31 -2
- {collective_tiles_carousel-1.0.4 → collective_tiles_carousel-1.1.1}/CONTRIBUTORS.rst +0 -0
- {collective_tiles_carousel-1.0.4 → collective_tiles_carousel-1.1.1}/DEVELOP.rst +0 -0
- {collective_tiles_carousel-1.0.4 → collective_tiles_carousel-1.1.1}/LICENSE.GPL +0 -0
- {collective_tiles_carousel-1.0.4 → collective_tiles_carousel-1.1.1}/LICENSE.rst +0 -0
- {collective_tiles_carousel-1.0.4 → collective_tiles_carousel-1.1.1}/README.rst +0 -0
- {collective_tiles_carousel-1.0.4 → collective_tiles_carousel-1.1.1}/constraints.txt +0 -0
- {collective_tiles_carousel-1.0.4 → collective_tiles_carousel-1.1.1}/docs/conf.py +0 -0
- {collective_tiles_carousel-1.0.4 → collective_tiles_carousel-1.1.1}/docs/index.rst +0 -0
- {collective_tiles_carousel-1.0.4 → collective_tiles_carousel-1.1.1}/requirements.txt +0 -0
- {collective_tiles_carousel-1.0.4 → collective_tiles_carousel-1.1.1}/setup.cfg +0 -0
- {collective_tiles_carousel-1.0.4 → collective_tiles_carousel-1.1.1}/src/collective/__init__.py +0 -0
- {collective_tiles_carousel-1.0.4 → collective_tiles_carousel-1.1.1}/src/collective/tiles/__init__.py +0 -0
- {collective_tiles_carousel-1.0.4 → collective_tiles_carousel-1.1.1}/src/collective/tiles/carousel/__init__.py +0 -0
- {collective_tiles_carousel-1.0.4 → collective_tiles_carousel-1.1.1}/src/collective/tiles/carousel/configure.zcml +0 -0
- {collective_tiles_carousel-1.0.4 → collective_tiles_carousel-1.1.1}/src/collective/tiles/carousel/interfaces.py +0 -0
- {collective_tiles_carousel-1.0.4 → collective_tiles_carousel-1.1.1}/src/collective/tiles/carousel/locales/README.rst +0 -0
- {collective_tiles_carousel-1.0.4 → collective_tiles_carousel-1.1.1}/src/collective/tiles/carousel/locales/__init__.py +0 -0
- {collective_tiles_carousel-1.0.4 → collective_tiles_carousel-1.1.1}/src/collective/tiles/carousel/locales/collective.tiles.carousel.pot +0 -0
- {collective_tiles_carousel-1.0.4 → collective_tiles_carousel-1.1.1}/src/collective/tiles/carousel/locales/en/LC_MESSAGES/collective.tiles.carousel.mo +0 -0
- {collective_tiles_carousel-1.0.4 → collective_tiles_carousel-1.1.1}/src/collective/tiles/carousel/locales/en/LC_MESSAGES/collective.tiles.carousel.po +0 -0
- {collective_tiles_carousel-1.0.4 → collective_tiles_carousel-1.1.1}/src/collective/tiles/carousel/locales/update.py +0 -0
- {collective_tiles_carousel-1.0.4 → collective_tiles_carousel-1.1.1}/src/collective/tiles/carousel/locales/update.sh +0 -0
- {collective_tiles_carousel-1.0.4 → collective_tiles_carousel-1.1.1}/src/collective/tiles/carousel/profiles/default/browserlayer.xml +0 -0
- {collective_tiles_carousel-1.0.4 → collective_tiles_carousel-1.1.1}/src/collective/tiles/carousel/profiles/default/metadata.xml +0 -0
- {collective_tiles_carousel-1.0.4 → collective_tiles_carousel-1.1.1}/src/collective/tiles/carousel/profiles/default/registry/mosaic.xml +0 -0
- {collective_tiles_carousel-1.0.4 → collective_tiles_carousel-1.1.1}/src/collective/tiles/carousel/profiles/uninstall/browserlayer.xml +0 -0
- {collective_tiles_carousel-1.0.4 → collective_tiles_carousel-1.1.1}/src/collective/tiles/carousel/setuphandlers.py +0 -0
- {collective_tiles_carousel-1.0.4 → collective_tiles_carousel-1.1.1}/src/collective/tiles/carousel/slides/__init__.py +0 -0
- {collective_tiles_carousel-1.0.4 → collective_tiles_carousel-1.1.1}/src/collective/tiles/carousel/slides/configure.zcml +0 -0
- {collective_tiles_carousel-1.0.4 → collective_tiles_carousel-1.1.1}/src/collective/tiles/carousel/slides/slide_full_view.pt +0 -0
- {collective_tiles_carousel-1.0.4 → collective_tiles_carousel-1.1.1}/src/collective/tiles/carousel/slides/slide_full_view.py +0 -0
- {collective_tiles_carousel-1.0.4 → collective_tiles_carousel-1.1.1}/src/collective/tiles/carousel/slides/slide_view.pt +0 -0
- {collective_tiles_carousel-1.0.4 → collective_tiles_carousel-1.1.1}/src/collective/tiles/carousel/slides/slide_view.py +0 -0
- {collective_tiles_carousel-1.0.4 → collective_tiles_carousel-1.1.1}/src/collective/tiles/carousel/slides/static/.gitkeep +0 -0
- {collective_tiles_carousel-1.0.4 → collective_tiles_carousel-1.1.1}/src/collective/tiles/carousel/testing.py +0 -0
- {collective_tiles_carousel-1.0.4 → collective_tiles_carousel-1.1.1}/src/collective/tiles/carousel/tests/__init__.py +0 -0
- {collective_tiles_carousel-1.0.4 → collective_tiles_carousel-1.1.1}/src/collective/tiles/carousel/tests/test_robot.py +0 -0
- {collective_tiles_carousel-1.0.4 → collective_tiles_carousel-1.1.1}/src/collective/tiles/carousel/tests/test_setup.py +0 -0
- {collective_tiles_carousel-1.0.4 → collective_tiles_carousel-1.1.1}/src/collective/tiles/carousel/utils.py +0 -0
- {collective_tiles_carousel-1.0.4 → collective_tiles_carousel-1.1.1}/src/collective.tiles.carousel.egg-info/SOURCES.txt +0 -0
- {collective_tiles_carousel-1.0.4 → collective_tiles_carousel-1.1.1}/src/collective.tiles.carousel.egg-info/dependency_links.txt +0 -0
- {collective_tiles_carousel-1.0.4 → collective_tiles_carousel-1.1.1}/src/collective.tiles.carousel.egg-info/entry_points.txt +0 -0
- {collective_tiles_carousel-1.0.4 → collective_tiles_carousel-1.1.1}/src/collective.tiles.carousel.egg-info/namespace_packages.txt +0 -0
- {collective_tiles_carousel-1.0.4 → collective_tiles_carousel-1.1.1}/src/collective.tiles.carousel.egg-info/not-zip-safe +0 -0
- {collective_tiles_carousel-1.0.4 → collective_tiles_carousel-1.1.1}/src/collective.tiles.carousel.egg-info/requires.txt +0 -0
- {collective_tiles_carousel-1.0.4 → collective_tiles_carousel-1.1.1}/src/collective.tiles.carousel.egg-info/top_level.txt +0 -0
@@ -2,6 +2,23 @@ Changelog
|
|
2
2
|
=========
|
3
3
|
|
4
4
|
|
5
|
+
1.1.1 (2025-05-09)
|
6
|
+
------------------
|
7
|
+
|
8
|
+
- Show indicators and controls only if there are more than one slide.
|
9
|
+
[petschki]
|
10
|
+
|
11
|
+
- Improve result calculation.
|
12
|
+
[petschki]
|
13
|
+
|
14
|
+
|
15
|
+
1.1.0 (2024-12-12)
|
16
|
+
------------------
|
17
|
+
|
18
|
+
- Use new `ContentBrowserWidget` for Plone 6.1.
|
19
|
+
[petschki]
|
20
|
+
|
21
|
+
|
5
22
|
1.0.4 (2024-05-02)
|
6
23
|
------------------
|
7
24
|
|
@@ -1,6 +1,6 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.2
|
2
2
|
Name: collective.tiles.carousel
|
3
|
-
Version: 1.
|
3
|
+
Version: 1.1.1
|
4
4
|
Summary: Slider for plone.app.mosaic based on Bootstrap 5
|
5
5
|
Home-page: https://github.com/collective/collective.tiles.carousel
|
6
6
|
Author: Peter Holzer
|
@@ -47,6 +47,18 @@ Requires-Dist: plone.browserlayer; extra == "test"
|
|
47
47
|
Requires-Dist: plone.testing; extra == "test"
|
48
48
|
Requires-Dist: plone.app.robotframework[debug]; extra == "test"
|
49
49
|
Requires-Dist: robotsuite; extra == "test"
|
50
|
+
Dynamic: author
|
51
|
+
Dynamic: author-email
|
52
|
+
Dynamic: classifier
|
53
|
+
Dynamic: description
|
54
|
+
Dynamic: home-page
|
55
|
+
Dynamic: keywords
|
56
|
+
Dynamic: license
|
57
|
+
Dynamic: project-url
|
58
|
+
Dynamic: provides-extra
|
59
|
+
Dynamic: requires-dist
|
60
|
+
Dynamic: requires-python
|
61
|
+
Dynamic: summary
|
50
62
|
|
51
63
|
.. This README is meant for consumption by humans and pypi. Pypi can render rst files so please do not use Sphinx features.
|
52
64
|
If you want to learn more about writing documentation, please check out: http://docs.plone.org/about/documentation_styleguide.html
|
@@ -108,6 +120,23 @@ Changelog
|
|
108
120
|
=========
|
109
121
|
|
110
122
|
|
123
|
+
1.1.1 (2025-05-09)
|
124
|
+
------------------
|
125
|
+
|
126
|
+
- Show indicators and controls only if there are more than one slide.
|
127
|
+
[petschki]
|
128
|
+
|
129
|
+
- Improve result calculation.
|
130
|
+
[petschki]
|
131
|
+
|
132
|
+
|
133
|
+
1.1.0 (2024-12-12)
|
134
|
+
------------------
|
135
|
+
|
136
|
+
- Use new `ContentBrowserWidget` for Plone 6.1.
|
137
|
+
[petschki]
|
138
|
+
|
139
|
+
|
111
140
|
1.0.4 (2024-05-02)
|
112
141
|
------------------
|
113
142
|
|
@@ -15,7 +15,7 @@ long_description = "\n\n".join(
|
|
15
15
|
|
16
16
|
setup(
|
17
17
|
name="collective.tiles.carousel",
|
18
|
-
version="1.
|
18
|
+
version="1.1.1",
|
19
19
|
description="Slider for plone.app.mosaic based on Bootstrap 5",
|
20
20
|
long_description=long_description,
|
21
21
|
# Get more from https://pypi.org/classifiers/
|
@@ -23,13 +23,12 @@
|
|
23
23
|
|
24
24
|
*** Settings *****************************************************************
|
25
25
|
|
26
|
-
Resource plone/app/robotframework/
|
27
|
-
Resource plone/app/robotframework/keywords.robot
|
26
|
+
Resource plone/app/robotframework/browser.robot
|
28
27
|
|
29
28
|
Library Remote ${PLONE_URL}/RobotRemote
|
30
29
|
|
31
|
-
Test Setup
|
32
|
-
Test Teardown
|
30
|
+
Test Setup Run keywords Plone Test Setup
|
31
|
+
Test Teardown Run keywords Plone Test Teardown
|
33
32
|
|
34
33
|
|
35
34
|
*** Test Cases ***************************************************************
|
@@ -47,20 +46,19 @@ Scenario: As a member I want to be able to log into the website
|
|
47
46
|
|
48
47
|
a login form
|
49
48
|
Go To ${PLONE_URL}/login_form
|
50
|
-
|
51
|
-
|
49
|
+
Get Text //body contains Login Name
|
50
|
+
Get Text //body contains Password
|
52
51
|
|
53
52
|
|
54
53
|
# --- WHEN -------------------------------------------------------------------
|
55
54
|
|
56
55
|
I enter valid credentials
|
57
|
-
|
58
|
-
|
59
|
-
Click
|
56
|
+
Type Text //input[@name="__ac_name"] admin
|
57
|
+
Type Text //input[@name="__ac_password"] secret
|
58
|
+
Click //button[contains(text(), "Log in")]
|
60
59
|
|
61
60
|
|
62
61
|
# --- THEN -------------------------------------------------------------------
|
63
62
|
|
64
63
|
I am logged in
|
65
|
-
|
66
|
-
Page should contain You are now logged in
|
64
|
+
Get Text //body contains You are now logged in
|
@@ -13,12 +13,11 @@
|
|
13
13
|
darkvariant python:view.data.get('darkvariant') and 'carousel-dark' or '';
|
14
14
|
crossfade python:view.data.get('crossfade') and 'carousel-fade' or '';
|
15
15
|
link_slides python:view.data.get('link_slides') != 'disabled';
|
16
|
-
items_per_slide python:view.data.get('items_per_slide'
|
16
|
+
items_per_slide python:view.data.get('items_per_slide', 1) or 1;
|
17
17
|
items_responsive python: items_per_slide > 1 and 'row-cols-2' or 'row-cols-1';
|
18
18
|
items_responsive python: items_per_slide == 3 and 'row-cols-1' or items_responsive;
|
19
19
|
autoplay_interval view/data/carousel_speed|nothing;
|
20
20
|
">
|
21
|
-
|
22
21
|
<div class="tileHeader"
|
23
22
|
tal:condition="python:view.data['title'] or view.data['description']"
|
24
23
|
>
|
@@ -41,7 +40,7 @@
|
|
41
40
|
>
|
42
41
|
|
43
42
|
<div class="carousel-indicators"
|
44
|
-
tal:condition="view
|
43
|
+
tal:condition="python:view.data.get('indicators')"
|
45
44
|
>
|
46
45
|
<tal:indicators repeat="item items">
|
47
46
|
<button class="${python:repeat.item.index == 0 and 'active' or None}"
|
@@ -82,7 +81,7 @@
|
|
82
81
|
href="#carousel-${view/id}"
|
83
82
|
role="button"
|
84
83
|
data-bs-slide="prev"
|
85
|
-
tal:condition="view
|
84
|
+
tal:condition="python:view.data.get('controls') and len(items) > 1"
|
86
85
|
>
|
87
86
|
<span class="carousel-control-prev-icon"
|
88
87
|
aria-hidden="true"
|
@@ -95,7 +94,7 @@
|
|
95
94
|
href="#carousel-${view/id}"
|
96
95
|
role="button"
|
97
96
|
data-bs-slide="next"
|
98
|
-
tal:condition="view
|
97
|
+
tal:condition="python:view.data.get('controls') and len(items) > 1"
|
99
98
|
>
|
100
99
|
<span class="carousel-control-next-icon"
|
101
100
|
aria-hidden="true"
|
@@ -1,4 +1,3 @@
|
|
1
|
-
from collections import OrderedDict
|
2
1
|
from collective.tiles.carousel import _
|
3
2
|
from collective.tiles.carousel.interfaces import ICollectiveTilesCarouselLayer
|
4
3
|
from collective.tiles.carousel.utils import parse_query_from_data
|
@@ -8,7 +7,6 @@ from plone.app.contenttypes.browser.link_redirect_view import NON_RESOLVABLE_URL
|
|
8
7
|
from plone.app.contenttypes.interfaces import ICollection
|
9
8
|
from plone.app.contenttypes.utils import replace_link_variables_by_paths
|
10
9
|
from plone.app.z3cform.widgets.querystring import QueryStringFieldWidget
|
11
|
-
from plone.app.z3cform.widgets.relateditems import RelatedItemsFieldWidget
|
12
10
|
from plone.autoform import directives as form
|
13
11
|
from plone.dexterity.interfaces import IDexterityContainer
|
14
12
|
from plone.memoize import view
|
@@ -30,6 +28,16 @@ from zope.schema.vocabulary import SimpleTerm
|
|
30
28
|
from zope.schema.vocabulary import SimpleVocabulary
|
31
29
|
|
32
30
|
|
31
|
+
try:
|
32
|
+
from plone.app.z3cform.widgets.contentbrowser import (
|
33
|
+
ContentBrowserFieldWidget as CarouselItemsWidget,
|
34
|
+
)
|
35
|
+
except ImportError:
|
36
|
+
from plone.app.z3cform.widgets.relateditems import (
|
37
|
+
RelatedItemsFieldWidget as CarouselItemsWidget,
|
38
|
+
)
|
39
|
+
|
40
|
+
|
33
41
|
@provider(IContextSourceBinder)
|
34
42
|
def image_scales(context):
|
35
43
|
"""Return custom source for image scales.
|
@@ -74,11 +82,12 @@ class ISliderTile(Schema):
|
|
74
82
|
|
75
83
|
form.widget(
|
76
84
|
"carousel_items",
|
77
|
-
|
85
|
+
CarouselItemsWidget,
|
78
86
|
vocabulary="plone.app.vocabularies.Catalog",
|
79
87
|
pattern_options={
|
80
88
|
"orderable": True,
|
81
89
|
"recentlyUsed": True,
|
90
|
+
"upload": True,
|
82
91
|
},
|
83
92
|
)
|
84
93
|
|
@@ -247,50 +256,37 @@ class SliderTile(Tile):
|
|
247
256
|
|
248
257
|
@property
|
249
258
|
def items(self):
|
250
|
-
|
259
|
+
result = []
|
260
|
+
|
251
261
|
if len(self.data.get("carousel_items") or []):
|
252
262
|
for item in self.data["carousel_items"]:
|
253
263
|
if ICollection.providedBy(item.to_object):
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
264
|
+
result += [
|
265
|
+
x.getObject()
|
266
|
+
for x in item.to_object.results(brains=True, batch=False)
|
267
|
+
]
|
268
|
+
elif IDexterityContainer.providedBy(item.to_object):
|
269
|
+
result += [
|
270
|
+
x.getObject()
|
271
|
+
for x in api.content.find(
|
272
|
+
path="/".join(item.to_object.getPhysicalPath()),
|
273
|
+
sort_on="getObjPositionInParent",
|
274
|
+
depth=1,
|
262
275
|
)
|
263
|
-
|
264
|
-
continue
|
265
|
-
if IDexterityContainer.providedBy(item.to_object):
|
266
|
-
items.update(
|
267
|
-
OrderedDict.fromkeys(
|
268
|
-
[
|
269
|
-
x.getObject()
|
270
|
-
for x in api.content.find(
|
271
|
-
path="/".join(item.to_object.getPhysicalPath()),
|
272
|
-
sort_on="getObjPositionInParent",
|
273
|
-
depth=1,
|
274
|
-
)
|
275
|
-
]
|
276
|
-
)
|
277
|
-
)
|
278
|
-
continue
|
276
|
+
]
|
279
277
|
else:
|
280
|
-
|
278
|
+
result.append(item.to_object)
|
281
279
|
|
282
280
|
query = self.query
|
281
|
+
limit = self.data.get("limit") or 12
|
282
|
+
|
283
283
|
if query:
|
284
|
-
|
285
|
-
|
286
|
-
)
|
284
|
+
# limit catalog query to our limit
|
285
|
+
query["sort_limit"] = limit
|
286
|
+
result += [x.getObject() for x in self.catalog(**query)]
|
287
287
|
|
288
|
-
|
289
|
-
|
290
|
-
for count, obj in enumerate(items.keys(), 1):
|
291
|
-
result.append(obj)
|
292
|
-
if count >= limit:
|
293
|
-
break
|
288
|
+
# limit result
|
289
|
+
result = result[:limit]
|
294
290
|
ips = self.data.get("items_per_slide", 1) or 1
|
295
291
|
slides = [
|
296
292
|
result[i : i + ips]
|
@@ -1,6 +1,6 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.2
|
2
2
|
Name: collective.tiles.carousel
|
3
|
-
Version: 1.
|
3
|
+
Version: 1.1.1
|
4
4
|
Summary: Slider for plone.app.mosaic based on Bootstrap 5
|
5
5
|
Home-page: https://github.com/collective/collective.tiles.carousel
|
6
6
|
Author: Peter Holzer
|
@@ -47,6 +47,18 @@ Requires-Dist: plone.browserlayer; extra == "test"
|
|
47
47
|
Requires-Dist: plone.testing; extra == "test"
|
48
48
|
Requires-Dist: plone.app.robotframework[debug]; extra == "test"
|
49
49
|
Requires-Dist: robotsuite; extra == "test"
|
50
|
+
Dynamic: author
|
51
|
+
Dynamic: author-email
|
52
|
+
Dynamic: classifier
|
53
|
+
Dynamic: description
|
54
|
+
Dynamic: home-page
|
55
|
+
Dynamic: keywords
|
56
|
+
Dynamic: license
|
57
|
+
Dynamic: project-url
|
58
|
+
Dynamic: provides-extra
|
59
|
+
Dynamic: requires-dist
|
60
|
+
Dynamic: requires-python
|
61
|
+
Dynamic: summary
|
50
62
|
|
51
63
|
.. This README is meant for consumption by humans and pypi. Pypi can render rst files so please do not use Sphinx features.
|
52
64
|
If you want to learn more about writing documentation, please check out: http://docs.plone.org/about/documentation_styleguide.html
|
@@ -108,6 +120,23 @@ Changelog
|
|
108
120
|
=========
|
109
121
|
|
110
122
|
|
123
|
+
1.1.1 (2025-05-09)
|
124
|
+
------------------
|
125
|
+
|
126
|
+
- Show indicators and controls only if there are more than one slide.
|
127
|
+
[petschki]
|
128
|
+
|
129
|
+
- Improve result calculation.
|
130
|
+
[petschki]
|
131
|
+
|
132
|
+
|
133
|
+
1.1.0 (2024-12-12)
|
134
|
+
------------------
|
135
|
+
|
136
|
+
- Use new `ContentBrowserWidget` for Plone 6.1.
|
137
|
+
[petschki]
|
138
|
+
|
139
|
+
|
111
140
|
1.0.4 (2024-05-02)
|
112
141
|
------------------
|
113
142
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{collective_tiles_carousel-1.0.4 → collective_tiles_carousel-1.1.1}/src/collective/__init__.py
RENAMED
File without changes
|
{collective_tiles_carousel-1.0.4 → collective_tiles_carousel-1.1.1}/src/collective/tiles/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|