# HG changeset patch
# User Thierry Florac
# Date 1539782839 -7200
# Node ID 6815147a533f5714d9e3b199fae38e1a5400072c
# Parent f543e56f0d07784706fcc507e1205839c2878ea8
Use default prefix in attachments list
diff -r f543e56f0d07 -r 6815147a533f src/pyams_default_theme/component/association/templates/association-viewlet.pt
--- a/src/pyams_default_theme/component/association/templates/association-viewlet.pt Tue Oct 16 11:16:57 2018 +0200
+++ b/src/pyams_default_theme/component/association/templates/association-viewlet.pt Wed Oct 17 15:27:19 2018 +0200
@@ -1,4 +1,21 @@
-
-
-
-
- ${structure:tales:html(description)}
-
-
-
- ${item_info.user_title}
-
-
-
-
diff -r f543e56f0d07 -r 6815147a533f src/pyams_default_theme/component/association/viewlet.py
--- a/src/pyams_default_theme/component/association/viewlet.py Tue Oct 16 11:16:57 2018 +0200
+++ b/src/pyams_default_theme/component/association/viewlet.py Wed Oct 17 15:27:19 2018 +0200
@@ -16,8 +16,9 @@
from pyams_skin.layer import IPyAMSUserLayer
from pyams_content.component.association.interfaces import IAssociationContainer, IAssociationInfo
-from pyams_content.component.extfile.interfaces import IExtFile
+from pyams_content.component.extfile.interfaces import IExtFile, IExtFileManagerInfo
from pyams_content.component.links.interfaces import IBaseLink
+from pyams_i18n.interfaces import II18n
from pyams_template.template import template_config
from pyams_viewlet.viewlet import ViewContentProvider, contentprovider_config
@@ -49,3 +50,9 @@
self.attachments.append(item)
elif IBaseLink.providedBy(item):
self.links.append(item)
+
+ @property
+ def attachments_title_prefix(self):
+ manager_info = IExtFileManagerInfo(self.request.root, None)
+ if manager_info is not None:
+ return II18n(manager_info).query_attribute('default_title_prefix', request=self.request)