<?php
/**
 * @var $this ServiceController
 * @var $content1 string
 * @var $content2 string
 * @var $contacts Contact[]
 */
?>
<?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) {
                    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">
            <h1><?php echo $this->pageName ?></h1>

            <div class="text-content">
                <?php echo $content1?>
            </div>
            <div class="tail-frame">
                <div class="tail"></div>
                <div class="service-list">
                    <?php foreach ($this->getServiceCenters() as $center): ?>
                    <a href="<?php echo CHtml::encode($this->createUrl('service/center', array('center' => $center->link)))?>"
                       class="service-item">
                        <span class="service-logo-wrap">
                            <span class="service-logo"
                                  style="background-image: url(<?php echo $center->imageBehavior->getFileUrl()?>)"></span>
                        </span>
                        <span class="service-name"><?php echo $center->i18n->name ?></span>
                    </a>
                    <?php endforeach; ?>
                </div>
            </div>
            <div class="text-content">
                <?php echo $content2 ?>
            </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>