{% load static %}

<link rel="stylesheet" href="{% static 'mycaldav/style.css' %}">
<div class="ifram_main_div">
{% if latest_task_list %}
    <table>
        <td style="font-weight: bold;padding-bottom: 5px; text-align: center;" colspan="2">Jour</td>
        {% for task in latest_task_list %}
            <tr><td style="font-weight: bold;vertical-align: top;"  class="td_key" id="{{task.uiid}}" >
                {% if task.done %}
                    {{task.key}}
                {% else %}
                    <a href="/caldav/task/edit/{{task.uiid}}" target="">{{task.key}}</a>
                {% endif %}
            </td>&nbsp;&nbsp;&nbsp;&nbsp;<td style="{% if task.done %}text-decoration:line-through;{% endif %}vertical-align: top;">{{ task.name }}<br>{{task.desc}}</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 %}
           <tr><td style="font-weight: bold;vertical-align: top;" class="td_key" >
           {% if task.done %}
                {{task.key}}
            {% else %}
                <a href="/caldav/task/edit/{{task.uiid}}" target="">{{task.key}}</a>
            {% endif %}
           </td>&nbsp;&nbsp;&nbsp;&nbsp;<td style="{% if task.done %}text-decoration:line-through;{% endif %}vertical-align: top;">{{ task.name }}<br>{{task.desc}}</td></tr>
        {% endfor %}
    </table>

{% else %}
    <p>Aucune tâche disponible.</p>
{% endif %}
</div>
