1<table>
2    <tr>
3        <th>Nr</th>
4        <th>Zgłoszone</th>
5        <th>Plan</th>
6        <th>Opis</th>
7    </tr>
8    <?php foreach ($tpl->get('tasks') as $task): ?>
9        <?php
10        switch($task->priority) {
11            case '2':
12                $color = "#F8E8E8";
13                break;
14            case '1':
15                $color = "#ffd";
16                break;
17            case '0':
18                $color = "#EEF6F0";
19                break;
20        }
21        ?>
22        <tr style="background-color: <?php echo $color ?>">
23            <td><a href="<?php echo $tpl->url('task', 'tid', $task->id) ?>">
24                    #z<?php echo $task->id ?>
25                </a></td>
26            <td><?php echo $tpl->date($task->create_date) ?></td>
27            <td>
28                <?php echo $task->plan_date ?>
29                <?php if ($task->all_day_event == '0'): ?>
30                    <?php echo $task->start_time ?>&nbsp;-&nbsp;<?php echo $task->finish_time ?>
31                <?php endif ?>
32            </td>
33            <td><?php echo $task->content_html ?></td>
34        </tr>
35    <?php endforeach ?>
36</table>