{% extends "mvp/account/overview.html" %}
{% load i18n dac_allauth %}
{% comment %}
The allauth cards on the Account Center's landing page.
This extends the template name it is itself saved under. Django resolves that
to the next template of the name along the loader path rather than back to
this file, so several apps can each ship one and chain through
{{ block.super }}, ending at django-mvp's own copy. For this one to be
reached at all, "dac.allauth" must come before "mvp" in INSTALLED_APPS: the
loader returns the first match, and an app listed after mvp never renders.
Everything the cards say comes from one {% account_summary %} call. There is
no view behind them and nothing is passed to them — the block shares the
surrounding page's context, and the tag reads the person out of it.
A section is None when its allauth app is not installed, so `{% if account.mfa %}`
asks whether the project has two-factor at all and `account.mfa.enabled` asks
whether this person turned it on.
{% endcomment %}
{% block account.cards %}
{{ block.super }}
{% account_summary as account %}
{% if account.unverified_email_count %}
{% endif %}
{% for emailaddress in account.emails %}
{{ emailaddress.email }}
{% if emailaddress.primary %}
{% endif %}
{% if emailaddress.verified %}
{% else %}
{% endif %}
{% empty %}
{% endfor %}
{% if account.has_password %}
{% else %}
{% endif %}
{% if account.has_password %}
{% else %}
{% endif %}
{% if account.social %}
{% for socialaccount in account.social.accounts %}