{%extends 'cmdb/base.html'%}
   
{% load icons %}
{% load query %}

{% block content %}
<h3>View change : {{ change.id }}</h3>
<h4>CI :
    {% if ci %}
        <a href="{% url ci_view ci.id %}">{{ ci.name }} (uid: {{ ci.uid }})</a>
    {% else %}
        {% if change.ci_id %}
            <a href="{% url ci_view change.ci_id %}">{{ change.ci_id }}</a>
        {% else %}
            –
        {% endif %}
    {% endif %}
</h4>
<hr>
<p>
<ul>
    <li>Comment: {{ change.message }}</li>
    <li>Time: {{ change.time }}</li>
    <li>Type: {{ change.get_type_display }}</li>
    <li>Priority: {{ change.get_priority_display }}</li>
</ul>
</p>
<hr>
{% if change.type == 6 %}
    {% include 'cmdb/include_ciattributechange.html' %}
{% elif change.type == 3 %}
    {% include 'cmdb/include_attributechange.html' %}
{% elif change.type == 2 %}
    {% include 'cmdb/include_puppet.html' %}
{% elif change.type == 1 %}
    {% include 'cmdb/include_git.html' %}
{% endif %}
{% endblock %}
