<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="SzkoleniaTable" class="table hover-rows custom-table FullTable" data-start-sort="2"
                       data-start-sort-direction="desc" data-start-height="50vh">
                    <thead>
                    <tr class="text-uppercase">
                        <th>Szkolenie</th>
                        <th>Tytuł</th>
                        <th>Od</th>
                        <th>Do</th>
                        <th>Ważne do</th>
                    </tr>
                    </thead>
                    <tbody>
                    <?php if (isset($trainings['bSzkolenia']['bSzkolenie'])) : ?>
                        <?php foreach ($trainings['bSzkolenia']['bSzkolenie'] as $k => $training): ?>
                            <tr
                                <?php if (!empty($training['bInformacjeDodatkowe'])): ?>
                                    class="more-info-append" data-append-to="#more-info-container"
                                    data-more-info="<?php echo $training['bInformacjeDodatkowe']; ?>"
                                <?php endif; ?>
                            >
                                <td class="info-addon"><?php echo $training['bSzkolenieOpisKodu']; ?></td>
                                <td><?php echo $training['bTytul']; ?></td>
                                <td><span class="span-date"><?php echo $training['bDataOd']; ?></span></td>
                                <td><span class="span-date"><?php echo $training['bDataDo']; ?></span></td>
                                <td><?php echo $training['bDataWaznosci']; ?></td>
                            </tr>
                        <?php endforeach; ?>
                    <?php endif; ?>
                    </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; ?>');
    })
</script>

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