view.php 3.05 KB
<?php
/**
 * @var $this ServiceController
 * @var $contacts Contact[]
 * @var $currentCategory ServiceCategory
 * @var $currentService Service
 */
?>
<?php $this->renderPartial('//snippets/headerGallery'); ?>
<!-- header end-->
<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->getServiceCategories() as $category) {
                    if ($category->id == $currentCategory->id) {
                        echo '<li class="active">', CHtml::link($category->i18n->name, array('service/category', 'category' => $category->link));
                        echo '<ul>';
                        foreach ($category->services as $service)
                            if (!$service->hidden) {
                                if ($service->id == $currentService->id) echo '<li class="active">';
                                else echo '<li>';
                                echo CHtml::link($service->i18n->name, array('service/view', 'category' => $category->link, 'link' => $service->link)), '</li>';
                            }
                        echo '</ul>';
                        echo '</li>';
                    } else {
                        echo '<li>', CHtml::link($category->i18n->name, array('service/category', 'category' => $category->link)), '</li>';
                    }

                }
                echo '<li>', CHtml::link('Расчет стоимости ТО', '/stoFilter'), '</li>';
                ?>
            </ul>
            <p class="section-title"><?php echo Yii::t('site', 'Сервис-центры')?></p>
            <ul class="sidebar-nav">
                <?php
                foreach ($this->getServiceCenters() as $center) {
                    echo '<li>', CHtml::link($center->i18n->name, array('service/center', 'center' => $center->link)), '</li>';
                }
                ?>
            </ul>
        </div>
        <div class="col8">
            <ul class="crumbs">
                <li><?php echo CHtml::link(Yii::t('site', 'Сервис'), array('service/index'));?></li>
                <li><?php echo CHtml::link($currentCategory->i18n->name, array('service/category', 'category' => $currentCategory->link));?>

                </li>
            </ul>
            <h1><?php echo $this->pageName?></h1>

            <div class="text-content">
                <?php echo $currentService->i18n->content;?>
            </div>
        </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>