index.php
2.83 KB
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
<?php
/**
* @var $this ActionController
* @var $content string
* @var $actions Action[]
* @var $currentCategory ActionCategory|null
*/
?>
<?php $this->renderPartial('//snippets/headerGallery');?>
<div class="wrapper content-wrapper">
<div class="col-wrapper">
<div class="col10">
<h1><?php echo CHtml::encode($this->pageName)?></h1>
<div class="text-content">
<?php echo $content ?>
</div>
<div class="slider-wrapper action-page-slider" id="main-page-slider">
<div class="slides-container" style="height: 401px; overflow: hidden;">
<?php foreach ($actions as $action): ?>
<div class="slide">
<?php echo CHtml::link(CHtml::image($action->imageBehavior->getFileUrl('preview')), array('action/view', 'link' => $action->link, 'category' => $action->actionCategory->link))?>
<div class="caption">
<span class="name"><?php echo CHtml::encode($action->i18n->name)?></span>
<span class="short"><?php echo CHtml::encode($action->i18n->short)?></span>
<?php if($action->status == 'active'):?>
<span class="short"><?php echo Yii::t('site','Осталось');?> <?= $action->dayLeft?> дней</span>
<?php else:?>
<span class="short over-action">Завершена</span>
<?php endif; ?>
</div>
</div>
<?php endforeach;?>
</div>
<a class="prev"></a>
<a class="next"></a>
</div>
<?php
/** @var $cs CClientScript */
$cs = Yii::app()->getClientScript();
$cs->registerCoreScript('jquery');
$cs->registerScriptFile('/js/slides.min.jquery.js');
$src = <<<JS
$('#main-page-slider').slides({
'container':'slides-container',
'next':'next',
'prev':'prev',
'paginationClass':'slide-pagination',
'currentClass':'active',
'generatePagination':false,
'play': 50000000,
'pause': 2500,
'hoverPause': true
});
JS;
$cs->registerScript('main-page-gallery', $src);
?>
</div>
<div class="col2">
<p class="section-title"><?php echo Yii::t('site','Есть вопросы?');?></p>
<div class="text-content">
<?php echo Yii::t('site','Обращайтесь к вашему персональному консультанту (акции)!');?>
</div>
<?php $this->renderPartial('//snippets/sidebarContacts');?>
</div>
</div>
</div>