User profile page: only display providers if there are some
Someone uses uMap with classic auth username/password, and they don't want those empty HTML elements
This commit is contained in:
parent
25b3a66351
commit
a89e6622ed
1 changed files with 25 additions and 23 deletions
|
@ -19,30 +19,32 @@
|
|||
<input type="submit" value="{% trans 'Save' %}" />
|
||||
</form>
|
||||
</div>
|
||||
<div class="row">
|
||||
<h3>{% trans "Your current providers" %}</h3>
|
||||
<ul>
|
||||
{% for name in providers %}<li>{{ name|title }}</li>{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="row">
|
||||
<h3>{% trans "Connect to another provider" %}</h3>
|
||||
<p>
|
||||
{% blocktrans %}It's a good habit to connect your account to more than one provider, in case one provider becomes unavailable, temporarily or even permanently.{% endblocktrans %}
|
||||
</p>
|
||||
<div>
|
||||
<ul class="login-grid block-grid">
|
||||
{% for name in backends.backends %}
|
||||
{% if name not in providers %}
|
||||
<li>
|
||||
<a href="{% url "social:begin" name %}"
|
||||
class="umap-login-popup login-{{ name }}"
|
||||
title="{{ name|title }}"></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% if backends.backends|length %}
|
||||
<div class="row">
|
||||
<h3>{% trans "Your current providers" %}</h3>
|
||||
<ul>
|
||||
{% for name in providers %}<li>{{ name|title }}</li>{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<h3>{% trans "Connect to another provider" %}</h3>
|
||||
<p>
|
||||
{% blocktrans %}It's a good habit to connect your account to more than one provider, in case one provider becomes unavailable, temporarily or even permanently.{% endblocktrans %}
|
||||
</p>
|
||||
<div>
|
||||
<ul class="login-grid block-grid">
|
||||
{% for name in backends.backends %}
|
||||
{% if name not in providers %}
|
||||
<li>
|
||||
<a href="{% url "social:begin" name %}"
|
||||
class="umap-login-popup login-{{ name }}"
|
||||
title="{{ name|title }}"></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock maincontent %}
|
||||
|
|
Loading…
Reference in a new issue