-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[!!!][TASK] upgrade extension solr (#311)
* [!!!][TASK] upgrade extension solr Templates, setupts and suggest.js have been updated according to new solr version. Breaking change if templates, setupts or suggest js have been overridden. * [TASK] fix linting error
- Loading branch information
1 parent
1612b8b
commit 53c573b
Showing
24 changed files
with
430 additions
and
499 deletions.
There are no files selected for viewing
16 changes: 12 additions & 4 deletions
16
Configuration/TypoScript/Library/lib.header.middle.search.setupts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,15 @@ | ||
plugin.tx_solr.templateFiles.searchHeaderMiddle = EXT:theme_t3kit/Resources/Private/Extensions/Solr/Templates/PiSearch/searchHeaderMiddle.html | ||
|
||
lib.header.middle.search = TEXT | ||
[globalVar = LIT:1 = {$themes.configuration.features.enableSolr}] | ||
lib.header.middle.search = USER | ||
lib.header.middle.search.userFunc = T3kit\themeT3kit\Plugin\Search\SearchHeaderMiddle->main | ||
lib.header.middle.search < plugin.tx_solr_PiSearch_Search | ||
lib.header.middle.search.view { | ||
templateRootPaths { | ||
100 = EXT:theme_t3kit/Resources/Private/Extensions/Solr/HeaderMiddleSearch/Templates/ | ||
} | ||
partialRootPaths { | ||
100 = EXT:theme_t3kit/Resources/Private/Extensions/Solr/HeaderMiddleSearch/Partials/ | ||
} | ||
layoutRootPaths { | ||
100 = EXT:theme_t3kit/Resources/Private/Extensions/Solr/HeaderMiddleSearch/Layouts/ | ||
} | ||
} | ||
[global] |
16 changes: 12 additions & 4 deletions
16
Configuration/TypoScript/Library/lib.header.top.search.setupts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,15 @@ | ||
plugin.tx_solr.templateFiles.searchHeaderTop = EXT:theme_t3kit/Resources/Private/Extensions/Solr/Templates/PiSearch/searchHeaderTop.html | ||
|
||
lib.header.top.search = TEXT | ||
[globalVar = LIT:1 = {$themes.configuration.features.enableSolr}] | ||
lib.header.top.search = USER | ||
lib.header.top.search.userFunc = T3kit\themeT3kit\Plugin\Search\SearchHeaderTop->main | ||
lib.header.top.search < plugin.tx_solr_PiSearch_Search | ||
lib.header.top.search.view { | ||
templateRootPaths { | ||
100 = EXT:theme_t3kit/Resources/Private/Extensions/Solr/HeaderTopSearch/Templates/ | ||
} | ||
partialRootPaths { | ||
100 = EXT:theme_t3kit/Resources/Private/Extensions/Solr/HeaderTopSearch/Partials/ | ||
} | ||
layoutRootPaths { | ||
100 = EXT:theme_t3kit/Resources/Private/Extensions/Solr/HeaderTopSearch/Layouts/ | ||
} | ||
} | ||
[global] |
16 changes: 12 additions & 4 deletions
16
Configuration/TypoScript/Library/lib.menu.main.search.setupts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,15 @@ | ||
plugin.tx_solr.templateFiles.searchMenuMain = EXT:theme_t3kit/Resources/Private/Extensions/Solr/Templates/PiSearch/searchMenuMain.html | ||
|
||
lib.menu.main.search = TEXT | ||
[globalVar = LIT:1 = {$themes.configuration.features.enableSolr}] | ||
lib.menu.main.search = USER | ||
lib.menu.main.search.userFunc = T3kit\themeT3kit\Plugin\Search\SearchMenuMain->main | ||
lib.menu.main.search < plugin.tx_solr_PiSearch_Search | ||
lib.menu.main.search.view { | ||
templateRootPaths { | ||
100 = EXT:theme_t3kit/Resources/Private/Extensions/Solr/MenuMainSearch/Templates/ | ||
} | ||
partialRootPaths { | ||
100 = EXT:theme_t3kit/Resources/Private/Extensions/Solr/MenuMainSearch/Partials/ | ||
} | ||
layoutRootPaths { | ||
100 = EXT:theme_t3kit/Resources/Private/Extensions/Solr/MenuMainSearch/Layouts/ | ||
} | ||
} | ||
[global] |
26 changes: 26 additions & 0 deletions
26
Resources/Private/Extensions/Solr/HeaderMiddleSearch/Partials/Search/Form.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<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="Form"> | ||
|
||
|
||
<div class="tx-solr-searchbox"> | ||
|
||
<s:searchForm id="tx-solr-search-form-pi-results" additionalFilters="{additionalFilters}"> | ||
<input type="hidden" name="L" value="{languageUid}" /> | ||
<input type="hidden" name="id" value="{pageUid}" /> | ||
|
||
<div class="header-middle__search-wrp" > | ||
<div class="header-middle__search-box" > | ||
<input type="text" class="tx-solr-q js-solr-q header-middle__search-input" name="{pluginNamespace}[q]" value="{q}" placeholder="{s:translate(key:'submit',default:'Search')}" data-search="searchSuggest" /> | ||
<button class="tx-solr-submit header-middle__search-submit" type="submit" value="{s:translate(key:'submit',default:'Search')}"><span class="icons icon-t3-search"></span></button> | ||
</div> | ||
</div> | ||
</s:searchForm> | ||
|
||
<s:debug.query /> | ||
</div> | ||
|
||
|
||
</f:section> |
25 changes: 25 additions & 0 deletions
25
Resources/Private/Extensions/Solr/HeaderTopSearch/Partials/Search/Form.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<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="Form"> | ||
|
||
<div class="tx-solr-searchbox"> | ||
|
||
<s:searchForm id="tx-solr-search-form-pi-results" additionalFilters="{additionalFilters}"> | ||
<input type="hidden" name="L" value="{languageUid}" /> | ||
<input type="hidden" name="id" value="{pageUid}" /> | ||
|
||
<div class="main-navigation__search-btn-wrp _header-top-search-btn"> | ||
<a class="main-navigation__search-btn js__main-navigation__search-btn" href="">{s:translate(key:'submit',default:'Search')}<span></span></a> | ||
</div> | ||
<div class="main-navigation__search-box _header-top-search-btn js__main-navigation__search-box" > | ||
<input type="search" id="inputText" class="tx-solr-q js-solr-q" name="{pluginNamespace}[q]" value="{q}" placeholder="{s:translate(key:'submit',default:'Search')}" data-search="searchSuggest" data-search="searchSuggest" /> | ||
</div> | ||
|
||
</s:searchForm> | ||
|
||
<s:debug.query /> | ||
</div> | ||
|
||
</f:section> |
23 changes: 23 additions & 0 deletions
23
Resources/Private/Extensions/Solr/MenuMainSearch/Partials/Search/Form.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<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="Form"> | ||
|
||
<div class="tx-solr-searchbox"> | ||
|
||
<s:searchForm id="tx-solr-search-form-pi-results" additionalFilters="{additionalFilters}"> | ||
<input type="hidden" name="L" value="{languageUid}" /> | ||
<input type="hidden" name="id" value="{pageUid}" /> | ||
<div class="main-navigation__search-btn-wrp"> | ||
<a class="main-navigation__search-btn js__main-navigation__search-btn" href="">{s:translate(key:'submit',default:'Search')}<span></span></a> | ||
</div> | ||
<div class="main-navigation__search-box js__main-navigation__search-box" > | ||
<input type="search" id="inputText" name="{pluginNamespace}[q]" value="{q}" placeholder="{s:translate(key:'submit',default:'Search')}" data-search="searchSuggest" /> | ||
</div> | ||
</s:searchForm> | ||
|
||
<s:debug.query /> | ||
</div> | ||
|
||
</f:section> |
23 changes: 23 additions & 0 deletions
23
Resources/Private/Extensions/Solr/Partials/Facets/Options.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<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" | ||
data-namespace-typo3-fluid="true" | ||
> | ||
|
||
<h5 class="facet-label">{facet.label}</h5> | ||
<ul class="facet-option-list facet-type-options fluidfacet list-unstyled" data-facet-name="{facet.name}" data-facet-label="{facet.label}"> | ||
<f:for each="{facet.options}" as="option" iteration="iteration"> | ||
<li class="facet-option{f:if(condition:'{iteration.index} > 9', then:' tx-solr-facet-hidden')}" data-facet-item-value="{option.value}"> | ||
<a class="facet solr-ajaxified" href="{s:uri.facet.addFacetItem(facet: facet, facetItem: option)}"><span class="icons icon-plus"></span> {option.label} </a> <span class="facet-result-count label label-default">{option.documentCount}</span> | ||
</li> | ||
</f:for> | ||
<f:if condition="{facet.options -> f:count()} > 10"> | ||
<li> | ||
<a href="#" class="tx-solr-facet-show-all" data-label-more="{s:translate(key:'faceting_showMore', extensionName:'solr')}" data-label-less="{s:translate(key:'faceting_showFewer', extensionName:'solr')}"> | ||
<s:translate key="faceting_showMore" extensionName="solr">Show more</s:translate> | ||
</a> | ||
</li> | ||
</f:if> | ||
</ul> | ||
|
||
</html> |
46 changes: 46 additions & 0 deletions
46
Resources/Private/Extensions/Solr/Partials/Result/Facets.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<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="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> | ||
<a href="{s:uri.facet.removeFacetItem(facet: facet, facetItem: item)}" class="facet remove-facet-option solr-ajaxified"><span class="icons icon-minus2"></span> {facet.label}: {item.label}</a> <span class="facet-result-count">({item.documentCount})</span> | ||
</li> | ||
</f:for> | ||
</f:for> | ||
<li class="facets-remove-all"> | ||
<a href="{s:uri.facet.removeAllFacets()}" class="solr-ajaxified"><span class="icons icon-cross"></span> | ||
<s:translate key="faceting_removeAllFilters">Remove all filters</s:translate> | ||
</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> | ||
</div> | ||
<ul class="facets list-unstyled"> | ||
<f:for each="{areaFacets}" as="facet"> | ||
<li class="facet facet-type facet-type-{facet.type}"> | ||
<f:render partial="Facets/{facet.partialName}" arguments="{resultSet:resultSet, facet:facet}"/> | ||
</li> | ||
</f:for> | ||
</ul> | ||
</div> | ||
</div> | ||
</s:facet.area.group> | ||
|
||
</div> | ||
|
||
</f:section> |
19 changes: 19 additions & 0 deletions
19
Resources/Private/Extensions/Solr/Partials/Result/PerPage.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<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="PerPage"> | ||
<div id="results-per-page"> | ||
<form method="post" action="{s:uri.search.currentSearch()}" class="form-inline" > | ||
<label for="{resultSet.usedSearchRequest.argumentNameSpace}[resultsPerPage]"><s:translate key="results_per_page">Per page:</s:translate></label> | ||
<select name="{resultSet.usedSearchRequest.argumentNameSpace}[resultsPerPage]" onchange="this.form.submit()" class="form-control"> | ||
<f:for each="{resultSet.usedSearchRequest.contextTypoScriptConfiguration.searchResultsPerPageSwitchOptionsAsArray}" as="availablePerPage"> | ||
<f:if condition="{availablePerPage}=={resultSet.usedResultsPerPage}"> | ||
<f:then><option selected="selected" value="{availablePerPage}">{availablePerPage}</option></f:then> | ||
<f:else><option value="{availablePerPage}">{availablePerPage}</option></f:else> | ||
</f:if> | ||
</f:for> | ||
</select> | ||
</form> | ||
</div> | ||
</f:section> |
35 changes: 35 additions & 0 deletions
35
Resources/Private/Extensions/Solr/Partials/Result/Sorting.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<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="secondaryContentSection"> | ||
<h3><s:translate key="sorting_sortBy">Sorting</s:translate></h3> | ||
<ul class="list-unstyled"> | ||
<f:for each="{resultSet.sortings}" as="sorting"> | ||
<li> | ||
<f:if condition="{sorting.isResetOption}"> | ||
<f:then> | ||
<a href="{s:uri.sorting.removeSorting()}" class="solr-ajaxified">{sorting.label}</a> | ||
</f:then> | ||
|
||
<f:else> | ||
<f:if condition="{sorting.selected}"> | ||
<f:then> | ||
<f:if condition="{sorting.isAscDirection}"> | ||
<f:then><span class="icons icon-arrow-down5"></span></f:then> | ||
<f:else><span class="icons icon-arrow-up4"></span></f:else> | ||
</f:if> | ||
<a href="{s:uri.sorting.setSorting(sortingName: sorting.name, sortingDirection: sorting.oppositeDirection)}" class="solr-ajaxified">{sorting.label}</a> | ||
</f:then> | ||
<f:else> | ||
<a href="{s:uri.sorting.setSorting(sortingName: sorting.name, sortingDirection: sorting.direction)}" class="solr-ajaxified">{sorting.label}</a> | ||
</f:else> | ||
</f:if> | ||
</f:else> | ||
</f:if> | ||
</li> | ||
</f:for> | ||
</ul> | ||
</div> | ||
</f:section> |
20 changes: 20 additions & 0 deletions
20
Resources/Private/Extensions/Solr/Partials/Search/Form.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<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="Form"> | ||
|
||
<div class="tx-solr-search-form"> | ||
|
||
<s:searchForm id="tx-solr-search-form-pi-results" additionalFilters="{additionalFilters}" class="form-inline"> | ||
<input type="hidden" name="L" value="{languageUid}" /> | ||
<input type="hidden" name="id" value="{pageUid}" /> | ||
<input type="text" class="tx-solr-q js-solr-q form-control" name="{pluginNamespace}[q]" value="{q}" /> | ||
<input type="submit" class="tx-solr-submit form-control" value="{s:translate(key:'submit',default:'Search')}" /> | ||
|
||
</s:searchForm> | ||
|
||
<s:debug.query /> | ||
</div> | ||
|
||
</f:section> |
27 changes: 27 additions & 0 deletions
27
Resources/Private/Extensions/Solr/Partials/Search/FrequentlySearched.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<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="FrequentlySearched"> | ||
|
||
<s:widget.frequentlySearched> | ||
<f:if condition="{frequentSearches}"> | ||
<div id="tx-solr-frequent-searches" class="secondaryContentSection"> | ||
<div class="csc-header"> | ||
<h3 class="csc-firstHeader"><s:translate key="frequentSearches">Frequently searched</s:translate></h3> | ||
</div> | ||
<ul class="list-unstyled"> | ||
<f:for each="{frequentSearches}" as="searchedForInfo"> | ||
<li class="{searchedForInfo.class}"> | ||
<a href="{s:uri.search.startNewSearch(queryString: searchedForInfo.q)}" class="solr-ajaxified">{searchedForInfo.q}</a> | ||
</li> | ||
</f:for> | ||
</ul> | ||
</div> | ||
|
||
</f:if> | ||
</s:widget.frequentlySearched> | ||
|
||
</f:section> | ||
|
||
</html> |
28 changes: 28 additions & 0 deletions
28
Resources/Private/Extensions/Solr/Partials/Search/LastSearches.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<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="LastSearches"> | ||
|
||
<s:widget.lastSearches> | ||
<f:if condition="{lastSearches}"> | ||
|
||
<div id="tx-solr-lastsearches" class="secondaryContentSection"> | ||
<div class="csc-header"> | ||
<h3 class="csc-firstHeader"><s:translate key="lastSearches">Last searches</s:translate></h3> | ||
</div> | ||
<ul class="list-unstyled"> | ||
<f:for each="{lastSearches}" as="searchedFor"> | ||
<li> | ||
<a href="{s:uri.search.startNewSearch(queryString: searchedFor)}" class="solr-ajaxified">{searchedFor}</a> | ||
</li> | ||
</f:for> | ||
</ul> | ||
</div> | ||
|
||
</f:if> | ||
</s:widget.lastSearches> | ||
|
||
</f:section> | ||
|
||
</html> |
28 changes: 0 additions & 28 deletions
28
Resources/Private/Extensions/Solr/Templates/PiFrequentSearches/frequentsearches.htm
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.