Blame view

protected/views/partnersSection/partners.php 4.03 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
81
82
83
84
85
86
87
88
89
90
91
92
93
  <?php
  /**
   * @var $this PartnersSectionController
   * @var $content1 string
   * @var $content2 string
   * @var $partners Partner[]
   * @var $contacts Contact[]
   */
  ?>
  <?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 ($partners as $item) {
                  $items[] = array(
                      'label' => $item->i18n->name,
                      'url' => $this->createUrl('partnersSection/partner', array('link' => $item->link)),
                  );
              }
              $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 $content1 ?>
              </div>
              <div class="partnters-list">
                  <?php foreach ($partners as $partner): ?>
                  <a href="<?php echo CHtml::encode($this->createUrl('partnersSection/partner', array('link' => $partner->link)))?>"
                     class="partnters-item">
                      <span class="partnters-item-img">
                          <?php echo CHtml::image($partner->imageBehavior->getFileUrl('medium'));?>
                      </span>
                      <span class="partnters-item-name"><?php echo CHtml::encode($partner->i18n->name)?></span>
                  </a>
                  <?php endforeach; ?>
              </div>
              <?php echo $content2;?>
          </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>