Updated links template
authorThierry Florac <tflorac@ulthar.net>
Tue, 22 Jan 2019 14:27:31 +0100
changeset 389 ff9d82c2d216
parent 388 f5521cdc0207
child 390 f2c646b0ddbf
Updated links template
src/pyams_default_theme/component/association/templates/association-viewlet.pt
--- a/src/pyams_default_theme/component/association/templates/association-viewlet.pt	Mon Jan 21 17:45:21 2019 +0100
+++ b/src/pyams_default_theme/component/association/templates/association-viewlet.pt	Tue Jan 22 14:27:31 2019 +0100
@@ -18,19 +18,15 @@
 		</tal:var>
 	</li>
 	<li tal:repeat="link view.links">
-		<tal:var define="link_info view.get_link_info(link);
-						 description i18n:link.description;">
-			<p>
-				<tal:if condition="description">
-					${structure:tales:html(description, renderer_style)}
-					<br tal:condition="view.description_format == 'text'" />
-				</tal:if>
-				<a tal:define="href link.get_url(request);
-							   target None if href.startswith(request.application_url) else '_blank'"
-				   href="${href}" target="${target}">
-					${link_info.user_title}
-				</a>
-			</p>
-		</tal:var>
+		<p tal:define="link_info view.get_link_info(link);
+					   description i18n:link.description;">
+			<tal:if condition="description">
+				${structure:tales:html(description, renderer_style)}
+				<br tal:condition="view.description_format == 'text'" />
+			</tal:if>
+			<a tal:define="href link.get_url(request);
+						   target None if (href.startswith('mailto:') or href.startswith(request.application_url)) else '_blank'"
+			   href="${href}" target="${target}">${link_info.user_title}</a>
+		</p>
 	</li>
 </ul>