<div class="row">
    <div class="col-xs-12">
        <div class="box box-danger mb0">
            <div class="row">
                <div class="col-xs-12">
                    <div class="pull-right">
                        <a class="btn btn-danger btn-flat hidden-messages-toggle">
                            <span style="margin-right: 10px;">Tylko ten rok</span>
                            <label class="switch switch-current-year">
                                <input type="checkbox" name="CurrentYear" id="CurrentYear" <?php if(isset($_GET['tylko-ten-rok'])) echo 'checked="checked"'; ?> />
                            </label>
                        </a>
                    </div>
                </div>
            </div>
            <div class="box-body table-responsive table-fixed-height">
                <table id="BadaniaTable" class="table hover-rows custom-table FullTable" data-start-sort="1" data-start-sort-direction="desc" data-start-height="50vh">
                    <thead>
                    <tr class="text-uppercase">
                        <th>Badanie</th>
                        <th>Data badania</th>
                        <th>Data ważności</th>
                        <th>Uwagi</th>
                    </tr>
                    </thead>
                    <tbody>
                    <?php foreach ($badania['bBadaniaLekarskie']['bBadanieLekarskie'] as $k => $badanie): ?>
                        <tr
                            <?php if (!empty($badanie['bInformacjeDodatkowe'])): ?>
                                class="more-info-append" data-append-to="#more-info-container"
                                data-more-info="<?php echo $badanie['bInformacjeDodatkowe']; ?>"
                            <?php endif; ?>
                        >
                            <td class="info-addon"><?php echo $badanie['bBadanieOpisKodu']; ?></td>
                            <td><span class="span-date"><?php echo $badanie['bDataBadania']; ?></span></td>
                            <td><span class="span-date"><?php echo $badanie['bDataWaznosci']; ?></span></td>
                            <td><?php if (!empty($badanie['bUwagi'])) echo $badanie['bUwagi']; ?></td>
                        </tr>
                    <?php endforeach; ?>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>
<div class="row more-info-container">
    <div class="col-xs-12">
        <div class="box">
            <div class="box-header">
                <h2 class="box-title">Informacje dodatkowe</h2>
            </div>
            <div class="box-body" id="more-info-container">

            </div>
        </div>
    </div>
</div>

<script>
    $(function () {
        $('.page-name:first-of-type').html('<?php echo $pageName; ?>');

        initiateDataTable();
    })
</script>

<?php echo $this->element('alert_close'); ?>