{% extends "admin/object_history.html" %}
{% load static %}

{% block extrahead %}
<link href="{% static 'css/pki.css' %}" type="text/css" media="screen" rel="stylesheet" />
{% endblock %}

{% block content %}
<div id="content-main">
<div class="module">
    <p />
    <table id="change-history">
        <thead>
        <tr>
            <th scope="col">Date/time</th>
            <th scope="col">User</th>
            <th scope="col">Action</th>
            <th scope="col">Changes</th>
        </tr>
        </thead>
        <tbody>
        {% if changelogs %}
        {% for c in changelogs %}
        <tr class="{% cycle 'row1' 'row2' %}">
            <th scope="row">{{ c.action_time|date:"DATETIME_FORMAT" }}</th>
            <td>{{ c.user.username }}{% if c.user.get_full_name %} ({{ c.user.get_full_name }}){% endif %}</td>
            <td>{{ c.action }}</td>
            <td>{{ c.changes }}</td>
        </tr>
        {% endfor %}
        {% else %}
        <tr>
            <th scope="row" colspan=4>No changelogs yet</th>
        </tr>
        {% endif %}
        </tbody>
    </table>
</div>
</div>
{% endblock %}
