Templates and imports cleanup
authorThierry Florac <thierry.florac@onf.fr>
Tue, 26 Mar 2019 12:33:58 +0100
changeset 1299 1a307e6b9432
parent 1298 51fb637ace75
child 1300 95f7277fa500
Templates and imports cleanup
src/pyams_content/features/renderer/zmi/templates/renderer-input.pt
src/pyams_content/features/renderer/zmi/widget.py
--- a/src/pyams_content/features/renderer/zmi/templates/renderer-input.pt	Tue Mar 26 11:44:28 2019 +0100
+++ b/src/pyams_content/features/renderer/zmi/templates/renderer-input.pt	Tue Mar 26 12:33:58 2019 +0100
@@ -1,12 +1,12 @@
 <label class="input bordered with-icon" i18n:domain="pyams_content">
 	<tal:var define="render view/show_renderer_properties">
-		<i class="icon-append fa fa-fw fa-pencil-square-o text-primary inverted hint align-base opaque"
+		<i tal:condition="render"
+			class="icon-append fa fa-fw fa-pencil-square-o text-primary inverted hint align-base opaque"
 			title="Edit renderer properties" i18n:attributes="title"
 			data-ams-hint-gravity="se" data-toggle="modal"
-			tal:condition="render"
-			tal:attributes="data-ams-url tales:absolute_url(context, 'renderer-properties.html');"></i>
-		<i class="icon-append fa fa-fw fa-pencil-square-o opacity-25"
-			tal:condition="not:render"></i>
+			data-ams-url="${tales:absolute_url(context, 'renderer-properties.html')"></i>
+		<i tal:condition="not:render"
+			class="icon-append fa fa-fw fa-pencil-square-o opacity-25"></i>
 	</tal:var>
 	<div class="select2-parent">
 		<select class="select2"
--- a/src/pyams_content/features/renderer/zmi/widget.py	Tue Mar 26 11:44:28 2019 +0100
+++ b/src/pyams_content/features/renderer/zmi/widget.py	Tue Mar 26 12:33:58 2019 +0100
@@ -12,17 +12,12 @@
 
 __docformat__ = 'restructuredtext'
 
+from z3c.form.interfaces import INPUT_MODE
+from z3c.form.widget import FieldWidget
 
-# import standard library
-
-# import interfaces
 from pyams_content.features.renderer.interfaces import IContentRenderer
 from pyams_form.interfaces.form import IFormLayer
-from z3c.form.interfaces import INPUT_MODE
-
-# import packages
 from pyams_form.widget import Select2Widget, widgettemplate_config
-from z3c.form.widget import FieldWidget
 
 
 @widgettemplate_config(mode=INPUT_MODE, template='templates/renderer-input.pt', layer=IFormLayer)