Blame view

frontend/views/event/show.php 2.77 KB
1da76554   Administrator   big commti
1
2
3
4
  <?php
  use frontend\assets\FlipclockAsset;
  use yii\helpers\Url;
  use yii\widgets\Breadcrumbs;
bc07fb47   Administrator   big commti
5
6
  use yii\widgets\ListView;
  
1da76554   Administrator   big commti
7
8
9
10
  FlipclockAsset::register($this);
  ?>
  <?php
  $this->title = $model->name;
5181a91a   Administrator   big commti
11
  $this->params['seo']['title'] = $this->title;
1da76554   Administrator   big commti
12
  
5181a91a   Administrator   big commti
13
  $this->params['seo']['h1'] = $this->title;
1da76554   Administrator   big commti
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
  ?>
  
  
  <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 clock"></div>
                  <script type="text/javascript">
                      var clock;
  
                      $(document).ready(function() {
                          var clock;
  
                          clock = $('.clock').FlipClock({
                              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();
  
                      });
                  </script>
  
  
                  <?php
              }
  
              ?>
          </div>
  
b905419d   Administrator   big commti
65
          <div class="body_view">
1da76554   Administrator   big commti
66
              <?=$model->body?>
b905419d   Administrator   big commti
67
68
          </div>
  
1da76554   Administrator   big commti
69
70
  
  
b905419d   Administrator   big commti
71
          <div class="block-100" itemscope itemtype="http://schema.org/Product">
1aa8f9e5   Administrator   big commti
72
73
  
                  <div class="catalog_product_list view_table">
bc07fb47   Administrator   big commti
74
75
76
                      <?= ListView::widget([
                          'dataProvider' => $productProvider,
                          'itemView' => function ($model, $key, $index, $widget) {
601f4d99   Виталий   -
77
                              return $this->render('../catalog/_product_item',[
bc07fb47   Administrator   big commti
78
                                  'model' => $model,
6d3c0929   Виталий   -
79
                                  'category' => $model->category,
bc07fb47   Administrator   big commti
80
81
82
83
84
85
86
  
                              ]);
                          },
                          'layout' => "{items}<div class=\"clearfix\"></div>{pager}",
                      ])
  
                      ?>
1aa8f9e5   Administrator   big commti
87
88
89
                  </div>
          </div>
      </div>
1da76554   Administrator   big commti
90
  </div>