<xen:require css="message_user_info.css" />
<xen:require css="bb_code.css" />
<xen:require css="EWRporta_Block_RecentNews.css" />
<div id="recentNews">
<xen:foreach loop="$RecentNews" value="$news">
<div class="sectionMain recentNews" id="{$news.thread_id}">
<div class="messageUserBlock">
<div class="avatarHolder">
<xen:if is="{$news.attach}">
<a href="{xen:link threads, $news}"><img src="{$news.attach.thumbnailUrl}" alt="{$news.attach.filename}" /></a>
<xen:elseif is="{$news.image}" />
<a href="{xen:link threads, $news}"><img src="{$news.image}" alt="{$news.image}" style="height: 150px; width: 150px;" /></a>
<xen:comment><xen:else />
<xen:avatar user="$news" size="m" itemprop="photo" /></xen:comment>
</xen:if>
<xen:comment><xen:if is="{$news.attach}">
<xen:elseif is="{$news.medio}" />
<div style="background: url('data/media/{$news.medio.media_id}.jpg') no-repeat;">
<a href="{xen:link 'full:media/popout', $news.medio}" class="OverlayTrigger"><img src="js/8wayrun/EWRmedio_play.png" width="160" height="90" /></a>
</div>
<xen:elseif is="{$news.image}" />
<a href="{xen:link threads, $news}"><img src="{$news.image}" alt="{$news.image}" style="height: 150px; width: 150px;" /></a>
<xen:else />
<xen:avatar user="$news" size="m" itemprop="photo" />
</xen:if></xen:comment>
</div>
</div>
<div class="primaryContent {xen:if '{$position} != "center" AND {$position} != "right"', 'leftDate'}">
<div class="subHeading">
<div style="float: right; white-space: nowrap;">
<a href="{xen:link threads, $news}"><xen:datetime time="$news.promote_date" /></a>
<xen:if is="{$visitor.permissions.EWRporta.canPromote}">
(<a href="{xen:link 'threads/edit', $news}" class="OverlayTrigger">{xen:phrase edit}</a>)
</xen:if>
</div>
</div>
<div class="lmsHeading"><a href="{xen:link threads, $news}">{$news.title}</a></div>
<div class="newsDate secondaryContent">
<div class="newsMonth heading">{$news.month}</div>
<div class="newsDay">{$news.day}</div>
</div>
<div class="messageContent baseHtml">
<div class="postedBy">
<span class="posted">{xen:phrase by} <a href="{xen:link members, $news}" class="username">{$news.username}</a>
{xen:phrase at} <a href="{xen:link threads, $news}">{xen:time $news.post_date, 'absolute'}</a></span>
<span class="views">({$news.view_count} {xen:phrase views})</span>
<span class="comments"><a href="{xen:link threads, $news}">{$news.reply_count} {xen:phrase comments}</a></span>
</div>
<div class="clearFix"></div>
</div>
<div class="sectionFooter {xen:if '{$option.social}', 'social'}">
<xen:if is="{$option.social}">
<xen:if hascontent="true">
<div class="sharePage">
<xen:require css="share_page.css" />
<xen:contentcheck>
<xen:if is="{$xenOptions.tweet.enabled}">
<div class="tweet shareControl">
<script type="text/javascript" src="http://widgets.tuenti.com/widgets.js"></script>
<a href="http://www.tuenti.com/share" class="tuenti-share-button"
icon-style="light"
share-url="http://www.rafastinson.com"></a>
<a href="http://twitter.com/share" class="twitter-share-button"
data-count="horizontal"
data-lang="{xen:helper twitterLang, $visitorLanguage.language_code}"
data-url="{xen:link canonical:threads, $news}"
{xen:if {$news.title}, 'data-text="{$news.title}"'}
{xen:if {$xenOptions.tweet.via}, 'data-via="{$xenOptions.tweet.via}"'}
{xen:if {$xenOptions.tweet.related}, 'data-related="{$xenOptions.tweet.related}"'}>{xen:phrase tweet}</a>
</div>
</xen:if>
<xen:if is="{$xenOptions.plusone}">
<div class="plusone shareControl">
<div class="g-plusone" data-size="medium" data-count="true" data-href="{xen:link canonical:threads, $news}" data-lang="{$visitorLanguage.language_code}"></div>
</div>
</xen:if>
<xen:if is="{$xenOptions.facebookLike}">
<div class="facebookLike shareControl">
<xen:container var="$facebookSdk">1</xen:container>
<fb:like href="{xen:link canonical:threads, $news}" layout="button_count" action="{$xenOptions.facebookLikeAction}" font="trebuchet ms" colorscheme="@fbColorScheme"></fb:like>
</div>
</xen:if>
</xen:contentcheck>
</div>
</xen:if>
<xen:else />
<xen:comment>{xen:phrase discussion_in_x_started_by_y_date_z, 'forum=<a href="{xen:link forums, $news}">{$news.node_title}</a>', 'name=<a href="{xen:link members, $news}" class="username">{$news.username}</a>', 'date=<a href="{xen:link threads, $news}">{xen:datetime $news.post_date, html}</a>'}</xen:comment>
</xen:if>
<div class="continue">
<a href="{xen:link threads, $news}"><xen:datetime time="$news.promote_date" /></a>
<xen:comment><a href="{xen:link threads, $news}" style="background: transparent url('@imagePath/xenforo/icons/redirect.png') no-repeat left bottom; padding-left: 20px;">
{xen:phrase continue_reading}
</a></xen:comment>
</div>
</div>
</div>
</div>
</xen:foreach>
<xen:if hascontent="true">
<div class="section sectionMain">
<xen:contentcheck>
<xen:if is="{$xenOptions.EWRporta_breakout}">
<div style="margin: -5px 0px; {xen:if '{$option.pagenav} && {$option.count} > {$option.limit}', 'float: right;'}">
<xen:include template="EWRporta_Footer" />
</div>
</xen:if>
<xen:if is="{$option.pagenav} && {$option.count} > {$option.limit}">
<div style="margin-left: 5px;">
<xen:pagenav link="portal" page="{$page}" perpage="{$option.limit}" total="{$option.count}" />
</div>
</xen:if>
</xen:contentcheck>
</div>
</xen:if>
</div>