{% load static %}

<link rel="stylesheet" href="{% static 'mycaldav/style.css' %}">
<div class="ifram_main_div">
{% if latest_task_list %}
    <table>
        {% for task in latest_task_list %}

            <tr style="" title="{{task.desc}}">
                <td style="vertical-align: top;font-weight: bold;" class="td_key" >
                    {{task.key}} 
                    {% if task.team_transfert %}                     
                    <svg class="team_svg_icon"  x="0px" y="0px" xmlns="http://www.w3.org/2000/svg"  viewBox="0 0 512 512">
                         <use class="team_svg_icon" xlink:href="{% static 'mycaldav/images/team_trans_2.svg' %}#icon"></use>
                     </svg>
                    {% endif %}
                    {% if task.team_manif %}
                    &nbsp;Manif
                    {% endif %}
                </td>
                <td style="{% if task.done %}text-decoration:line-through{% endif %}">
                    <span style="{% if task.team_1_chef %}color: yellow !important;{% endif %}; width: 150px;display: inline-block">{{ task.team_1 }}</span>&nbsp;
                    <span style="{% if task.team_2_chef %}color: yellow !important;{% endif %};width: 150px;display: inline-block">{{ task.team_2 }}</span>
                </td>
            </tr>
        {% endfor %}
        <tr><td>&nbsp;</td></tr>
        <tr>
            <td style="border-top: 1px dashed white;font-weight: bold;padding: 5px; text-align: center;" colspan="2">Nuit</td>
        </tr>
        {% for task in night_task_list %}
        {% if task.str_start_date == today %}
           <tr style=""><td style="font-weight: bold;vertical-align: top;{% if task.team_transfert %}background-color: orange;{% endif %}" class="td_key" >
               {{task.key}}
               {% if task.team_transfert %}                     
                    <svg class="team_svg_icon"  x="0px" y="0px" xmlns="http://www.w3.org/2000/svg"  viewBox="0 0 512 512">
                         <use class="team_svg_icon" xlink:href="{% static 'mycaldav/images/team_trans_2.svg' %}#icon"></use>
                     </svg>
                    {% endif %}
                    {% if task.team_manif %}
                    <svg class="team_svg_icon"  x="0px" y="0px" xmlns="http://www.w3.org/2000/svg"  viewBox="0 0 512 512">
                         <use class="team_svg_icon" xlink:href="{% static 'mycaldav/images/team_manif.svg' %}#icon"></use>
                     </svg>
                    {% endif %}
           </td>
                <td style="{% if task.done %}text-decoration:line-through{% endif %}">
                    <span style="{% if task.team_1_chef %}color: yellow !important;{% endif %};width: 150px;display: inline-block">{{ task.team_1 }}</span>&nbsp;
                    <span style="{% if task.team_2_chef %}color: yellow !important;{% endif %};width: 150px;display: inline-block">{{ task.team_2 }}</span>
                </td>
           </tr>
        {% endif %}
        {% endfor %}
    </table>
{% else %}
    <p>Aucune information d'équipage</p>
{% endif %}
</div>