Пример #1
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getEntrevistador()
 {
     return $this->hasOne(ContenidoEntrevistador::className(), ['entrevistador_id' => 'entrevistador_id']);
 }
Пример #2
0
}], ['width' => '150px', 'label' => 'Redes Sociales del talento', 'class' => 'kartik\\grid\\EditableColumn', 'attribute' => 'redes_sociales_talento', 'editableOptions' => function ($model, $key, $index, $widget) {
    return ['asPopover' => false, 'inputType' => \kartik\editable\Editable::INPUT_TEXT, 'formOptions' => ['action' => Url::to(['contenidos/change', 'id' => $model->contenido_id])], 'header' => 'Redes Sociales del talento', 'size' => 'md'];
}], ['class' => 'kartik\\grid\\EditableColumn', 'attribute' => 'profesion_id', 'label' => 'Profesion', 'width' => '100px', 'value' => function ($model, $key, $index, $widget) {
    return $model->profesion->profesion;
}, 'filterType' => GridView::FILTER_SELECT2, 'filter' => \yii\helpers\ArrayHelper::map(\backend\models\ContenidoProfesion::find()->asArray()->orderBy('profesion')->all(), 'profesion_id', 'profesion'), 'filterWidgetOptions' => ['pluginOptions' => ['allowClear' => true]], 'filterInputOptions' => ['placeholder' => 'Profesion'], 'editableOptions' => function ($model, $key, $index, $widget) {
    return ['formOptions' => ['action' => Url::to(['contenidos/change', 'id' => $model->contenido_id])], 'header' => 'Profesion', 'size' => 'md', 'inputType' => \kartik\editable\Editable::INPUT_SELECT2, 'options' => ['data' => \yii\helpers\ArrayHelper::map(\backend\models\ContenidoProfesion::find()->all(), 'profesion_id', 'profesion')]];
}], ['width' => '150px', 'label' => 'CV o Biografía ( Adjuntar)', 'attribute' => 'cv_biografia', 'format' => 'raw', 'value' => function ($model) {
    return Html::a($model->cv_biografia, $model->cv_biografia, ['data-pjax' => 0]);
}], ['class' => 'kartik\\grid\\EditableColumn', 'attribute' => 'generado_por_id', 'label' => 'Generado por', 'width' => '100px', 'value' => function ($model, $key, $index, $widget) {
    return $model->generadoPor->generado_por;
}, 'filterType' => GridView::FILTER_SELECT2, 'filter' => \yii\helpers\ArrayHelper::map(\backend\models\ContenidoGeneradoPor::find()->asArray()->orderBy('generado_por')->all(), 'generado_por_id', 'generado_por'), 'filterWidgetOptions' => ['pluginOptions' => ['allowClear' => true]], 'filterInputOptions' => ['placeholder' => 'Generado por'], 'editableOptions' => function ($model, $key, $index, $widget) {
    return ['formOptions' => ['action' => Url::to(['contenidos/change', 'id' => $model->contenido_id])], 'header' => 'Generado por', 'size' => 'md', 'inputType' => \kartik\editable\Editable::INPUT_SELECT2, 'options' => ['data' => \yii\helpers\ArrayHelper::map(\backend\models\ContenidoGeneradoPor::find()->all(), 'generado_por_id', 'generado_por')]];
}], ['class' => 'kartik\\grid\\EditableColumn', 'attribute' => 'entrevistador_id', 'label' => 'Entrevistador', 'width' => '100px', 'value' => function ($model, $key, $index, $widget) {
    return $model->entrevistador->entrevistador;
}, 'filterType' => GridView::FILTER_SELECT2, 'filter' => \yii\helpers\ArrayHelper::map(\backend\models\ContenidoEntrevistador::find()->asArray()->orderBy('entrevistador')->all(), 'entrevistador_id', 'entrevistador'), 'filterWidgetOptions' => ['pluginOptions' => ['allowClear' => true]], 'filterInputOptions' => ['placeholder' => 'Entrevistador'], 'editableOptions' => function ($model, $key, $index, $widget) {
    return ['formOptions' => ['action' => Url::to(['contenidos/change', 'id' => $model->contenido_id])], 'header' => 'Entrevistador', 'size' => 'md', 'inputType' => \kartik\editable\Editable::INPUT_SELECT2, 'options' => ['data' => \yii\helpers\ArrayHelper::map(\backend\models\ContenidoEntrevistador::find()->all(), 'entrevistador_id', 'entrevistador')]];
}], ['width' => '100px', 'label' => 'Reconocimiento', 'format' => ['date', 'php:d F Y'], 'class' => 'kartik\\grid\\EditableColumn', 'attribute' => 'reconocimiento', 'editableOptions' => function ($model, $key, $index, $widget) {
    return ['asPopover' => true, 'inputType' => \kartik\editable\Editable::INPUT_DATE, 'formOptions' => ['action' => Url::to(['contenidos/change', 'id' => $model->contenido_id])], 'header' => 'Reconocimiento', 'size' => 'md', 'options' => ['convertFormat' => true, 'pluginOptions' => ['format' => 'php:Y-m-d']]];
}], ['width' => '150px', 'label' => 'Telefono de oficina', 'class' => 'kartik\\grid\\EditableColumn', 'attribute' => 'telefono_oficina', 'editableOptions' => function ($model, $key, $index, $widget) {
    return ['asPopover' => false, 'inputType' => \kartik\editable\Editable::INPUT_TEXT, 'formOptions' => ['action' => Url::to(['contenidos/change', 'id' => $model->contenido_id])], 'header' => 'Telefono de oficina', 'size' => 'md'];
}], ['width' => '150px', 'label' => 'Celular', 'class' => 'kartik\\grid\\EditableColumn', 'attribute' => 'celular', 'editableOptions' => function ($model, $key, $index, $widget) {
    return ['asPopover' => false, 'inputType' => \kartik\editable\Editable::INPUT_TEXT, 'formOptions' => ['action' => Url::to(['contenidos/change', 'id' => $model->contenido_id])], 'header' => 'Celular', 'size' => 'md'];
}], ['width' => '150px', 'label' => 'Mail', 'class' => 'kartik\\grid\\EditableColumn', 'attribute' => 'mail', 'editableOptions' => function ($model, $key, $index, $widget) {
    return ['asPopover' => false, 'inputType' => \kartik\editable\Editable::INPUT_TEXT, 'formOptions' => ['action' => Url::to(['contenidos/change', 'id' => $model->contenido_id])], 'header' => 'Mail', 'size' => 'md'];
}], ['width' => '150px', 'label' => 'Dirección de oficina', 'class' => 'kartik\\grid\\EditableColumn', 'attribute' => 'direccion_oficina', 'editableOptions' => function ($model, $key, $index, $widget) {
    return ['asPopover' => false, 'inputType' => \kartik\editable\Editable::INPUT_TEXT, 'formOptions' => ['action' => Url::to(['contenidos/change', 'id' => $model->contenido_id])], 'header' => 'Dirección de oficina', 'size' => 'md'];
}]];
echo export\ExportMenu::widget(['dataProvider' => $dataProvider, 'columns' => $gridColumns, 'columnSelectorOptions' => ['label' => 'Columnas'], 'dropdownOptions' => ['label' => 'Exportar Todo', 'class' => 'btn btn-default'], 'hiddenColumns' => [0, 1, 10], 'noExportColumns' => [0, 1, 10], 'exportConfig' => [export\ExportMenu::FORMAT_HTML => false, export\ExportMenu::FORMAT_CSV => false, export\ExportMenu::FORMAT_TEXT => false, export\ExportMenu::FORMAT_PDF => false, export\ExportMenu::FORMAT_EXCEL => false]]);
?>

Пример #3
0

    <div class="row">
        <div class="col-xs-4">

            <?php 
echo $form->field($model, 'generado_por_id')->widget(Select2::classname(), ['data' => ArrayHelper::map(\backend\models\ContenidoGeneradoPor::find()->orderBy('generado_por')->all(), 'generado_por_id', 'generado_por'), 'options' => ['placeholder' => 'Selecciona Generado por'], 'pluginOptions' => ['allowClear' => true]]);
?>
        </div>
    </div>

    <div class="row">
        <div class="col-xs-4">

            <?php 
echo $form->field($model, 'entrevistador_id')->widget(Select2::classname(), ['data' => ArrayHelper::map(\backend\models\ContenidoEntrevistador::find()->orderBy('entrevistador')->all(), 'entrevistador_id', 'entrevistador'), 'options' => ['placeholder' => 'Selecciona Entrevistador'], 'pluginOptions' => ['allowClear' => true]]);
?>
        </div>
    </div>

    <div class="row">
        <div class="col-xs-4">
            <?php 
echo $form->field($model, 'reconocimiento')->widget(DateControl::classname(), ['language' => 'es', 'type' => 'date', 'displayFormat' => 'php: d F Y', 'options' => ['pluginOptions' => ['autoclose' => true, 'showMeridian' => true]]]);
?>
        </div>
    </div>

    <div class="row">
        <div class="col-xs-4">
            <?php