Code layout change.
[wolnelektury.git] / src / wolnelektury / templates / socialaccount / snippets / provider_list.html
diff --git a/src/wolnelektury/templates/socialaccount/snippets/provider_list.html b/src/wolnelektury/templates/socialaccount/snippets/provider_list.html
new file mode 100644 (file)
index 0000000..80f9c2f
--- /dev/null
@@ -0,0 +1,22 @@
+{% load socialaccount %}
+{% load static from staticfiles %}
+
+{% for provider in socialaccount.providers %}
+    {% if provider.id == "openid" %}
+        {% for brand in provider.get_brands %}
+            <li>
+                <a title="{{brand.name}}" 
+                    class="socialaccount_provider {{provider.id}} {{brand.id}}" 
+                    href="{% provider_login_url provider.id openid=brand.openid_url %}"
+                    ><img alt="{{ brand.name }}"
+                        src="{% static 'img/auth/'|add:brand.id|add:'.png' %}" /></a>
+            </li>
+        {% endfor %}
+    {% endif %}
+    <li>
+        <a title="{{provider.name}}" class="socialaccount_provider {{provider.id}}" 
+            href="{% provider_login_url provider.id %}"
+            ><img alt="{{ provider.name }}"
+                src="{% static 'img/auth/'|add:provider.id|add:'.png' %}" /></a>
+    </li>
+{% endfor %}