<?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 Supervising'), ['action' => 'edit', $supervising->id]) ?> </li>
        <li><?= $this->Form->postLink(__('Delete Supervising'), ['action' => 'delete', $supervising->id], ['confirm' => __('Are you sure you want to delete # {0}?', $supervising->id)]) ?> </li>
        <li><?= $this->Html->link(__('List Supervisings'), ['action' => 'index']) ?> </li>
        <li><?= $this->Html->link(__('New Supervising'), ['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 Departments'), ['controller' => 'Departments', 'action' => 'index']) ?> </li>
        <li><?= $this->Html->link(__('New Department'), ['controller' => 'Departments', 'action' => 'add']) ?> </li>
    </ul>
</nav>
<div class="supervisings view large-9 medium-8 columns content">
    <h3><?= h($supervising->id) ?></h3>
    <table class="vertical-table">
        <tr>
            <th scope="row"><?= __('Schooltype') ?></th>
            <td><?= $supervising->has('schooltype') ? $this->Html->link($supervising->schooltype->name, ['controller' => 'Schooltypes', 'action' => 'view', $supervising->schooltype->id]) : '' ?></td>
        </tr>
        <tr>
            <th scope="row"><?= __('Code') ?></th>
            <td><?= h($supervising->code) ?></td>
        </tr>
        <tr>
            <th scope="row"><?= __('Token') ?></th>
            <td><?= h($supervising->token) ?></td>
        </tr>
        <tr>
            <th scope="row"><?= __('Id') ?></th>
            <td><?= $this->Number->format($supervising->id) ?></td>
        </tr>
        <tr>
            <th scope="row"><?= __('Created') ?></th>
            <td><?= h($supervising->created) ?></td>
        </tr>
        <tr>
            <th scope="row"><?= __('Modified') ?></th>
            <td><?= h($supervising->modified) ?></td>
        </tr>
    </table>
    <div class="related">
        <h4><?= __('Related Departments') ?></h4>
        <?php if (!empty($supervising->departments)): ?>
        <table cellpadding="0" cellspacing="0">
            <tr>
                <th scope="col"><?= __('Id') ?></th>
                <th scope="col"><?= __('Schooltype Id') ?></th>
                <th scope="col"><?= __('Supervising Id') ?></th>
                <th scope="col"><?= __('Title') ?></th>
                <th scope="col"><?= __('Code') ?></th>
                <th scope="col"><?= __('Super School Code') ?></th>
                <th scope="col"><?= __('Count') ?></th>
                <th scope="col"><?= __('Delivery Date') ?></th>
                <th scope="col"><?= __('Requested') ?></th>
                <th scope="col"><?= __('Delivered') ?></th>
                <th scope="col"><?= __('Checkedin') ?></th>
                <th scope="col"><?= __('Delivery Count') ?></th>
                <th scope="col"><?= __('Data') ?></th>
                <th scope="col"><?= __('Created') ?></th>
                <th scope="col"><?= __('Modified') ?></th>
                <th scope="col" class="actions"><?= __('Actions') ?></th>
            </tr>
            <?php foreach ($supervising->departments as $departments): ?>
            <tr>
                <td><?= h($departments->id) ?></td>
                <td><?= h($departments->schooltype_id) ?></td>
                <td><?= h($departments->supervising_id) ?></td>
                <td><?= h($departments->title) ?></td>
                <td><?= h($departments->code) ?></td>
                <td><?= h($departments->super_school_code) ?></td>
                <td><?= h($departments->count) ?></td>
                <td><?= h($departments->delivery_date) ?></td>
                <td><?= h($departments->requested) ?></td>
                <td><?= h($departments->delivered) ?></td>
                <td><?= h($departments->checkedin) ?></td>
                <td><?= h($departments->delivery_count) ?></td>
                <td><?= h($departments->data) ?></td>
                <td><?= h($departments->created) ?></td>
                <td><?= h($departments->modified) ?></td>
                <td class="actions">
                    <?= $this->Html->link(__('View'), ['controller' => 'Departments', 'action' => 'view', $departments->id]) ?>
                    <?= $this->Html->link(__('Edit'), ['controller' => 'Departments', 'action' => 'edit', $departments->id]) ?>
                    <?= $this->Form->postLink(__('Delete'), ['controller' => 'Departments', 'action' => 'delete', $departments->id], ['confirm' => __('Are you sure you want to delete # {0}?', $departments->id)]) ?>
                </td>
            </tr>
            <?php endforeach; ?>
        </table>
        <?php endif; ?>
    </div>
</div>
