{# # This file is part of Invenio. # Copyright (C) 2014 CERN. # # Invenio is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later version. # # Invenio is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Invenio; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. #} {%- import "accounts/settings/helpers.html" as helpers with context %} {%- from "_formhelpers.html" import render_field with context %} {%- extends "accounts/settings/index.html" %} {% block settings_body %} {{helpers.panel_start( _('Developer Applications'), btn=_('New application'), btn_icon='fa fa-plus', btn_href=url_for('.client_new'), with_body=False, )}} {% if clients %}

{{ _('You have registered these applications to use the %(site_name)s API:', site_name=config.CFG_SITE_NAME) }}

{% else %}

{{ _("You have not yet registered any applications. Click the 'New application' button to create an application to access the %(site_name)s API.", site_name=config['CFG_SITE_NAME']) }}

{% endif %} {{helpers.panel_end(with_body=False)}} {{helpers.panel_start( _('Personal access tokens'), btn=_('New token'), btn_icon='fa fa-plus', btn_href=url_for('.token_new'), with_body=False, )}} {% if tokens %}

{{ _('Following are personal tokens to used to access the %(site_name)s API:', site_name=config.CFG_SITE_NAME) }}

{% else %}

{{ _("You have not yet created any personal access tokens. Click the 'New token' button to create a personal access token.") }}

{% endif %} {{helpers.panel_end(with_body=False)}} {{helpers.panel_start( _('Authorized applications'), with_body=False, )}} {% if authorized_apps %}

{{ _('You have granted the following application access to your account:') }}

{% else %}

{{ _('You have not yet granted any external applications access to your account.') }}

{% endif %} {{helpers.panel_end(with_body=False)}} {% endblock %}