{% extends "ui/base-devices.html" %}
{% load url from future %}
{% load icons %}
{% load bob %}

{% block content %}
<p>
{% if show_all %}
<a class="btn" href="?all=">{% icon 'fugue-user-silhouette' %} Hide changes without an author.</a>
{% else %}
<a class="btn" href="?all=1">{% icon 'fugue-user-silhouette-question' %} Show changes without an author.</a>
{% endif %}
</p>
<table class="table table-striped table-bordered details-history">
    <thead><tr>
        <th>Date</th>
        <th>Author</th>
        <th>Field</th>
        <th>Before</th>
        <th>After</th>
        <th>Comment</th>
    </tr></thead>
    <tbody>
        {% for h in history_page.object_list %}
            <tr>
                <td>{{ h.date|timesince_limited }}</td>
                <td>{{ h.user|default:h.plugin }}</td>
                <td>{{ h.component }}.{{ h.field_name }}</td>
                <td>{{ h.old_value }}</td>
                <td>{{ h.new_value }}</td>
                <td>{{ h.comment|default:'' }}</td>
            </tr>
        {% endfor %}
    </tbody>
</table>
{% pagination history_page fugue_icons=1 show_all=1 url_query=url_query query_variable_name=query_variable_name %}
{% endblock content %}
