Templates updated to display null values ZTK-1.1
authorThierry Florac <tflorac@ulthar.net>
Tue, 13 Nov 2012 16:03:37 +0100
branchZTK-1.1
changeset 189 c9ce3999f76b
parent 188 694af148f557
child 190 5152d59c147c
Templates updated to display null values
src/ztfy/utils/browser/templates/textlinelist_display.pt
--- a/src/ztfy/utils/browser/templates/textlinelist_display.pt	Wed Oct 31 14:19:43 2012 +0100
+++ b/src/ztfy/utils/browser/templates/textlinelist_display.pt	Tue Nov 13 16:03:37 2012 +0100
@@ -1,34 +1,37 @@
-<input type="text"
-	tal:attributes="id view/id;
-					name view/name;
-					class view/klass;
-					style view/style;
-					title view/title;
-					value view/value;
-					lang view/lang;
-					onclick view/onclick;
-					ondblclick view/ondblclick;
-					onmousedown view/onmousedown;
-					onmouseup view/onmouseup;
-					onmouseover view/onmouseover;
-					onmousemove view/onmousemove;
-					onmouseout view/onmouseout;
-					onkeypress view/onkeypress;
-					onkeydown view/onkeydown;
-					onkeyup view/onkeyup;
-					disabled view/disabled;
-					tabindex view/tabindex;
-					onfocus view/onfocus;
-					onblur view/onblur;
-					onchange view/onchange;
-					readonly view/readonly;
-					accesskey view/accesskey;
-					onselect view/onselect;" />
-<script type="text/javascript" tal:content="string:
-	$$().ready(function() {
-		$$('INPUT[id=${view/id}]').multiselect({
-			separator: '|',
-			readonly: true
-		});
-	});">
-</script>
\ No newline at end of file
+<tal:if condition="view/value">
+	<input type="text"
+		tal:attributes="id view/id;
+						name view/name;
+						class view/klass;
+						style view/style;
+						title view/title;
+						value view/value;
+						lang view/lang;
+						onclick view/onclick;
+						ondblclick view/ondblclick;
+						onmousedown view/onmousedown;
+						onmouseup view/onmouseup;
+						onmouseover view/onmouseover;
+						onmousemove view/onmousemove;
+						onmouseout view/onmouseout;
+						onkeypress view/onkeypress;
+						onkeydown view/onkeydown;
+						onkeyup view/onkeyup;
+						disabled view/disabled;
+						tabindex view/tabindex;
+						onfocus view/onfocus;
+						onblur view/onblur;
+						onchange view/onchange;
+						readonly view/readonly;
+						accesskey view/accesskey;
+						onselect view/onselect;" />
+	<script type="text/javascript" tal:content="string:
+		$$().ready(function() {
+			$$('INPUT[id=${view/id}]').multiselect({
+				separator: '|',
+				readonly: true
+			});
+		});">
+	</script>
+</tal:if>
+<span tal:condition="not:view/value">--</span>
\ No newline at end of file