Beispiel #1
0
 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = Tareas::find();
     $dataProvider = new ActiveDataProvider(['query' => $query]);
     $this->load($params);
     if (!$this->validate()) {
         // uncomment the following line if you do not want to return any records when validation fails
         // $query->where('0=1');
         return $dataProvider;
     }
     $query->andFilterWhere(['idTareas' => $this->idTareas]);
     $query->andFilterWhere(['like', 'Tarea', $this->Tarea]);
     return $dataProvider;
 }
 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = Tareas::find();
     $dataProvider = new ActiveDataProvider(['query' => $query]);
     $this->load($params);
     if (!$this->validate()) {
         // uncomment the following line if you do not want to return any records when validation fails
         // $query->where('0=1');
         return $dataProvider;
     }
     $query->andFilterWhere(['idtareas' => $this->idtareas, 'fecha_inicio' => $this->fecha_inicio, 'fecha_fin' => $this->fecha_fin]);
     $query->andFilterWhere(['like', 'nombre', $this->nombre])->andFilterWhere(['like', 'descripcion', $this->descripcion]);
     return $dataProvider;
 }
Beispiel #3
0
/* @var $model app\models\TareaTipo */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="tarea-tipo-form">

    <?php 
$form = ActiveForm::begin();
?>

    <?php 
echo $form->field($model, 'idtarea_tipo')->textInput();
?>

    <?php 
echo $form->field($model, 'idTareas')->dropDownList(ArrayHelper::map(Tareas::find()->all(), 'idTareas', 'Tarea'), ['prompt' => 'Seleccione Tarea']);
?>

    <?php 
echo $form->field($model, 'idTipo')->dropDownList(ArrayHelper::map(Tipo::find()->all(), 'idTipo', 'Tipo'), ['prompt' => 'Seleccione Tipo']);
?>

    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
    </div>

    <?php 
ActiveForm::end();
?>
/* @var $form yii\widgets\ActiveForm */
?>

<div class="detalle-form">

    <?php 
$form = ActiveForm::begin();
?>

    
	  <?php 
echo $form->field($model, 'recurso_humano_idrecurso_humano')->dropDownList(ArrayHelper::map(\app\models\RecursoHumano::find()->asArray()->all(), 'idrecurso_humano', 'nombre'), ['prompt' => 'Selecciona']);
?>

	<?php 
echo $form->field($model, 'tareas_idtareas')->dropDownList(ArrayHelper::map(\app\models\Tareas::find()->asArray()->all(), 'idtareas', 'nombre'), ['prompt' => 'Selecciona']);
?>

    

    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
    </div>

    <?php 
ActiveForm::end();
?>

</div>