# HG changeset patch # User Thierry Florac # Date 1542724817 -3600 # Node ID a6429e91f09105f3d61b39ecec2a80dc75761de4 # Parent 829f481fe2a6ca73fd1e44d5ae1240e0c8054018# Parent df8da54d790ab5584bc9d379a1f0c763ec64d65e Added custom label to contact card link button diff -r df8da54d790a -r a6429e91f091 docs/HISTORY.txt --- a/docs/HISTORY.txt Tue Nov 20 15:19:28 2018 +0100 +++ b/docs/HISTORY.txt Tue Nov 20 15:40:17 2018 +0100 @@ -1,6 +1,10 @@ History ======= +0.1.17 +------ + - added customizable label to contact button + 0.1.16 ------ - added results internal OID into view's preview diff -r df8da54d790a -r a6429e91f091 src/pyams_default_theme/component/paragraph/interfaces/contact.py --- a/src/pyams_default_theme/component/paragraph/interfaces/contact.py Tue Nov 20 15:19:28 2018 +0100 +++ b/src/pyams_default_theme/component/paragraph/interfaces/contact.py Tue Nov 20 15:40:17 2018 +0100 @@ -12,17 +12,12 @@ __docformat__ = 'restructuredtext' - -# import standard library - -# import interfaces - -# import packages -from zope.interface import Interface, Attribute +from zope.interface import Attribute, Interface from zope.schema import Bool, Choice -from zope.schema.vocabulary import SimpleVocabulary, SimpleTerm +from zope.schema.vocabulary import SimpleTerm, SimpleVocabulary from pyams_i18n.schema import I18nTextLineField + from pyams_default_theme import _ @@ -62,7 +57,7 @@ can_display_map = Attribute("Check if location map can be displayed") - button_label = I18nTextLineField(title=_("Button label"), - description=_("Label of the navigation button displayed by " + button_label = I18nTextLineField(title=_("Contact button label"), + description=_("Custom label of the contact button displayed by " "front-office template"), required=False) diff -r df8da54d790a -r a6429e91f091 src/pyams_default_theme/component/paragraph/templates/contact-default.pt --- a/src/pyams_default_theme/component/paragraph/templates/contact-default.pt Tue Nov 20 15:19:28 2018 +0100 +++ b/src/pyams_default_theme/component/paragraph/templates/contact-default.pt Tue Nov 20 15:40:17 2018 +0100 @@ -23,8 +23,9 @@ Contact email: - - ${view.contact_email} + + ${button_label or view.contact_email}