Blame view

frontend/views/company/portfolio.php 2.25 KB
14a09168   Alex Savenko   init 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
61
62
63
  <?php
  
      use common\models\Specialization;
      use common\models\User;
      use yii\data\ActiveDataProvider;
      use \yii\helpers\Html;
      use yii\helpers\Url;
      use yii\widgets\ListView;
      use yii\widgets\Pjax;
  
      /**
       * @var yii\web\View       $this
       * @var User               $company
       * @var ActiveDataProvider $portfolio
       * @var array              $filters
       * @var int                $filter_id
       */
      $this->params[ 'company' ] = $company;
      $this->title = 'Proektant.net';
  ?>
  <div class="performer-vacancy-vacant-title-reclam-wr style">
  
      <?php
          Pjax::begin();
      ?>
      <div class="portfolio-project-wr style">
          <div class="workplace-title style">
              <p><?= Yii::t('app', 'Projects') ?>: <?= $portfolio->totalCount ?></p></div>
          <div class="portfolio-project-tags style">
              <?= Html::a("Все (".count($company->portfolios).")", [
                  'company/portfolio',
                  'company_id' => $company->id,
                  'type'       => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL,
              ], [ 'class' => !isset( $filter_id ) || empty( $filter_id ) ? "active-tag" : "" ]); ?>
              <a href="#" class="active-tag"></a>
              <?php foreach($filters as $filter) {
                  echo Html::a("{$filter['specialization_name']} ({$filter['count']})", Url::toRoute([
                      'company/portfolio-filter',
                      'company_id' => $company->id,
                      'filter'     => $filter['specialization_id'],
                      'type'       => ( !empty( $this->params[ 'type' ] ) ) ? $this->params[ 'type' ] : NULL,
                  ]), [ 'class' => isset( $filter_id ) && $filter['specialization_id'] == $filter_id ? "active-tag" : "" ]);
              } ?>
  
          </div>
      </div>
  
      <div class="style">
          <div class="portfolio-project-blocks-wrapper">
              <?= ListView::widget([
                  'dataProvider' => $portfolio,
                  'itemView'     => '_portfolio_list_view',
                  'layout'       => "{items}\n<div class='navi-buttons-wr style'>{pager}</div>",
                  'viewParams'   => [ 'parent_view' => $this ],
              ]); ?>
  
          </div>
      </div>
      <?php
          Pjax::end();
      ?>
  
  </div>