<?php
/**
 * @var $this aboutSectionController
 * @var $content string
 */
?>
<?php $this->renderPartial('//snippets/headerGallery'); ?>
<!-- header end-->
<div class="wrapper content-wrapper">
    <div class="col-wrapper">
        <div class="col2">
            <ul class="sidebar-nav">

                <?php
                echo '<li>', CHtml::link($this->getRootNode()->i18n->label, array('about/index', 'node_id' => $this->getRootNode()->id)), '</li>';

                foreach ($this->getRootNode()->nodes as $node)
                    if (!$node->hidden) {
                        switch ($node->data_type) {
                            case('partnersSection'):
                                echo '<li>', CHtml::link($node->i18n->label,
                                    $this->createUrl('partnersSection/partners', array('node_id' => $node->id))
                                ), '</li>';
                                break;
                            case('jobsSection'):
                                echo '<li>', CHtml::link($node->i18n->label,
                                    $this->createUrl('jobsSection/jobs', array('node_id' => $node->id))
                                ), '</li>';
                                break;
                            case('aboutSection'):
                                if ($node->id == $this->getNode()->id) {
                                    echo '<li class="active">';
                                    echo CHtml::link($node->i18n->label, array('aboutSection/index', 'node_id' => $node->id));
                                    if (!empty($this->getRootNode()->nodes)) {
                                        echo '<ul>';
                                        foreach ($node->nodes as $sectionNode)
                                            if (!$sectionNode->hidden) {
                                                echo '<li>', CHtml::link($sectionNode->i18n->label, array('aboutPage/index', 'node_id' => $sectionNode->id)), '</li>';
                                            }
                                        echo '</ul>';
                                    }
                                    echo '</li>';
                                } else {
                                    echo '<li>',
                                    CHtml::link($node->i18n->label, array('aboutSection/index', 'node_id' => $node->id)), '</li>';
                                }
                                break;
                        }
                    } ?>
            </ul>
        </div>
        <div class="col8">
            <ul class="crumbs">
                <li><?php echo CHtml::link($this->getRootNode()->i18n->label, array('about/index', 'node_id' => $this->getRootNode()->id)), '</li>';?>
                    →
                </li>
            </ul>
            <h1><?php echo $this->pageName?></h1>

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