//if(!$ghd) { throw new NotFoundHttpException('Страница не найдена.');} $this->title = 'Расписание группы ' . $model->name; $this->params['breadcrumbs'][] = ['label' => 'Информация', 'url' => Url::to(['site/information'])]; $this->params['breadcrumbs'][] = ['label' => 'Расписание', 'url' => Url::to(['lesson/index'])]; $this->params['breadcrumbs'][] = $this->title; ?> <div class="lesson-index"> <h3><?php echo "Расписание группы: " . Html::a($model->name, ['//group/view', 'id' => $model->id]); ?> </h3> <?php /* $ghd_id_arr = array(); foreach ($ghd as $grouphasdisc){ array_push($ghd_id_arr,$grouphasdisc->id); }; $lessons = Lesson::find()->where(['ghd_id' => $ghd_id_arr])->orderBy('week ASC, day ASC, time ASC')->all(); */ $lessons = Lesson::getLessonsList(['group' => $group]); echo Tabs::widget(['options' => ['class' => 'nav nav-pills nav-justified'], 'items' => [['label' => 'Неделя - 1', 'content' => Schedule::widget(['scenario' => 'group', 'lessons' => $lessons, 'week' => 1])], ['label' => 'Неделя - 2', 'content' => Schedule::widget(['scenario' => 'group', 'lessons' => $lessons, 'week' => 2])]]]); ?> </div> <?php Modal::begin(['header' => '', 'id' => 'modal', 'size' => 'modal-lg']); echo "<div id='modalContent'></div>"; Modal::end();
$this->params['breadcrumbs'][] = ['label' => 'Расписание', 'url' => Url::to(['lesson/index'])]; $this->params['breadcrumbs'][] = $this->title; ?> <div class="lesson-index"> <h3><?php echo "Архив расписания группы: " . Html::a($groupModel->name, ['//group/view', 'id' => $groupModel->id]); ?> <?php echo Html::encode($formatter->asDate($semesterModel->begin_date) . "-" . $formatter->asDate($semesterModel->end_date)); ?> </h3> <?php /* $ghd_id_arr = array(); foreach ($ghd as $grouphasdisc){ array_push($ghd_id_arr,$grouphasdisc->id); }; $lessons = Lesson::find()->where(['ghd_id' => $ghd_id_arr])->orderBy('week ASC, day ASC, time ASC')->all(); */ $lessons = Lesson::getLessonsList(['group' => $group, 'semester' => $semester]); echo Tabs::widget(['items' => [['label' => 'Неделя - 1', 'content' => Schedule::widget(['scenario' => 'group', 'lessons' => $lessons, 'week' => 1])], ['label' => 'Неделя - 2', 'content' => Schedule::widget(['scenario' => 'group', 'lessons' => $lessons, 'week' => 2])]]]); ?> </div> <?php Modal::begin(['header' => '', 'id' => 'modal', 'size' => 'modal-lg']); echo "<div id='modalContent'></div>"; Modal::end();