{% if loops.similar|length %}
<div class="forumbg">

	<div class="inner">
		<ul class="topiclist">
			<li class="header">
				<dl class="icon">
					<dt><div class="list-inner">{{ lang('SIMILAR_TOPICS') }}</div></dt>
					<dd class="posts">{{ lang('STATISTICS') }}</dd>
					<dd class="lastpost"><span>{{ lang('LAST_POST') }}</span></dd>
				</dl>
			</li>
		</ul>
		<ul class="topiclist topics">

		{% for similar in loops.similar %}
			{% EVENT search_results_topic_before %}
			<li class="row{% if similar.S_ROW_COUNT is even %} bg1{% else %} bg2{% endif %}">
				<dl>
					<dt title="{{ similar.TOPIC_FOLDER_IMG_ALT }}" class="icon {{ similar.TOPIC_IMG_STYLE }}">{% if similar.TOPIC_ICON_IMG %}<img src="{{ T_ICONS_PATH ~ similar.TOPIC_ICON_IMG }}" alt="" title="" />{% endif %}</dt>
					<dd>
						{% if similar.S_UNREAD_TOPIC and not S_IS_BOT %}<a href="{{ similar.U_NEWEST_POST }}" class="icon-link"></a>{% endif %}
						<div class="list-inner">

							{% EVENT topiclist_row_prepend %}
							{% if similar.S_UNREAD_TOPIC and not S_IS_BOT %}<a href="{{ similar.U_NEWEST_POST }}">{{ NEWEST_POST_IMG }}</a> {% endif %}
							<a href="{{ similar.U_VIEW_TOPIC }}" class="topictitle">{{ similar.TOPIC_TITLE }}</a> {{ similar.ATTACH_ICON_IMG }}
							{% if similar.S_TOPIC_UNAPPROVED or similar.S_POSTS_UNAPPROVED %}<a href="{{ similar.U_MCP_QUEUE }}">{{ similar.UNAPPROVED_IMG }}</a> {% endif %}
							{% if similar.S_TOPIC_REPORTED %}<a href="{{ similar.U_MCP_REPORT }}">{{ REPORTED_IMG }}</a>{% endif %}<br />
							{% if similar.pagination|length %}
							<div class="pagination">
								<ul>
								{% for pagination in similar.pagination %}
									{% if pagination.S_IS_PREV %}
									{% elseif pagination.S_IS_CURRENT %}<li class="active"><span>{{ pagination.PAGE_NUMBER }}</span></li>
									{% elseif pagination.S_IS_ELLIPSIS %}<li class="ellipsis"><span>{{ lang('ELLIPSIS') }}</span></li>
									{% elseif pagination.S_IS_NEXT %}
									{% else %}<li><a href="{{ pagination.PAGE_URL }}">{{ pagination.PAGE_NUMBER }}</a></li>
									{% endif %}
								{% endfor %}
								</ul>
							</div>
							{% endif %}
							{% if similar.S_HAS_POLL %}{{ POLL_IMG }} {% endif %}
							{{ lang('POST_BY_AUTHOR') }} {{ similar.TOPIC_AUTHOR_FULL }} &raquo; {{ similar.FIRST_POST_TIME }} &raquo; {{ lang('IN') }} <a href="{{ similar.U_VIEW_FORUM }}">{{ similar.FORUM_TITLE }}</a>
							{% EVENT topiclist_row_append %}

						</div>
					</dd>
					<dd class="posts">
						{{ lang('REPLIES') ~ lang('COLON') }} <strong>{{ similar.TOPIC_REPLIES }}</strong><br />
						{{ lang('VIEWS') ~ lang('COLON') }} <strong>{{ similar.TOPIC_VIEWS }}</strong>
					</dd>
					<dd class="lastpost"><span>
						<i class="fa fa-fw fa-user"></i> {{ lang('POST_BY_AUTHOR') }} {{ similar.LAST_POST_AUTHOR_FULL }}
						{% if not S_IS_BOT %}<a href="{{ similar.U_LAST_POST }}" title="{{ lang('GOTO_LAST_POST') }}">{{ LAST_POST_IMG }}</a> {% endif %}<br /><i class="fa fa-fw fa-clock-o"></i> {{ similar.LAST_POST_TIME }}<br /> </span>
					</dd>
				</dl>
			</li>
			{% EVENT search_results_topic_after %}
		{% endfor %}
		</ul>

	</div>
</div>
{% endif %}
