<?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(__('Edit Examination'), ['action' => 'edit', $examination->id]) ?> </li>
        <li><?= $this->Form->postLink(__('Delete Examination'), ['action' => 'delete', $examination->id], ['confirm' => __('Are you sure you want to delete # {0}?', $examination->id)]) ?> </li>
        <li><?= $this->Html->link(__('List Examinations'), ['action' => 'index']) ?> </li>
        <li><?= $this->Html->link(__('New Examination'), ['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 Imports'), ['controller' => 'Imports', 'action' => 'index']) ?> </li>
        <li><?= $this->Html->link(__('New Import'), ['controller' => 'Imports', 'action' => 'add']) ?> </li>
    </ul>
</nav>
<div class="examinations view large-9 medium-8 columns content">
    <h3><?= h($examination->title) ?></h3>
    <table class="vertical-table">
        <tr>
            <th scope="row"><?= __('Schooltype') ?></th>
            <td><?= $examination->has('schooltype') ? $this->Html->link($examination->schooltype->name, ['controller' => 'Schooltypes', 'action' => 'view', $examination->schooltype->id]) : '' ?></td>
        </tr>
        <tr>
            <th scope="row"><?= __('Title') ?></th>
            <td><?= h($examination->title) ?></td>
        </tr>
        <tr>
            <th scope="row"><?= __('Id') ?></th>
            <td><?= $this->Number->format($examination->id) ?></td>
        </tr>
        <tr>
            <th scope="row"><?= __('Created') ?></th>
            <td><?= h($examination->created) ?></td>
        </tr>
        <tr>
            <th scope="row"><?= __('Modified') ?></th>
            <td><?= h($examination->modified) ?></td>
        </tr>
    </table>
    <div class="related">
        <h4><?= __('Related Imports') ?></h4>
        <?php if (!empty($examination->imports)): ?>
        <table cellpadding="0" cellspacing="0">
            <tr>
                <th scope="col"><?= __('Id') ?></th>
                <th scope="col"><?= __('Schooltype Id') ?></th>
                <th scope="col"><?= __('Examination Id') ?></th>
                <th scope="col"><?= __('Title') ?></th>
                <th scope="col"><?= __('Filename') ?></th>
                <th scope="col"><?= __('Tablename') ?></th>
                <th scope="col"><?= __('Field Separator') ?></th>
                <th scope="col"><?= __('Mapping') ?></th>
                <th scope="col"><?= __('Skip') ?></th>
                <th scope="col"><?= __('Clear') ?></th>
                <th scope="col"><?= __('Update Table') ?></th>
                <th scope="col"><?= __('Overwrite') ?></th>
                <th scope="col"><?= __('Created') ?></th>
                <th scope="col"><?= __('Modified') ?></th>
                <th scope="col" class="actions"><?= __('Actions') ?></th>
            </tr>
            <?php foreach ($examination->imports as $imports): ?>
            <tr>
                <td><?= h($imports->id) ?></td>
                <td><?= h($imports->schooltype_id) ?></td>
                <td><?= h($imports->examination_id) ?></td>
                <td><?= h($imports->title) ?></td>
                <td><?= h($imports->filename) ?></td>
                <td><?= h($imports->tablename) ?></td>
                <td><?= h($imports->field_separator) ?></td>
                <td><?= h($imports->mapping) ?></td>
                <td><?= h($imports->skip) ?></td>
                <td><?= h($imports->clear) ?></td>
                <td><?= h($imports->update_table) ?></td>
                <td><?= h($imports->overwrite) ?></td>
                <td><?= h($imports->created) ?></td>
                <td><?= h($imports->modified) ?></td>
                <td class="actions">
                    <?= $this->Html->link(__('View'), ['controller' => 'Imports', 'action' => 'view', $imports->id]) ?>
                    <?= $this->Html->link(__('Edit'), ['controller' => 'Imports', 'action' => 'edit', $imports->id]) ?>
                    <?= $this->Form->postLink(__('Delete'), ['controller' => 'Imports', 'action' => 'delete', $imports->id], ['confirm' => __('Are you sure you want to delete # {0}?', $imports->id)]) ?>
                </td>
            </tr>
            <?php endforeach; ?>
        </table>
        <?php endif; ?>
    </div>
</div>
