Exemple #1
0
</h1>
   <?php 
// echo $this->render('_search', ['model' => $searchModel]);
?>
 
   <div class="btn-group">
    <?php 
echo Html::button('Добавить занятие', ['value' => Url::to(['//lesson/create']), 'class' => 'btn btn-success modalButton']);
?>
     
    <?php 
echo Html::button('Управление типами', ['value' => Url::to(['//lesson-type/index']), 'class' => 'btn btn-primary modalButton']);
?>
         
   </div>
   <?php 
Pjax::begin(['enablePushState' => false]);
?>
   <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'options' => ['class' => 'table-responsive'], 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'groupName', 'disciplineName', ['attribute' => 'lessonTypeName', 'filter' => ArrayHelper::map(\common\models\LessonType::find()->all(), 'name', 'name')], 'teacherFullname', ['attribute' => 'week', 'filter' => [1 => 1, 2 => 2]], ['attribute' => 'day', 'value' => function ($model) {
    return $model->dayRealName;
}, 'filter' => Lesson::getDaysList()], ['attribute' => 'time', 'filter' => ArrayHelper::map(Lesson::find()->select('time')->distinct()->all(), 'time', 'time')], 'auditory', ['class' => 'common\\components\\ActionColumn']]]);
?>
   <?php 
Pjax::end();
?>
</div>
<?php 
Modal::begin(['header' => '', 'id' => 'modal', 'size' => 'modal-lg']);
echo "<div id='modalContent'></div>";
Modal::end();
Exemple #2
0
    

    <?php 
echo $model->isNewRecord ? $form->field($model, 'thd_id')->widget(DepDrop::classname(), ['options' => ['id' => 'thd_id-id'], 'pluginOptions' => ['depends' => ['lesson-ghd_id'], 'placeholder' => '...', 'url' => Url::to(['/lesson/thd'])]]) : $form->field($model, 'thd_id')->dropDownList(ArrayHelper::map($model->groupHasDiscipline->teacherHasDiscipline, 'teacher.id', 'teacher.user.fullname'));
?>
    
    <?php 
echo $form->field($model, 'lesson_type_id')->dropDownList(ArrayHelper::map(LessonType::find()->all(), 'id', 'name'));
?>

    <?php 
echo $form->field($model, 'week')->dropDownList(['1' => 1, '2' => 2]);
?>

    <?php 
echo $form->field($model, 'day')->dropDownList(Lesson::getDaysList());
?>

    <?php 
echo $form->field($model, 'time')->widget(TimePicker::classname(), ['pluginOptions' => ['defaultTime' => '8:30:00', 'showSeconds' => true, 'showMeridian' => false, 'minuteStep' => 5]]);
?>

    <?php 
echo $form->field($model, 'auditory')->textInput(['maxlength' => true]);
?>

    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? 'Создать' : 'Сохранить', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
    </div>