<div align="center"><img alt="logo" src="https://raw.githubusercontent.com/collective/collective.contact_behaviors/main/docs/logo.svg" width="100" /></div>
<h1 align="center">Contact Behaviors for Plone</h1>
<div align="center">
[![PyPI](https://img.shields.io/pypi/v/collective.contact_behaviors)](https://pypi.org/project/collective.contact_behaviors/)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/collective.contact_behaviors)](https://pypi.org/project/collective.contact_behaviors/)
[![PyPI - Wheel](https://img.shields.io/pypi/wheel/collective.contact_behaviors)](https://pypi.org/project/collective.contact_behaviors/)
[![PyPI - License](https://img.shields.io/pypi/l/collective.contact_behaviors)](https://pypi.org/project/collective.contact_behaviors/)
[![PyPI - Status](https://img.shields.io/pypi/status/collective.contact_behaviors)](https://pypi.org/project/collective.contact_behaviors/)
[![PyPI - Plone Versions](https://img.shields.io/pypi/frameworkversions/plone/collective.contact_behaviors)](https://pypi.org/project/collective.contact_behaviors/)
[![Meta](https://github.com/collective/collective.contact_behaviors/actions/workflows/meta.yml/badge.svg)](https://github.com/collective/collective.contact_behaviors/actions/workflows/meta.yml)
![Code Style](https://img.shields.io/badge/Code%20Style-Black-000000)
[![GitHub contributors](https://img.shields.io/github/contributors/collective/collective.contact_behaviors)](https://github.com/collective/collective.contact_behaviors)
[![GitHub Repo stars](https://img.shields.io/github/stars/collective/collective.contact_behaviors?style=social)](https://github.com/collective/collective.contact_behaviors)
</div>
## Features
`collective.contact_behaviors` is a collection of additional behaviors and vocabularies for Dexterity content types.
### Behaviors
* `collective.contact_behaviors.address_info`: Provides address information fields:
* address
* address_2
* city
* state
* postal_code
* country
* `collective.contact_behaviors.contact_info`: Provides contact information fields:
* contact_email
* contact_website
* contact_phone
### Permissions
| id | title | Usage |
| -- | -- | -- |
| collective.contact_behaviors.address_info.view | collective.contact_behaviors: View Basic Address Information | Read access to `city`, `state`, `postal_code`, `country` |
| collective.contact_behaviors.address_info_details.view | collective.contact_behaviors: View Detailed Address Information | Read access to `address`, `address_2` |
| collective.contact_behaviors.contact_info.view | collective.contact_behaviors: View Contact Information | Read access to `contact_email`, `contact_website`, `contact_phone` |
### Catalog Indexes
This package adds Indexes and Metadata to Portal Catalog.
| Content Attribute | Index Type | Metadata |
| -- | -- | -- |
| country | FieldIndex | ✅ |
| contact_email | FieldIndex | ❌ |
## See it in action
This package is being used by the following add-ons:
* [`collective.casestudy`](https://github.com/collective/collective.casestudy)
## Documentation
This package is supposed to be used by Plone integrators on their add-ons.
### Installation
Add `collective.contact_behaviors` as a dependency on your package's `setup.py`
```python
install_requires = [
"collective.contact_behaviors",
"Plone",
"plone.restapi",
"setuptools",
],
```
Also, add `collective.contact_behaviors` to your package's `configure.zcml` (or `dependencies.zcml`):
```xml
<include package="collective.contact_behaviors" />
```
### Generic Setup
To automatically enable this package when your add-on is installed, add the following line inside the package's `profiles/default/metadata.xml` `dependencies` element:
```xml
<dependency>profile-collective.contact_behaviors:default</dependency>
```
And to enable the behaviors provided here to a specific content type, please edit your type configuration and include the following lines (or one of them) to the `behaviors` property:
```xml
<element value="collective.contact_behaviors.address_info" />
<element value="collective.contact_behaviors.contact_info" />
```
## Source Code and Contributions
We welcome contributions to `collective.contact_behaviors`.
You can create an issue in the issue tracker, or contact a maintainer.
- [Issue Tracker](https://github.com/collective/collective.contact_behaviors/issues)
- [Source Code](https://github.com/collective/collective.contact_behaviors/)
### Development setup
You need a working Python environment version 3.8 or later.
Then install the dependencies and a development instance using:
```bash
make install
```
By default, we use the latest Plone version in the 6.x series.
### Update translations
```bash
make i18n
```
### Format codebase
```bash
make format
```
### Run tests
```bash
make test
```
## License
The project is licensed under GPLv2.
# Changelog
<!--
You should *NOT* be adding new change log entries to this file.
You should create a file in the news directory instead.
For helpful instructions, please see:
https://github.com/plone/plone.releaser/blob/master/ADD-A-NEWS-ITEM.rst
-->
<!-- towncrier release notes start -->
## 1.0.0a3 (2023-06-27)
### New features:
- Allow other packages to set default values for address fields [@ericof] #2
## 1.0.0a2 (2023-06-21)
### New features:
- Implement `collective.contact_behaviors.address_info behavior` @ericof address
- Implement `collective.contact_behaviors.contact_info behavior` @ericof contact
- Implement `plone.app.querystring.field.country` querystring filter @ericof querystring
- Implement `collective.contact_behaviors.available_countries` and `collective.contact_behaviors.countries` @ericof vocabularies
### Internal:
- Update configuration files.
[plone devs] 23d5b8e1
- Added towncrier as a package dependency. @ericof towncrier
## 1.0.0a2 (unreleased)
- Nothing changed yet.
## 1.0.0a1 (2023-06-21)
Raw data
{
"_id": null,
"home_page": "https://github.com/collective/collective.contact_behaviors",
"name": "collective.contact-behaviors",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "",
"keywords": "Python Plone CMS",
"author": "Plone Community",
"author_email": "ericof@plone.org",
"download_url": "https://files.pythonhosted.org/packages/87/34/43bf8434bce6cb284da4dd546d8935fbcca14f4c43e51065454b2c5fce30/collective.contact_behaviors-1.0.0a3.tar.gz",
"platform": null,
"description": "\n<div align=\"center\"><img alt=\"logo\" src=\"https://raw.githubusercontent.com/collective/collective.contact_behaviors/main/docs/logo.svg\" width=\"100\" /></div>\n\n<h1 align=\"center\">Contact Behaviors for Plone</h1>\n\n<div align=\"center\">\n\n[![PyPI](https://img.shields.io/pypi/v/collective.contact_behaviors)](https://pypi.org/project/collective.contact_behaviors/)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/collective.contact_behaviors)](https://pypi.org/project/collective.contact_behaviors/)\n[![PyPI - Wheel](https://img.shields.io/pypi/wheel/collective.contact_behaviors)](https://pypi.org/project/collective.contact_behaviors/)\n[![PyPI - License](https://img.shields.io/pypi/l/collective.contact_behaviors)](https://pypi.org/project/collective.contact_behaviors/)\n[![PyPI - Status](https://img.shields.io/pypi/status/collective.contact_behaviors)](https://pypi.org/project/collective.contact_behaviors/)\n\n\n[![PyPI - Plone Versions](https://img.shields.io/pypi/frameworkversions/plone/collective.contact_behaviors)](https://pypi.org/project/collective.contact_behaviors/)\n\n[![Meta](https://github.com/collective/collective.contact_behaviors/actions/workflows/meta.yml/badge.svg)](https://github.com/collective/collective.contact_behaviors/actions/workflows/meta.yml)\n![Code Style](https://img.shields.io/badge/Code%20Style-Black-000000)\n\n[![GitHub contributors](https://img.shields.io/github/contributors/collective/collective.contact_behaviors)](https://github.com/collective/collective.contact_behaviors)\n[![GitHub Repo stars](https://img.shields.io/github/stars/collective/collective.contact_behaviors?style=social)](https://github.com/collective/collective.contact_behaviors)\n\n</div>\n\n## Features\n\n`collective.contact_behaviors` is a collection of additional behaviors and vocabularies for Dexterity content types.\n\n### Behaviors\n\n* `collective.contact_behaviors.address_info`: Provides address information fields:\n\n * address\n * address_2\n * city\n * state\n * postal_code\n * country\n\n* `collective.contact_behaviors.contact_info`: Provides contact information fields:\n\n * contact_email\n * contact_website\n * contact_phone\n\n\n### Permissions\n\n| id | title | Usage |\n| -- | -- | -- |\n| collective.contact_behaviors.address_info.view | collective.contact_behaviors: View Basic Address Information | Read access to `city`, `state`, `postal_code`, `country` |\n| collective.contact_behaviors.address_info_details.view | collective.contact_behaviors: View Detailed Address Information | Read access to `address`, `address_2` |\n| collective.contact_behaviors.contact_info.view | collective.contact_behaviors: View Contact Information | Read access to `contact_email`, `contact_website`, `contact_phone` |\n\n\n### Catalog Indexes\n\nThis package adds Indexes and Metadata to Portal Catalog.\n\n| Content Attribute | Index Type | Metadata |\n| -- | -- | -- |\n| country | FieldIndex | \u2705 |\n| contact_email | FieldIndex | \u274c |\n\n## See it in action\n\nThis package is being used by the following add-ons:\n\n* [`collective.casestudy`](https://github.com/collective/collective.casestudy)\n\n## Documentation\n\nThis package is supposed to be used by Plone integrators on their add-ons.\n\n### Installation\n\nAdd `collective.contact_behaviors` as a dependency on your package's `setup.py`\n\n```python\n install_requires = [\n \"collective.contact_behaviors\",\n \"Plone\",\n \"plone.restapi\",\n \"setuptools\",\n ],\n```\n\nAlso, add `collective.contact_behaviors` to your package's `configure.zcml` (or `dependencies.zcml`):\n\n```xml\n<include package=\"collective.contact_behaviors\" />\n```\n\n### Generic Setup\n\nTo automatically enable this package when your add-on is installed, add the following line inside the package's `profiles/default/metadata.xml` `dependencies` element:\n\n```xml\n <dependency>profile-collective.contact_behaviors:default</dependency>\n```\n\nAnd to enable the behaviors provided here to a specific content type, please edit your type configuration and include the following lines (or one of them) to the `behaviors` property:\n\n```xml\n <element value=\"collective.contact_behaviors.address_info\" />\n <element value=\"collective.contact_behaviors.contact_info\" />\n```\n\n## Source Code and Contributions\n\nWe welcome contributions to `collective.contact_behaviors`.\n\nYou can create an issue in the issue tracker, or contact a maintainer.\n\n- [Issue Tracker](https://github.com/collective/collective.contact_behaviors/issues)\n- [Source Code](https://github.com/collective/collective.contact_behaviors/)\n\n\n### Development setup\n\nYou need a working Python environment version 3.8 or later.\n\nThen install the dependencies and a development instance using:\n\n```bash\nmake install\n```\n\nBy default, we use the latest Plone version in the 6.x series.\n\n### Update translations\n\n```bash\nmake i18n\n```\n### Format codebase\n\n```bash\nmake format\n```\n### Run tests\n\n```bash\nmake test\n```\n\n## License\n\nThe project is licensed under GPLv2.\n\n\n# Changelog\n\n<!--\n You should *NOT* be adding new change log entries to this file.\n You should create a file in the news directory instead.\n For helpful instructions, please see:\n https://github.com/plone/plone.releaser/blob/master/ADD-A-NEWS-ITEM.rst\n-->\n\n<!-- towncrier release notes start -->\n\n## 1.0.0a3 (2023-06-27)\n\n\n### New features:\n\n- Allow other packages to set default values for address fields [@ericof] #2\n\n\n## 1.0.0a2 (2023-06-21)\n\n\n### New features:\n\n- Implement `collective.contact_behaviors.address_info behavior` @ericof address\n- Implement `collective.contact_behaviors.contact_info behavior` @ericof contact\n- Implement `plone.app.querystring.field.country` querystring filter @ericof querystring\n- Implement `collective.contact_behaviors.available_countries` and `collective.contact_behaviors.countries` @ericof vocabularies\n\n\n### Internal:\n\n- Update configuration files.\n [plone devs] 23d5b8e1\n- Added towncrier as a package dependency. @ericof towncrier\n\n\n## 1.0.0a2 (unreleased)\n\n\n- Nothing changed yet.\n\n\n## 1.0.0a1 (2023-06-21)\n\n\n",
"bugtrack_url": null,
"license": "GPL version 2",
"summary": "A collection of contact information behaviors and vocabularies for Dexterity content types.",
"version": "1.0.0a3",
"project_urls": {
"Homepage": "https://github.com/collective/collective.contact_behaviors",
"PyPI": "https://pypi.python.org/pypi/collective.contact_behaviors",
"Source": "https://github.com/collective/collective.contact_behaviors",
"Tracker": "https://github.com/collective/collective.contact_behaviors/issues"
},
"split_keywords": [
"python",
"plone",
"cms"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "1904fe9683b83fa81f12777511dea7c2aa64bbfab21ae1e280c16c02567319ae",
"md5": "331672ad7a05434b01b507233a0152ce",
"sha256": "d803d27b09bba105b247e9ed797379c649a1c0879d6e2976a00547d355bc831c"
},
"downloads": -1,
"filename": "collective.contact_behaviors-1.0.0a3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "331672ad7a05434b01b507233a0152ce",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 138329,
"upload_time": "2023-06-27T14:59:33",
"upload_time_iso_8601": "2023-06-27T14:59:33.408077Z",
"url": "https://files.pythonhosted.org/packages/19/04/fe9683b83fa81f12777511dea7c2aa64bbfab21ae1e280c16c02567319ae/collective.contact_behaviors-1.0.0a3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "873443bf8434bce6cb284da4dd546d8935fbcca14f4c43e51065454b2c5fce30",
"md5": "8065ab55b1a582c0098f9793e86207a0",
"sha256": "0ca563e33e873f099fc5f474b21f510babd4be945cd28324a843e671cdcf8c99"
},
"downloads": -1,
"filename": "collective.contact_behaviors-1.0.0a3.tar.gz",
"has_sig": false,
"md5_digest": "8065ab55b1a582c0098f9793e86207a0",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 123508,
"upload_time": "2023-06-27T14:59:35",
"upload_time_iso_8601": "2023-06-27T14:59:35.024888Z",
"url": "https://files.pythonhosted.org/packages/87/34/43bf8434bce6cb284da4dd546d8935fbcca14f4c43e51065454b2c5fce30/collective.contact_behaviors-1.0.0a3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-06-27 14:59:35",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "collective",
"github_project": "collective.contact_behaviors",
"travis_ci": false,
"coveralls": true,
"github_actions": true,
"requirements": [],
"tox": true,
"lcname": "collective.contact-behaviors"
}