Package: collective.contact.core
IntroductionThis add-on is part of thecollective.contact.*suite. For an overview and a demo of these suite, seecollective.contact.demo.A Plone add-on that provides a directory where you create persons, organizations, sub-organizations and positions.How-toFirst, create a directory in your site. This directory will contain all the informations related to your contacts.You can then add organizations to this directory. An organization can contain organizations (such as services, divisions or department) or positions (such as CEO, mayor or developer).You can also add persons to this directory. A person is a physical person that can hold one or more positions or be member of one or more organizations.
To associate a person with an organization or a position, add a held position content type in the person’s context.Consider the following:the person type will contain personal contact detailsthe held_position type will contain professional contact detailsModify your directory to customize the organization types and the position types that you will associate with your organizations, sub-organizations and positions.Look at the test data profile collective.contact.core test data for detailed examples.ConfigurationThe following configuration can be adapted in the plone registry (prefix=IContactCoreParameters):person_contact_details_privateboolean, default to True.The person contact details are private and will not be used in other context, like held position.person_title_in_titleboolean, default to True.Display person title in displayed person’s title.use_held_positions_to_search_personboolean, default to True.Use held positions to search persons.use_description_to_search_personboolean, default to True.Use description to search persons.display_contact_photo_on_organization_viewboolean, default to True.Display contact photo on organization view.contact_source_metadata_contentchoice, default to get_full_title.Choose information displayed after a search in contact widget.LocalizationIn some countries (i.e. France) the format of an address is<nr> <street>instead of<street> <nr>.You can provide a translation for theaddress_linei18n-msgid in the collective.contact.core translations if this is the case for your country.You can also patchcollective.contact.core.behaviors.ADDRESS_FIELDSto make the number field show up before the street in add and edit forms.In your addon, create apatches.pyfile with this content:from collective.contact.core import behaviors
behaviors.ADDRESS_FIELDS[0:2] = reversed(behaviors.ADDRESS_FIELDS[0:2])
behaviors.ADDRESS_FIELDS_PLUS_PARENT[2:4] = reversed(behaviors.ADDRESS_FIELDS_PLUS_PARENT[2:4])and import it in your__init__.pyso the patches takes effect.TranslationsThis product has been translated intoGerman.Spanish.French.Italian.Slovenian.You can contribute for any message missing or other new languages, join us atPlone Collective TeamintoTransifex.netservice with all world Plone translators community.InstallationInstall collective.contact.core by adding it to your buildout file:[buildout]…eggs =collective.contact.coreand then running “bin/buildout”, next enable the product in your plone site.ContributeHave an idea? Found a bug? Let us know byopening a ticket.Issue Tracker:https://github.com/collective/collective.contact.core/issuesSource Code:https://github.com/collective/collective.contact.coreDocumentation:https://github.com/collective/collective.contact.demo/blob/master/README.mdContributorsGauthier Bastien, IMIOVincent Fretin, EcreallStéphan Geulette, IMIOCédric Messiant, EcreallFrédéric Peters, Entr’ouvertThomas Desvenain, EcreallLeonardo J. Caballero G., Plone VenezuelaLaurent Lasudry, AffiniticChangelog1.42.0 (2023-09-13)Set mail index lowercase.
[sgeulette]1.41 (2023-09-07)Improved date ranges.
[sgeulette]1.40 (2023-07-20)Added plone.app.iterate dependency.
[sgeulette]Replaced subscribers grok declaration by zcml
[sgeulette]Added subscribers docstrings
[sgeulette]fix: [DMS-949] min & max for start_date, end_date
[bleybaert]1.39 (2022-06-14)Addedsafe_utils.pythat will only include safe utils.
[gbastien]Added validation for identifiers token INameTokenTableRowSchema.
[odelaere]1.38 (2022-02-03)Removed useless imports in collective.contact.core.schema.
Import ContactList or ContactChoice should be done from collective.contact.widget.schema
[odelaere]Added parameterdisplay_photo_label_on_viewsthat will display the field photolabelinstead of default behavior that is only displaying the photo without label.
[gbastien]1.37 (2021-10-20)Add image path when exporting
[boulch]1.36 (2021-04-20)In vocabulary.OrganizationTypesOrLevels, usegetRequestinsteadcontext.REQUESTto get the current request, in some case like when using aplone.restapiendpoint,context.REQUESTcould not have anURL.
[gbastien]Replaced SearchableText indexers by IDynamicTextIndexExtender adapters.
So another extender using IDynamicTextIndexExtender also works (like
collective.behavior.internalnumber).
[sgeulette]1.35 (2021-01-14)Addedutils.get_position_type_namethat will return aposition_type namefor a givendirectoryandposition_type token.
[gbastien]1.34 (2020-10-07)Added robot test for collective.contatc.widget 1.12 version.
[daggelpop]1.33 (2020-08-18)Add newenterprise numberfield for organization content type
[laulaz]Updated Title to work with transmogrifier
[sgeulette]Updated birthday widget to manage dates range
[sgeulette]Addedcreate_organization.pngicon useable if necessary
[gbastien]1.32 (2020-05-08)Add Transifex.net service integration to manage the translation process.
[macagua]Add Spanish translation
[macagua]Removed duplicated code displaying two times the logo in organization view.
[gbastien]1.31 (2020-04-07)Do not execute integrity check for content types that are not related to this package.
This prevent issues with plone.app.iterate.
[mpeeters]1.30 (2020-02-06)Avoid an error when we try to remove a working copy from plone.app.iterate
[mpeeters]Displaydescriptionon the organization view. Fielddescriptionmay be
filled but was not displayed.
[gbastien]1.29 (2019-11-25)Removed overlay on heldposition actions in person view.
[sgeulette]Added option to display belowcontenttitle viewlet on contact views.
[sgeulette]1.28 (2019-11-04)Ensure than export is unicode encoding.
[boulch]1.27 (2019-09-20)Added contact_source metadata to be used in contact widget.
[sgeulette]If person details privacy is True, contact details on person don’t search related items.
[sgeulette]1.26 (2019-06-28)Setcacheable=”True”forstyle.cssincssregistry.xml.
[gbastien]Keep div and CSS idviewlet-below-content-bodywhen renderingplone.belowcontentbodyviewlets on various views.
[gbastien]Extendedutils.get_gender_and_numberto manage parametersuse_byanduse_tothat will add new values to returned result prepended by‘B’or‘T’.
[gbastien]Added email index
[sgeulette, daggelpop]1.25 (2019-05-16)Call@@gender_person_title_mapping.jsonfrom JS onportal_url.
[gbastien]1.24 (2019-01-31)Added methodheld_position.get_labelto get theheld_positionlabel so it
is easy to override.
[gbastien]Removed check onajax_loadwhen renderingplone.abovecontenttitleandplone.belowcontentbodyviewlet managers or it is not possible to render any
viewlet when content is displayed in an overlay. This was done fordirectory,contact,organization,personandpositionviews.
[gbastien]1.23 (2018-11-20)Removed useless Attribute fieldis_createdfromIPersonschema.
Added corresponding migration.
[gbastien]Makeheld_position.get_titlereturn unicode.
[gbastien]Added parameterinclude_person_title=Truetoperson.get_titleand toheld_position.get_person_titleso we get personfirstname/lastnamewithoutperson_title.
[gbastien]Added image fieldperson.signature.
[gbastien]1.22 (2018-10-12)Renderplone.abovecontenttitleandplone.belowcontentbodyviewlets
in the directory view.
[gbastien]Removed useless call toplone.belowcontentviewlet in person view.
[gbastien]1.21 (2018-09-11)On persons listed on the directory view, display held_positions when hovering
person title (tooltip).
[gbastien]Display organization details (tooltip) when hovering organization link.Make it easy to override the way sub organizations are displayed on an
organization by calling a @@suborganizations view.
[gbastien]Use a tag<h3>to display label ofOrganizationsandPositionscontained
in anOrganizationlike it is already the case forHeld positionsandOther contacts.
[gbastien]Do not useunittest2anymore, useunittestinstead.
[gbastien]1.20 (2018-07-20)Added ‘utils.get_gender_and_number’ that returns the gender and number of a
given list of contacts.  This is useful to manage gender (female/male) and
number (singular/plural) for generated words.
[gbastien]1.19 (2018-07-09)Add email to SearchableText of a person. Useful when fixing contact data for
smtp error reports after sending a newsletter with collective.contact.mailaction
[fRiSi]1.18 (2018-06-07)Use real full title in held_position and position get_full_title methods.
Necessary to display to the end user the right organization, without ambiguity.
[sgeulette]Prevent address fields from being erased if they are changed programmaticaly before any manual edition.
[thomasdesvenain]Prevent title ascii error on organization vcard export.
[bsuttor]Prevent fatal error if there is no organization on held_position.
[thomasdesvenain]Prevent error when person is None on held_position.
[Gagaro]Use another version than 1.2.8 for plone.app.textfield as version 1.2.9
fixes issue we had in tests.
(Seehttps://github.com/plone/plone.app.textfield/issues/22).
[gbastien]Display positions on the organization view respecting order (getObjPositionInParent).
[gbastien]Display various content title consistently everywhere in the application.
[gbastien, sgeulette]Display content icon before content title.
[gbastien]Added parameter display_contact_photo_on_organization_view to the registry,
it True (default), the contact photo is displayed in the @@othercontacts, if
False, the person content_type icon is displayed.
[gbastien]1.17 (2017-10-02)Fix get_valid_url mehtod when there is accent into url.
[bsuttor]1.16 (2017-09-22)Set person_contact_details_private option to true by default.
[sgeulette]1.15 (2017-05-30)Fix robot tests.
[thomasdesvenain]Don’t purge behaviors when reinstalling.
[sgeulette]Set plone.app.textfield maximum version as 1.2.7
[thomasdesvenain]1.14 (2017-05-16)Lint for code-analysis.
[bsuttor]1.13 (2017-05-16)Set IContactDetails behavior on held_position type.
Person contact details are considered as personal data.
[sgeulette]Use a python view to provide gender/person title mapping. In this way, the terms can be translated.
[cedricmessiant]Avoid error in addcontact when there is no directory.
[cedricmessiant]Prevent fatal error if by chance a held position related to a position or an organisation has been removed
but the relation always exist. An error is logged.
[thomasdesvenain]Refactor: move complex sortable title methods into content objects.
[thomasdesvenain]1.12 (2017-01-17)Change field order for address (<street> <nr>- as this is more common in most countries)address format can be localized by using msgidaddress_linefield order in add and edit forms can be patched (see README for details)(fixes #29) [fRiSi]Fixed indexing a held position which organization has been removed.
[thomasdesvenain]Add translations for de, it, fr and sl.
[fRiSi]1.11 (2016-10-13)Fix setup_relation_dependency when many are setup on the same page.
[thomasdesvenain]Fix “create contact” widget link when master organization field value has
changed or has become empty.
[thomasdesvenain]1.10 (2016-10-05)Fix AddContact form problem with security hotfix 20160830
[ebrehault]1.9 (2016-07-07)Reindex suborganizations (and positions and held positions) when an
organization is modified.
[vincentfretin]Use start and end indexes for held_position.
[sgeulette]1.8 (2016-03-31)Hide contact types from the navigation.
[pcdummy]Sort sub organizations by folder position in organization view
[sgeulette]1.7 (2016-03-04)Do not hide token column in edit mode
[sgeulette]Expose person_title in held_position
[ebrehault]1.6 (2015-11-24)Fix slave field creation button for held positions
[ebrehault]Fix organization searchable text when related organizations
[ebrehault]Allow reorder on directory fields
[cedricmessiant]Fix prelabel_for_portal_type signature.
Some javascript fixes or improvements.
[vincentfretin]Use different views/schemas for different use cases for add-contact widget
[cedricmessiant]1.5 (2015-06-02)Feature: Display held positions start date and end date on organization view.
[cedricmessiant]Feature: Add custom settings to override prelabel and label of the ‘Create’ link in widget.
[cedricmessiant]Added italian translation
[keul]JSLint fixes (invalid commas)
[keul]1.4 (2015-04-03)Fix javascript that was disabled by error in addcontact view.Feature: Add parameter to choose if we want to use description to search
persons.
[cedricmessiant]UI: Turn phone numbers into clickable tel: links.
[jazwsophie]Feature: Add parameter to choose if we want to use held positions to search
persons.
[cedricmessiant]1.3 (2014-09-11)Feature: Simple validator for phone number.
[thomasdesvenain]UI: If website doesn’t start with http, addhttp://at its beginning.
[cedricmessiant]UI: Open external web site in a new window.
[vincentfretin]UI: Avoid the contact information of a person be displayed two times
when it fall backs from organization or function.
[thomasdesvenain]UI: If a contact field is dependent to a position or an organization,
we update ‘add new’ link of the contact field
so that the ‘position’ or ‘organization’ field is pre-selected in the overlay.
[thomasdesvenain]UI: use classes instead of ids on address because it can be used
several times on the same page.
[thomasdesvenain]API: added a nonfallbackcontactdetails view that displays only direct contact details.
Useful when you want to display contact details of a contact and contact details
of objects it is related to on the same page: it avoids double displays.
Apply it on held positions view.
[thomasdesvenain]Fix: If held position implements IContactDetails behavior,
then show contact details fields on add contact form.
[thomasdesvenain]Fix: If ‘use parent address’ has been selected,
ensure content address fields are cleared.
[thomasdesvenain]Fix: Hide use parent address:works in overlays,always display use parent address on held position if it implements contact details.[thomasdesvenain]Fix: Avoid failure on person
if for any reason person title, firstname or lastname attribute is not set.
[thomasdesvenain]Fix: Switch street and additional data on address view.
[thomasdesvenain]Fix: address fallback in excel export.
[thomasdesvenain]Fix: VCard - avoid failure if no ‘person_title’ is set on content.
[thomasdesvenain]Fix: Contact might not have any aq_parent
[ebrehault]Hide ‘Use parent address’ checkbox only if it is not checked and if parent
address is empty
[ebrehault]1.2 (2014-06-16)Contact details of a person fallbacks to person’s main position
get from IPersonHeldPositions adapter.
[thomasdesvenain]Added an IPersonHeldPositions adapter that gets positions sorted by status :
a main position, all current positions, closed positions.
[thomasdesvenain]Sort get_held_positions on organization.
[cedricmessiant]Add plone.abovecontenttitle viewlet manager to person, organization, position
and contact (held_position) views.
[vincentfretin]js functions have a namespace.
[thomasdesvenain]Add an api to make dependencies between a contact field and an other one.
(needs collective.contact.widget >= 1.2)
[thomasdesvenain]Add parameter to choose if we want to display person title in person’s displayed title.
[cedricmessiant]Tools for excel export with collective.excelexport:
- renderer for contact field,
- exportable to show person infos on held_position export.
[thomasdesvenain]1.1 (2014-03-11)Remove meta_type override because it breaks copy support.
[thomasdesvenain]Fix if for any reason use_parent_address is True, content has an address and
has no parent with an address.
[thomasdesvenain]Add help messages on add contact form.
[thomasdesvenain]Display more information about “other contacts” in organization view.
[cedricmessiant]Add ICustomSettings adapter lookup in widget settings utility to be
able to overrides add_url_for_portal_type method in some projects.
[vincentfretin]Rewrite every contact content view in separate views (basefields, contactdetails, etc) so
that we can override only a specific part of the view in customer projects.
[cedricmessiant]Rename all contact content views to “view”.
[cedricmessiant]Add hcard microformat (seehttp://microformats.org/wiki/hcard) for person and organization.
[cedricmessiant]Use a macro to display contact details.
[thomasdesvenain]Manage case users have uploaded non-image formats for logo or photo.
[thomasdesvenain]Display behavior fields on contactable views
once they are in default fieldset.
[thomasdesvenain]Fixed: keep order of TTW fields displayed on view pages.
[thomasdesvenain]Add tooltip overviews for held positions, persons, positions and organizations.
[cedricmessiant]Use thumb scale for logos and photos.
[cedricmessiant]Add icon for ‘Create Contact’ link on position and organization pages.
[cedricmessiant]Customize sortable_title indexer for Person and Held Position
and add a corresponding brain
metadata (to enable use of this index in collective.contact.facetednav
alphabetic search widget).
[cedricmessiant]A content that just implements IContactDetails behavior
is adaptatable to IContactable and have a VCal export.
[thomasdesvenain]We can hide Use parent address field using a permission:
“collective.contact.core.UseParentAddress”
So it is possible to remove this feature via rolemap
or remove it on some content types via workflow.
[thomasdesvenain]Don’t crash when deleting position or organization if a held position is
associated with it. Show relations that will be broken
(plone.app.linkintegrity integration).
[vincentfretin]Fix ObjectModifiedEvent subscribers to not reindex if event is
a ContainerModifiedEvent.
[vincentfretin]Don’t show use_parent_address checkbox if there is no parent address.
[cedricmessiant]Fix parent address in add forms.
[cedricmessiant]Add more robot framework tests.
[cedricmessiant]Add ‘Create Contact’ link on position view.
[cedricmessiant]Use full title instead of Title in position view title.
[cedricmessiant]Show organization’s and root organization’s name in position’s full title.
[cedricmessiant]Add first organization title in held position’s title.
[cedricmessiant]Added logo and activity rich field on organization type.
[thomasdesvenain]Fixed generate id from title on held positions and persons.
[thomasdesvenain]When we get the address of a contact, if the most direct address is empty,
look for the next.
[thomasdesvenain]Added Fax and Website fields to IContactDetails and IContactable.
[thomasdesvenain]Fixed javascript in @@add-organization view.
[vincentfretin]Fixed use parent address if we set Contact Details behaviour on held positions.
[thomasdesvenain]Add vCard support to organizations
[ebrehault]1.0 (2013-09-13)Birthday is now optional as a behaviour.
[thomasdesvenain]Use (-200, 1) years range for birthday field.
[vincentfretin]“Add new” popup link is renamed from “Add …” to “Create …”
[thomasdesvenain]New behaviour to add a “Related organizations” field on a content type.
[thomasdesvenain]Plain text search improvements:we can find persons with organization names, functions names,the same for held positions,indexation is updated when organization or function changes[thomasdesvenain]Messages that document better the organization / position held position
adding process.
[thomasdesvenain]Display position label in title of held position view page.
[thomasdesvenain]Added an additional input text label to held positions,
used on titles if held_position is directly related to an organization.
[thomasdesvenain]Display contacts on organization page.
[thomasdesvenain]We can find a function with the organization name.
[thomasdesvenain]Fixed field customization view.
[vincentfretin, thomasdesvenain]Fixed held_position field showing in Add contact overlay if Plone site id
is different of Plone.
[vincentfretin]Added workflows for contact objects.
[cedricmessiant]0.11 (2013-03-11)Fixed bug with default views.
[cedricmessiant]0.10 (2013-03-07)Fixed MANIFEST.in
[cedricmessiant]0.9 (2013-03-07)Initial release
[cedricmessiant]