Blame view

frontend/views/company/team.php 2.17 KB
fbdb1f1c   Yarik   test
1
  <?php
a020aad3   Yarik   test
2
3
4
5
6
7
      /**
       * @var User               $company
       * @var ActiveDataProvider $team
       * @var View               $this
       * @var ActiveDataProvider $comments
       */
fbdb1f1c   Yarik   test
8
  
a020aad3   Yarik   test
9
10
11
12
13
14
15
      use common\models\User;
      use common\modules\comment\models\Comment;
      use yii\data\ActiveDataProvider;
      use yii\helpers\Html;
      use yii\web\View;
      use yii\widgets\LinkPager;
      use yii\widgets\ListView;
fbdb1f1c   Yarik   test
16
  
a020aad3   Yarik   test
17
18
      $this->params[ 'company' ] = $company;
      $this->title = 'My Yii Application';
fbdb1f1c   Yarik   test
19
20
  ?>
      <div class="command-blocks-wr style">
a020aad3   Yarik   test
21
          <?= ListView::widget([
d36bdac6   Administrator   17.02.16
22
              'dataProvider' => $team,
a020aad3   Yarik   test
23
24
25
              'itemView'     => '_company_list_view',
              'layout'       => '{items}',
          ]); ?>
fbdb1f1c   Yarik   test
26
  
fbdb1f1c   Yarik   test
27
28
29
  
      </div>
      <div class="navi-buttons-wr style command-command-style">
a020aad3   Yarik   test
30
31
32
          <?= LinkPager::widget([
              'pagination' => $team->pagination,
          ]); ?>
fbdb1f1c   Yarik   test
33
34
35
      </div>
  <?php
      /*====Blocks for layout====*/
a020aad3   Yarik   test
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
      if($comments->totalCount > 0) {
          $this->beginBlock('review');
          ?>
          <div class="section-box-19">
              <div class="box-wr">
                  <div class="box-all">
                      <div class="company-performer-comm-title style">Отзывов: <?= $comments->totalCount ?></div>
                      <?= ListView::widget([
                          'dataProvider' => $comments,
                          'itemView'     => '_company_team_review',
                          'layout'       => '{items}',
                          'options'      => [
                              'class' => 'company-performer-comments-wr style',
                          ],
                          'itemOptions'  => [
                              'class' => 'company-performer-comments-bl',
                          ],
                      ]) ?>
                      <div class="company-performer-comm-see-all-butt style">
                          <?= Html::a('Читать все отзывы', [
                              'company/review',
                              'company_id' => $company->id,
                          ]) ?>
fbdb1f1c   Yarik   test
59
60
                      </div>
                  </div>
fbdb1f1c   Yarik   test
61
62
              </div>
          </div>
a020aad3   Yarik   test
63
64
65
          <?php
          $this->endBlock();
      }
fbdb1f1c   Yarik   test
66
67
      /*====End blocks for layout====*/
  ?>