<!DOCTYPE html>
{% load static %}
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Véhicules</title>
   <link rel="stylesheet" href="{% static 'vehicles/style.css' %}">
</head>
<body>
<div class="main_container">
{% for vhc in list_vhc %}
    {% with 'vehicles/images/ocvs_rtw_'|add:vhc.nType|add:'_'|add:vhc.nStatus|add:'.png' as image_static %}
    <div class="child">
        <div style="height: 25%;display: flex;padding-top: 10px;" >
            <a href="/admin/vehicles/vehicles/{{vhc.id}}/change/" target="{{target}}"  style="font-weight: bold;width: 78px;">{{vhc.sName}}</a><br>

            <img height="100px" src="{% static image_static %}" ><br>

            <span style="align-self: flex-end; padding: 20px;color:orange; width: 43px;">
                {% if vhc.bLucas %}LUCAS{% endif %}
            </span>

            <b><a href="/vehicules/peremptions" target="{{target}}" >Péremptions</a></b>



        </div>
        <div class="child_box" style="height: 70%;">
            <div class="container" style="height: var(--main-child-container-height);">
                <b>Infos techniques</b>
                {% for info in vhc.get_all_infos_tech %}
                <div class="element" style="margin-top: 15px">
                    <a href="/admin/vehicles/vehicles_infos/{{info.id}}" target="{{target}}" >{{info.sDesc}}</a> <br>
                    <span style="font-style: italic;text-transform:uppercase;align-self: flex-end;">{{info.get_Start_formated}} {{info.get_Author_formated}}</span>
                </div>
                {% endfor %}

            </div>
            <div class="container"  style="height: var(--main-child-container-height);">
                <b>Matériels manquants</b>
                 {% for info in vhc.get_all_infos_mat %}
                <div class="element red" style="margin-top: 15px;">
                    <a href="/admin/vehicles/vehicles_infos/{{info.id}}" target="{{target}}" >{{info.sDesc}}</a> <br>
                    <br><span style="font-style: italic;text-transform:uppercase;">{{info.get_Start_formated}} {{info.get_Author_formated}}</span>
                </div>
                {% endfor %}
            </div>
            <div style="width: 350px;height: var(--main-child-container-height);display:none">
                <b><a href="/vehicules/peremptions" target="{{target}}" >Péremptions</a></b>
                <div class="child_box">

                    <div style="width: 170px;margin-top: 15px">
                        {% for info in vhc.get_all_infos_perempt_perma %}
                        <a href="/admin/vehicles/vehicles_infos/{{info.id}}" target="{{target}}">{{info.sDesc}}</a><br>
                        {% endfor %}
                    </div>

                    <div style="width: 170px;margin-top: 15px">
                        {% for info in vhc.get_all_infos_perempt %}
                        <a href="/admin/vehicles/vehicles_infos/{{info.id}}" target="{{target}}">{{info.sDesc}}</a> <br>
                        {% endfor %}
                    </div>

                </div>

            </div>
        </div>




    </div>
    {% endwith %}
{% endfor %}
</div>


</body>
</html>
