# HG changeset patch # User Thierry Florac # Date 1518191377 -3600 # Node ID 51377db3e7236c144a1a0f22fae38fdc7fc95330 # Parent 01d0a17753d02ecaa6ccd73cb59832335597d521 Added title to paragraph summary diff -r 01d0a17753d0 -r 51377db3e723 src/pyams_content/shared/imagemap/zmi/paragraph.py --- a/src/pyams_content/shared/imagemap/zmi/paragraph.py Fri Feb 09 16:08:59 2018 +0100 +++ b/src/pyams_content/shared/imagemap/zmi/paragraph.py Fri Feb 09 16:49:37 2018 +0100 @@ -164,5 +164,12 @@ language = None + def update(self): + i18n = II18n(self.context) + if self.language: + setattr(self, 'title', i18n.get_attribute('title', self.language, request=self.request)) + else: + setattr(self, 'title', i18n.query_attribute('title', request=self.request)) + def get_item_info(self, item): return IAssociationInfo(item, None) diff -r 01d0a17753d0 -r 51377db3e723 src/pyams_content/shared/imagemap/zmi/templates/paragraph-summary.pt --- a/src/pyams_content/shared/imagemap/zmi/templates/paragraph-summary.pt Fri Feb 09 16:08:59 2018 +0100 +++ b/src/pyams_content/shared/imagemap/zmi/templates/paragraph-summary.pt Fri Feb 09 16:49:37 2018 +0100 @@ -1,3 +1,4 @@ +

title