server-files.php
1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
use yii\helpers\Html;
use yii\helpers\Url;
use yii\grid\GridView;
use yii\grid\SerialColumn;
use yii\grid\ActionColumn;
use yii\widgets\Pjax;
use backend\assets\ParserAsset;
/* @var $this yii\web\View */
/* @var $searchModel backend\models\CatalogSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Файлы на сервере';
$this->params['breadcrumbs'][] = $this->title;
ParserAsset::register($this);
Pjax::begin(['id' => 'server_files_grid']);
?>
<div class="catalog-index">
<?= Html::tag('h3', \Yii::$app->session->setFlash( 'server-files'),['class'=>'bg-success'])?>
<h1><?= Html::encode($this->title) ?></h1>
<?= GridView::widget( ['dataProvider' => $dataProvider,
'columns' => [['class' => SerialColumn::className()],
[
'label' =>'Поставщик',
'value' => function ($data) {
return $data->importer;
},
],
['label' =>'Дата загрузки',
'attribute' => 'upload_time' ],
['content' => function ($model) {
//Url::to(['delete', 'id' => $model->id, 'date_update' => $model->price_date_update]);
return Html::a('<span class="glyphicon glyphicon-remove"> Удалить </span>', '#', [
'value' => $model->id,
'class' => 'deleteLink',
]);
},
],
]] );?>
<?= Html::a('Запустить загрузку файлов', ['launch-crone-uploads'],['class' => 'btn btn-success']) ?>
</div>
<?php
Pjax::end();
?>