<table width="100%" cellpadding="0" cellspacing="0" border="0" style="margin-bottom:24px;">
    <tr>
        <th style="text-align:left; background:#1a1a2e; color:#f8f7f4; padding:8px 10px; font-size:12px;">No.</th>
        <th style="text-align:left; background:#1a1a2e; color:#f8f7f4; padding:8px 10px; font-size:12px;">Creado</th>
        <th style="text-align:left; background:#1a1a2e; color:#f8f7f4; padding:8px 10px; font-size:12px;">Fecha limite</th>
        <th style="text-align:left; background:#1a1a2e; color:#f8f7f4; padding:8px 10px; font-size:12px;">Descripcion</th>
    </tr>
    <?php foreach ($tpl->get('tasks') as $task): ?>
        <?php
        $color = "#ffffff";
        switch($task->priority) {
            case '2':
                $color = "#fce4ec";
                break;
            case '1':
                $color = "#fff8e1";
                break;
            case '0':
                $color = "#e8f5e9";
                break;
        }
        ?>
        <tr style="background-color:<?php echo $color ?>">
            <td style="padding:8px 10px; border-bottom:1px solid #f0eeea; font-size:13px;">
                <a href="<?php echo $tpl->url('task', 'tid', $task->id) ?>" style="color:#e94560; font-weight:bold; text-decoration:none;">No.<?php echo $task->id ?></a>
            </td>
            <td style="padding:8px 10px; border-bottom:1px solid #f0eeea; font-size:12px; color:#7a7a8e;"><?php echo $tpl->date($task->create_date) ?></td>
            <td style="padding:8px 10px; border-bottom:1px solid #f0eeea; font-size:13px; color:#1a1a2e; font-weight:bold;">
                <?php echo $task->plan_date ?>
                <?php if ($task->all_day_event == '0'): ?>
                    <span style="color:#7a7a8e; font-weight:normal;"><?php echo $task->start_time ?>&nbsp;-&nbsp;<?php echo $task->finish_time ?></span>
                <?php endif ?>
            </td>
            <td style="padding:8px 10px; border-bottom:1px solid #f0eeea; font-size:13px; color:#3a3a4e; line-height:1.4;"><?php echo $task->content_html ?></td>
        </tr>
    <?php endforeach ?>
</table>
