Blame view

protected/views/about/_photoFeed.php 708 Bytes
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
  <?php
  /**
   * @var $galleryId
   */
  ?>
  <?php
  /** @var $photo GalleryPhoto */
  $photo = GalleryPhoto::model()->with('i18n')->find(
      array(
          'condition' => 'gallery_id = :gal_id',
          'order' => 'rand()',
          'params' => array(
              ':gal_id' => $galleryId,
          )
      ));
  if ($photo !== null):
      ?>
  <p class="section-title"><?php echo Yii::t('site', 'Фотолента');?></p>
  <div class="photofeed-box">
      <div class="photofeed-image">
          <?php
          $link = $photo->i18n->link;
          if (empty($link)) $link = '/ru/news/categories/about';
          echo CHtml::link(CHtml::image($photo->getUrl('gallery'), $photo->i18n->name), $link);?>
      </div>
  </div>
  <?php endif; ?>