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;
|
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 */
|
/* bits of responsive design */
|
||||||
|
|
||||||
@media screen and (max-width: 760px) {
|
@media screen and (max-width: 760px) {
|
||||||
|
|
|
@ -6,37 +6,58 @@
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div id="left"
|
<div id="left">
|
||||||
<div class="block">
|
<div class="block">
|
||||||
<h2>{% trans "Profile" %}</h2>
|
<h2>{% trans "Profile" %}</h2>
|
||||||
<div id="profile">
|
<div id="profile">
|
||||||
{% if profile %}
|
{% if profile %}
|
||||||
<dl>
|
<dl>
|
||||||
{% for key, values in profile %}
|
{% for key, values in profile %}
|
||||||
<dt>{{ key|capfirst }}</dt>
|
<dt>{{ key|capfirst }}</dt>
|
||||||
<dd>{% if values|length == 1 %}{{ values.0 }}{% else %}
|
<dd>{% if values|length == 1 %}{{ values.0 }}{% else %}
|
||||||
<ul>
|
<ul>
|
||||||
{% for value in values %}
|
{% for value in values %}
|
||||||
<li>{{ value }}</li>
|
<li>{{ value }}</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</dd>
|
</dd>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</dl>
|
</dl>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="right">
|
<div id="right">
|
||||||
<div class="block">
|
<div class="block">
|
||||||
<h2>{% trans "Account Management" %}</h2>
|
<h2>{% trans "Account Management" %}</h2>
|
||||||
<ul class="account-management">
|
<ul class="account-management">
|
||||||
<li><a href="{% url 'email-change' %}">{% trans "Change email" %}</a></li>
|
<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 'profile_edit' %}">{% trans "Edit profile" %}</a></li>
|
||||||
<li><a href="{% url 'delete_account' %}">{% trans "Delete profile" %}</a></li>
|
<li><a href="{% url 'delete_account' %}">{% trans "Delete profile" %}</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</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>
|
</div>
|
||||||
<br class="clear" />
|
<br class="clear" />
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
Reference in New Issue