{% extends "base.html" %} {% block title %}Connections{% endblock %} {% block heading %}Connected accounts{% endblock %} {% block body %} {% if not connections %}

Nothing is connected yet. Connect an account.

{% else %} {% for connection in connections %} {% set network = networks.get(connection.platform) %} {# The id is the platform's, named after the account rather than after a row of ours. That is what makes a webhook naming a Page line up with a connection without a lookup table. #} {% endfor %}
AccountNetworkConnection id Token
{{ connection.account_name }} {{ network.label if network else connection.platform }} {% if connection.host %}
{{ connection.host }}{% endif %}
{{ connection.id }} {% if connection.token.expires_at %} expires {{ connection.token.expires_at.strftime('%Y-%m-%d %H:%M') }}
renewed for you before every call {% else %} never expires {% endif %} {% if connection.token.refresh_token_expires_at %} {# Pinterest's refresh token lasts 60 days and renewing the access token does not extend it, so an account nobody has posted from since the summer needs signing in again. This is the date to put a "reconnect" prompt in front of. #}
reconnect before {{ connection.token.refresh_token_expires_at.strftime('%Y-%m-%d') }} {% endif %}
limits
{% endif %}

What has happened

{% if not activity %}

Nothing yet.

{% else %} {% for happening in activity %} {% endfor %}
WhenWhatAccountDetail
{{ happening.at[:19] }} {{ happening.what }} {{ happening.connection_id }} {{ happening.detail }} {% if happening.link %}
{{ happening.link }} {% endif %}

Refusals are rows here rather than messages that scrolled past. socialchimp raises; writing it down is this app's decision.

{% endif %} {% endblock %}