add ugiro changes
This commit is contained in:
@@ -14,6 +14,7 @@ use yii\web\UploadedFile;
|
||||
use yii\data\ArrayDataProvider;
|
||||
use yii\db\Query;
|
||||
use yii\data\ActiveDataProvider;
|
||||
use common\models\MessageDetsta;
|
||||
|
||||
/**
|
||||
* UgiroController implements the CRUD actions for Ugiro model.
|
||||
@@ -97,6 +98,7 @@ class UgiroController extends Controller {
|
||||
'koteg' => $model
|
||||
] );
|
||||
$processor->run ();
|
||||
$this->redirect(['view', 'id' => $model->id_ugiro]);
|
||||
} else {
|
||||
\Yii::$app->session->setFlash ( 'danger', 'Nem lehet futtatni a fájlt' );
|
||||
\Yii::error ( "a koteg státusza nem STATUS_RECIEVED. A koteg azonosíótja:" . $model->id_ugiro );
|
||||
@@ -111,8 +113,19 @@ class UgiroController extends Controller {
|
||||
}
|
||||
}
|
||||
|
||||
$query = MessageDetsta::find();
|
||||
$query->andWhere(['id_ugiro' => $model->id_ugiro]);
|
||||
$query->orderBy([ 'created_at' => SORT_ASC ]);
|
||||
|
||||
$detstaDp = new ActiveDataProvider([
|
||||
'query' => $query,
|
||||
'pagination' => false,
|
||||
'sort' => false
|
||||
]);
|
||||
|
||||
return $this->render ( 'view', [
|
||||
'model' => $this->findModel ( $id )
|
||||
'model' => $this->findModel ( $id ) ,
|
||||
'detstaDp' => $detstaDp
|
||||
] );
|
||||
}
|
||||
protected function downloadUgiro($model) {
|
||||
|
||||
@@ -5,6 +5,9 @@ use yii\widgets\DetailView;
|
||||
use yii\helpers\Url;
|
||||
use common\models\Ugiro;
|
||||
use yii\widgets\ActiveForm;
|
||||
use yii\grid\GridView;
|
||||
use yii\base\Widget;
|
||||
use yii\grid\ActionColumn;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $model common\models\Ugiro */
|
||||
@@ -85,6 +88,29 @@ $attributes = [
|
||||
'attributes' => $attributes,
|
||||
]) ?>
|
||||
|
||||
|
||||
<h1>Detsta válaszok</h1>
|
||||
<?php
|
||||
echo GridView::widget(
|
||||
[
|
||||
'dataProvider' => $detstaDp,
|
||||
'columns' =>[
|
||||
[
|
||||
'attribute' => 'created_at',
|
||||
'label' => 'Létrehozva'
|
||||
],
|
||||
[
|
||||
'class' => ActionColumn::className()
|
||||
]
|
||||
]
|
||||
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
</div>
|
||||
<div class="btns">
|
||||
<?php
|
||||
|
||||
Reference in New Issue
Block a user