{% extends "core/base.html" %}

{% load i18n %}

{% block browser_title %}{% blocktrans %}OAuth2 Applications{% endblocktrans %}{% endblock %}
{% block page_title %}{% blocktrans %}OAuth2 Applications{% endblocktrans %}{% endblock %}

{% block content %}
  <a href="{% url "register_oauth_application" %}" class="btn green waves-effect waves-light">
    <i class="material-icons iconify left" data-icon="mdi:add"></i>
    {% blocktrans %}Register new application{% endblocktrans %}
  </a>
  <div class="collection">
    {% for application in applications %}
      <a class="collection-item avatar" href="{% url "oauth2_application" application.id %}">
        {% if application.icon %}
          <img src="{{ application.icon.url }}" alt="{{ application.name }}" class="circle">
        {% endif %}
        <span class="title">
          {{ application.name }}
        </span>
      </a>
      {% empty %}
      <div class="collection-item flow-text">
        {% blocktrans %}No applications defined.{% endblocktrans %}
      </div>
    {% endfor %}
  </div>
{% endblock %}
