meilisearch/Resources/Private/Partials/Result/Sorting.html

49 lines
1.8 KiB
HTML
Raw Permalink Normal View History

2021-04-17 00:26:33 +02:00
<html xmlns="http://www.w3.org/1999/xhtml" lang="en"
xmlns:f="http://typo3.org/ns/TYPO3/Fluid/ViewHelpers"
2021-04-17 21:20:54 +02:00
xmlns:s="http://typo3.org/ns/WapplerSystems/Meilisearch/ViewHelpers">
2021-04-17 00:26:33 +02:00
<f:section name="Sorting">
2021-04-17 21:20:54 +02:00
<div id="tx-meilisearch-sorting" class="secondaryContentSection dropdown">
2021-04-17 00:26:33 +02:00
<button class="btn btn-default dropdown-toggle" type="button" id="sortDropDown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
<span class=" glyphicon glyphicon-sort"></span>
<s:translate key="sorting_sortBy">Sorting</s:translate>
<span class="caret"></span>
</button>
<ul class="dropdown-menu" aria-labelledby="sortDropDown">
<f:for each="{resultSet.sortings}" as="sorting">
<f:if condition="{sorting.isResetOption}">
<f:then>
<li>
2021-04-17 21:20:54 +02:00
<a href="{s:uri.sorting.removeSorting()}" class="meilisearch-ajaxified">{sorting.label}</a>
2021-04-17 00:26:33 +02:00
</li>
</f:then>
<f:else>
<f:if condition="{sorting.selected}">
<f:then>
<li class="active">
2021-04-17 21:20:54 +02:00
<a href="{s:uri.sorting.setSorting(sortingName: sorting.name, sortingDirection: sorting.oppositeDirection)}" class="meilisearch-ajaxified">
2021-04-17 00:26:33 +02:00
<f:if condition="{sorting.isAscDirection}">
<f:then><span class=" glyphicon glyphicon-arrow-up pull-right"></span></f:then>
<f:else><span class=" glyphicon glyphicon-arrow-down pull-right"></span></f:else>
</f:if>
<span>{sorting.label}</span>
</a>
</li>
</f:then>
<f:else>
<li>
2021-04-17 21:20:54 +02:00
<a href="{s:uri.sorting.setSorting(sortingName: sorting.name, sortingDirection: sorting.direction)}" class="meilisearch-ajaxified">{sorting.label}</a>
2021-04-17 00:26:33 +02:00
</li>
</f:else>
</f:if>
</f:else>
</f:if>
</f:for>
</ul>
</div>
2021-04-17 21:20:54 +02:00
</f:section>