File tree 5 files changed +261
-228
lines changed
src/recensio/plone/browser
5 files changed +261
-228
lines changed Original file line number Diff line number Diff line change 46
46
python_requires = ">=3.8" ,
47
47
install_requires = [
48
48
"setuptools" ,
49
+ "eea.facetednavigation" ,
49
50
"ftw.upgrade" ,
50
51
"plone.api" ,
51
52
"collective.vdexvocabulary" ,
Original file line number Diff line number Diff line change 1
1
<configure
2
2
xmlns =" http://namespaces.zope.org/zope"
3
3
xmlns : browser =" http://namespaces.zope.org/browser"
4
+ xmlns : faceted =" http://namespaces.zope.org/faceted"
4
5
xmlns : plone =" http://namespaces.plone.org/plone"
5
6
>
6
7
7
8
<include
8
9
package =" z3c.jbot"
9
10
file =" meta.zcml"
10
11
/>
12
+ <include
13
+ package =" eea.facetednavigation"
14
+ file =" meta.zcml"
15
+ />
11
16
<browser : jbot
12
17
directory =" overrides"
13
18
layer =" recensio.plone.interfaces.IRecensioPloneLayer"
82
87
83
88
<!-- Listing views -->
84
89
90
+ <configure package =" eea.facetednavigation.browser" >
91
+ <browser : page
92
+ name =" faceted_query"
93
+ for =" ..interfaces.IFacetedNavigable"
94
+ class =" recensio.plone.browser.listing.RecensioFacetedQueryHandler"
95
+ template =" template/query.pt"
96
+ permission =" zope2.View"
97
+ layer =" recensio.plone.interfaces.IRecensioPloneLayer"
98
+ />
99
+ </configure >
100
+
85
101
<browser : page
86
102
name =" sorting-menu"
87
103
for =" *"
90
106
permission =" zope2.View"
91
107
/>
92
108
93
- <browser : page
109
+ <faceted : view
94
110
name =" results-listing"
111
+ title =" Review Results Listing"
95
112
for =" *"
96
113
class =" .listing.ResultsListing"
97
114
template =" templates/results-listing.pt"
Original file line number Diff line number Diff line change
1
+ from eea .facetednavigation .browser .app .query import FacetedQueryHandler
1
2
from plone import api
3
+ from plone .app .contentlisting .interfaces import IContentListing
2
4
from Products .CMFPlone .browser .navtree import getNavigationRoot
3
5
from Products .CMFPlone .utils import normalizeString
4
6
from Products .Five .browser import BrowserView
9
11
from ZTUtils import make_query
10
12
11
13
14
+ class RecensioFacetedQueryHandler (FacetedQueryHandler ):
15
+ """Add recensio capabilities"""
16
+
17
+ def punctuated_title_and_subtitle (self , obj ):
18
+ return punctuated_title_and_subtitle (obj )
19
+
20
+
12
21
class ResultsListing (BrowserView ):
13
22
"""Lists search results."""
14
23
@@ -36,6 +45,7 @@ def items(self):
36
45
catalog = api .portal .get_tool ("portal_catalog" )
37
46
results = catalog (self .query )
38
47
IAnnotations (self .request )["recensio.query_results" ] = results
48
+ results = IContentListing (results )
39
49
return results
40
50
41
51
def translate (self , msgid ):
Original file line number Diff line number Diff line change 40
40
tal : condition =" context/syndication-util/context_allowed"
41
41
></p >
42
42
43
- <div metal : use-macro =" context/results-listing/macros/results-listing "
43
+ <div metal : use-macro =" context/results-listing/macros/content-core "
44
44
tal : condition =" results"
45
45
></div >
46
46
You can’t perform that action at this time.
0 commit comments