Blame view

app/modules/admin/views/orders/index.php 1.36 KB
bf807468   Alex Savenko   first commit
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
57
58
59
60
  <?
  use yii\helpers\Html;
  use yii\grid\GridView;
  
  
  $this->title = 'Заказы';
  $this->params['breadcrumbs'][] = $this->title;
  ?>
  <h1>Заказы</h1>
  
  <?= GridView::widget([
      'dataProvider' => $dataProvider,
      'filterModel' => $searchModel,
      'columns' => [
          ['class' => 'yii\grid\SerialColumn'],
  		[
  		'attribute' => 'id',
  		'value'=>'id',
  		//'contentOptions'=>['style'=>'width: 160px;']
  		],
  		[
  		'attribute' => 'date_time',
  		'value'=>'date_time',
  		//'contentOptions'=>['style'=>'width: 160px;']
  		],
  		[
  		'attribute' => 'surname',
  		'value'=>'surname',
  		//'contentOptions'=>['style'=>'max-width: 300px;']
  		],        
  		[
  		'attribute' => 'name',
  		'value'=>function($data){
                              return Html::a($data->name, ['/admin/orders/show','id'=>$data->id]);
                          },
                  'format'=>'raw',
  		],
  		[
  		'attribute' => 'phone',
  		'value'=>'phone',
  		//'contentOptions'=>['style'=>'max-width: 300px;']
  		],
  		[
  		'attribute' => 'total',
  		'value'=>'total',
  		//'contentOptions'=>['style'=>'max-width: 300px;']
  		],
  
  		[
  		'attribute' => 'status',
  		'value'=>'status',
  		'contentOptions'=>['style'=>'width: 5px;']
  		],                                 
          [
              'class'    => 'yii\grid\ActionColumn',
              'template' => '{delete}',
              'contentOptions'=>['style'=>'width: 70px;']
          ],		
      ],
  ]) ?>