{# -*- coding: utf-8 -*- This file is part of Invenio. Copyright (C) 2015-2018 CERN. Invenio is free software; you can redistribute it and/or modify it under the terms of the MIT License; see LICENSE file for more details. #} {%- extends config.OAUTHCLIENT_SETTINGS_TEMPLATE %} {% set panel_title = _("Linked accounts") %} {% set panel_icon = "linkify icon" %} {% set num_linked_services = services|selectattr("account")|list|length %} {% set can_disconnect = (num_linked_services > 1 or not only_external_login) %} {% block settings_body %}
{% block oauth_body_text %}

{{ _('Tired of entering password for %(sitename)s every time you sign in? Set up single sign-on with one or more of the services below:', sitename=config.THEME_SITENAME) }}

{% endblock oauth_body_text %}
{%- for s in services %}
{% block oauth_controls scoped %}
{# we'll only show the "disconnect" button if it's not the only way for the user to log in #} {%- if s.account and can_disconnect -%} {{ _('Disconnect') }} {%- elif not s.account -%} {{ _('Connect') }} {%- endif -%}
{% endblock oauth_controls %}
{% if s.icon %}{% endif %} {{s.title}} {% if s.account %}{% endif %}
{{s.description}}
{%- endfor %}
{% endblock %}