view.php 2.72 KB
<?php
/**
 * @var $this ActionController
 * @var $content string
 * @var $currentAction Action
 * @var $currentCategory ActionCategory|null
 */
?>
<?php $this->renderPartial('//snippets/headerGallery'); ?>

<div class="wrapper content-wrapper">
    <div class="col-wrapper">
        <div class="col2 aside-no-title">
            <ul class="sidebar-nav">
                <?php
                if ($this->action->id == 'index')
                    echo '<li class="active">';
                else
                    echo '<li>';
                echo CHtml::link(Yii::t('site', 'Текущие акции'), array('action/index')), '</li>';
                /*
                foreach ($this->getActionCategories() as $category) {
                    if (isset($currentCategory) && $currentCategory->id == $category->id) {
                        echo '<li class="active">', CHtml::link($category->i18n->name, array('action/category', 'link' => $category->link));
                        echo '<ul>';
                        foreach ($currentCategory->actions as $item)
                            if (!$item->is_finished) {
                                if ($item->id == $currentAction->id)
                                    echo '<li class="active">';
                                else
                                    echo '<li>';
                                echo CHtml::link($item->i18n->name, array('action/view', 'link' => $item->link, 'category' => $currentCategory->link)), '</li>';
                            }

                        echo '</ul>';
                        echo '</li>';
                    } else
                        echo '<li>', CHtml::link($category->i18n->name, array('action/category', 'link' => $category->link)), '</li>';
                }
                */
                if ($this->action->id == 'finished')
                    echo '<li class="active">';
                else
                    echo '<li>';
                echo  CHtml::link(Yii::t('site', 'Завершенные акции'), array('action/finished')), '</li>';
                ?>
            </ul>
        </div>
        <div class="col8">
            <h1><?php echo CHtml::encode($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>