<?php 

use yii\helpers\Html;
$this->title = Yii::t('app', 'Training Requests Added By You');

?>

<div class="user">
    <h1><?= $this->title ?></h1>
    <p>
        <?= Html::a(Yii::t('app', 'Add New Request'), ['/training-requests/create'], ['class' => 'btn btn-purple btn-expanded']) ?>
    </p>

    <table class="table table-striped table-bordered">
        <tr>
            <th><?= Yii::t('app', 'Serial Number') ?></th>
            <th><?= Yii::t('app', 'Create Date') ?></th>
            <th><?= Yii::t('app', 'Training Request Status') ?></th>
            <th></th>
        </tr>

        <?php foreach($requests as $request): ?>
            <tr>
                <td><?= $request->serial_number ?></td>
                <td><?= $request->create_date ?></td>
                <td><?= Yii::t('app', $request->training_request_status) ?></td>
                <td><?= Html::a('<span class="glyphicon glyphicon-eye-open"></span>', ['/training-requests/view', 'id' => $request->id]) ?></td>
            </tr>
        <?php endforeach; ?>
    </table>

</div>
