Updated header template
authorThierry Florac <tflorac@ulthar.net>
Wed, 12 Dec 2018 14:40:56 +0100
changeset 1158 ae370f498f04
parent 1157 ffb751b038cc
child 1159 fc062f9e32c0
Updated header template
src/pyams_content/shared/common/zmi/templates/header.pt
--- a/src/pyams_content/shared/common/zmi/templates/header.pt	Wed Dec 12 11:14:55 2018 +0100
+++ b/src/pyams_content/shared/common/zmi/templates/header.pt	Wed Dec 12 14:40:56 2018 +0100
@@ -1,36 +1,36 @@
 <tal:block i18n:domain="pyams_content"
 		   define="config tales:back_configuration">
 	<tal:if condition="config.display_shared_tool_title">
-		<h1 class="page-title margin-bottom-5" tal:define="back_url view.back_url">
-			<a class="font-xs hint" data-ams-target="#content"
+		<h1 class="page-title margin-bottom-5"
+			tal:define="back_url view.back_url">
+			<a class="font-xs hint"
+			   href="${back_url}"
 			   title="Back to previous page" i18n:attributes="title"
-			   tal:attributes="href back_url;
-							   data-ams-target view.back_target;">
+			   data-ams-target="${view.back_target}">
 				<i class="fa fa-chevron-left padding-right-10"></i>
 			</a>
 			<tal:if condition="config.display_content_icon">
 				<i tal:attributes="class view.icon_class"></i>
 			</tal:if>
-			<tal:var content="view.title" />
+			${view.title}
 		</h1>
 	</tal:if>
-	<div tal:attributes="class 'margin-left-10 margin-bottom-5 padding-left-20' if config.display_shared_tool_title else 'margin-bottom-5 padding-left-10'">
-		<span class="bold content-oid" tal:content="view.oid">OID</span> :
-		<span class="bold content-title" tal:content="i18n:context.title">Title</span> |
-		<span class="content-owner" i18n:translate="">by <i18n:var name="owner" tal:content="view.owner" /></span>
-		<i data-ams-plugins="pyams_content"
+	<div class="${'margin-left-10 margin-bottom-5 padding-left-20' if config.display_shared_tool_title else 'margin-bottom-5 padding-left-10'}">
+		<span class="bold content-oid">${view.oid}</span> :
+		<span class="bold content-title">${i18n:context.title}</span> |
+		<span class="content-owner" i18n:translate="">by <i18n:var name="owner">${view.owner}</i18n:var></span>
+		<i class="fa fa-star${'' if view.favorite_content else '-o'} txt-color-blue hint opaque align-middle padding-left-10 padding-bottom-5"
+		   data-ams-plugins="pyams_content"
+		   data-ams-plugin-pyams_content-src="${tales:resource_path('pyams_content.zmi:pyams_content')}"
 		   data-ams-click-handler="PyAMS_content.profile.switchFavorite"
 		   data-ams-hint-gravity="w" title="Add/remove from favorites" i18n:attributes="title"
-		   tal:attributes="class 'fa fa-star{0} txt-color-blue hint opaque align-middle padding-left-10 padding-bottom-5'.format('' if view.favorite_content else '-o');
-						   data-ams-plugin-pyams_content-src tales:resource_path('pyams_content.zmi:pyams_content');
-						   data-sequence-oid view.hex_oid;"></i><br />
-		<span class="content-version" tal:content="string:V${view.version_id}">Version</span> =
-		<span class="content-state" tal:content="structure view.state">state</span> |
-		<span class="content-state-date" tal:content="view.state_date">state date</span>
+		   data-sequence-oid="${view.hex_oid}"></i><br />
+		<span class="content-version">V${view.version_id}</span> =
+		<span class="content-state">${structure:view.state}</span> |
+		<span class="content-state-date">${view.state_date}</span>
 		<tal:loop repeat="link view.versions_links">|
-			<a tal:attributes="class link['css_class'];
-							   href link['href'];"
-			   tal:content="link['title']">link</a>
+			<a class="${link['css_class']}"
+			   href="${link['href']}">${link['title']}</a>
 		</tal:loop>
 	</div>
 </tal:block>