<xf:title>Top threads</xf:title>
<div class="block">
<div class="block-container">
<h3 class="block-minorHeader">
<xf:if is="$isForumScoped">
Top in {$node.title}
<xf:else />
Global Top
</xf:if>
</h3>
<div class="block-body">
<xf:if is="$threads|count">
<ul class="block-body">
<xf:foreach loop="$threads" value="$thread">
<li class="block-row" style="display:flex; justify-content:space-between; align-items:center;">
<!-- Left side: title + forum + starter -->
<div>
<xf:if is="$thread.prefix_id">
{{ prefix('thread', $thread, 'html', '') }}
</xf:if>
<a href="{{ link('threads', $thread) }}"><strong>{$thread.title}</strong></a>
<span class="u-muted">
<xf:if is="!$isForumScoped">
in <a href="{{ link('forums', $thread.Forum) }}">{{$thread.Forum.title}}</a> •
</xf:if>
Started by <xf:username user="$thread.User" /> •
<xf:date time="{$thread.post_date}" />
</span>
</div>
<!-- Right side: replies/views -->
<div style="white-space:nowrap; text-align:right;">
<span class="u-muted">Replies:</span> {$thread.reply_count}
<span class="u-muted">Views:</span> {$thread.view_count}
<a href="{{ link('threads/latest', $thread) }}">Latest</a>
</div>
</li>
</xf:foreach>
</ul>
<xf:else />
<div class="block-row">No threads yet.</div>
</xf:if>
</div>
</div>
</div>
<xf:if is="$isForumScoped">
<xf:pagenav
page="{$page}"
perpage="{$perPage}"
total="{$total}"
link="aixf-top"
data="{{ {'node_id': $node.node_id} }}" />
<xf:else />
<xf:pagenav
page="{$page}"
perpage="{$perPage}"
total="{$total}"
link="aixf-top" />
</xf:if>