federation management block added to account management page.
Code indented Closes #5942
This commit is contained in:
parent
e5127c210f
commit
b1f56856d6
|
@ -907,6 +907,22 @@ ul.account-management li {
|
|||
margin: 0 1em;
|
||||
}
|
||||
|
||||
#federation-management li {
|
||||
list-style-type: none;
|
||||
margin: 5px 0;
|
||||
}
|
||||
|
||||
#federation-management li span.name {
|
||||
float: left;
|
||||
width: 20em;
|
||||
}
|
||||
|
||||
#federation-management li button {
|
||||
background: #f68423;
|
||||
border: none;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
/* bits of responsive design */
|
||||
|
||||
@media screen and (max-width: 760px) {
|
||||
|
|
|
@ -6,37 +6,58 @@
|
|||
{% 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 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>
|
||||
</div>
|
||||
|
||||
<div id="right">
|
||||
<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 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>
|
||||
{% 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 %}
|
||||
|
|
Reference in New Issue