X-Git-Url: https://git.mdrn.pl/cas.git/blobdiff_plain/6b6dbacd7a4c81cdb13a15825f8df2ecffe58375..9217713db2e16d23f9ba16f90db5e524b4cdabaa:/src/accounts/templates/account/profile.html diff --git a/src/accounts/templates/account/profile.html b/src/accounts/templates/account/profile.html index af04370..6c907cc 100644 --- a/src/accounts/templates/account/profile.html +++ b/src/accounts/templates/account/profile.html @@ -2,18 +2,23 @@ {% load gravatar 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"> + <img src="{% gravatar_url request.user.email 120 %}" + alt="Gravatar" + title="{% trans 'Change at Gravatar.com' %}"> + <p><a href="{% url 'cas_logout' %}">{% trans "Logout" %}</a></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> @@ -22,6 +27,7 @@ <h2>{% trans "Password change" %}</h2> <form method="post" action="/accounts/change_password"> + {% csrf_token %} <table> {{ pass_form.as_table }} <tr><td colspan="2"><button type="submit">{% trans "Change password" %}</button></td></tr> @@ -29,10 +35,14 @@ </form> </div> - <div id="services-list"> - <h2>{% trans "Availble services" %}</h2> - <a href="http://redakcja.wolnelektury.pl/"> - <img src="{{ MEDIA_URL }}static/platforma.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 %}