{% extends 'base.html' %}
{% import 'flask.j2' as flask %}

{% block style %}
    <link href="/static/datatables/jquery.dataTables.min.css" rel="stylesheet">
    <link href="/static/datatables/dataTables.semanticui.min.css" rel="stylesheet">
{% endblock %}

{% block script %}
    <script src="/static/datatables/jquery.dataTables.min.js"></script>
    <script src="/static/datatables/dataTables.semanticui.min.js"></script>
    <script src="/static/js/users.js"></script>
{% endblock %}

{% block content %}

{{ flask.messages() }}

<div class="ui segment">
    <a class="ui primary button" href="{{ url_for('canaille.admin.clients.add') }}">{% trans %}Add client{% endtrans %}</a>
</div>

<table class="ui table">
    <thead>
        <th>{% trans %}Name{% endtrans %}</th>
        <th>{% trans %}URL{% endtrans %}</th>
        <th>{% trans %}Created{% endtrans %}</th>
    </thead>
    {% for client in clients %}
    <tr>
        <td><a href="{{ url_for('canaille.admin.clients.edit', client_id=client.oauthClientID) }}">{{ client.oauthClientName }}</a></td>
        <td><a href="{{ client.oauthClientURI }}">{{ client.oauthClientURI }}</a></td>
        <td>{{ client.issue_date }}</td>
    </tr>
    {% endfor %}
</table>

{% endblock %}
