src/pyams_security/views/templates/social-login.pt
changeset 2 94e76f8e9828
parent 0 f04e1d0a0723
child 36 10fee8fa82f6
--- a/src/pyams_security/views/templates/social-login.pt	Sun Feb 22 14:52:32 2015 +0100
+++ b/src/pyams_security/views/templates/social-login.pt	Mon Feb 23 17:55:05 2015 +0100
@@ -4,7 +4,14 @@
 		  data-ams-plugin-pyams_security-src="/--static--/pyams_security/js/security.js"
 		  data-ams-plugin-pyams_security-callback="PyAMS_security.init_social"></span>
 	<span>Login with: </span>
-	<a class="authomatic" href="/login/facebook">Facebook</a>
-	<a class="authomatic" href="/login/twitter">Twitter</a>
-	<a class="authomatic" href="/login/google">Google</a>
+	<tal:loop repeat="provider view.providers">
+		<a class="authomatic hint"
+		   data-ams-hint-gravity="n"
+		   tal:define="config provider.get_configuration()"
+		   tal:attributes="title config.name;
+						   href string:/login/${provider.provider_name}">
+			<img width="16" height="16"
+				 tal:attributes="src string:/--static--/pyams_security/img/${config.icon_filename}" />
+		</a>
+	</tal:loop>
 </div>