registerJs( <<title = Yii::$app->name; echo Alert::widget([ 'type' => Alert::TYPE_INFO, 'title' => 'Информация: ', 'titleOptions' => ['icon' => 'info-sign'], 'body' => 'Для отображения данных укажите параметры поиска и нажмите кнопку "Показать"' ]); ?>

Учебные планы

'_academic_plan_form']); ?>
user->identity->isInRole(User::ROLE_STUDENT)) { echo Html::tag('label', 'Учебный план:', ['for' => 'plan_plan']); } elseif (Yii::$app->user->identity->isInRole(User::ROLE_TEACHER)) { echo Html::tag('label', 'Место работы:', ['for' => 'plan_plan']); } ?>
'form-control form-group', 'id' => 'plan_id'] ); ?>
$semester_id, 'name' => 'plan_semester', 'class' => 'form-control form-group', 'type' => DepDrop::TYPE_SELECT2, 'data' => ArrayHelper::map($semesters, 'id', 'name'), 'options' => ['id' => 'semester_id', 'placeholder' => 'Выберите семестр'], 'select2Options' => ['pluginOptions' => ['allowClear' => false, 'multiple' => false]], 'pluginOptions' => [ 'initialize' => true, 'depends' => ['plan_id'], 'loadingText' => 'Загрузка ...', 'placeholder' => 'Выберите семестр', 'dropdownParent' => '#body-content-id', 'url' => Url::to(['/student/semesters']), ], ]); ?>
'btn btn-primary', 'id' => '_academic_plan_button']); ?>
user->identity->isInRole(User::ROLE_STUDENT)) { $role = 'учебного плана'; } elseif (Yii::$app->user->identity->isInRole(User::ROLE_TEACHER)) { $role = 'места работы'; } echo Html::tag( 'div', "Для {$role} записей не обнаружено.", ['class' => 'alert alert-info', 'role' => 'alert'] ); } elseif (!empty($semesters)) { echo Html::tag( 'div', 'Для семестра записей не обнаружено.', ['class' => 'alert alert-info', 'role' => 'alert'] ); } ?>
name && $disc_name != '') { $tableArray[] = $row; $row = $empty_row; } $row['Единица измерения'] = $discipline->unit; if ($row['Предмет'] == '') { $row['Предмет'] = $discipline->name; } foreach ($loads as $load) { if ($discipline->load == $load) { $row[$load] = $discipline->getInfo(); } } $disc_name = $discipline->name; } $tableArray[] = $row; $loads[] = 'Единица измерения'; $dataProvider = new ArrayDataProvider([ 'allModels' => $tableArray, 'sort' => [ 'attributes' => $loads ] ]); $columns = []; foreach ($loads as $load) { $columns[] = [ 'label' => $load, 'attribute' => $load, 'contentOptions' => ($load == 'Предмет') ? ['id' => '_academic_table-left', 'class' => 'col-sm-4'] : [] ]; } Pjax::begin([ 'options' => ['id' => '_academic_table'], 'timeout' => false, 'enablePushState' => false, 'clientOptions' => ['method' => 'POST'] ]); echo Html::beginTag('div', ['class' => 'table-responsive']); echo GridView::widget([ 'hover' => true, 'headerContainer' => ['class' => 'thead-light'], 'tableOptions' => ['class' => 'table-sm'], 'striped' => false, 'summary' => false, 'pager' => [ 'firstPageLabel' => '<<', 'prevPageLabel' => '<', 'nextPageLabel' => '>', 'lastPageLabel' => '>>', ], 'columns' => $columns, 'layout' => '{items}{pager}', 'dataProvider' => $dataProvider, 'options' => ['align' => 'left', 'id' => '_academic_table'] ]); echo Html::endTag('div'); Pjax::end(); } else { Pjax::begin([ 'options' => ['id' => '_academic_table'], 'timeout' => false, 'enablePushState' => false, 'clientOptions' => ['method' => 'POST'] ]); echo Html::tag( 'div', 'Для заданных параметров данные не могут быть предоставлены.', ['class' => 'alert alert-info', 'role' => 'alert'] ); Pjax::end(); } ?>