add template for account management

This commit is contained in:
Frédéric Péters 2015-03-09 17:20:07 +01:00
parent f70373e0b1
commit caf7b76d29
1 changed files with 64 additions and 0 deletions

View File

@ -0,0 +1,64 @@
{% extends "base.html" %}
{% load i18n %}
{% block title %}
{% trans "Account Management" %}
{% endblock %}
{% block content %}
<div id="left">
<div class="block">
<h2>{% trans "Profile" %}</h2>
<div id="profile">
{% if profile %}
<dl>
{% for key, values in profile %}
<dt>{{ key|capfirst }}</dt>
<dd>{% if values|length == 1 %}{{ values.0 }}{% else %}
<ul>
{% for value in values %}
<li>{{ value }}</li>
{% endfor %}
</ul>
{% endif %}
</dd>
{% endfor %}
</dl>
{% endif %}
</div>
</div>
<div class="block">
<h2>{% trans "Account Management" %}</h2>
<ul class="account-management">
<li><a href="{% url 'email-change' %}">{% trans "Change email" %}</a></li>
<li><a href="{% url 'profile_edit' %}">{% trans "Edit profile" %}</a></li>
<li><a href="{% url 'delete_account' %}">{% trans "Delete profile" %}</a></li>
</ul>
</div>
</div>
<div id="right">
{% if federation_management %}
<div class="block" id="federation-management">
<h2>{% trans "Federation management" %}</h2>
<ul>
{% for federation in federation_management %}
<li>
<form method="post" action="{{ federation.url }}">
{% csrf_token %}
<span class="name">{{ federation.name }}</span>
{% for key, value in federation.hidden_inputs.iteritems %}
<input type="hidden" name="{{ key }}" value="{{ value }}"/>
{% endfor %}
{% for button_name, button_label in federation.buttons %}
<button name="{{ button_name }}" class="{{ button_name }}">{{ button_label }}</button>
{% endfor %}
</form>
</li>
{% endfor %}
</ul>
</div>
{% endif %}
</div>
<br class="clear" />
{% endblock %}