{% extends 'base.html' %}
{% load buttons %}
{% load custom_links %}
{% load helpers %}
{% load static %}
{% load tz %}

{% block header %}
<div class="row noprint">
    <div class="col-sm-8 col-md-9">
        <ol class="breadcrumb">
            <li>Diff</li>
            <li>{{ breadcrumb.model }}</li>
            <li>From</li>
            <li>{{ breadcrumb.from }}</li>
            <li>To</li>
            <li>{{ breadcrumb.to }}</li>
        </ol>
    </div>
</div>
<h1>
    {% block title %}
    {{ title }}
    {% endblock %}
</h1>
{% endblock %}

{% block content %}
<div class="row">
    <div class="col-md-7">
        <div class="panel panel-default">
            <div class="panel-heading">
                <strong>{{ display_name }} Diff</strong>
            </div>
            <table class="table table-hover panel-body attr-table">
                {% if diff_obj %}
                    <tr>
                        <td><strong>Field</strong></td>
                        <td><strong>Before</strong></td>
                        <td><strong>After</strong></td>
                    </tr>
                    {% for row in diff_obj %}
                        <tr>
                            <td>
                                {{ row.name }}
                            </td>
                            <td class="{{ row.before_style }}">
                                {{ row.before_val }}
                            </td>
                            <td class="{{ row.after_style }}">
                                {{ row.after_val }}
                            </td>
                        </tr>
                    {% endfor %}
                {% else %}
                    <h3 class="text-muted text-center">No diffs found</h3>
                {% endif %}
            </table>
        </div>
    </div>
</div>
{% endblock %}
