<?php if(!defined('ACCESS_CONTROL')) {header($_SERVER['SERVER_PROTOCOL']. ' 404'); exit('404 not found');}?>
<fieldset>
    <legend>Logs for task «<?php echo(htmlentities($task['name']))?>» </legend>
</fieldset>
<table class="table table-small table-hover table-condensed">
    <thead>
    <tr>
        <th style="width: 1%">ID</th>
        <th style="width: 85%">Log</th>
        <th style="width: 14%">DateTime</th>
    </tr>
    </thead>
    <?php if ($logs):?>
    <tbody>
    <?php foreach($logs as $log):?>
    <tr class="{{ log.error ? 'bg-danger' : '' }}">
        <td><?php echo($log['id'])?></td>
        <td><?php echo(htmlentities($log['log']))?></td>
        <td><?php echo($log['created_at'])?></td>
    </tr>
    <?php endforeach?>
    </tbody>
    <?php else:?>
    <tbody>
    <tr>
        <td colspan="3">Logs not found</td>
    </tr>
    </tbody>
    <?php endif?>
</table>