job.php 3.31 KB
<?php
/**
 * @var $this JobsSectionController
 * @var $contacts Contact[]
 * @var $job Job
 * @var $jobs Job[]
 */
?>
<?php $this->renderPartial('//snippets/headerGallery'); ?>
<!-- header end-->
<div class="wrapper content-wrapper">
    <div class="col-wrapper">
        <div class="col2 aside-no-title">
            <?php
            $items = array();
            foreach ($jobs as $item) {
                $items[] = array(
                    'label' => $item->i18n->name,
                    'url' => $this->createUrl('jobsSection/job', array('link' => $item->link)),
                    'active' => $item->id == $job->id,
                );
            }
            $sideMenu = array(
                array('url' => $this->createUrl('about/index', array('node_id' => $this->root_node_id)), 'label' => Yii::t('site', 'О компании')),
            );
            foreach ($this->getRootNode()->nodes as $node)
                if (!$node->hidden) {
                    $sideMenuItem = null;
                    switch ($node->data_type) {
                        case('partnersSection'):
                            $sideMenuItem = array(
                                'url' => $this->createUrl('partnersSection/partners', array('node_id' => $node->id)),
                                'label' => $node->i18n->label,
                            );
                            break;
                        case('jobsSection'):
                            $sideMenuItem = array(
                                'url' => $this->createUrl('jobsSection/jobs', array('node_id' => $node->id)),
                                'label' => $node->i18n->label,
                            );
                            break;
                        case('aboutSection'):
                            $sideMenu[] = array(
                                'url' => $this->createUrl('aboutSection/index', array('node_id' => $node->id)),
                                'label' => $node->i18n->label,
                            );
                            break;
                    }
                    if (!empty($sideMenuItem)) {
                        $sideMenuItem['active'] = $node->id == $this->node_id;
                        if ($sideMenuItem['active']) {
                            $sideMenuItem['items'] = $items;
                        }
                        $sideMenu[] = $sideMenuItem;
                    }
                }
            $this->widget('zii.widgets.CMenu', array(
                'items' => $sideMenu,
                'htmlOptions' => array('class' => 'sidebar-nav'),
            ));
            ?>
            <?php $this->renderPartial('//about/_photoFeed', array('galleryId' => $this->getAboutRoot()->photo_gallery_id));?>
        </div>
        <div class="col8">
            <h1><?php echo CHtml::encode($this->pageName)?></h1>

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