<?php /* $form->field($model, 'username')->textInput(['maxlength' => true]) */ ?> <?php // $form->field($model, 'datetime')->textInput() ?> <?php // $form->field($model, 'ipaddress')->textInput() ?> <?php echo $form->field($model, 'degreeid')->widget(Select2::classname(), ['name' => 'state_2', 'value' => '', 'data' => ArrayHelper::map(Acddegree::find()->joinWith(['acdevaluations.group'])->where(['acdgroup.groupid' => $model->groupid])->orderBy('description')->asArray()->all(), 'degreeid', 'description'), 'id' => 'combo', 'pluginOptions' => ['allowClear' => true], 'options' => ['placeholder' => 'Selecione o Grau acadêmico', 'format' => 'raw']]); ?> <?php echo $form->field($model, 'description')->textInput(); ?> <?php // $form->field($model, 'dateforecast')->textInput() ?> <?php echo $form->field($model, 'dateforecast')->widget(DateControl::classname(), ['type' => DateControl::FORMAT_DATE, 'ajaxConversion' => false, 'options' => ['pluginOptions' => ['autoclose' => true]]]); ?> <?php //$form->field($model, 'weight')->textInput()
/** * @return \yii\db\ActiveQuery */ public function getDegree() { return $this->hasOne(Acddegree::className(), ['degreeid' => 'degreeid']); }
<button type="button" class="btn btn-danger">Excluir</button> </div> </div> </div> </div> <?php Pjax::begin(['id' => 'gridAvaliacao', 'enablePushState' => false]); ?> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => ['evaluationid', ['attribute' => 'degreeid', 'vAlign' => 'middle', 'width' => '180px', 'value' => function ($model, $key, $index, $widget) { return Html::a($model->degree->description, '#', ['title' => 'selecione Grau', 'onclick' => 'alert("This will open the author page.\\n\\nDisabled for this demo!")']); }, 'filterType' => GridView::FILTER_SELECT2, 'filter' => ArrayHelper::map(Acddegree::find()->joinWith(['acdevaluations.group'])->where(['acdgroup.groupid' => $groupid])->orderBy('description')->asArray()->all(), 'degreeid', 'description'), 'filterWidgetOptions' => ['pluginOptions' => ['allowClear' => true]], 'filterInputOptions' => ['placeholder' => 'slecione Garu'], 'format' => 'raw'], 'description:ntext', ['attribute' => 'dateforecast', 'format' => ['date', 'php:d/m/Y']], 'maxpoints', ['class' => 'yii\\grid\\ActionColumn', 'template' => '{view} {update} {delete}', 'buttons' => ['view' => function ($url, $model, $key) { return Html::button('<span class="glyphicon glyphicon-eye-open"></span>', ['onclick' => "pop('index.php?r=portal-professor/evaluation/view&id={$model->evaluationid}','insere')", 'id' => $key, 'title' => Yii::t('yii', 'Ver informações da dsiciplina')]); }, 'update' => function ($url, $model, $key) { return Html::button('<span class="glyphicon glyphicon-pencil"></span>', ['onclick' => "pop('index.php?r=portal-professor/evaluation/update&id={$model->evaluationid}','insere')", 'id' => $key, 'title' => Yii::t('yii', 'Ver informações da dsiciplina')]); }, 'delete' => function ($url, $model, $key) { return Html::button('<span class="glyphicon glyphicon-trash"></span>', ['onclick' => "\$('#excluir').modal('show')", 'id' => $key, 'title' => Yii::t('yii', 'Ver informações da dsiciplina')]); }]]]]); ?> <?php Pjax::end(); ?> </div> <?php $js = <<<JS init();
/** * @return \yii\db\ActiveQuery */ public function getAcddegrees() { return $this->hasMany(Acddegree::className(), ['centerid' => 'centerid']); }
/** * @return \yii\db\ActiveQuery */ public function getAcddegrees() { return $this->hasMany(Acddegree::className(), ['learningperiodid' => 'learningperiodid']); }