collective.eeafaceted.collectionwidget


Namecollective.eeafaceted.collectionwidget JSON
Version 1.15 PyPI version JSON
download
home_pagehttp://pypi.python.org/pypi/collective.eeafaceted.collectionwidget
Summaryeea.facetednavigation widget that enables selecting a collection (among several) as base filter
upload_time2023-07-03 11:45:55
maintainer
docs_urlNone
authorIMIO
requires_python
licenseGPL
keywords plone faceted navigation widget collection
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            .. image:: https://travis-ci.org/collective/collective.eeafaceted.collectionwidget.svg
  :target: https://travis-ci.org/collective/collective.eeafaceted.collectionwidget


.. image:: https://coveralls.io/repos/github/collective/collective.eeafaceted.collectionwidget/badge.svg?branch=master
  :target: https://coveralls.io/github/collective/collective.eeafaceted.collectionwidget?branch=master


==========================================================================
collective.eeafaceted.collectionwidget
==========================================================================

Package adding a widget for eea.facetednavigation that list collections as base searches

* `Source code @ GitHub <https://github.com/collective/collective.eeafaceted.collectionwidget>`_
* `Continuous Integration @ Travis-CI <http://travis-ci.org/collective/collective.eeafaceted.collectionwidget>`_

How it works
============

Once installed, a new widget `Collection Link` is available while configuring the faceted navigation.
If you add Collections to a folder on which faceted navigation is enabled, the widget will display
the found Collections and use it as base searches.
A special content DashboardCollection is also provided, it is based on the Collection but use additional
behaviors :

- The 'DashboardCollection' behavior that provides an extra field showNumberOfItems, making it possible to display the counter on a per DashboardCollection basis;
- The 'TAL condition' behavior that adds a field into which defining a TAL expression that will make it possible to hide or show a Collection in the widget.

Installation
============

To install `collective.eeafaceted.collectionwidget` you simply add ``collective.eeafaceted.collectionwidget``
to the list of eggs in your buildout, use make run to launch buildout and start Plone.
Then, install `collective.eeafaceted.collectionwidget` using the Add-ons control panel.

Configuration
=============

All that is necessary when adding this kind of widget in a faceted navigation is to enter a name for the displayed widget and to select the vocabulary `collective.eeafaceted.collectionwidget.collectionvocabulary`.  It will automatically display the Collections contained in the folder the faceted navigation is configured on.  It is also possible to group Collections by category, to do so, instead of adding the Collections directly in the folder, you can create a subfolder that will contain the Collections.

eea.facetednavigation version
=============================

From version 1.0, the widget requires at least `eea.facetednavigation` 10.0 where widget is built using `z3c.form`.
If you are using `eea.facetednavigation` < 10.0, you need to use a version of `collective.eeafaceted.collectionwidget` < 1.0.


Changelog
=========


1.15 (2023-07-03)
-----------------

- Ensure that parent can be displayed if `hide_category` is True and without category
  [mpeeters]
- Add `hide_category` option (False by default) to add the possibility to hide category titles
  [mpeeters]


1.14 (2022-01-10)
-----------------

- Fixed `utils.getCurrentCollection`, when `collectionUID` retrieved from
  `facetedQuery` form value, we have a list of values.
  [gbastien]

1.13 (2022-01-03)
-----------------

- Use an alias for `__call__` methods that use `ram.cache` in `vocabulary.py`
  this way, the key generated for the `ram.cache` storage is different.
  [gbastien]

1.12 (2021-12-06)
-----------------

- Added `ram.cache` for `CollectionCategoryVocabulary` to avoid query at each
  request as query is using a `sort_on=getObjPositionInParent` which is very slow.
  [gbastien]
- Override `DashboardCollection` query computation that by default in
  `plone.app.contenttypes` and `plone.app.querystring` will arbitrary add a `path`
  index in the query, and again, the `path` index is very slow and just not necessary.
  [gbastien]
- Use unrestricted catalog query when possible.
  [gbastien]
- Optimized the catalog query that compute the `number_of_items` counters.
  [gbastien]

1.11 (2020-05-28)
-----------------

- Added `real_context` parameter to `CollectionVocabulary`.
  [sgeulette]
- Use `ITALCondition` behavior to evaluate the `tal_condition` expression so
  `ITALCondition.complete_extra_expr_ctx` is taken into account.
  [gbastien]

1.10 (2019-09-12)
-----------------

- Invalidate `collective.eeafaceted.collectionwidget.cachedcollectionvocabulary`
  if `portal_url` changed, this can be the case when application is accessed
  by same user from different URi.
  [gbastien]

1.9 (2019-08-23)
----------------

- Added parameter `raise_on_error=True` to `utils._get_criterion` so it will
  return `None` in case passed context is not a faceted context instead
  raising an error.
  [gbastien]

1.8 (2019-08-13)
----------------

- Do not store the collection object in `term.value` of vocabulary
  `CollectionVocabulary` because it can be ram cached
  (in `CachedCollectionVocabulary` for example) and ram caching methods
  returning objects is a bad idea.
  [gbastien]
- Added `caching=True` parameter to `utils.getCurrentCollection` so it is
  computed one time by request for a given `faceted_context`.
  [gbastien]

1.7 (2019-03-28)
----------------

- Added parameter RenderTermView.compute_count_on_init, True by default that
  will do the collections count be computed when the widget is rendered. This
  makes it possible to disable it.
  [gbastien]
- Fix an issue with the widget used in combination with collective.solr
  [mpeeters]
- In `utils._updateDefaultCollectionFor` use `ICriteria.edit` to change value
  as it handles persistence instead doing it ourselves.
  After value is changed, trigger `FacetedGlobalSettingsChangedEvent`.
  [gbastien]

1.6 (2019-01-03)
----------------

- Avoid error when deleting site.
  [sgeulette]
- Factorized code called in `widget.__call__` in `widget._initialize_widget`
  method so it is easy to call from outside.
  [gbastien]

1.5 (2018-12-18)
----------------

- Temporary fix to not crash in `KeptCriteria` adapter when managing daterange
  widget.  For now, if index is a `DateIndex` and values is a `list`,
  we do not keep criteria for it.
  [gbastien]

1.4 (2018-11-29)
----------------

- Migrate IFacetedNavigable criterias, replacing old vocabulary by
  `cachedcollectionvocabulary`.
  [sgeulette]
- Added method `RenderCategoryView._get_category_template` to formalize how to
  get template used to display a term category.
  [gbastien]

1.3 (2018-11-20)
----------------

- Removed AT Collection creation from tests as it is not used and it fails
  because of a bug in plone.api==1.8.4.
  See https://github.com/plone/plone.api/pull/414
  [gbastien]
- Define a `csscompilation` name for collection widget own CSS ressource.
  Do redefine as little as possible when including widget view/edit css/js into
  eea.facetednavigation existing bundles.
  [gbastien]
- Moved CachedCollectionVocabulary from imio.dashboard, now named
  `collective.eeafaceted.collectionwidget.cachedcollectionvocabulary`.
  Moved dashboard collection related events.
  [sgeulette]

1.2 (2018-09-04)
----------------

- Added translations for `Enabled?`.
  [gbastien]

1.1 (2018-06-22)
----------------

- Corrected bad release, include last code.
  [gbastien]

1.0 (2018-06-20)
----------------

- Make widget compatible with `eea.facetednavigation >= 10.0`.
  This makes it no more compatible with older version.
  [gbastien]
- Make package installable on both Plone4 and Plone5.
  [gbastien]
- Rely on `plone.app.contenttypes` instead `plone.app.collection`.
  [gbastien]
- Do not break to display the facetednavigation_view if no collection widget
  defined, it is the case when just enabling the faceted navigation on a new
  folder.
  [gbastien]
- Added field `enabled` (default=True) on a DashboardCollection make it possible
  to disable it so it is no more displayed in the collection widget (portlet).
  We specifically do not use a workflow for DashboardCollection.
  [gbastien]

0.9 (2018-05-25)
----------------

- Moved here some methods from imio.dashboard:
  _get_criterion, getCollectionLinkCriterion, getCurrentCollection
  [sgeulette]
- facetednavigation_view override to manage default collection widget redirection
  [sgeulette]
- Added portal attribute on category view.
  [sgeulette]

0.8 (2018-05-03)
----------------

- Fix wrong release version 0.7.
  [gbastien]

0.7 (2018-05-03)
----------------

- Removed useless parameter `query` from `CollectionVocabulary.__call__`.
  [gbastien]
- Use `zope.globalrequest.getRequest` and not `context.REQUEST`
  to get the REQUEST.
  [gbastien]

0.6 (2016-12-07)
----------------

- Add an option force_redirect_to in CollectionVocabulary to force generating
  no_redirect=1 urls for all collections.
  [vincentfretin]

- Don't modify the title of the page if the h1 has class dontupdate.
  [vincentfretin]

- Fix bug with DateTime in kept_criteria_as_json.
  [cedricmessiant]


0.5 (2016-05-13)
----------------

- Added plone.app.collection as a real dependency, this way it is present
  and we make sure that the profile is installed.
  [gbastien]


0.4 (2016-03-29)
----------------

- Adapted tests for eea.facetednavigation 8.8, moved to the collective,
  prepare for release on pypi.python.org.
  [gbastien]


0.3 (2016-03-03)
----------------

- Display number of collection items in the term view. Override
  display_number_of_items method if you want to alter this behaviour.
  [cedricmessiant]


0.2 (2015-09-03)
----------------

- The context for @@render_collection_widget_category is now the category
  (folder) and the context for @@render_collection_widget_term is the
  collection. (closes #11677)
  [vincentfretin]

- When generating link to sub faceted, make sure every default values are
  correctly initialized, especially value of the Collection widget for which
  the id could be different than current faceted Collection widget id
  [gbastien]

- If we use functionnality of sub folders where faceted navigation is enabled,
  and the default collection is on one of these subfolders, do not redirect to
  this default collection if we use the 'folder_contents' of the root folder or
  user is systematically redirected to the subfolder and it is not possible
  anymore to access on the root folder
  [gbastien]

- Added portal_url attribute in RenderCategoryView
  [sgeulette]

0.1 (2015-07-14)
----------------

- Initial release.
  [IMIO]
            

Raw data

            {
    "_id": null,
    "home_page": "http://pypi.python.org/pypi/collective.eeafaceted.collectionwidget",
    "name": "collective.eeafaceted.collectionwidget",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "Plone faceted navigation widget collection",
    "author": "IMIO",
    "author_email": "support@imio.be",
    "download_url": "https://files.pythonhosted.org/packages/77/4f/0458b21d28c1a5c854cd0a7aabbb267ff1f9b604a454642b432d51089506/collective.eeafaceted.collectionwidget-1.15.tar.gz",
    "platform": null,
    "description": ".. image:: https://travis-ci.org/collective/collective.eeafaceted.collectionwidget.svg\n  :target: https://travis-ci.org/collective/collective.eeafaceted.collectionwidget\n\n\n.. image:: https://coveralls.io/repos/github/collective/collective.eeafaceted.collectionwidget/badge.svg?branch=master\n  :target: https://coveralls.io/github/collective/collective.eeafaceted.collectionwidget?branch=master\n\n\n==========================================================================\ncollective.eeafaceted.collectionwidget\n==========================================================================\n\nPackage adding a widget for eea.facetednavigation that list collections as base searches\n\n* `Source code @ GitHub <https://github.com/collective/collective.eeafaceted.collectionwidget>`_\n* `Continuous Integration @ Travis-CI <http://travis-ci.org/collective/collective.eeafaceted.collectionwidget>`_\n\nHow it works\n============\n\nOnce installed, a new widget `Collection Link` is available while configuring the faceted navigation.\nIf you add Collections to a folder on which faceted navigation is enabled, the widget will display\nthe found Collections and use it as base searches.\nA special content DashboardCollection is also provided, it is based on the Collection but use additional\nbehaviors :\n\n- The 'DashboardCollection' behavior that provides an extra field showNumberOfItems, making it possible to display the counter on a per DashboardCollection basis;\n- The 'TAL condition' behavior that adds a field into which defining a TAL expression that will make it possible to hide or show a Collection in the widget.\n\nInstallation\n============\n\nTo install `collective.eeafaceted.collectionwidget` you simply add ``collective.eeafaceted.collectionwidget``\nto the list of eggs in your buildout, use make run to launch buildout and start Plone.\nThen, install `collective.eeafaceted.collectionwidget` using the Add-ons control panel.\n\nConfiguration\n=============\n\nAll that is necessary when adding this kind of widget in a faceted navigation is to enter a name for the displayed widget and to select the vocabulary `collective.eeafaceted.collectionwidget.collectionvocabulary`.  It will automatically display the Collections contained in the folder the faceted navigation is configured on.  It is also possible to group Collections by category, to do so, instead of adding the Collections directly in the folder, you can create a subfolder that will contain the Collections.\n\neea.facetednavigation version\n=============================\n\nFrom version 1.0, the widget requires at least `eea.facetednavigation` 10.0 where widget is built using `z3c.form`.\nIf you are using `eea.facetednavigation` < 10.0, you need to use a version of `collective.eeafaceted.collectionwidget` < 1.0.\n\n\nChangelog\n=========\n\n\n1.15 (2023-07-03)\n-----------------\n\n- Ensure that parent can be displayed if `hide_category` is True and without category\n  [mpeeters]\n- Add `hide_category` option (False by default) to add the possibility to hide category titles\n  [mpeeters]\n\n\n1.14 (2022-01-10)\n-----------------\n\n- Fixed `utils.getCurrentCollection`, when `collectionUID` retrieved from\n  `facetedQuery` form value, we have a list of values.\n  [gbastien]\n\n1.13 (2022-01-03)\n-----------------\n\n- Use an alias for `__call__` methods that use `ram.cache` in `vocabulary.py`\n  this way, the key generated for the `ram.cache` storage is different.\n  [gbastien]\n\n1.12 (2021-12-06)\n-----------------\n\n- Added `ram.cache` for `CollectionCategoryVocabulary` to avoid query at each\n  request as query is using a `sort_on=getObjPositionInParent` which is very slow.\n  [gbastien]\n- Override `DashboardCollection` query computation that by default in\n  `plone.app.contenttypes` and `plone.app.querystring` will arbitrary add a `path`\n  index in the query, and again, the `path` index is very slow and just not necessary.\n  [gbastien]\n- Use unrestricted catalog query when possible.\n  [gbastien]\n- Optimized the catalog query that compute the `number_of_items` counters.\n  [gbastien]\n\n1.11 (2020-05-28)\n-----------------\n\n- Added `real_context` parameter to `CollectionVocabulary`.\n  [sgeulette]\n- Use `ITALCondition` behavior to evaluate the `tal_condition` expression so\n  `ITALCondition.complete_extra_expr_ctx` is taken into account.\n  [gbastien]\n\n1.10 (2019-09-12)\n-----------------\n\n- Invalidate `collective.eeafaceted.collectionwidget.cachedcollectionvocabulary`\n  if `portal_url` changed, this can be the case when application is accessed\n  by same user from different URi.\n  [gbastien]\n\n1.9 (2019-08-23)\n----------------\n\n- Added parameter `raise_on_error=True` to `utils._get_criterion` so it will\n  return `None` in case passed context is not a faceted context instead\n  raising an error.\n  [gbastien]\n\n1.8 (2019-08-13)\n----------------\n\n- Do not store the collection object in `term.value` of vocabulary\n  `CollectionVocabulary` because it can be ram cached\n  (in `CachedCollectionVocabulary` for example) and ram caching methods\n  returning objects is a bad idea.\n  [gbastien]\n- Added `caching=True` parameter to `utils.getCurrentCollection` so it is\n  computed one time by request for a given `faceted_context`.\n  [gbastien]\n\n1.7 (2019-03-28)\n----------------\n\n- Added parameter RenderTermView.compute_count_on_init, True by default that\n  will do the collections count be computed when the widget is rendered. This\n  makes it possible to disable it.\n  [gbastien]\n- Fix an issue with the widget used in combination with collective.solr\n  [mpeeters]\n- In `utils._updateDefaultCollectionFor` use `ICriteria.edit` to change value\n  as it handles persistence instead doing it ourselves.\n  After value is changed, trigger `FacetedGlobalSettingsChangedEvent`.\n  [gbastien]\n\n1.6 (2019-01-03)\n----------------\n\n- Avoid error when deleting site.\n  [sgeulette]\n- Factorized code called in `widget.__call__` in `widget._initialize_widget`\n  method so it is easy to call from outside.\n  [gbastien]\n\n1.5 (2018-12-18)\n----------------\n\n- Temporary fix to not crash in `KeptCriteria` adapter when managing daterange\n  widget.  For now, if index is a `DateIndex` and values is a `list`,\n  we do not keep criteria for it.\n  [gbastien]\n\n1.4 (2018-11-29)\n----------------\n\n- Migrate IFacetedNavigable criterias, replacing old vocabulary by\n  `cachedcollectionvocabulary`.\n  [sgeulette]\n- Added method `RenderCategoryView._get_category_template` to formalize how to\n  get template used to display a term category.\n  [gbastien]\n\n1.3 (2018-11-20)\n----------------\n\n- Removed AT Collection creation from tests as it is not used and it fails\n  because of a bug in plone.api==1.8.4.\n  See https://github.com/plone/plone.api/pull/414\n  [gbastien]\n- Define a `csscompilation` name for collection widget own CSS ressource.\n  Do redefine as little as possible when including widget view/edit css/js into\n  eea.facetednavigation existing bundles.\n  [gbastien]\n- Moved CachedCollectionVocabulary from imio.dashboard, now named\n  `collective.eeafaceted.collectionwidget.cachedcollectionvocabulary`.\n  Moved dashboard collection related events.\n  [sgeulette]\n\n1.2 (2018-09-04)\n----------------\n\n- Added translations for `Enabled?`.\n  [gbastien]\n\n1.1 (2018-06-22)\n----------------\n\n- Corrected bad release, include last code.\n  [gbastien]\n\n1.0 (2018-06-20)\n----------------\n\n- Make widget compatible with `eea.facetednavigation >= 10.0`.\n  This makes it no more compatible with older version.\n  [gbastien]\n- Make package installable on both Plone4 and Plone5.\n  [gbastien]\n- Rely on `plone.app.contenttypes` instead `plone.app.collection`.\n  [gbastien]\n- Do not break to display the facetednavigation_view if no collection widget\n  defined, it is the case when just enabling the faceted navigation on a new\n  folder.\n  [gbastien]\n- Added field `enabled` (default=True) on a DashboardCollection make it possible\n  to disable it so it is no more displayed in the collection widget (portlet).\n  We specifically do not use a workflow for DashboardCollection.\n  [gbastien]\n\n0.9 (2018-05-25)\n----------------\n\n- Moved here some methods from imio.dashboard:\n  _get_criterion, getCollectionLinkCriterion, getCurrentCollection\n  [sgeulette]\n- facetednavigation_view override to manage default collection widget redirection\n  [sgeulette]\n- Added portal attribute on category view.\n  [sgeulette]\n\n0.8 (2018-05-03)\n----------------\n\n- Fix wrong release version 0.7.\n  [gbastien]\n\n0.7 (2018-05-03)\n----------------\n\n- Removed useless parameter `query` from `CollectionVocabulary.__call__`.\n  [gbastien]\n- Use `zope.globalrequest.getRequest` and not `context.REQUEST`\n  to get the REQUEST.\n  [gbastien]\n\n0.6 (2016-12-07)\n----------------\n\n- Add an option force_redirect_to in CollectionVocabulary to force generating\n  no_redirect=1 urls for all collections.\n  [vincentfretin]\n\n- Don't modify the title of the page if the h1 has class dontupdate.\n  [vincentfretin]\n\n- Fix bug with DateTime in kept_criteria_as_json.\n  [cedricmessiant]\n\n\n0.5 (2016-05-13)\n----------------\n\n- Added plone.app.collection as a real dependency, this way it is present\n  and we make sure that the profile is installed.\n  [gbastien]\n\n\n0.4 (2016-03-29)\n----------------\n\n- Adapted tests for eea.facetednavigation 8.8, moved to the collective,\n  prepare for release on pypi.python.org.\n  [gbastien]\n\n\n0.3 (2016-03-03)\n----------------\n\n- Display number of collection items in the term view. Override\n  display_number_of_items method if you want to alter this behaviour.\n  [cedricmessiant]\n\n\n0.2 (2015-09-03)\n----------------\n\n- The context for @@render_collection_widget_category is now the category\n  (folder) and the context for @@render_collection_widget_term is the\n  collection. (closes #11677)\n  [vincentfretin]\n\n- When generating link to sub faceted, make sure every default values are\n  correctly initialized, especially value of the Collection widget for which\n  the id could be different than current faceted Collection widget id\n  [gbastien]\n\n- If we use functionnality of sub folders where faceted navigation is enabled,\n  and the default collection is on one of these subfolders, do not redirect to\n  this default collection if we use the 'folder_contents' of the root folder or\n  user is systematically redirected to the subfolder and it is not possible\n  anymore to access on the root folder\n  [gbastien]\n\n- Added portal_url attribute in RenderCategoryView\n  [sgeulette]\n\n0.1 (2015-07-14)\n----------------\n\n- Initial release.\n  [IMIO]",
    "bugtrack_url": null,
    "license": "GPL",
    "summary": "eea.facetednavigation widget that enables selecting a collection (among several) as base filter",
    "version": "1.15",
    "project_urls": {
        "Homepage": "http://pypi.python.org/pypi/collective.eeafaceted.collectionwidget"
    },
    "split_keywords": [
        "plone",
        "faceted",
        "navigation",
        "widget",
        "collection"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "774f0458b21d28c1a5c854cd0a7aabbb267ff1f9b604a454642b432d51089506",
                "md5": "093a81ca0e202bfe131c627b03bb3cba",
                "sha256": "2752beb106b3413c7f990fd32612facc2d6dd61dd0622e49d1d5d5e20440f5b2"
            },
            "downloads": -1,
            "filename": "collective.eeafaceted.collectionwidget-1.15.tar.gz",
            "has_sig": false,
            "md5_digest": "093a81ca0e202bfe131c627b03bb3cba",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 52418,
            "upload_time": "2023-07-03T11:45:55",
            "upload_time_iso_8601": "2023-07-03T11:45:55.087543Z",
            "url": "https://files.pythonhosted.org/packages/77/4f/0458b21d28c1a5c854cd0a7aabbb267ff1f9b604a454642b432d51089506/collective.eeafaceted.collectionwidget-1.15.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-03 11:45:55",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "collective.eeafaceted.collectionwidget"
}
        
Elapsed time: 0.08966s