{#- A custody plugin's Account links (spec/plugin-pages-follow-their-role): notices, then the kit's account map -- the external accounts reported beside the accounts granted to this instance, linked with "Link" -- then the vendor's sections. `data` is a meridian.roles.custody.AccountLinksRead; `action`, where the map's forms post, the plugin's linking route. Optional, each with its default: `map`, the JSON object handed to the account map, its accounts' extra fields (number, custodian, account_type, note, connection, connection_id, open) passed through untouched -- built from `data` when not given; `group_by`, the map's grouping to start with (none); `link_several`, whether its handler takes several links in one form (false); `no_new_account`, whether no new account is offered (true unless the person is a deployment admin). The map pages as many rows as fit the screen (`page-size="auto"`), and where `link_account` is in `caller.second_pair_of_eyes` it takes `prepare`, so its Link is Prepare. The plain table the map holds for a browser without the kit is `vendor_rows`'s, which a plugin may replace with its own forms. -#} {% extends "meridian/base.html" %} {% import "meridian/roles/_rows.html" as om %} {% block content %} {% if not data.accounts %} {% if caller.deployment_admin %} {{ om.next_step("No accounts granted yet", "A deployment admin grants this plugin the accounts it may link to, in the admin portal's Accounts tab.") }} {% else %} {{ om.next_step("No accounts granted yet", "A deployment admin grants this plugin the accounts it may link to. Ask a deployment admin to grant some.") }} {% endif %} {% endif %} {{ om.second_pair_of_eyes("link_account", caller) }} {% block vendor_notices %}{% endblock %} {% set no_new = no_new_account if no_new_account is defined else not caller.deployment_admin %} {% set handed = map if map is defined else {"external_accounts": data.external_accounts|map("om_record")|list, "accounts": data.accounts|map("om_record")|list, "links": data.links|map("om_record")|list} %} {% block vendor_rows scoped %} {% for account in data.external_accounts %} {% set link = data.links|selectattr("external_account_id", "equalto", account.external_account_id)|first %} {% endfor %}
External accountLinked to
{{ account.name or account.external_account_id }}{% if account.detail or account.account_type %} {{ [account.detail, account.account_type]|select|join(", ") }}{% endif %}{{ link.account_name if link else "Not linked" }}
{% endblock %}
{% block vendor_sections %}{% endblock %} {% endblock %}