{#- A custody plugin's Connections (spec/plugin-pages-follow-their-role): notices, then "Connections", a row each, then the vendor's sections. `data` is a meridian.roles.custody.ConnectionsRead, or the plugin's record extending it. "Refresh" and "Reconnect" on a row, as the vendor allows, go in `vendor_columns`. "Connect" is drawn in the Connections section's head, never the page's (no header action), where the vendor connects through a portal of its own: `action`, where its form posts -- or a list of the section head's actions, each a mapping in meridian/kit.html's `action` terms (`path`, `said`, and `label` and `kind` where given) naming its act by `tool_name` (SnapTrade's Connect and Refresh). An act in `caller.second_pair_of_eyes` is drawn as "Prepare", posting `prepare`, never as a plain make. -#} {% extends "meridian/base.html" %} {% import "meridian/kit.html" as kit %} {% import "meridian/roles/_rows.html" as om %} {% block content %} {% if data.credentials and not data.credentials|selectattr("set")|list %} {{ om.next_step("No credentials yet", "Enter them in", "settings", "Settings") }} {% endif %} {% block vendor_notices %}{% endblock %}
{% set actions = [] if action is not defined or not action else ([{"path": action, "said": "Connect"}] if action is string else action) %}

Connections

{%- if actions %}
{%- for each in actions %} {%- if each.tool_name and each.tool_name in caller.second_pair_of_eyes %}{{ kit.action(each.path, "Prepare", fields={"prepare": "1"}, label="Prepare: " ~ (each.label or each.said)) }} {%- else %}{{ kit.action(each.path, each.said, kind=each.kind or "", label=each.label or "") }} {%- endif %} {%- endfor %}
{% endif %}
{% if data.connections %} {% for row in [none] + data.connections %} {% if row is none %} {%- else %} {%- endif %} {% block vendor_columns scoped %}{% endblock %} {% if row is none %}{% else %}{% endif %} {% endfor %}
ConnectionStateAccounts reachedLast read
{{ row.connection }}{{ row.state }}{{ row.accounts_reached }}{{ row.last_read or "Not read yet" }}
{% else %}
No connections yet
{% endif %}
{% block vendor_sections %}{% endblock %} {% endblock %}