<xf:title>{{ phrase('translate_phrases:') }} {$language.title}</xf:title>

<div class="block">
	<div class="block-outer">
		<div class="block-outer-opposite">
			<div class="buttonGroup">
				<xf:button class="button--link menuTrigger" data-xf-click="menu" aria-expanded="false" aria-haspopup="true">{{ phrase('refine_search') }}</xf:button>
				<div class="menu menu--wide" data-menu="menu" aria-hidden="true"
					data-href="{{ link('phrases/refine-search', null, {'language_id': $language.language_id, 'translate_only': true} + $conditions) }}"
					data-load-target=".js-filterMenuBody">

					<div class="menu-content">
						<h4 class="menu-header">{{ phrase('refine_search') }}</h4>
						<div class="js-filterMenuBody">
							<div class="menu-row">{{ phrase('loading...') }}</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>

<xf:if is="$phrases is not empty">
	<div>
		<div class="js-phraseTarget">
			<xf:foreach loop="$phrases" value="$phrase">
				<span class="u-anchorTarget" id="phrase-{$phrase.phrase_id}"></span>
				<xf:macro id="phrase_translate_macros::expanded" arg-phrase="{$phrase}" arg-language="{$language}" />
			</xf:foreach>
		</div>
		<div class="block js-phraseLoadMore">
			<div class="block-container">
				<!--<div class="block-body block-row block-row&#45;&#45;alt block-row&#45;&#45;minor block-row&#45;&#45;separated">-->
				<div class="block-footer block-footer--split">
					<span class="block-footer-counter">{{ display_totals($count, $total) }}</span>
					<xf:if is="$hasMore">
						<span class="block-footer-controls"><xf:button href="{{ link('phrases/translation', null, {'last_title': $last.title, 'last_count': $count, 'total': $total, 'language_id': $language.language_id} + $conditions) }}"
							data-xf-click="inserter"
							data-append=".js-phraseTarget"
							data-replace=".js-phraseLoadMore"
							data-scroll-target="#phrase-{$last.phrase_id}"
							data-animate-replace="false">
							{{ phrase('more') }}
						</xf:button></span>
					</xf:if>
				</div>
			</div>
		</div>
	</div>
<xf:else />
	<div class="blockMessage">{{ phrase('no_results_found') }}</div>
</xf:if>