<? global $vis_language; ?>
<div class="vis_main_window vis_shadow vis_round_corner"><table cellpadding="0" cellspacing="0" width="100%"><tr><td>
    <div class="vis_main_header"><? echo $vis_language['TXTTASKS']; ?></div></td><td align="right">
        <span class="vis_sub_header_normal" onclick="$('#vis_workpanel_div').visExecution('load_module','<? echo $vis_language['TXTADDTASK']; ?>',{'vis_module':'home','vis_operation':'add_cal_event'});"><span class="vis-icon vis-icon-plus"></span><? echo$vis_language['TXTADD']; ?></span> </td></tr></table>
    <div class="vis_main_window_content vis_round_corner">
        <table cellpadding="0" cellspacing="0" width="100%" class="vis_list_table">
            <tr><th><? echo$vis_language['TXTTITLE']; ?></th><th><? echo $vis_language['TXTSTARTDATE']; ?></th><th><? echo $vis_language['TXTENDDATE']; ?></th><th><? echo $vis_language['TXTSTATUS']; ?></th><th><? echo$vis_language['TXTPRIORITY']; ?></th><th><? echo$vis_language['TXTLABEL']; ?></th><th></th></tr><?
            if($tasks!=-1) for($i=0;$i<count($tasks);$i++) {
                echo '<tr><td class="vis-pointer" onclick="$(\'#vis_workpanel_div\').visExecution(\'load_module\', \''.trim($tasks[$i]['subject']).'\', {\'vis_module\':\'home\', \'vis_operation\':\'edit_task\', \'vis_task_id\':'.$tasks[$i]['task_id'].'})">';
                echo $tasks[$i]['subject'].'</td>'.'<td>'.format_datetime($tasks[$i]['start_date']).'</td>'.'<td>'.format_datetime($tasks[$i]['end_date']).'</td>'.'<td>'.$tasks[$i]['task_status'].'</td>'.'<td>'.$tasks[$i]['priority'].'</td>'.'<td>'.$tasks[$i]['label'].'</td>';
                echo '<td><span class="vis-icon-med vis-icon-trash" onclick="$(this).visInterface(\'load_dialog\', {\'vis_module\':\'home\', \'vis_operation\':\'get_task_delete\', \'vis_task_id\':'.$tasks[$i]['task_id'].', \'vis_static_area\':\'vis_task_delete_form\'})"></span></td></tr>';
            }?>
        </table>
    </div>
</div>