Blame view

backend/views/certificate/index.php 1.21 KB
cc658b4c   Yarik   Big commit
1
  <?php
21aedefe   Yarik   Another one admin...
2
3
4
5
6
7
8
9
10
11
12
13
      
      use common\models\Certificate;
      use yii\helpers\Html;
      use yii\grid\GridView;
      
      /**
       * @var yii\web\View                    $this
       * @var common\models\CertificateSearch $searchModel
       * @var yii\data\ActiveDataProvider     $dataProvider
       */
      $this->title = 'Certificates';
      $this->params[ 'breadcrumbs' ][] = $this->title;
cc658b4c   Yarik   Big commit
14
15
  ?>
  <div class="certificate-index">
21aedefe   Yarik   Another one admin...
16
      
cc658b4c   Yarik   Big commit
17
      <h1><?= Html::encode($this->title) ?></h1>
21aedefe   Yarik   Another one admin...
18
      
cc658b4c   Yarik   Big commit
19
      <p>
21aedefe   Yarik   Another one admin...
20
          <?= Html::a('Create Certificate', [ 'create' ], [ 'class' => 'btn btn-success' ]) ?>
cc658b4c   Yarik   Big commit
21
22
23
      </p>
      <?= GridView::widget([
          'dataProvider' => $dataProvider,
21aedefe   Yarik   Another one admin...
24
25
26
          'filterModel'  => $searchModel,
          'columns'      => [
              [ 'class' => 'yii\grid\SerialColumn' ],
cc658b4c   Yarik   Big commit
27
28
              'certificate_id',
              'name',
21aedefe   Yarik   Another one admin...
29
30
31
32
33
34
35
36
37
38
39
              [
                  'attribute' => 'link',
                  'value'     => function($model) {
                      /**
                       * @var Certificate $model
                       */
                      return Html::a($model->link, $model->getCertificateUrl());
                  },
                  'format' => 'html',
              ],
              [ 'class' => 'yii\grid\ActionColumn' ],
cc658b4c   Yarik   Big commit
40
41
42
          ],
      ]); ?>
  </div>