Commit e5f8317f authored by Markus Sommer's avatar Markus Sommer Committed by Thomas Löffler

[TASK] Improve TER Design

parent aa15393d
......@@ -49,7 +49,7 @@ plugin.tx_solr.search {
label = Extension tags
field = keywords_stringM
partialName = OptionsTags
itemClass = info
itemClass = dark
prefix = #
}
}
......
......@@ -9,11 +9,9 @@
<div class="card-block">
<div class="facet-option-list facet-type-options fluidfacet" data-facet-name="{facet.name}" data-facet-label="{facet.label}">
<f:for each="{facet.options}" as="option" iteration="iteration">
<a class="btn btn-outline-{facet.configuration.itemClass} mb-1 mr-1 facet solr-ajaxified" href="{s:uri.facet.addFacetItem(facet: facet, facetItem: option)}">
<strong>
{facet.configuration.prefix}{option.label}
<span class="badge badge-{facet.configuration.itemClass}">{option.documentCount}</span>
</strong>
<a class="btn btn-outline-{facet.configuration.itemClass} btn-sm mb-1 mr-1 facet solr-ajaxified" href="{s:uri.facet.addFacetItem(facet: facet, facetItem: option)}">
{facet.configuration.prefix}{option.label}
<span class="badge badge-{facet.configuration.itemClass}">{option.documentCount}</span>
</a>
</f:for>
</div>
......
......@@ -4,59 +4,53 @@
<f:section name="Document">
<li class="card results-entry mb-3 col-md-6{f:if(condition:document.isElevated, then: ' results-elevated')}"
data-document-score="{document.score}"
data-document-id="{document.id}"
data-document-url="{document.url}"
>
<f:if condition="{document.isElevated}">
<div class="results-elevated-label">
<s:translate key="sponsored" />
</div>
</f:if>
<div class="card-block">
<div class="align-items-center">
<h2 class="card-title">
<f:if condition="{document.extensionIcon_stringS}">
<img class="ter-ext-icon" alt="{document.title}" src="{document.extensionIcon_stringS}" height="32" width="32">
</f:if>
<a href="{s:uri.result.addSearchWordList(url:document.url, searchWords:resultSet.usedQuery.keywords)}">{document.title}</a>
</h2>
<h4 class="card-subtitle text-muted mb-2">
{document.extensionKey_stringS} /
<span class="ter-ext-state ter-ext-state-{document.extensionState_stringS}">{document.extensionState_stringS}</span>
</h4>
<p>
<f:format.crop maxCharacters="180" respectWordBoundaries="true">
{s:document.highlightResult(resultSet:resultSet, document:document, fieldName:'content')}
</f:format.crop>
</p>
<f:comment>
<small class="text-muted">Updated:
<f:format.date format="m/d/Y H:i">@{document.extensionLastUpload_intS}</f:format.date>
by
<f:format.crop maxCharacters="50">{document.author}</f:format.crop>
</small>
</f:comment>
<h3>
<f:if condition="{document.supports7_boolS}">
<span class="badge badge-success"><strong>7 LTS</strong></span>
</f:if>
<f:if condition="{document.supports8_boolS}">
<span class="badge badge-success"><strong>8 LTS</strong></span>
</f:if>
</h3>
</div>
</div>
<f:if condition="{document.insecure_boolS}">
<f:else>
<div class="">
<a class="btn btn-primary btn-block btn-lg" href="{document.extensionDownloadZipUrl_stringS}">
<i class="fa fa-download"></i>
<strong>Download version {document.extensionVersion_stringS} as ZIP</strong>
</a>
</div>
</f:else>
</f:if>
</li>
<li class="card card-size-medium{f:if(condition:document.isElevated, then: ' results-elevated')}"
data-document-score="{document.score}"
data-document-id="{document.id}"
data-document-url="{document.url}"
>
<f:if condition="{document.isElevated}">
<div class="results-elevated-label">
<s:translate key="sponsored" />
</div>
</f:if>
<div class="card-block">
<div class="align-items-center">
<h3 class="card-title">
<f:if condition="{document.extensionIcon_stringS}">
<img class="ter-ext-icon" alt="{document.title}" src="{document.extensionIcon_stringS}" height="32" width="32">
</f:if>
<a href="{s:uri.result.addSearchWordList(url:document.url, searchWords:resultSet.usedQuery.keywords)}">{document.title}</a>
</h3>
<h4 class="card-subtitle text-muted mb-2">
{document.extensionKey_stringS} /
<span class="ter-ext-state ter-ext-state-{document.extensionState_stringS}">{document.extensionState_stringS}</span>
</h4>
<p>
<f:format.crop maxCharacters="180" respectWordBoundaries="true">{s:document.highlightResult(resultSet:resultSet, document:document, fieldName:'content')}</f:format.crop>
</p>
<f:comment>
<small class="text-muted">Updated:
<f:format.date format="m/d/Y H:i">@{document.extensionLastUpload_intS}</f:format.date>
by
<f:format.crop maxCharacters="50">{document.author}</f:format.crop>
</small>
</f:comment>
<ul class="list-inline">
<f:if condition="{document.supports7_boolS}">
<li class="list-inline-item badge badge-success">7 LTS</li>
</f:if>
<f:if condition="{document.supports8_boolS}">
<li class="list-inline-item badge badge-success">8 LTS</li>
</f:if>
</ul>
</div>
</div>
<div class="">
<a class="btn btn-primary btn-block btn-lg" href="{document.extensionDownloadZipUrl_stringS}">
<i class="fa fa-download"></i>
<strong>Download version {document.extensionVersion_stringS} as ZIP</strong>
</a>
</div>
</li>
</f:section>
......@@ -4,49 +4,45 @@
<f:section name="Facets">
<div id="tx-solr-faceting">
<f:if condition="{resultSet.facets.used -> f:count()}">
<div id="tx-solr-facets-in-use">
<h3>
<s:translate key="faceting_resultsNarrowedBy">Used facets</s:translate>
</h3>
<ul class="facets list-unstyled">
<f:for each="{resultSet.facets.used}" as="facet">
<f:for each="{facet.allFacetItems.selected}" as="item">
<li class="mb-1">
<a href="{s:uri.facet.removeFacetItem(facet: facet, facetItem: item)}" class="btn btn-{facet.configuration.itemClass} facet remove-facet-option solr-ajaxified">
<strong><i class="fa fa-times"></i> {facet.configuration.prefix}{item.label}</strong>
</a>
</li>
<div class="card-container">
<f:if condition="{resultSet.facets.used -> f:count()}">
<div id="tx-solr-facets-in-use">
<h3>
<s:translate key="faceting_resultsNarrowedBy">Used facets</s:translate>
</h3>
<ul class="facets list-unstyled">
<f:for each="{resultSet.facets.used}" as="facet">
<f:for each="{facet.allFacetItems.selected}" as="item">
<li class="mb-1">
<a href="{s:uri.facet.removeFacetItem(facet: facet, facetItem: item)}" class="btn btn-{facet.configuration.itemClass} facet remove-facet-option solr-ajaxified">
<strong><i class="fa fa-times"></i> {facet.configuration.prefix}{item.label}</strong>
</a>
</li>
</f:for>
</f:for>
</f:for>
<li class="facets-remove-all mt-3">
<a href="{s:uri.facet.removeAllFacets()}" class="btn btn-primary solr-ajaxified">
<strong><i class="fa fa-times"></i>
<s:translate key="faceting_removeAllFilters">Remove all filters</s:translate>
</strong>
</a>
</li>
</ul>
</div>
</f:if>
<li class="facets-remove-all mt-3">
<a href="{s:uri.facet.removeAllFacets()}" class="btn btn-primary solr-ajaxified">
<strong><i class="fa fa-times"></i>
<s:translate key="faceting_removeAllFilters">Remove all filters</s:translate>
</strong>
</a>
</li>
</ul>
</div>
</f:if>
<s:facet.area.group groupName="main" facets="{resultSet.facets.available}">
<div class="facet-area-main">
<div class="solr-facets-available secondaryContentSection">
<div class="csc-header">
<h3 class="csc-firstHeader">
<s:translate key="faceting_narrowSearch">Narrow Search</s:translate>
</h3>
<s:facet.area.group groupName="main" facets="{resultSet.facets.available}">
<div class="facet-area-main">
<div class="solr-facets-available secondaryContentSection">
<f:for each="{areaFacets}" as="facet">
<div class="card card-size-large">
<f:render partial="Facets/{facet.partialName}" arguments="{resultSet:resultSet, facet:facet}" />
</div>
</f:for>
</div>
<f:for each="{areaFacets}" as="facet">
<div class="card">
<f:render partial="Facets/{facet.partialName}" arguments="{resultSet:resultSet, facet:facet}" />
</div>
</f:for>
</div>
</div>
</s:facet.area.group>
</s:facet.area.group>
</div>
</div>
</f:section>
......@@ -4,8 +4,7 @@
<f:section name="Form">
<div class="tx-solr-search-form mt-5">
<div class="tx-solr-search-form mt-5 mb-5">
<s:searchForm id="tx-solr-search-form-pi-results" class="" additionalFilters="{additionalFilters}">
<input type="hidden" name="L" value="{languageUid}" />
<input type="hidden" name="id" value="{pageUid}" />
......@@ -18,7 +17,6 @@
</span>
</div>
</s:searchForm>
</div>
</f:section>
<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/">
xmlns:f="http://typo3.org/ns/TYPO3/Fluid/ViewHelpers"
xmlns:s="http://typo3.org/ns/ApacheSolrForTypo3/Solr/ViewHelpers/">
<f:layout name="Main" />
......@@ -10,14 +10,6 @@
<f:render partial="Search/Form" section="Form" arguments="{search:search, additionalFilters:additionalFilters, pluginNamespace: pluginNamespace, resultSet: resultSet}" />
<f:if condition="{resultSet.usedSearch.numberOfResults}">
<div class="mb-4">
<i class="result-found">
<s:translate key="results_found" arguments="{0:resultSet.usedSearch.numberOfResults, 1: resultSet.usedSearch.queryTime}">Found %d extensions in %d seconds</s:translate>
</i>
</div>
</f:if>
<f:if condition="{resultSet.usedSearch.numberOfResults}">
<f:else>
<div class="alert alert-danger mt-3">
......@@ -54,13 +46,7 @@
<s:widget.resultPaginate resultSet="{resultSet}" configuration="{templatePath:'EXT:ter_layout/Resources/Private/Templates/Solr/ViewHelpers/Widget/ResultPaginate/Index.html'}">
<ol start="{pagination.displayRangeStart}" class="results-list list-unstyled">
<f:for each="{documents}" as="document" iteration="iterator">
<f:if condition="{iterator.isOdd}">
<div class="card-deck">
</f:if>
<f:render partial="Result/Document" section="Document" arguments="{resultSet:resultSet, document:document}" />
<f:if condition="{iterator.isEven} || {iterator.isLast}">
</div>
</f:if>
</f:for>
</ol>
</s:widget.resultPaginate>
......
......@@ -2,10 +2,6 @@
xmlns:f="http://typo3.org/ns/TYPO3/Fluid/ViewHelpers"
xmlns:s="http://typo3.org/ns/ApacheSolrForTypo3/Solr/ViewHelpers/"
data-namespace-typo3-fluid="true">
<f:if condition="{configuration.insertAbove}">
<f:render section="paginator" arguments="{pagination: contentArguments.pagination, configuration:configuration, resultSet:resultSet}" />
</f:if>
<f:renderChildren arguments="{contentArguments}" />
<f:if condition="{configuration.insertBelow}">
......
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