Use "resource_path" TALES extension to get resource URL
authorThierry Florac <thierry.florac@onf.fr>
Tue, 16 May 2017 11:00:11 +0200
changeset 75 06d6babc5fd7
parent 74 57f97b550c57
child 76 e3c1ec4f3260
Use "resource_path" TALES extension to get resource URL
src/pyams_content/component/links/zmi/templates/widget-input.pt
src/pyams_content/component/links/zmi/templates/widget-list-input.pt
--- a/src/pyams_content/component/links/zmi/templates/widget-input.pt	Tue May 16 10:59:49 2017 +0200
+++ b/src/pyams_content/component/links/zmi/templates/widget-input.pt	Tue May 16 11:00:11 2017 +0200
@@ -1,6 +1,6 @@
 <label class="input bordered with-icon" i18n:domain="pyams_content"
 	   data-ams-plugins="pyams_content"
-	   data-ams-plugin-pyams_content-src="/--static--/pyams_content/js/pyams_content{MyAMS.devext}.js">
+	   tal:attributes="data-ams-plugin-pyams_content-src extension:resource_path('pyams_content.skin:pyams_content')">
 	<div class="btn-group icon-append">
 		<i class="fa fa-fw fa-bars txt-color-green opaque" data-toggle="dropdown"
 			tal:attributes="data-ams-select2-target view/name"></i>
--- a/src/pyams_content/component/links/zmi/templates/widget-list-input.pt	Tue May 16 10:59:49 2017 +0200
+++ b/src/pyams_content/component/links/zmi/templates/widget-list-input.pt	Tue May 16 11:00:11 2017 +0200
@@ -1,6 +1,6 @@
 <label class="input bordered with-icon" i18n:domain="pyams_content"
 	   data-ams-plugins="pyams_content"
-	   data-ams-plugin-pyams_content-src="/--static--/pyams_content/js/pyams_content{MyAMS.devext}.js">
+	   tal:attributes="data-ams-plugin-pyams_content-src extension:resource_path('pyams_content.skin:pyams_content')">
 	<div class="btn-group icon-append">
 		<i class="fa fa-fw fa-bars txt-color-green opaque" data-toggle="dropdown"
 			tal:attributes="data-ams-select2-target string:${view/name}:list"></i>