{% extends "django_webid/provider/base.html" %}

{% load i18n %}
{% load uni_form_tags %}


{% block head_title %}{% blocktrans %}WebID Certs List{% endblocktrans %}{% endblock %}

{% block extra_head %}
{% endblock %}

{% block body %}

{% if messages %}
    <ul id="messages">
        {% for message in messages %}
        <li id="message_{{ forloop.counter }}">{{message}}</li>
        {% endfor %}
    </ul>
{% endif %}

<div class="middle_panel">

    <h1>{% trans "Your WebID Certificates" %}</h1>
    {# FIXME handle case with 0 certificates --> link to install one #}
    <p>These below are all the valid certificates that you have installed (in any of your browsers). You can click on them to see more details, or click "revoke" if you no longer want to be able to use either of them.</p>
    <ul>
    {% for cert in object_list %}
    <li><a href="{% url webidprovider-cert-detail cert_id=cert.id %}">sha1: {{ cert.fingerprint_sha1 }}</a> {{ cert.valid_from }} {{ cert.expires }} <a class="danger" href="{% url webidprovider-cert-revoke cert_id=cert.id %}">revoke</a></li>
    {% endfor %}
    </ul>

</div>

{% endblock %}

{% block extra_body %}
{% endblock %}

