<?php if (isset($entriesIndex) && $entriesIndex) : ?>
<div class="clear"></div>
<div class="last-entries-index">
<p class="title"><?php echo tt('News', 'entries');?></p>
<?php foreach($entriesIndex as $entries) : ?>
<div class="last-entries-item">
<div class="last-entries-date">
<p class="ns-label">
<?php echo $entries->dateCreatedLong;?>
</p>
</div>
<div class="last-entries-title">
<?php echo CHtml::link(truncateText($entries->getStrByLang('title'), 80), $entries->getUrl());?>
</div>
</div>
<?php endforeach;?>
<?php
foreach ($entries as $item) : ?>
<div class="entries-items">
<?php if($item->image):?>
<div class="imagenews"><?php $src = $item->image->getFullThumbLink(); ?>
<?php if($src) : ?>
<div class="entries-image-list">
<?php
$tagAlt = CHtml::encode($item->getStrByLang('title'));
if (issetModule('seo') && isset($item->image->image_seo) && $item->image->image_seo->getStrByLang('alt')) {
$tagAlt = CHtml::encode($item->image->image_seo->getStrByLang('alt'));
}
?>
<?php echo CHtml::link(CHtml::image($src, $tagAlt), array('class' => 'sxa')); ?>
</div>
<?php endif; ?>
<?php endif; ?>
<p>
<span class="title"><?php echo CHtml::link(CHtml::encode($item->getStrByLang('title')), $item->getUrl()); ?></span>
</p>
<?php
echo $item->getAnnounce();
?></div>
<p>
</p>
<div class="clear">
</div>
<?php endforeach; ?>
<?php
if(!$entries){
echo tt('Entries list is empty.', 'entries');
}
if($pages){
$this->widget('itemPaginator',array('pages' => $pages, 'header' => ''));
}
?>
<div class="last-entries-title">
<?php echo CHtml::link(truncateText($entries->getStrByLang('title'), 80), $entries->getUrl());?>
</div>
<div class="last-entries-title">
<p><?php echo CHtml::link(truncateText($entries->getStrByLang('title'), 80), $entries->getUrl());?></p>
<?php if($entries->image):?>
<div class="imagenews"><?php $src = $entries->image->getFullThumbLink(); ?>
<?php if($src) : ?>
<div class="entries-image-list">
<?php
$tagAlt = CHtml::encode($entries->getStrByLang('title'));
if (issetModule('seo') && isset($entries->image->image_seo) && $entries->image->image_seo->getStrByLang('alt')) {
$tagAlt = CHtml::encode($entries->image->image_seo->getStrByLang('alt'));
}
?>
<?php echo CHtml::link(CHtml::image($src, $tagAlt), array('class' => 'sxa')); ?>
</div>
<?php endif; ?>
<?php endif; ?>
</div>