model.php
4.09 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<?php
/**
* @var $this TuningController
* @var $currentBrand TuningBrand
* @var $currentModel TuningModel
* @var $sets TuningSet[]
* @var $contacts Contact[]
*/
?>
<?php $this->renderPartial('//snippets/headerGallery'); ?>
<div class="wrapper content-wrapper">
<div class="col-wrapper">
<div class="col2">
<p class="section-title"><?php echo Yii::t('site', 'Наши услуги');?></p>
<ul class="sidebar-nav">
<?php foreach ($this->getServices() as $item): ?>
<li><?php echo CHtml::link($item->i18n->name, array('tuning/service', 'link' => $item->link));?></li>
<?php endforeach; ?>
</ul>
<p class="section-title"><?php echo Yii::t('site', 'Марки авто')?></p>
<ul class="sidebar-nav">
<?php foreach ($this->getBrands() as $brand): ?>
<?php if ($brand->id == $currentBrand->id): ?>
<li class="active">
<?php echo CHtml::link($brand->i18n->name, array('tuning/brand', 'brand' => $brand->link));?>
<ul>
<?php foreach ($brand->tuningModels as $model) if (!$model->hidden): ?>
<li <?php if ($model->id == $currentModel->id) echo'class="active"' ?>>
<?php
echo CHtml::link($model->i18n->name, array(
'tuning/model',
'brand' => $model->tuningBrand->link,
'model' => $model->link)
);
?>
</li>
<?php endif; ?>
</ul>
</li>
<?php else: ?>
<li><?php echo CHtml::link($brand->i18n->name, array('tuning/brand', 'brand' => $brand->link));?></li>
<?php endif; ?>
<?php endforeach; ?>
</ul>
</div>
<div class="col8">
<ul class="crumbs">
<li><?php echo CHtml::link(Yii::t('site', 'Тюнинг автомобилей'), array('tuning/index'));?>→</li>
<li><?php echo CHtml::link($currentBrand->i18n->name, array(
'tuning/brand',
'brand' => $currentBrand->link,
));?>→
</li>
</ul>
<h1><?php echo $this->pageName?></h1>
<div class="catalog-wrapper">
<?php foreach ($sets as $set): ?>
<a href="<?php echo
CHtml::encode($this->createUrl('tuning/view', array(
'brand' => $set->tuningModel->tuningBrand->link,
'model' => $set->tuningModel->link,
'set' => $set->link,
)));
?>" class="catalog-item big">
<span class="catalog-item-image">
<?php echo CHtml::image($set->imageBehavior->getFileUrl('medium'))?>
</span>
<span class="catalog-item-name"><?php echo $set->i18n->name?></span>
</a>
<?php endforeach;?>
</div>
<div class="col8">
<?php echo $currentModel->i18n->content?>
</div>
<h2><?php echo Yii::t('site', 'Мы с удовольствием ответим на все ваши вопросы по тюнингу автомобиля');?></h2>
<?php echo $this->tuningRoot->i18n->contact_info?>
</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>