--- a/src/pyams_portal/zmi/container.py Sat Jan 27 00:22:30 2018 +0100
+++ b/src/pyams_portal/zmi/container.py Sat Jan 27 00:23:57 2018 +0100
@@ -35,6 +35,7 @@
from pyams_skin.table import DefaultElementEditorAdapter, BaseTable, NameColumn, TrashColumn
from pyams_skin.viewlet.menu import MenuItem
from pyams_utils.adapter import adapter_config, ContextRequestViewAdapter
+from pyams_utils.fanstatic import get_resource_path
from pyams_utils.registry import query_utility
from pyams_utils.traversing import get_parent
from pyams_utils.url import absolute_url
@@ -47,7 +48,7 @@
from z3c.form import field
from zope.interface import implementer, Interface
-from pyams_portal import _
+from pyams_portal import _, pyams_portal, pyams_portal_css
#
@@ -89,11 +90,12 @@
def data_attributes(self):
manager = query_utility(IPortalTemplateContainer)
attributes = super(PortalTemplateContainerTable, self).data_attributes
- table_attrs = {'data-ams-location': absolute_url(manager, self.request),
- 'data-ams-plugins': 'pyams_workflow pyams_portal',
- 'data-ams-plugin-pyams_workflow-src': "/--static--/pyams_workflow/js/workflow{MyAMS.devext}.js",
- 'data-ams-plugin-pyams_portal-src': "/--static--/pyams_portal/js/portal{MyAMS.devext}.js",
- 'data-ams-plugin-pyams_portal-css': "/--static--/pyams_portal/css/portal{MyAMS.devext}.css"}
+ table_attrs = {
+ 'data-ams-location': absolute_url(manager, self.request),
+ 'data-ams-plugins': 'pyams_portal',
+ 'data-ams-plugin-pyams_portal-src': get_resource_path(pyams_portal),
+ 'data-ams-plugin-pyams_portal-css': get_resource_path(pyams_portal_css)
+ }
if 'table' in attributes:
attributes['table'].update(table_attrs)
else: