<xf:if is="$threads is not empty">
	<xf:macro id="activity_summary_macros::outer_header"
		arg-title="{$title}" />

	<xf:foreach loop="$threads" value="$thread">
		<xf:set var="$header">
			<a href="{{ link('canonical:threads', $thread) }}">{$thread.title}</a>
		</xf:set>
		<xf:set var="$attribution">
			{$thread.username} &middot; {{ date_time($thread.post_date) }} &middot; {{ phrase('replies:') }} {$thread.reply_count|number_short}
		</xf:set>
		<xf:set var="$footer">
			{{ phrase('forum:') }} <a href="{{ link('canonical:forums', $thread.Forum) }}">{$thread.Forum.title}</a>
		</xf:set>
		<xf:set var="$footerOpposite">
			<a href="{{ link('canonical:threads', $thread) }}" class="button button--link">{{ phrase('read_more') }}</a>
		</xf:set>

		<xf:macro id="activity_summary_macros::block"
			arg-header="{$header}"
			arg-attribution="{$attribution}"
			arg-content="{{ bb_code_type_snippet('emailHtml', $thread.FirstPost.message, 'post', $thread.FirstPost, 300) }}"
			arg-footer="{$footer}"
			arg-footerOpposite="{$footerOpposite}" />
	</xf:foreach>
</xf:if>