<?php
/**
  * @var \App\View\AppView $this
  */
?>
<nav class="large-3 medium-4 columns" id="actions-sidebar">
    <ul class="side-nav">
        <li class="heading"><?= __('Actions') ?></li>
        <li><?= $this->Html->link(__('New Import'), ['action' => 'add']) ?></li>
        <li><?= $this->Html->link(__('List Schooltypes'), ['controller' => 'Schooltypes', 'action' => 'index']) ?></li>
        <li><?= $this->Html->link(__('New Schooltype'), ['controller' => 'Schooltypes', 'action' => 'add']) ?></li>
        <li><?= $this->Html->link(__('List Examinations'), ['controller' => 'Examinations', 'action' => 'index']) ?></li>
        <li><?= $this->Html->link(__('New Examination'), ['controller' => 'Examinations', 'action' => 'add']) ?></li>
    </ul>
</nav>
<div class="imports index large-9 medium-8 columns content">
    <h3><?= __('Imports') ?></h3>
    <table cellpadding="0" cellspacing="0">
        <thead>
            <tr>
                <th scope="col"><?= $this->Paginator->sort('id') ?></th>
                <th scope="col"><?= $this->Paginator->sort('schooltype_id') ?></th>
                <th scope="col"><?= $this->Paginator->sort('examination_id') ?></th>
                <th scope="col"><?= $this->Paginator->sort('title') ?></th>
                <th scope="col"><?= $this->Paginator->sort('filename') ?></th>
                <!-- <th scope="col"><?= $this->Paginator->sort('tablename') ?></th>
                <th scope="col"><?= $this->Paginator->sort('field_separator') ?></th>
                <th scope="col"><?= $this->Paginator->sort('skip') ?></th>
                <th scope="col"><?= $this->Paginator->sort('clear') ?></th>
                <th scope="col"><?= $this->Paginator->sort('update_table') ?></th>
                <th scope="col"><?= $this->Paginator->sort('overwrite') ?></th>
                <th scope="col"><?= $this->Paginator->sort('created') ?></th>
                <th scope="col"><?= $this->Paginator->sort('modified') ?></th>  -->
                <th scope="col" class="actions"><?= __('Actions') ?></th>
            </tr>
        </thead>
        <tbody>
            <?php foreach ($imports as $import): ?>
            <tr>
                <td><?= $this->Number->format($import->id) ?></td>
                <td><?= $import->has('schooltype') ? $this->Html->link($import->schooltype->name, ['controller' => 'Schooltypes', 'action' => 'view', $import->schooltype->id]) : '' ?></td>
                <td><?= $import->has('examination') ? $this->Html->link($import->examination->title, ['controller' => 'Examinations', 'action' => 'view', $import->examination->id]) : '' ?></td>
                <td><?= h($import->title) ?></td>
                <td><?= h($import->filename) ?></td>
                <!-- <td><?= h($import->tablename) ?></td>
                <td><?= h($import->field_separator) ?></td>
                <td><?= $this->Number->format($import->skip) ?></td>
                <td><?= h($import->clear) ?></td>
                <td><?= h($import->update_table) ?></td>
                <td><?= h($import->overwrite) ?></td> 
                <td><?= h($import->created) ?></td>
                <td><?= h($import->modified) ?></td> -->
                <td class="actions">
                    <?= $this->Html->link(__('View'), ['action' => 'view', $import->id]) ?>
                    <?= $this->Html->link(__('Edit'), ['action' => 'edit', $import->id]) ?>
                    <?= $this->Form->postLink(__('Delete'), ['action' => 'delete', $import->id], ['confirm' => __('Are you sure you want to delete # {0}?', $import->id)]) ?>
                </td>
            </tr>
            <?php endforeach; ?>
        </tbody>
    </table>
    <div class="paginator">
        <ul class="pagination">
            <?= $this->Paginator->first('<< ' . __('first')) ?>
            <?= $this->Paginator->prev('< ' . __('previous')) ?>
            <?= $this->Paginator->numbers() ?>
            <?= $this->Paginator->next(__('next') . ' >') ?>
            <?= $this->Paginator->last(__('last') . ' >>') ?>
        </ul>
        <p><?= $this->Paginator->counter(['format' => __('Page {{page}} of {{pages}}, showing {{current}} record(s) out of {{count}} total')]) ?></p>
    </div>
</div>
