<commit_before><?php /* @var $reports Easol_Report[] */ ?>

<div class="row">
    <div class="col-md-12">
        <h1 class="page-header">Flex Reports</h1>
        <br/><br/>

        <?php if ($this->session->flashdata('message') && $this->session->flashdata('type')) { ?>
            <div class="alert alert-<?= $this->session->flashdata('type') ?>"> <?= $this->session->flashdata('message') ?> </div>
        <?php } ?>
    </div>
</div>

<div class="row">
    <div class="col-md-12">
        <table class="table table-bordered">
            <thead>
                <tr>
                    <th>Report Name</th>
                    <?php if(Easol_AuthorizationRoles::hasAccess(['System Administrator','Data Administrator'])) { ?><th>Display Type</th> <?php } ?>
                    <th>Category</th>
                    <?php if(Easol_AuthorizationRoles::hasAccess(['System Administrator','Data Administrator'])) { ?>

                        <th>School</th>
                        <th>Access</th>
                        <th>Edit</th>
                        <th>Delete</th>

                    <?php } ?>

                </tr>
            </thead>
            <tbody>
                <?php foreach($reports as $report){ ?>
                <tr>
                    <td><?= $report->ReportName ?></td>
                    <?php if(Easol_AuthorizationRoles::hasAccess(['System Administrator','Data Administrator'])) { ?><td><?= $report->getDisplayType()->DisplayName ?></td><?php } ?>
                    <td><?= $report->getCategory()->ReportCategoryName ?></td>
                    <?php if(Easol_AuthorizationRoles::hasAccess(['System Administrator','Data Administrator'])) { ?>
                        <td><?= $report->getSchool()->NameOfInstitution ?></td>
                        <td><?php
                        foreach($report->getAccessTypes() as $access){
                            echo '<span> '.$access->RoleTypeName.'</span> ';
                        }
                        ?></td>

                        <td>[ <a href="<?= site_url('reports/edit/'.$report->ReportId) ?>"><span class="fa fa-pencil"></span></a> ]</td>
                        <td>[ <a href="<?= site_url('reports/delete/'.$report->ReportId) ?>"><span class="fa fa-trash-o"></span></a> ]</td>
                    <?php } ?>



                </tr>
                <?php } ?>

            </tbody>
        </table>

    </div>
</div>

<div class="row">
    <div class="col-md-12">
        <a href="<?= site_url('reports/create') ?>"> <button class="btn btn-primary">New Flex Report</button></a>
    </div>
</div><commit_msg>#17 Flex Reports<commit_after><?php /* @var $reports Easol_Report[] */ ?>

<div class="row">
    <div class="col-md-12">
        <h1 class="page-header">Flex Reports</h1>
        <br/><br/>

        <?php if ($this->session->flashdata('message') && $this->session->flashdata('type')) { ?>
            <div class="alert alert-<?= $this->session->flashdata('type') ?>"> <?= $this->session->flashdata('message') ?> </div>
        <?php } ?>
    </div>
</div>

<div class="row">
    <div class="col-md-12">
        <table class="table table-bordered">
            <thead>
                <tr>
                    <th>Report Name</th>
                    <?php if(Easol_AuthorizationRoles::hasAccess(['System Administrator','Data Administrator'])) { ?><th>Display Type</th> <?php } ?>
                    <th>Category</th>
                    <?php if(Easol_AuthorizationRoles::hasAccess(['System Administrator','Data Administrator'])) { ?>

                        <th>School</th>
                        <th>Access</th>
                        <th>Edit</th>
                        <th>Delete</th>

                    <?php } ?>

                </tr>
            </thead>
            <tbody>
                <?php foreach($reports as $report){ ?>
                <tr>
                    <td><a href="<?= site_url('reports/view/'.$report->ReportId) ?>"><?= $report->ReportName ?></a></td>
                    <?php if(Easol_AuthorizationRoles::hasAccess(['System Administrator','Data Administrator'])) { ?><td><?= $report->getDisplayType()->DisplayName ?></td><?php } ?>
                    <td><?= $report->getCategory()->ReportCategoryName ?></td>
                    <?php if(Easol_AuthorizationRoles::hasAccess(['System Administrator','Data Administrator'])) { ?>
                        <td><?= $report->getSchool()->NameOfInstitution ?></td>
                        <td><?php
                        foreach($report->getAccessTypes() as $access){
                            echo '<span> '.$access->RoleTypeName.'</span> ';
                        }
                        ?></td>

                        <td>[ <a href="<?= site_url('reports/edit/'.$report->ReportId) ?>"><span class="fa fa-pencil"></span></a> ]</td>
                        <td>[ <a href="<?= site_url('reports/delete/'.$report->ReportId) ?>"><span class="fa fa-trash-o"></span></a> ]</td>
                    <?php } ?>



                </tr>
                <?php } ?>

            </tbody>
        </table>

    </div>
</div>

<div class="row">
    <div class="col-md-12">
        <a href="<?= site_url('reports/create') ?>"> <button class="btn btn-primary">New Flex Report</button></a>
    </div>
</div>
{'fraction_non_alphanumeric': 0.20339622641509433, 'fraction_numerical': 0.0033962264150943396, 'mean_word_length': 1.7004584819154356, 'pattern_counts': {'":': 0, '<': 192, '<?xml version=': 0, '>': 231, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '651757', 'n_tokens_mistral': 1555, 'n_tokens_neox': 1470, 'n_words': 255}