Blame view

protected/views/news/_newsFooter.php 1.45 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
  <?php
  /**
   * @var $this NewsController
   */
  ?>
  <div class="col10">
      <div class="col4">
          <?php $this->renderPartial('//sport/_nearestEvents');?>
      </div>
      <div class="col6 with-margin">
          <p class="section-title"><?php echo Yii::t('site', 'Популярные новости');?></p>
          <?php foreach ($this->getPopularNews() as $news): ?>
          <div class="news-item">
              <div class="preview-img">
                  <?php echo CHtml::link(CHtml::image($news->imageBehavior->getFileUrl('preview'), '', array('width' => 82)), array('news/view', 'link' => $news->link, 'node_id'=>$news->newsCategory->news_root_id));?>
              </div>
              <div class="news-content">
                  <p>
                      <?php
                      $timestamp = CDateTimeParser::parse($news->date, 'yyyy-MM-dd');
                      echo CHtml::link($news->i18n->name, array('news/view', 'link' => $news->link, 'node_id'=>$news->newsCategory->news_root_id)), ' — ';
  
                      echo Yii::app()->getDateFormatter()->format('d MMMM yyyy', $timestamp);
  
                      ?>
                  </p>
  
                  <?php echo $news->i18n->short?>
              </div>
          </div>
          <?php endforeach;?>
          <span class="read-more">
              <?php echo CHtml::link(Yii::t('site', 'Архив новостей'), array('news/index', 'node_id'=>Node::model()->find('data_type= \'newsRoot\'')->id));?>»
          </span>
      </div>
  </div>