plone.portlet.collection 4.0.0a4__tar.gz → 4.0.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.
- {plone.portlet.collection-4.0.0a4 → plone.portlet.collection-4.0.1}/CHANGES.rst +21 -1
- {plone.portlet.collection-4.0.0a4/plone.portlet.collection.egg-info → plone.portlet.collection-4.0.1}/PKG-INFO +25 -6
- plone.portlet.collection-4.0.1/plone/__init__.py +1 -0
- plone.portlet.collection-4.0.1/plone/portlet/__init__.py +1 -0
- plone.portlet.collection-4.0.1/plone/portlet/collection/collection.pt +108 -0
- {plone.portlet.collection-4.0.0a4 → plone.portlet.collection-4.0.1}/plone/portlet/collection/collection.py +4 -21
- plone.portlet.collection-4.0.1/plone/portlet/collection/configure.zcml +35 -0
- {plone.portlet.collection-4.0.0a4 → plone.portlet.collection-4.0.1}/plone/portlet/collection/profiles/default/metadata.xml +1 -1
- plone.portlet.collection-4.0.1/plone/portlet/collection/profiles/default/portlets.xml +14 -0
- {plone.portlet.collection-4.0.0a4 → plone.portlet.collection-4.0.1}/plone/portlet/collection/testing.py +0 -1
- {plone.portlet.collection-4.0.0a4 → plone.portlet.collection-4.0.1}/plone/portlet/collection/tests/test_portlet_collection.py +0 -3
- {plone.portlet.collection-4.0.0a4 → plone.portlet.collection-4.0.1/plone.portlet.collection.egg-info}/PKG-INFO +25 -6
- plone.portlet.collection-4.0.1/plone.portlet.collection.egg-info/requires.txt +21 -0
- plone.portlet.collection-4.0.1/pyproject.toml +63 -0
- plone.portlet.collection-4.0.1/setup.cfg +24 -0
- {plone.portlet.collection-4.0.0a4 → plone.portlet.collection-4.0.1}/setup.py +20 -3
- plone.portlet.collection-4.0.0a4/plone/__init__.py +0 -7
- plone.portlet.collection-4.0.0a4/plone/portlet/__init__.py +0 -7
- plone.portlet.collection-4.0.0a4/plone/portlet/collection/collection.pt +0 -119
- plone.portlet.collection-4.0.0a4/plone/portlet/collection/configure.zcml +0 -34
- plone.portlet.collection-4.0.0a4/plone/portlet/collection/profiles/default/portlets.xml +0 -16
- plone.portlet.collection-4.0.0a4/plone.portlet.collection.egg-info/requires.txt +0 -9
- plone.portlet.collection-4.0.0a4/pyproject.toml +0 -20
- plone.portlet.collection-4.0.0a4/setup.cfg +0 -32
- {plone.portlet.collection-4.0.0a4 → plone.portlet.collection-4.0.1}/CONTRIBUTING.rst +0 -0
- {plone.portlet.collection-4.0.0a4 → plone.portlet.collection-4.0.1}/MANIFEST.in +0 -0
- {plone.portlet.collection-4.0.0a4 → plone.portlet.collection-4.0.1}/README.rst +0 -0
- {plone.portlet.collection-4.0.0a4 → plone.portlet.collection-4.0.1}/docs/LICENSE.GPL +0 -0
- {plone.portlet.collection-4.0.0a4 → plone.portlet.collection-4.0.1}/docs/LICENSE.txt +0 -0
- {plone.portlet.collection-4.0.0a4 → plone.portlet.collection-4.0.1}/plone/portlet/collection/__init__.py +0 -0
- {plone.portlet.collection-4.0.0a4 → plone.portlet.collection-4.0.1}/plone/portlet/collection/tests/__init__.py +0 -0
- {plone.portlet.collection-4.0.0a4 → plone.portlet.collection-4.0.1}/plone/portlet/collection/tests/functional.txt +0 -0
- {plone.portlet.collection-4.0.0a4 → plone.portlet.collection-4.0.1}/plone/portlet/collection/tests/test_functional_doctest.py +0 -0
- {plone.portlet.collection-4.0.0a4 → plone.portlet.collection-4.0.1}/plone.portlet.collection.egg-info/SOURCES.txt +0 -0
- {plone.portlet.collection-4.0.0a4 → plone.portlet.collection-4.0.1}/plone.portlet.collection.egg-info/dependency_links.txt +0 -0
- {plone.portlet.collection-4.0.0a4 → plone.portlet.collection-4.0.1}/plone.portlet.collection.egg-info/namespace_packages.txt +0 -0
- {plone.portlet.collection-4.0.0a4 → plone.portlet.collection-4.0.1}/plone.portlet.collection.egg-info/not-zip-safe +0 -0
- {plone.portlet.collection-4.0.0a4 → plone.portlet.collection-4.0.1}/plone.portlet.collection.egg-info/top_level.txt +0 -0
- {plone.portlet.collection-4.0.0a4 → plone.portlet.collection-4.0.1}/requirements-6.0.x.txt +0 -0
@@ -8,6 +8,26 @@ Changelog
|
|
8
8
|
|
9
9
|
.. towncrier release notes start
|
10
10
|
|
11
|
+
4.0.1 (2023-03-21)
|
12
|
+
------------------
|
13
|
+
|
14
|
+
Internal:
|
15
|
+
|
16
|
+
|
17
|
+
- Update configuration files.
|
18
|
+
[plone devs] (a533099d)
|
19
|
+
|
20
|
+
|
21
|
+
4.0.0 (2022-11-30)
|
22
|
+
------------------
|
23
|
+
|
24
|
+
Bug fixes:
|
25
|
+
|
26
|
+
|
27
|
+
- Final release.
|
28
|
+
[gforcada] (#600)
|
29
|
+
|
30
|
+
|
11
31
|
4.0.0a4 (2022-05-24)
|
12
32
|
--------------------
|
13
33
|
|
@@ -135,7 +155,7 @@ Bug fixes:
|
|
135
155
|
|
136
156
|
New features:
|
137
157
|
|
138
|
-
- add options to
|
158
|
+
- add options to suppress icons,
|
139
159
|
read thumb_scale from registry plus option to override thumb_scale individually
|
140
160
|
or suppress thumbs.
|
141
161
|
Replace paper clip (fontello icon) with mimetype icon
|
@@ -1,13 +1,12 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: plone.portlet.collection
|
3
|
-
Version: 4.0.
|
3
|
+
Version: 4.0.1
|
4
4
|
Summary: A portlet that fetches results from a collection
|
5
5
|
Home-page: https://pypi.org/project/plone.portlet.collection/
|
6
6
|
Author: Plone Foundation
|
7
7
|
Author-email: plone-developers@lists.sourceforge.net
|
8
8
|
License: GPL version 2
|
9
9
|
Keywords: collection portlet
|
10
|
-
Platform: UNKNOWN
|
11
10
|
Classifier: Development Status :: 5 - Production/Stable
|
12
11
|
Classifier: Environment :: Web Environment
|
13
12
|
Classifier: Framework :: Plone
|
@@ -17,9 +16,11 @@ Classifier: Framework :: Zope :: 5
|
|
17
16
|
Classifier: License :: OSI Approved :: GNU General Public License v2 (GPLv2)
|
18
17
|
Classifier: Operating System :: OS Independent
|
19
18
|
Classifier: Programming Language :: Python
|
20
|
-
Classifier: Programming Language :: Python :: 3.7
|
21
19
|
Classifier: Programming Language :: Python :: 3.8
|
22
20
|
Classifier: Programming Language :: Python :: 3.9
|
21
|
+
Classifier: Programming Language :: Python :: 3.10
|
22
|
+
Classifier: Programming Language :: Python :: 3.11
|
23
|
+
Requires-Python: >=3.8
|
23
24
|
Provides-Extra: test
|
24
25
|
|
25
26
|
Introduction
|
@@ -37,6 +38,26 @@ Changelog
|
|
37
38
|
|
38
39
|
.. towncrier release notes start
|
39
40
|
|
41
|
+
4.0.1 (2023-03-21)
|
42
|
+
------------------
|
43
|
+
|
44
|
+
Internal:
|
45
|
+
|
46
|
+
|
47
|
+
- Update configuration files.
|
48
|
+
[plone devs] (a533099d)
|
49
|
+
|
50
|
+
|
51
|
+
4.0.0 (2022-11-30)
|
52
|
+
------------------
|
53
|
+
|
54
|
+
Bug fixes:
|
55
|
+
|
56
|
+
|
57
|
+
- Final release.
|
58
|
+
[gforcada] (#600)
|
59
|
+
|
60
|
+
|
40
61
|
4.0.0a4 (2022-05-24)
|
41
62
|
--------------------
|
42
63
|
|
@@ -164,7 +185,7 @@ Bug fixes:
|
|
164
185
|
|
165
186
|
New features:
|
166
187
|
|
167
|
-
- add options to
|
188
|
+
- add options to suppress icons,
|
168
189
|
read thumb_scale from registry plus option to override thumb_scale individually
|
169
190
|
or suppress thumbs.
|
170
191
|
Replace paper clip (fontello icon) with mimetype icon
|
@@ -504,5 +525,3 @@ Fixes:
|
|
504
525
|
|
505
526
|
- First public release
|
506
527
|
[baekholt, wichert]
|
507
|
-
|
508
|
-
|
@@ -0,0 +1 @@
|
|
1
|
+
__import__("pkg_resources").declare_namespace(__name__)
|
@@ -0,0 +1 @@
|
|
1
|
+
__import__("pkg_resources").declare_namespace(__name__)
|
@@ -0,0 +1,108 @@
|
|
1
|
+
<html xmlns="http://www.w3.org/1999/xhtml"
|
2
|
+
xmlns:i18n="http://xml.zope.org/namespaces/i18n"
|
3
|
+
xmlns:tal="http://xml.zope.org/namespaces/tal"
|
4
|
+
tal:omit-tag=""
|
5
|
+
>
|
6
|
+
|
7
|
+
<div class="card portlet portletCollection"
|
8
|
+
tal:define="
|
9
|
+
collection_url view/collection_url;
|
10
|
+
plone_view context/@@plone;
|
11
|
+
toLocalizedTime nocall:plone_view/toLocalizedTime;
|
12
|
+
viewActions python:context.portal_registry.get('plone.types_use_view_action_in_listings', []);
|
13
|
+
icons nocall:context/@@iconresolver;
|
14
|
+
normalizeString nocall:plone_view/normalizeString;
|
15
|
+
"
|
16
|
+
tal:attributes="
|
17
|
+
class string:card portlet portletCollection ${view/css_class};
|
18
|
+
"
|
19
|
+
i18n:domain="plone"
|
20
|
+
>
|
21
|
+
|
22
|
+
<div class="card-header">
|
23
|
+
<a tal:omit-tag="not:view/data/show_more"
|
24
|
+
tal:attributes="
|
25
|
+
href collection_url;
|
26
|
+
"
|
27
|
+
>
|
28
|
+
<span tal:content="view/data/header"></span>
|
29
|
+
</a>
|
30
|
+
</div>
|
31
|
+
|
32
|
+
<div class="card-body">
|
33
|
+
<ul>
|
34
|
+
<tal:events tal:repeat="obj view/results">
|
35
|
+
<li class="portletItem"
|
36
|
+
tal:define="
|
37
|
+
plone_layout context/@@plone_layout;
|
38
|
+
portal context/@@plone_portal_state/portal;
|
39
|
+
image_scale portal/@@image_scale;
|
40
|
+
plone_view context/@@plone;
|
41
|
+
oddrow repeat/obj/odd;
|
42
|
+
useView python:obj.portal_type in viewActions;
|
43
|
+
itemUrl python:useView and obj.getURL() + '/view' or obj.getURL();
|
44
|
+
item_wf_state obj/review_state;
|
45
|
+
item_wf_state_class python:'state-' + plone_view.normalizeString(item_wf_state);
|
46
|
+
item_type obj/portal_type;
|
47
|
+
supress_icon view/data/no_icons;
|
48
|
+
supress_thumb view/data/no_thumbs;
|
49
|
+
thumb_scale view/thumb_scale;
|
50
|
+
item_type_class python:('contenttype-' + plone_view.normalizeString(item_type)) if not supress_icon else '';
|
51
|
+
"
|
52
|
+
tal:attributes="
|
53
|
+
class python:oddrow and 'portletItem even' or 'portletItem odd';
|
54
|
+
"
|
55
|
+
>
|
56
|
+
<a href="#"
|
57
|
+
tal:attributes="
|
58
|
+
href itemUrl;
|
59
|
+
class string:tile $item_type_class $item_wf_state_class;
|
60
|
+
title obj/Description;
|
61
|
+
"
|
62
|
+
>
|
63
|
+
|
64
|
+
<tal:icon tal:condition="python: not supress_icon and item_type != 'File'"
|
65
|
+
tal:replace="structure python:icons.tag(f'contenttype/{normalizeString(item_type)}')"
|
66
|
+
/>
|
67
|
+
<tal:icon tal:condition="python: not supress_icon and item_type == 'File'"
|
68
|
+
tal:replace="structure python:icons.tag(f'mimetype-{obj.mime_type}')"
|
69
|
+
/>
|
70
|
+
<img tal:condition="python: obj.getIcon and thumb_scale and not supress_thumb"
|
71
|
+
tal:replace="structure python:image_scale.tag(obj, 'image', scale=thumb_scale, css_class='float-end thumb-'+thumb_scale)"
|
72
|
+
/>
|
73
|
+
|
74
|
+
<span tal:replace="obj/Title">Title</span>
|
75
|
+
</a>
|
76
|
+
<div class="portletItemDetails"
|
77
|
+
tal:define="
|
78
|
+
obj_date python:obj.start and obj.start or obj.Date();
|
79
|
+
"
|
80
|
+
tal:condition="view/data/show_dates"
|
81
|
+
tal:content="python:toLocalizedTime(obj_date)"
|
82
|
+
>May 5</div>
|
83
|
+
</li>
|
84
|
+
</tal:events>
|
85
|
+
</ul>
|
86
|
+
</div>
|
87
|
+
|
88
|
+
<div class="card-footer"
|
89
|
+
tal:define="
|
90
|
+
showMore view/data/show_more;
|
91
|
+
"
|
92
|
+
tal:condition="python:showMore or view.include_empty_footer()"
|
93
|
+
>
|
94
|
+
<a tal:condition="showMore"
|
95
|
+
tal:attributes="
|
96
|
+
href collection_url;
|
97
|
+
"
|
98
|
+
>
|
99
|
+
<span class="hiddenStructure"><span tal:replace="view/data/header"></span>
|
100
|
+
-
|
101
|
+
</span>
|
102
|
+
<span i18n:translate="more_url">More…</span>
|
103
|
+
</a>
|
104
|
+
</div>
|
105
|
+
|
106
|
+
</div>
|
107
|
+
|
108
|
+
</html>
|
@@ -1,18 +1,18 @@
|
|
1
1
|
from ComputedAttribute import ComputedAttribute
|
2
|
-
from plone.app.layout.navigation.root import getNavigationRoot
|
3
2
|
from plone.app.portlets.browser import formhelper
|
4
3
|
from plone.app.portlets.portlets import base
|
5
4
|
from plone.app.uuid.utils import uuidToObject
|
6
5
|
from plone.app.z3cform.widget import RelatedItemsFieldWidget
|
7
6
|
from plone.autoform.directives import widget
|
7
|
+
from plone.base.defaultpage import is_default_page
|
8
|
+
from plone.base.interfaces.controlpanel import ISiteSchema
|
9
|
+
from plone.base.navigationroot import get_navigation_root
|
8
10
|
from plone.i18n.normalizer.interfaces import IIDNormalizer
|
9
11
|
from plone.memoize.instance import memoize
|
10
12
|
from plone.portlet.collection import PloneMessageFactory as _
|
11
13
|
from plone.portlets.interfaces import IPortletDataProvider
|
12
14
|
from plone.registry.interfaces import IRegistry
|
13
15
|
from Products.CMFCore.utils import getToolByName
|
14
|
-
from Products.CMFPlone.defaultpage import is_default_page
|
15
|
-
from Products.CMFPlone.interfaces.controlpanel import ISiteSchema
|
16
16
|
from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile
|
17
17
|
from Products.MimetypesRegistry.MimeTypeItem import guess_icon_path
|
18
18
|
from zExceptions import NotFound
|
@@ -24,23 +24,6 @@ import os
|
|
24
24
|
import random
|
25
25
|
|
26
26
|
|
27
|
-
COLLECTIONS = []
|
28
|
-
|
29
|
-
try:
|
30
|
-
from plone.app.collection.interfaces import ICollection
|
31
|
-
|
32
|
-
COLLECTIONS.append(ICollection.__identifier__)
|
33
|
-
except ImportError:
|
34
|
-
pass
|
35
|
-
|
36
|
-
try:
|
37
|
-
from plone.app.contenttypes.interfaces import ICollection
|
38
|
-
|
39
|
-
COLLECTIONS.append(ICollection.__identifier__)
|
40
|
-
except ImportError:
|
41
|
-
pass
|
42
|
-
|
43
|
-
|
44
27
|
class ICollectionPortlet(IPortletDataProvider):
|
45
28
|
"""A portlet which renders the results of a collection object."""
|
46
29
|
|
@@ -310,7 +293,7 @@ class Renderer(base.Renderer):
|
|
310
293
|
|
311
294
|
def getMimeTypeIcon(self, obj):
|
312
295
|
fileo = obj.getObject().file
|
313
|
-
portal_url =
|
296
|
+
portal_url = get_navigation_root(self.context)
|
314
297
|
mtt = getToolByName(self.context, "mimetypes_registry")
|
315
298
|
if fileo.contentType:
|
316
299
|
ctype = mtt.lookup(fileo.contentType)
|
@@ -0,0 +1,35 @@
|
|
1
|
+
<configure
|
2
|
+
xmlns="http://namespaces.zope.org/zope"
|
3
|
+
xmlns:five="http://namespaces.zope.org/five"
|
4
|
+
xmlns:genericsetup="http://namespaces.zope.org/genericsetup"
|
5
|
+
xmlns:plone="http://namespaces.plone.org/plone"
|
6
|
+
i18n_domain="plone"
|
7
|
+
>
|
8
|
+
|
9
|
+
<five:registerPackage package="." />
|
10
|
+
|
11
|
+
<genericsetup:registerProfile
|
12
|
+
name="default"
|
13
|
+
title="Collection portlet"
|
14
|
+
description="A simple portlet that displays the results of a collection object"
|
15
|
+
provides="Products.GenericSetup.interfaces.EXTENSION"
|
16
|
+
directory="profiles/default"
|
17
|
+
/>
|
18
|
+
|
19
|
+
<permission
|
20
|
+
id="plone.portlet.collection.AddCollectionPortlet"
|
21
|
+
title="plone.portlet.collection: Add collection portlet"
|
22
|
+
/>
|
23
|
+
|
24
|
+
<!-- Register the portlet -->
|
25
|
+
<plone:portlet
|
26
|
+
name="plone.portlet.collection.Collection"
|
27
|
+
interface=".collection.ICollectionPortlet"
|
28
|
+
assignment=".collection.Assignment"
|
29
|
+
renderer=".collection.Renderer"
|
30
|
+
addview=".collection.AddForm"
|
31
|
+
editview=".collection.EditForm"
|
32
|
+
view_permission="zope2.View"
|
33
|
+
edit_permission="plone.portlet.collection.AddCollectionPortlet"
|
34
|
+
/>
|
35
|
+
</configure>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<portlets xmlns:i18n="http://xml.zope.org/namespaces/i18n"
|
3
|
+
i18n:domain="plone"
|
4
|
+
>
|
5
|
+
|
6
|
+
<!-- Portlet type registrations -->
|
7
|
+
|
8
|
+
<portlet addview="plone.portlet.collection.Collection"
|
9
|
+
description="A portlet which displays the results of a collection query"
|
10
|
+
title="Collection portlet"
|
11
|
+
i18n:attributes="title; description"
|
12
|
+
/>
|
13
|
+
|
14
|
+
</portlets>
|
@@ -19,7 +19,6 @@ import unittest
|
|
19
19
|
|
20
20
|
|
21
21
|
class TestPortlet(unittest.TestCase):
|
22
|
-
|
23
22
|
layer = PLONE_PORTLET_COLLECTION_INTEGRATION_TESTING
|
24
23
|
|
25
24
|
def setUp(self):
|
@@ -72,7 +71,6 @@ class TestPortlet(unittest.TestCase):
|
|
72
71
|
|
73
72
|
|
74
73
|
class TestRenderer(unittest.TestCase):
|
75
|
-
|
76
74
|
layer = PLONE_PORTLET_COLLECTION_INTEGRATION_TESTING
|
77
75
|
|
78
76
|
def setUp(self):
|
@@ -114,7 +112,6 @@ class TestRenderer(unittest.TestCase):
|
|
114
112
|
|
115
113
|
|
116
114
|
class TestCollectionQuery(unittest.TestCase):
|
117
|
-
|
118
115
|
layer = PLONE_PORTLET_COLLECTION_INTEGRATION_TESTING
|
119
116
|
|
120
117
|
def setUp(self):
|
@@ -1,13 +1,12 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: plone.portlet.collection
|
3
|
-
Version: 4.0.
|
3
|
+
Version: 4.0.1
|
4
4
|
Summary: A portlet that fetches results from a collection
|
5
5
|
Home-page: https://pypi.org/project/plone.portlet.collection/
|
6
6
|
Author: Plone Foundation
|
7
7
|
Author-email: plone-developers@lists.sourceforge.net
|
8
8
|
License: GPL version 2
|
9
9
|
Keywords: collection portlet
|
10
|
-
Platform: UNKNOWN
|
11
10
|
Classifier: Development Status :: 5 - Production/Stable
|
12
11
|
Classifier: Environment :: Web Environment
|
13
12
|
Classifier: Framework :: Plone
|
@@ -17,9 +16,11 @@ Classifier: Framework :: Zope :: 5
|
|
17
16
|
Classifier: License :: OSI Approved :: GNU General Public License v2 (GPLv2)
|
18
17
|
Classifier: Operating System :: OS Independent
|
19
18
|
Classifier: Programming Language :: Python
|
20
|
-
Classifier: Programming Language :: Python :: 3.7
|
21
19
|
Classifier: Programming Language :: Python :: 3.8
|
22
20
|
Classifier: Programming Language :: Python :: 3.9
|
21
|
+
Classifier: Programming Language :: Python :: 3.10
|
22
|
+
Classifier: Programming Language :: Python :: 3.11
|
23
|
+
Requires-Python: >=3.8
|
23
24
|
Provides-Extra: test
|
24
25
|
|
25
26
|
Introduction
|
@@ -37,6 +38,26 @@ Changelog
|
|
37
38
|
|
38
39
|
.. towncrier release notes start
|
39
40
|
|
41
|
+
4.0.1 (2023-03-21)
|
42
|
+
------------------
|
43
|
+
|
44
|
+
Internal:
|
45
|
+
|
46
|
+
|
47
|
+
- Update configuration files.
|
48
|
+
[plone devs] (a533099d)
|
49
|
+
|
50
|
+
|
51
|
+
4.0.0 (2022-11-30)
|
52
|
+
------------------
|
53
|
+
|
54
|
+
Bug fixes:
|
55
|
+
|
56
|
+
|
57
|
+
- Final release.
|
58
|
+
[gforcada] (#600)
|
59
|
+
|
60
|
+
|
40
61
|
4.0.0a4 (2022-05-24)
|
41
62
|
--------------------
|
42
63
|
|
@@ -164,7 +185,7 @@ Bug fixes:
|
|
164
185
|
|
165
186
|
New features:
|
166
187
|
|
167
|
-
- add options to
|
188
|
+
- add options to suppress icons,
|
168
189
|
read thumb_scale from registry plus option to override thumb_scale individually
|
169
190
|
or suppress thumbs.
|
170
191
|
Replace paper clip (fontello icon) with mimetype icon
|
@@ -504,5 +525,3 @@ Fixes:
|
|
504
525
|
|
505
526
|
- First public release
|
506
527
|
[baekholt, wichert]
|
507
|
-
|
508
|
-
|
@@ -0,0 +1,21 @@
|
|
1
|
+
setuptools
|
2
|
+
ExtensionClass
|
3
|
+
plone.base
|
4
|
+
plone.memoize
|
5
|
+
plone.portlets
|
6
|
+
plone.app.portlets
|
7
|
+
plone.app.vocabularies
|
8
|
+
Products.GenericSetup
|
9
|
+
Products.MimetypesRegistry
|
10
|
+
plone.app.querystring
|
11
|
+
plone.app.uuid
|
12
|
+
plone.app.z3cform
|
13
|
+
plone.autoform
|
14
|
+
plone.i18n
|
15
|
+
plone.registry
|
16
|
+
|
17
|
+
[test]
|
18
|
+
lxml
|
19
|
+
plone.testing
|
20
|
+
plone.app.testing
|
21
|
+
plone.app.contenttypes[test]
|
@@ -0,0 +1,63 @@
|
|
1
|
+
# Generated from:
|
2
|
+
# https://github.com/plone/meta/tree/master/config/default
|
3
|
+
[tool.towncrier]
|
4
|
+
filename = "CHANGES.rst"
|
5
|
+
directory = "news/"
|
6
|
+
title_format = "{version} ({project_date})"
|
7
|
+
underlines = ["-", ""]
|
8
|
+
|
9
|
+
[[tool.towncrier.type]]
|
10
|
+
directory = "breaking"
|
11
|
+
name = "Breaking changes:"
|
12
|
+
showcontent = true
|
13
|
+
|
14
|
+
[[tool.towncrier.type]]
|
15
|
+
directory = "feature"
|
16
|
+
name = "New features:"
|
17
|
+
showcontent = true
|
18
|
+
|
19
|
+
[[tool.towncrier.type]]
|
20
|
+
directory = "bugfix"
|
21
|
+
name = "Bug fixes:"
|
22
|
+
showcontent = true
|
23
|
+
|
24
|
+
[[tool.towncrier.type]]
|
25
|
+
directory = "internal"
|
26
|
+
name = "Internal:"
|
27
|
+
showcontent = true
|
28
|
+
|
29
|
+
[[tool.towncrier.type]]
|
30
|
+
directory = "documentation"
|
31
|
+
name = "Documentation:"
|
32
|
+
showcontent = true
|
33
|
+
|
34
|
+
[[tool.towncrier.type]]
|
35
|
+
directory = "tests"
|
36
|
+
name = "Tests"
|
37
|
+
showcontent = true
|
38
|
+
|
39
|
+
[tool.isort]
|
40
|
+
profile = "plone"
|
41
|
+
|
42
|
+
[tool.black]
|
43
|
+
target-version = ["py38"]
|
44
|
+
|
45
|
+
[tool.dependencychecker]
|
46
|
+
Zope = [
|
47
|
+
# Zope own provided namespaces
|
48
|
+
'App', 'OFS', 'Products.Five', 'Products.OFSP', 'Products.PageTemplates',
|
49
|
+
'Products.SiteAccess', 'Shared', 'Testing', 'ZPublisher', 'ZTUtils',
|
50
|
+
'Zope2', 'webdav', 'zmi',
|
51
|
+
# Zope dependencies
|
52
|
+
'Acquisition', 'DateTime', 'transaction', 'zExceptions', 'ZODB', 'zope.component',
|
53
|
+
'zope.configuration', 'zope.container', 'zope.deferredimport', 'zope.event',
|
54
|
+
'zope.exceptions', 'zope.globalrequest', 'zope.i18n', 'zope.i18nmessageid',
|
55
|
+
'zope.interface', 'zope.lifecycleevent', 'zope.location', 'zope.publisher',
|
56
|
+
'zope.schema', 'zope.security', 'zope.site', 'zope.traversing', 'AccessControl',
|
57
|
+
]
|
58
|
+
'plone.base' = [
|
59
|
+
'AccessControl', 'Products.BTreeFolder2', 'Products.CMFCore',
|
60
|
+
'Products.CMFDynamicViewFTI', 'zope.deprecation',
|
61
|
+
]
|
62
|
+
python-dateutil = ['dateutil']
|
63
|
+
ExtensionClass = ['ComputedAttribute']
|
@@ -0,0 +1,24 @@
|
|
1
|
+
[bdist_wheel]
|
2
|
+
universal = 0
|
3
|
+
|
4
|
+
[flake8]
|
5
|
+
doctests = 1
|
6
|
+
ignore =
|
7
|
+
E501,
|
8
|
+
W503,
|
9
|
+
E203,
|
10
|
+
E231,
|
11
|
+
|
12
|
+
[check-manifest]
|
13
|
+
ignore =
|
14
|
+
.editorconfig
|
15
|
+
.meta.toml
|
16
|
+
.pre-commit-config.yaml
|
17
|
+
tox.ini
|
18
|
+
*.cfg
|
19
|
+
.coveragerc
|
20
|
+
|
21
|
+
[egg_info]
|
22
|
+
tag_build =
|
23
|
+
tag_date = 0
|
24
|
+
|
@@ -2,7 +2,7 @@ from setuptools import find_packages
|
|
2
2
|
from setuptools import setup
|
3
3
|
|
4
4
|
|
5
|
-
version = "4.0.
|
5
|
+
version = "4.0.1"
|
6
6
|
|
7
7
|
setup(
|
8
8
|
name="plone.portlet.collection",
|
@@ -19,9 +19,10 @@ setup(
|
|
19
19
|
"License :: OSI Approved :: GNU General Public License v2 (GPLv2)",
|
20
20
|
"Operating System :: OS Independent",
|
21
21
|
"Programming Language :: Python",
|
22
|
-
"Programming Language :: Python :: 3.7",
|
23
22
|
"Programming Language :: Python :: 3.8",
|
24
23
|
"Programming Language :: Python :: 3.9",
|
24
|
+
"Programming Language :: Python :: 3.10",
|
25
|
+
"Programming Language :: Python :: 3.11",
|
25
26
|
],
|
26
27
|
keywords="collection portlet",
|
27
28
|
author="Plone Foundation",
|
@@ -32,14 +33,30 @@ setup(
|
|
32
33
|
namespace_packages=["plone", "plone.portlet"],
|
33
34
|
include_package_data=True,
|
34
35
|
zip_safe=False,
|
36
|
+
python_requires=">=3.8",
|
35
37
|
install_requires=[
|
36
38
|
"setuptools",
|
39
|
+
"ExtensionClass",
|
40
|
+
"plone.base",
|
37
41
|
"plone.memoize",
|
38
42
|
"plone.portlets",
|
39
43
|
"plone.app.portlets",
|
40
44
|
"plone.app.vocabularies",
|
45
|
+
"Products.GenericSetup",
|
46
|
+
"Products.MimetypesRegistry",
|
47
|
+
"plone.app.querystring",
|
48
|
+
"plone.app.uuid",
|
49
|
+
"plone.app.z3cform",
|
50
|
+
"plone.autoform",
|
51
|
+
"plone.i18n",
|
52
|
+
"plone.registry",
|
41
53
|
],
|
42
54
|
extras_require={
|
43
|
-
"test": [
|
55
|
+
"test": [
|
56
|
+
"lxml",
|
57
|
+
"plone.testing",
|
58
|
+
"plone.app.testing",
|
59
|
+
"plone.app.contenttypes[test]",
|
60
|
+
],
|
44
61
|
},
|
45
62
|
)
|
@@ -1,119 +0,0 @@
|
|
1
|
-
<html
|
2
|
-
xmlns="http://www.w3.org/1999/xhtml"
|
3
|
-
xmlns:i18n="http://xml.zope.org/namespaces/i18n"
|
4
|
-
xmlns:tal="http://xml.zope.org/namespaces/tal"
|
5
|
-
tal:omit-tag=""
|
6
|
-
>
|
7
|
-
|
8
|
-
<div
|
9
|
-
class="card portlet portletCollection"
|
10
|
-
tal:define="
|
11
|
-
collection_url view/collection_url;
|
12
|
-
plone_view context/@@plone;
|
13
|
-
toLocalizedTime nocall:plone_view/toLocalizedTime;
|
14
|
-
viewActions python:context.portal_registry.get('plone.types_use_view_action_in_listings', []);
|
15
|
-
icons nocall:context/@@iconresolver;
|
16
|
-
normalizeString nocall:plone_view/normalizeString;
|
17
|
-
"
|
18
|
-
tal:attributes="
|
19
|
-
class string:card portlet portletCollection ${view/css_class};
|
20
|
-
"
|
21
|
-
i18n:domain="plone"
|
22
|
-
>
|
23
|
-
|
24
|
-
<div class="card-header">
|
25
|
-
<a
|
26
|
-
tal:omit-tag="not:view/data/show_more"
|
27
|
-
tal:attributes="
|
28
|
-
href collection_url;
|
29
|
-
"
|
30
|
-
>
|
31
|
-
<span tal:content="view/data/header" />
|
32
|
-
</a>
|
33
|
-
</div>
|
34
|
-
|
35
|
-
<div class="card-body">
|
36
|
-
<ul>
|
37
|
-
<tal:events tal:repeat="obj view/results">
|
38
|
-
<li
|
39
|
-
class="portletItem"
|
40
|
-
tal:define="
|
41
|
-
plone_layout context/@@plone_layout;
|
42
|
-
portal context/@@plone_portal_state/portal;
|
43
|
-
image_scale portal/@@image_scale;
|
44
|
-
plone_view context/@@plone;
|
45
|
-
oddrow repeat/obj/odd;
|
46
|
-
useView python:obj.portal_type in viewActions;
|
47
|
-
itemUrl python:useView and obj.getURL() + '/view' or obj.getURL();
|
48
|
-
item_wf_state obj/review_state;
|
49
|
-
item_wf_state_class python:'state-' + plone_view.normalizeString(item_wf_state);
|
50
|
-
item_type obj/portal_type;
|
51
|
-
supress_icon view/data/no_icons;
|
52
|
-
supress_thumb view/data/no_thumbs;
|
53
|
-
thumb_scale view/thumb_scale;
|
54
|
-
item_type_class python:('contenttype-' + plone_view.normalizeString(item_type)) if not supress_icon else '';
|
55
|
-
"
|
56
|
-
tal:attributes="
|
57
|
-
class python:oddrow and 'portletItem even' or 'portletItem odd';
|
58
|
-
"
|
59
|
-
>
|
60
|
-
<a
|
61
|
-
href="#"
|
62
|
-
tal:attributes="
|
63
|
-
href itemUrl;
|
64
|
-
class string:tile $item_type_class $item_wf_state_class;
|
65
|
-
title obj/Description;
|
66
|
-
"
|
67
|
-
>
|
68
|
-
|
69
|
-
<tal:icon
|
70
|
-
tal:condition="python: not supress_icon and item_type != 'File'"
|
71
|
-
tal:replace="structure python:icons.tag(f'contenttype/{normalizeString(item_type)}')"
|
72
|
-
/>
|
73
|
-
<tal:icon
|
74
|
-
tal:condition="python: not supress_icon and item_type == 'File'"
|
75
|
-
tal:replace="structure python:icons.tag(f'mimetype-{obj.mime_type}')"
|
76
|
-
/>
|
77
|
-
<img
|
78
|
-
tal:condition="python: obj.getIcon and thumb_scale and not supress_thumb"
|
79
|
-
tal:replace="structure python:image_scale.tag(obj, 'image', scale=thumb_scale, css_class='float-end thumb-'+thumb_scale)"
|
80
|
-
/>
|
81
|
-
|
82
|
-
<span tal:replace="obj/Title">Title</span>
|
83
|
-
</a>
|
84
|
-
<div
|
85
|
-
class="portletItemDetails"
|
86
|
-
tal:define="
|
87
|
-
obj_date python:obj.start and obj.start or obj.Date();
|
88
|
-
"
|
89
|
-
tal:condition="view/data/show_dates"
|
90
|
-
tal:content="python:toLocalizedTime(obj_date)"
|
91
|
-
>May 5</div>
|
92
|
-
</li>
|
93
|
-
</tal:events>
|
94
|
-
</ul>
|
95
|
-
</div>
|
96
|
-
|
97
|
-
<div
|
98
|
-
class="card-footer"
|
99
|
-
tal:define="
|
100
|
-
showMore view/data/show_more;
|
101
|
-
"
|
102
|
-
tal:condition="python:showMore or view.include_empty_footer()"
|
103
|
-
>
|
104
|
-
<a
|
105
|
-
tal:condition="showMore"
|
106
|
-
tal:attributes="
|
107
|
-
href collection_url;
|
108
|
-
"
|
109
|
-
>
|
110
|
-
<span class="hiddenStructure"><span tal:replace="view/data/header" />
|
111
|
-
-
|
112
|
-
</span>
|
113
|
-
<span i18n:translate="more_url">More…</span>
|
114
|
-
</a>
|
115
|
-
</div>
|
116
|
-
|
117
|
-
</div>
|
118
|
-
|
119
|
-
</html>
|
@@ -1,34 +0,0 @@
|
|
1
|
-
<configure
|
2
|
-
xmlns="http://namespaces.zope.org/zope"
|
3
|
-
xmlns:five="http://namespaces.zope.org/five"
|
4
|
-
xmlns:genericsetup="http://namespaces.zope.org/genericsetup"
|
5
|
-
xmlns:plone="http://namespaces.plone.org/plone"
|
6
|
-
i18n_domain="plone">
|
7
|
-
|
8
|
-
<five:registerPackage package="." />
|
9
|
-
|
10
|
-
<genericsetup:registerProfile
|
11
|
-
name="default"
|
12
|
-
title="Collection portlet"
|
13
|
-
directory="profiles/default"
|
14
|
-
description="A simple portlet that displays the results of a collection object"
|
15
|
-
provides="Products.GenericSetup.interfaces.EXTENSION"
|
16
|
-
/>
|
17
|
-
|
18
|
-
<permission
|
19
|
-
id="plone.portlet.collection.AddCollectionPortlet"
|
20
|
-
title="plone.portlet.collection: Add collection portlet"
|
21
|
-
/>
|
22
|
-
|
23
|
-
<!-- Register the portlet -->
|
24
|
-
<plone:portlet
|
25
|
-
name="plone.portlet.collection.Collection"
|
26
|
-
interface=".collection.ICollectionPortlet"
|
27
|
-
assignment=".collection.Assignment"
|
28
|
-
view_permission="zope2.View"
|
29
|
-
edit_permission="plone.portlet.collection.AddCollectionPortlet"
|
30
|
-
renderer=".collection.Renderer"
|
31
|
-
addview=".collection.AddForm"
|
32
|
-
editview=".collection.EditForm"
|
33
|
-
/>
|
34
|
-
</configure>
|
@@ -1,16 +0,0 @@
|
|
1
|
-
<?xml version="1.0"?>
|
2
|
-
<portlets
|
3
|
-
xmlns:i18n="http://xml.zope.org/namespaces/i18n"
|
4
|
-
i18n:domain="plone">
|
5
|
-
|
6
|
-
<!-- Portlet type registrations -->
|
7
|
-
|
8
|
-
<portlet
|
9
|
-
addview="plone.portlet.collection.Collection"
|
10
|
-
title="Collection portlet"
|
11
|
-
description="A portlet which displays the results of a collection query"
|
12
|
-
i18n:attributes="title;
|
13
|
-
description"
|
14
|
-
/>
|
15
|
-
|
16
|
-
</portlets>
|
@@ -1,20 +0,0 @@
|
|
1
|
-
[tool.towncrier]
|
2
|
-
filename = "CHANGES.rst"
|
3
|
-
directory = "news/"
|
4
|
-
title_format = "{version} ({project_date})"
|
5
|
-
underlines = ["-", ""]
|
6
|
-
|
7
|
-
[[tool.towncrier.type]]
|
8
|
-
directory = "breaking"
|
9
|
-
name = "Breaking changes:"
|
10
|
-
showcontent = true
|
11
|
-
|
12
|
-
[[tool.towncrier.type]]
|
13
|
-
directory = "feature"
|
14
|
-
name = "New features:"
|
15
|
-
showcontent = true
|
16
|
-
|
17
|
-
[[tool.towncrier.type]]
|
18
|
-
directory = "bugfix"
|
19
|
-
name = "Bug fixes:"
|
20
|
-
showcontent = true
|
@@ -1,32 +0,0 @@
|
|
1
|
-
[bdist_wheel]
|
2
|
-
universal = 0
|
3
|
-
|
4
|
-
[check-manifest]
|
5
|
-
ignore =
|
6
|
-
*.cfg
|
7
|
-
.coveragerc
|
8
|
-
.editorconfig
|
9
|
-
|
10
|
-
[isort]
|
11
|
-
profile = black
|
12
|
-
force_alphabetical_sort = True
|
13
|
-
force_single_line = True
|
14
|
-
lines_after_imports = 2
|
15
|
-
|
16
|
-
[flake8]
|
17
|
-
ignore =
|
18
|
-
W503,
|
19
|
-
C812,
|
20
|
-
E501
|
21
|
-
T001
|
22
|
-
C813
|
23
|
-
exclude = bootstrap.py,docs,*.egg.,omelette
|
24
|
-
max-line-length = 88
|
25
|
-
max-complexity = 18
|
26
|
-
select = B,C,E,F,W,T4,B9
|
27
|
-
builtins = unicode,basestring
|
28
|
-
|
29
|
-
[egg_info]
|
30
|
-
tag_build =
|
31
|
-
tag_date = 0
|
32
|
-
|
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
|