Blame view

protected/views/aboutSection/index.php 3.39 KB
a1684257   Administrator   first commit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
  <?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>