Blame view

protected/views/jobsSection/job.php 3.31 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
75
76
77
78
79
80
  <?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>