<?php
/**
 * @var \FiloBlu\Flow\Block\Adminhtml\Check\Checkcsv $block
 */

$results = $block->getOutputMessage();

?>

<h2><?php echo __("Risultato dell'elaborazione"); ?></h2>
<table class="data-grid">
    <thead>
        <tr>
            <th class="data-grid-th" style="text-align: center">
                #
            </th>
            <th class="data-grid-th">
                Messaggio
            </th>
            <th class="data-grid-th" style="text-align: center">
                Risultato
            </th>
        </tr>
    </thead>
    <tbody>

            <?php
                $i = 0;
                foreach($results as $message){
                    ?>
                    <tr class="<?php echo ($i%2==0)?'even':'';?> _clickable">
                        <td style="text-align: center"><?php echo $i; ?></td>
                        <td><?php echo $message[0]; ?></td>
                        <td style="text-align: center"><?php echo ($message[1])?'<strong style="color:#0B6623">OK</strong>':'<strong style="color:#FF0000">KO</strong>'; ?></td>
                    </tr>
                    <?php
                    $i++;
                }

            ?>

    </tbody>
</table>
<br/>
<button onclick="location.href='<?php echo $this->getUrl('flow/check/index');?>'" class="primary"><?php echo __('Elabora un altro file'); ?></button>


