Add basic functionality for self-registration.
[cas.git] / src / accounts / templates / account / profile.html
index 46f5686..3845526 100644 (file)
@@ -1,19 +1,26 @@
 {% extends "base.html" %}
-{% load gravatar i18n %}
+{% load libravatar_tags i18n %}
 
 {% block content %}
-       <div class="user_avatar">
-               <img src="{% gravatar request.user.email 120 %}">
-               <p><a href="{% url cas_provider.views.logout %}">{% trans "Logout" %}</a></p>
-       </div>
+       <aside class="user_avatar">
+        <a href="https://avatars.nowoczesnapolska.org.pl/" title="{% trans 'How to change the avatar?' %}">
+               <img src="{% libravatar request.user.email 120 %}"
+            alt="Libravatar"></a>
+               <p><a href="{% url 'cas_provider.views.logout' %}">{% trans "Logout" %}</a></p>
+
+    <p><small><a href="{% url 'socialaccount_connections' %}">{% trans "Manage external accounts" %}</a></small></p>
+       </aside>
 
        <div id="details">
                {% if messages %}
-                       <p>{% for message in messages %}<span class="message">{{ message }}</span>{% endfor %}</p>
+            <section id="messages">
+                {% for message in messages %}<p>{{ message }}</p>{% endfor %}
+            </section>
        {% endif %}
 
-               <h2>{% trans "Your profile" %}</h2>
+    <h2>{% trans "Your profile" %}</h2>
     <form method="post" action="/accounts/change_profile">
+    {% csrf_token %}
        <table>
                {{ basic_form.as_table }}
                        <tr><td colspan="2"><button type="submit">{% trans "Change profile" %}</button></td></tr>
        </form>
 
        <h2>{% trans "Password change" %}</h2>
-       <form method="post" action="/accounts/change_password">
-       <table>
-               {{ pass_form.as_table }}
-               <tr><td colspan="2"><button type="submit">{% trans "Change password" %}</button></td></tr>
-               </table>
-       </form>
-       </div>
+    <a href="{% url 'account_change_password' %}">Zmień hasło</a>
 
-       <div id="services-list">
-               <h2>{% trans "Availble services" %}</h2>
-               <a href="http://redakcja.nowoczesnapolska.org.pl/">
-                       <img src="http://www.nowoczesnapolska.org.pl/wordpress/wp-content/uploads/2008/11/wl-logo-white.png">
-               </a>
-               <a href="http://redmine.nowoczesnapolska.org.pl/">
-                       <img src="{{ MEDIA_URL }}static/redmine_logo.png">
-               </a>
        </div>
+
+
+    {% if services %}
+       <section id="services-list">
+        <h1>{% trans "Sign in to:" %}</h1>
+        {% for service in services %}
+            <a href="{{ service.url }}" title="{{ service.name }}">
+                <img src="{{ service.image.url }}" alt="{{ service.name }}">
+            </a>
+        {% endfor %}
+       </section>
+    {% endif %}
 {% endblock %}