Include public profile avatar
authorThierry Florac <thierry.florac@onf.fr>
Wed, 07 Oct 2015 17:58:51 +0200
changeset 89 5eee812ae968
parent 88 8621c907c243
child 90 2c75cd01d282
Include public profile avatar
src/pyams_skin/templates/layout.pt
--- a/src/pyams_skin/templates/layout.pt	Wed Oct 07 17:55:35 2015 +0200
+++ b/src/pyams_skin/templates/layout.pt	Wed Oct 07 17:58:51 2015 +0200
@@ -1,6 +1,6 @@
 <!DOCTYPE html>
 <html lang="fr"
-	  tal:define="config extension:configuration;
+	  tal:define="config extension:back_configuration;
 				  static extension:static_configuration;
 				  userid request.authenticated_userid;"
 	  tal:attributes="lang request.locale_name">
@@ -9,8 +9,6 @@
 	<meta charset="utf-8">
 
 	<title tal:content="config.title"></title>
-	<meta name="description" tal:attributes="content config.description">
-	<meta name="author" tal:attributes="content config.author">
 
 	<meta name="HandheldFriendly" content="True">
 	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
@@ -80,7 +78,13 @@
 				<!-- User login name and status -->
 				<span>
 					<span id="activity" class="activity-dropdown" tal:condition="userid">
-						<i class="fa fa-user"></i>
+						<tal:var define="profile extension:public_profile(request)">
+							<tal:if condition="profile.avatar">
+								<img tal:define="src extension:absolute_url(profile.avatar)"
+									 tal:attributes="src string:${src}/++thumb++square:24x24.png" />
+							</tal:if>
+							<i tal:condition="not:profile.avatar" class="fa fa-user"></i>
+						</tal:var>
 						<b class="badge hidden">0</b>
 					</span>