<?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>