Exemple #1
0
    // get the relation
    if ($invitados !== null) {
        if (!empty($invitados)) {
            foreach ($invitados as $invitado) {
                $valores .= $invitado->userInvitado->nombre . ', ';
            }
        }
    }
    return $valores;
}], ['attribute' => 'f_inicio', 'width' => '120px', 'format' => ['date', 'php:D d M Y h:i A']], ['readonly' => function ($model, $key, $index, $widget) {
    return $model->user->id != Yii::$app->user->identity->id;
    // do not allow editing of inactive records
}, 'class' => 'kartik\\grid\\EditableColumn', 'width' => '80px', 'attribute' => 'actividad', 'label' => 'Actividad', 'value' => function ($model, $key, $index, $widget) {
    return $model->actividad;
}, 'filterType' => GridView::FILTER_SELECT2, 'filter' => \yii\helpers\ArrayHelper::map(\backend\models\Agenda::listaActividades(), 'id', 'actividad'), 'filterWidgetOptions' => ['pluginOptions' => ['allowClear' => true]], 'filterInputOptions' => ['placeholder' => 'Actividad'], 'editableOptions' => function ($model, $key, $index, $widget) {
    return ['formOptions' => ['action' => Url::to([''])], 'header' => 'Actividad', 'size' => 'md', 'inputType' => \kartik\editable\Editable::INPUT_SELECT2, 'options' => ['data' => \yii\helpers\ArrayHelper::map(\backend\models\Agenda::listaActividades(), 'id', 'actividad')]];
}], ['readonly' => function ($model, $key, $index, $widget) {
    return $model->user->id != Yii::$app->user->identity->id;
    // do not allow editing of inactive records
}, 'class' => 'kartik\\grid\\EditableColumn', 'attribute' => 'lugar', 'label' => 'Dirección', 'width' => '140px', 'value' => function ($model, $key, $index, $widget) {
    return $model->lugar;
}, 'editableOptions' => function ($model, $key, $index, $widget) {
    return ['inputType' => \kartik\editable\Editable::INPUT_TEXT, 'formOptions' => ['action' => Url::to(['agenda/change', 'id' => $model->agendaid])], 'header' => 'Lugar', 'size' => 'md'];
}], ['readonly' => function ($model, $key, $index, $widget) {
    return $model->user->id != Yii::$app->user->identity->id;
    // do not allow editing of inactive records
}, 'class' => 'kartik\\grid\\EditableColumn', 'width' => '80px', 'attribute' => 'estado', 'label' => 'Estado', 'value' => function ($model, $key, $index, $widget) {
    return $model->estado;
}, 'filterType' => GridView::FILTER_SELECT2, 'filter' => \yii\helpers\ArrayHelper::map(\backend\models\Agenda::listaEstado(), 'id', 'estado'), 'filterWidgetOptions' => ['pluginOptions' => ['allowClear' => true]], 'filterInputOptions' => ['placeholder' => 'Estado'], 'editableOptions' => function ($model, $key, $index, $widget) {
    return ['formOptions' => ['action' => Url::to(['agenda/change', 'id' => $model->agendaid])], 'header' => 'Estado', 'size' => 'md', 'inputType' => \kartik\editable\Editable::INPUT_SELECT2, 'options' => ['data' => \yii\helpers\ArrayHelper::map(\backend\models\Agenda::listaEstado(), 'id', 'estado')]];
}], ['readonly' => function ($model, $key, $index, $widget) {
Exemple #2
0
echo $form->field($model, 'user_id')->dropDownList($lista)->label('Asignado');
?>
        </div>
    </div>

    <div class="row">
        <div class="col-xs-3">
            <?php 
echo $form->field($model, 'estado')->dropDownList(\yii\helpers\ArrayHelper::map(\backend\models\Agenda::listaEstado(), 'id', 'estado'));
?>
        </div>
    </div>
    <div class="row">
        <div class="col-xs-3">
            <?php 
echo $form->field($model, 'actividad')->dropDownList(\yii\helpers\ArrayHelper::map(\backend\models\Agenda::listaActividades(), 'id', 'actividad'), ['prompt' => '[Seleccionar]']);
?>
        </div>
    </div>
    <div class="row">
        <div class="col-xs-3">
            <?php 
echo $form->field($model, 'asunto')->textarea(['maxlength' => true]);
?>
        </div>
    </div>
    <div class="row">
        <div class="col-xs-3">


            <?php