<?php use app\entities\Kurs; use app\helpers\Html; use app\models\kurs_slushatelyu\ZapisNaKursForm; use app\widgets\KursSummary; /** * @var ZapisNaKursForm $model */ $kurs = Kurs::findOne($model->kurs); ?> <div class="jumbotron"> <h2>Вы отменили запись на курс «<?php echo $kurs->nazvanie; ?> » </h2> <?php echo KursSummary::widget(['model' => $kurs]); ?> <?php echo Html::returningA('Ок', ['class' => 'btn btn-primary btn-lg center-block']); ?> </div>
var $switch = $(this); var $row = $switch.closest('tr'); var $sub_row = $row.next('tr.sub-row'); $switch.click(function() { $sub_row.toggle(); $row.toggleClass('sub-row-shown'); return false; }); }); }); JS; $userId = Yii::$app->user->id; $roles = $userId ? Yii::$app->authManager->getRolesByUser($userId) : []; echo GridView::widget(['dataProvider' => $data, 'pager' => ['maxButtonCount' => 20], 'layout' => "{pager}\n{items}\n{pager}", 'options' => ['class' => 'spisok-kursov'], 'tableOptions' => ['class' => 'table'], 'afterRow' => function ($kurs) { return Html::tag('tr', '<td></td><td colspan="3">' . KursSummary::widget(['model' => $kurs]) . '</td><td></td>', ['class' => 'sub-row', 'style' => 'display:none']); }, 'rowOptions' => function ($kurs) { $class = ''; if ($kurs->statusProgrammy and $kurs->statusProgrammy == StatusProgrammyKursa::ZAVERSHENA) { $class = 'info'; } return ['class' => $class]; }, 'columns' => [['header' => 'Категория слушателей', 'format' => 'ntext', 'value' => function ($kurs) { return implode(",\n", $kurs->nazvaniyaKategorijSlushatelej); }], ['header' => 'Наименование программы', 'value' => 'nazvanie', 'contentOptions' => ['class' => 'nazvanie']], ['header' => 'Форма обучения', 'format' => 'ntext', 'value' => function ($kurs) { return implode(",\n", $kurs->formyObucheniyaAsNames); }], ['header' => 'О курсе', 'format' => 'html', 'value' => function () { return Html::a('показать', '#', ['class' => 'sub-row-switch']); }], ['format' => 'raw', 'value' => function ($kurs) { /** * @var $kurs KursExtended
/** * @var ZapisNaKursForm $model * @var $this yii\web\View */ $this->title = 'Запись на курс в БРИОП'; $form = ActiveForm::begin(['fieldConfig' => ['template' => "{label}\n<div class=\"col-md-8\">\n{input}\n{hint}\n{error}\n</div>", 'labelOptions' => ['class' => 'control-label col-md-4']]]); $kursEntity = Kurs::findOne($kurs); ?> <h2>Запись на курс «<?php echo $kursEntity->nazvanie; ?> » </h2> <?php echo KursSummary::widget(['model' => $kursEntity]); ?> <div class="row"> <div class="col-md-5 form-horizontal"> <div class="fields-group-heading"> <h3>Работа</h3> </div> <?php echo $form->field($model, 'pedStazh')->widget(TouchSpin::className()); ?> <?php echo $form->field($model, 'stazhVDolzhnosti')->widget(TouchSpin::className());