Blame view

frontend/views/event/show.php 2.72 KB
8072159c   Alex Savenko   create proj
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
  <?php
  /**
   * @var $this View
   */
  
  
  use yii\web\View;
  use yii\widgets\ListView;
  use frontend\assets\FlipclockAsset;
  FlipclockAsset::register($this);
  
  ?>
  <?php
  $this->title = $model->name;
  $this->params['seo']['title'] = $this->title;
  
  $this->params['seo']['h1'] = $this->title;
  ?>
  
  
  <div class="wrapper white item_container">
      <div class="container">
  	<h1><?=$model->name?></h1>
          <div class="event_block_img">
              <?php if($model->image){?>
                  <?= \common\components\artboximage\ArtboxImageHelper::getImage($model->imageUrl, 'event_left', ['align' => 'left'])?>
              <?php }?>
  
              <?php
  
              if(!empty($model->end_at) && strtotime($model->end_at) > strtotime(date("Y-m-d"))){
                  ?>
                  <div class="clock_style_abs clock"></div>
              <?php $js = "
                           var clock;
  
                          clock = new FlipClock(jQuery('.clock'),{
                              clockFace: 'DailyCounter',
                              language: 'ru',
                              classes: {
                                  active: 'flip-clock-active',
                                  before: 'flip-clock-before',
                                  divider: 'flip-clock-divider',
                                  dot: 'flip-clock-dot',
                                  label: 'flip-clock-label',
                                  flip: 'flip',
                                  play: 'play',
                                  wrapper: 'flip-clock-wrapper'
                              },
                          });
  
                      clock.setTime(".(strtotime($model->end_at) - strtotime(date('Y-m-d H:i:s'))).");
                      clock.setCountdown(true);
                      clock.start();";
              $this->registerJs($js,View::POS_LOAD) ?>
  
  
                  <?php
              }
  
              ?>
          </div>
  
          <div class="body_view">
              <?=$model->body?>
          </div>
  
  
  
          <div class="block-100" itemscope itemtype="http://schema.org/Product">
  
                  <div class="catalog_product_list view_table">
                      <?= ListView::widget([
                          'emptyText' => '',
                          'dataProvider' => $productProvider,
                          'itemView' => function ($model, $key, $index, $widget) {
                              return $this->render('../catalog/_product_item',[
                                  'model' => $model,
                                  'category' => $model->category,
  
                              ]);
                          },
                          'layout' => "{items}<div class=\"clearfix\"></div>{pager}",
                      ])
  
                      ?>
                  </div>
          </div>
      </div>
  </div>