{% extends "base.html" %}

{% block title %}{{ change.cve.cve_id }} - {{ super() }}{% endblock %}

{% block content %}

<section class="content-header">
    <h1><a class="btn btn-default" href="{{ url_for('main.cve', cve_id=change.cve.cve_id) }}"><i class="fa fa-arrow-left"></i></a> Change of {{ change.created_at.strftime('%d %b %Y, %H:%M') }} <small>{{ change.cve.cve_id }}</small></h1>
    <ol class="breadcrumb">
        <li><a href="{{ url_for('main.home') }}">OpenCVE</a></li>
        <li><a href="{{ url_for('main.cves') }}">Vulnerabilities (CVE)</a></li>
        <li><a href="{{ url_for('main.cve', cve_id=change.cve.cve_id) }}">{{ change.cve.cve_id }}</a></li>
        <li class="active">Change {{ change.created_at.strftime('%d %b %Y, %H:%M') }}</li>
    </ol>
</section>

<section class="content">
    <div class="row">
        <div class="col-md-12">
            <div class="box box-primary">
                <div class="box-header">
                    <div class="box-title">List of Events</div>
                </div>
                <div class="box-body">
                    <table class="table table-bordered table-striped">
                        <thead>
                            <th class="col-md-1">Type</th>
                            <th class="col-md-5">Values Removed</th>
                            <th class="col-md-5">Values Added</th>
                        </thead>
                        <tbody>
                        {% for event in change.events %}
                            {% set template = 'report/' + event.type.code + '_details.html' %}
                            {% include template %}
                        {% endfor %}
                        </tbody>
                    </table>
                </div>
            </div>
            <div class="box box-primary">
                <div class="box-header">
                    <div class="box-title">JSON Diff</div>
                </div>
                <div class="box-body">
                    {{ diff|safe }}
                </div>
            </div>
        </div>
    </div>
</section>

{% endblock %}