Commit 63faec6d authored by Stefan Busemann's avatar Stefan Busemann

Merge branch '168-sort-eg-by-date-downloads-last-update' into 'develop'

Resolve "Sort eg. by date, downloads, last update"

Closes #168

See merge request !467
parents 91f2e16c 78d065db
Pipeline #8551 passed with stages
in 9 minutes and 14 seconds
......@@ -48,6 +48,33 @@ plugin.tx_solr {
}
}
}
sorting = 1
sorting {
options >
options {
relevance {
label = Relevance
field = relevance
}
title {
label = Title
field = title
}
extensionKey {
label = Key
field = extensionKey_stringS
}
lastUpload {
label = Last Upload
field = extensionLastUpload_intS
}
author {
label = Author
field = author
}
}
}
}
cssFiles.results =
......
<html xmlns="http://www.w3.org/1999/xhtml" lang="en"
xmlns:f="http://typo3.org/ns/TYPO3/Fluid/ViewHelpers"
xmlns:s="http://typo3.org/ns/ApacheSolrForTypo3/Solr/ViewHelpers">
<f:section name="Sorting">
<div id="tx-solr-sorting" class="d-none d-lg-block d-xl-block">
<div class="card-container">
<div class="card card-size-large mb-3">
<div class="card-header">
<s:translate key="sorting_sortBy">Sorting</s:translate>
</div>
<div class="card-body">
<div>
<f:for each="{resultSet.sortings}" as="sorting">
<f:if condition="{sorting.isResetOption}">
<f:then>
<a href="{s:uri.sorting.removeSorting()}" class="btn btn-outline-warning btn-sm mb-1 mr-1 solr-ajaxified">{sorting.label}</a>
</f:then>
<f:else>
<f:if condition="{sorting.selected}">
<f:then>
<a href="{s:uri.sorting.setSorting(sortingName: sorting.name, sortingDirection: sorting.oppositeDirection)}" class="btn btn-warning btn-sm mb-1 mr-1 solr-ajaxified">
<f:if condition="{sorting.isAscDirection}">
<f:then><i class="fa fa-arrow-up"></i></f:then>
<f:else><i class="fa fa-arrow-down"></i></f:else>
</f:if>
<span>{sorting.label}</span>
</a>
</f:then>
<f:else>
<a href="{s:uri.sorting.setSorting(sortingName: sorting.name, sortingDirection: sorting.direction)}" class="btn btn-outline-warning btn-sm mb-1 mr-1 solr-ajaxified">{sorting.label}</a>
</f:else>
</f:if>
</f:else>
</f:if>
</f:for>
</div>
</div>
</div>
</div>
</div>
</f:section>
......@@ -7,7 +7,6 @@
<f:section name="content">
<div class="container-fluid">
<f:render partial="Search/Form" section="Form" arguments="{search:search, additionalFilters:additionalFilters, pluginNamespace: pluginNamespace, resultSet: resultSet}" />
<f:if condition="{resultSet.allResultCount}">
<f:else>
......@@ -18,6 +17,9 @@
<f:then>
<div class="row">
<div class="col-lg-3">
<f:if condition="{resultSet.usedSearchRequest.contextTypoScriptConfiguration.searchSorting}">
<f:render partial="Result/Sorting" section="Sorting" arguments="{resultSet:resultSet}" />
</f:if>
<f:if condition="{resultSet.usedSearchRequest.contextTypoScriptConfiguration.searchFaceting}">
<f:render partial="Result/Facets" section="Facets" arguments="{resultSet:resultSet}" />
</f:if>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment