Blame view

backend/views/parser/server-files.php 1.57 KB
35764921   Mihail   add action and vi...
1
2
  <?php
  use yii\helpers\Html;
1fe29bbe   Mihail   fixed parser and ...
3
  use yii\helpers\Url;
35764921   Mihail   add action and vi...
4
5
6
7
  use yii\grid\GridView;
  use yii\grid\SerialColumn;
  use yii\grid\ActionColumn;
  use yii\widgets\Pjax;
0ade45a9   Mihail   add ajax handler ...
8
  use backend\assets\ParserAsset;
35764921   Mihail   add action and vi...
9
10
11
12
13
14
  
  
  /* @var $this yii\web\View */
  /* @var $searchModel backend\models\CatalogSearch */
  /* @var $dataProvider yii\data\ActiveDataProvider */
  
0ade45a9   Mihail   add ajax handler ...
15
  $this->title = 'Файлы на сервере';
35764921   Mihail   add action and vi...
16
  $this->params['breadcrumbs'][] = $this->title;
0ade45a9   Mihail   add ajax handler ...
17
18
  ParserAsset::register($this);
  Pjax::begin(['id' => 'server_files_grid']);
35764921   Mihail   add action and vi...
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
  
  ?>
      <div class="catalog-index">
  
          <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' ],
  
0ade45a9   Mihail   add ajax handler ...
36
37
38
39
40
41
42
43
44
                  ['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',
                      ]);
                  },
                  ],
  
35764921   Mihail   add action and vi...
45
46
47
  
              ]] );?>
  
1fe29bbe   Mihail   fixed parser and ...
48
          <?= Html::a('Загрузить файлы', ['parse'],['class' => 'btn btn-success']) ?>
35764921   Mihail   add action and vi...
49
50
51
52
53
  
      </div>
  <?php
  Pjax::end();
  ?>