Blame view

frontend/views/event/show.php 2.61 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
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
  FlipclockAsset::register($this);
  ?>
  <?php
  $this->title = $model->name;
  
  ?>
  
  
  <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
63
          <div class="body_view">
1da76554   Administrator   big commti
64
              <?=$model->body?>
b905419d   Administrator   big commti
65
66
          </div>
  
1da76554   Administrator   big commti
67
68
  
  
b905419d   Administrator   big commti
69
          <div class="block-100" itemscope itemtype="http://schema.org/Product">
1aa8f9e5   Administrator   big commti
70
71
  
                  <div class="catalog_product_list view_table">
bc07fb47   Administrator   big commti
72
73
74
75
76
77
78
79
80
81
82
83
                      <?= ListView::widget([
                          'dataProvider' => $productProvider,
                          'itemView' => function ($model, $key, $index, $widget) {
                              return $this->render('_product_item',[
                                  'model' => $model,
  
                              ]);
                          },
                          'layout' => "{items}<div class=\"clearfix\"></div>{pager}",
                      ])
  
                      ?>
1aa8f9e5   Administrator   big commti
84
85
86
                  </div>
          </div>
      </div>
1da76554   Administrator   big commti
87
  </div>