Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
E
extensions.typo3.org
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
60
Issues
60
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
8
Merge Requests
8
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
services
T
t3o sites
extensions.typo3.org
extensions.typo3.org
Commits
e819807a
Commit
e819807a
authored
Aug 21, 2017
by
Thomas Löffler
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'redesign-solr-result-list' into 'develop'
Redesign solr result list See merge request
!151
parents
ecd868b3
c137f10b
Pipeline
#1993
passed with stages
in 2 minutes and 18 seconds
Changes
9
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
220 additions
and
75 deletions
+220
-75
html/typo3conf/ext/ter_fe2/Classes/Solr/Indexqueue/TerIndexer.php
...o3conf/ext/ter_fe2/Classes/Solr/Indexqueue/TerIndexer.php
+16
-1
html/typo3conf/ext/ter_fe2/Configuration/TypoScript/Default/Plugins/Solr.ts
.../ter_fe2/Configuration/TypoScript/Default/Plugins/Solr.ts
+7
-1
html/typo3conf/ext/ter_fe2/Resources/Private/Templates/Extension/Show.html
...t/ter_fe2/Resources/Private/Templates/Extension/Show.html
+1
-1
html/typo3conf/ext/ter_layout/Configuration/TypoScript/Ext/Solr.ts
...3conf/ext/ter_layout/Configuration/TypoScript/Ext/Solr.ts
+29
-30
html/typo3conf/ext/ter_layout/Resources/Private/Partials/Solr/Facets/OptionsTags.html
...t/Resources/Private/Partials/Solr/Facets/OptionsTags.html
+21
-0
html/typo3conf/ext/ter_layout/Resources/Private/Partials/Solr/Facets/OptionsTypo3.html
.../Resources/Private/Partials/Solr/Facets/OptionsTypo3.html
+22
-0
html/typo3conf/ext/ter_layout/Resources/Private/Partials/Solr/Result/Facets.html
...layout/Resources/Private/Partials/Solr/Result/Facets.html
+46
-0
html/typo3conf/ext/ter_layout/Resources/Private/Partials/Solr/Search/Form.html
...r_layout/Resources/Private/Partials/Solr/Search/Form.html
+22
-0
html/typo3conf/ext/ter_layout/Resources/Private/Templates/Solr/Results.html
.../ter_layout/Resources/Private/Templates/Solr/Results.html
+56
-42
No files found.
html/typo3conf/ext/ter_fe2/Classes/Solr/Indexqueue/TerIndexer.php
View file @
e819807a
...
...
@@ -106,10 +106,25 @@ class TerIndexer extends \ApacheSolrForTypo3\Solr\IndexQueue\Indexer {
// does this extension supports different versions?
// @todo: use JSON with all versions to get them
$lastVersion
=
$extension
->
getLastVersion
();
$document
->
setField
(
'supports6_boolS'
,
Version
::
doesExtensionVersionSupportTypo3Version
(
$lastVersion
,
6
200
000
));
$document
->
setField
(
'supports6_boolS'
,
Version
::
doesExtensionVersionSupportTypo3Version
(
$lastVersion
,
6
002
000
));
$document
->
setField
(
'supports7_boolS'
,
Version
::
doesExtensionVersionSupportTypo3Version
(
$lastVersion
,
7006000
));
$document
->
setField
(
'supports8_boolS'
,
Version
::
doesExtensionVersionSupportTypo3Version
(
$lastVersion
,
8007000
));
$document
->
setField
(
'supports9_boolS'
,
Version
::
doesExtensionVersionSupportTypo3Version
(
$lastVersion
,
9000000
));
$typo3Support
=
[];
if
(
Version
::
doesExtensionVersionSupportTypo3Version
(
$lastVersion
,
6002000
))
{
$typo3Support
[]
=
'6.2 LTS'
;
}
if
(
Version
::
doesExtensionVersionSupportTypo3Version
(
$lastVersion
,
7006000
))
{
$typo3Support
[]
=
'7 LTS'
;
}
if
(
Version
::
doesExtensionVersionSupportTypo3Version
(
$lastVersion
,
8007000
))
{
$typo3Support
[]
=
'8 LTS'
;
}
if
(
Version
::
doesExtensionVersionSupportTypo3Version
(
$lastVersion
,
9000000
))
{
$typo3Support
[]
=
'9'
;
}
$document
->
setField
(
'typo3support_stringM'
,
$typo3Support
);
// add documentation link
/** @var \T3o\TerFe2\Service\Documentation $documentationService */
...
...
html/typo3conf/ext/ter_fe2/Configuration/TypoScript/Default/Plugins/Solr.ts
View file @
e819807a
...
...
@@ -184,6 +184,12 @@ plugin {
localField
=
tags
multiValue
=
1
}
keywords_stringM
=
SOLR_RELATION
keywords_stringM
{
localField
=
tags
multiValue
=
1
}
}
}
}
...
...
@@ -197,7 +203,7 @@ plugin {
}
}
[
globalVar
=
GP
:
q
=
]
[
globalVar
=
GP
:
tx_solr
|
q
=
]
[
else
]
plugin
.
tx_solr
.
search
.
query
.
sortBy
=
...
...
html/typo3conf/ext/ter_fe2/Resources/Private/Templates/Extension/Show.html
View file @
e819807a
...
...
@@ -64,7 +64,7 @@
<h3>
Tags
</h3>
<p
class=
"tags"
>
<f:for
each=
"{extension.tags}"
as=
"tag"
>
<f:link.page
class=
"btn btn-info mb-1"
pageUid=
"{settings.pages.searchResultsPid}"
additionalParams=
"{tx_solr: {filter: {0: '
keyword
s:{tag.title}'}}}"
><strong>
#{tag.title}
</strong></f:link.page>
<f:link.page
class=
"btn btn-info mb-1"
pageUid=
"{settings.pages.searchResultsPid}"
additionalParams=
"{tx_solr: {filter: {0: '
tag
s:{tag.title}'}}}"
><strong>
#{tag.title}
</strong></f:link.page>
</f:for>
</p>
</f:if>
...
...
html/typo3conf/ext/ter_layout/Configuration/TypoScript/Ext/Solr.ts
View file @
e819807a
...
...
@@ -15,37 +15,36 @@ plugin.tx_solr {
cssFiles
.
results
=
}
lib
.
solr
.
format_number
=
TEXT
lib
.
solr
.
format_number
{
field
=
argument_0
numberFormat
=
1
numberFormat
.
thousands_sep
=
,
}
lib
.
solr
.
extensionkeywithdashes
=
TEXT
lib
.
solr
.
extensionkeywithdashes
{
field
=
argument_0
replacement
{
10
{
search
=
_
replace
=
-
}
plugin
.
tx_solr
.
search
{
ignoreGlobalQParameter
=
1
query
{
allowEmptyQuery
=
1
}
results
{
resultsHighlighting
=
1
resultsHighlighting
{
wrap
=
<
mark
>|<
/mark
>
}
}
plugin
.
tx_solr
.
search
.
faceting
=
1
plugin
.
tx_solr
.
search
.
faceting
{
facets
>
facets
{
keywords
{
label
=
Keywords
field
=
keywords
#
we
need
the
facet
to
be
able
to
filter
by
keywords
,
but
we
don
'
t want to show it in the filter
includeInAvailableFacets = 0
includeInUsedFacets = 0
includeInUsedFacets = 0
}
faceting
=
1
faceting
{
facetLimit
=
25
facets
>
facets
{
typo3
{
label
=
Works
with
TYPO3
field
=
typo3support_stringM
partialName
=
OptionsTypo3
itemClass
=
success
sortBy
=
alpha
}
tags
{
label
=
Extension
tags
field
=
keywords_stringM
partialName
=
OptionsTags
itemClass
=
info
prefix
=
#
}
}
}
}
html/typo3conf/ext/ter_layout/Resources/Private/Partials/Solr/Facets/OptionsTags.html
0 → 100644
View file @
e819807a
<html
xmlns=
"http://www.w3.org/1999/xhtml"
lang=
"en"
xmlns:f=
"http://typo3.org/ns/TYPO3/Fluid/ViewHelpers"
data-namespace-typo3-fluid=
"true"
>
<div
class=
"card-header"
>
<span
class=
"facet-label"
>
{facet.label}
</span>
</div>
<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>
</f:for>
</div>
</div>
</html>
html/typo3conf/ext/ter_layout/Resources/Private/Partials/Solr/Facets/OptionsTypo3.html
0 → 100644
View file @
e819807a
<html
xmlns=
"http://www.w3.org/1999/xhtml"
lang=
"en"
xmlns:f=
"http://typo3.org/ns/TYPO3/Fluid/ViewHelpers"
data-namespace-typo3-fluid=
"true"
>
<div
class=
"card-header"
>
<span
class=
"facet-label"
>
{facet.label}
</span>
</div>
<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 facet solr-ajaxified"
href=
"{s:uri.facet.addFacetItem(facet: facet, facetItem: option)}"
>
<strong>
{option.label}
<span
class=
"badge badge-{facet.configuration.itemClass}"
>
{option.documentCount}
</span>
</strong>
</a><br>
</f:for>
</div>
</div>
</html>
html/typo3conf/ext/ter_layout/Resources/Private/Partials/Solr/Result/Facets.html
0 → 100644
View file @
e819807a
<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
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>
<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>
</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>
</div>
</f:section>
html/typo3conf/ext/ter_layout/Resources/Private/Partials/Solr/Search/Form.html
0 → 100644
View file @
e819807a
<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 mt-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}"
/>
<div
class=
"input-group input-group-lg"
>
<input
type=
"text"
class=
"form-control"
placeholder=
"Search for extensions, tags, author..."
name=
"tx_solr[q]"
value=
"{q}"
>
<span
class=
"input-group-btn"
>
<button
type=
"submit"
class=
"btn btn-primary"
type=
"button"
><s:translate
key=
"submit"
default=
"Search"
/></button>
</span>
</div>
</s:searchForm>
</div>
</f:section>
html/typo3conf/ext/ter_layout/Resources/Private/Templates/Solr/Results.html
View file @
e819807a
...
...
@@ -6,55 +6,69 @@
<f:section
name=
"main"
>
<div
id=
"tx-solr-search
"
>
<div
class=
"container-fluid
"
>
<f:if
condition=
"{resultSet.isAutoCorrected}"
>
<f:then>
<span
class=
"searched-for"
>
<s:translate
key=
"no_results_nothing_found"
arguments=
"{0: resultSet.initialQueryString}"
>
Nothing found for "%s".
</s:translate>
<s:translate
key=
"no_results_search_for_original"
arguments=
"{0: resultSet.correctedQueryString}"
>
Search instead for "%s".
</s:translate>
</span>
</f:then>
<f:render
partial=
"Search/Form"
section=
"Form"
arguments=
"{search:search, additionalFilters:additionalFilters, pluginNamespace: pluginNamespace, resultSet: resultSet}"
/>
<f:else>
<f:if
condition=
"{resultSet.usedQuery.keywordsCleaned}"
>
<span
class=
"searched-for"
>
<s:translate
key=
"results_searched_for"
arguments=
"{0: resultSet.usedQuery.keywordsCleaned}"
>
Searched for "%s"
</s:translate>
</span>
</f:if>
</f:else>
<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.hasSpellCheckingSuggestions}"
>
<f:if
condition=
"{resultSet.usedSearch.numberOfResults}"
>
<f:else>
<div
class=
"alert alert-danger mt-3"
>
<s:translate
key=
"no_results_nothing_found"
arguments=
"{0: resultSet.usedQuery.queryString}"
>
Nothing found for "%s".
</s:translate>
</div>
</f:else>
<f:then>
<s:translate
key=
"didYouMean"
>
Did you mean
</s:translate>
<f:for
each=
"{resultSet.spellCheckingSuggestions}"
as=
"suggestion"
>
<f:link.page
additionalParams=
"{q:suggestion.suggestion}"
noCacheHash=
"1"
>
{suggestion.suggestion}
</f:link.page>
</f:for>
?
</f:then>
</f:if>
<div
class=
"row"
>
<div
class=
"col-lg-3"
>
<f:if
condition=
"{resultSet.usedSearchRequest.contextTypoScriptConfiguration.searchFaceting}"
>
<f:render
partial=
"Result/Facets"
section=
"Facets"
arguments=
"{resultSet:resultSet}"
/>
</f:if>
</div>
<div
class=
"col-lg-9"
>
<div
id=
"tx-solr-search"
>
<f:if
condition=
"{resultSet.isAutoCorrected}"
>
<span
class=
"searched-for"
>
<s:translate
key=
"no_results_nothing_found"
arguments=
"{0: resultSet.initialQueryString}"
>
Nothing found for "%s".
</s:translate>
<s:translate
key=
"no_results_search_for_original"
arguments=
"{0: resultSet.correctedQueryString}"
>
Search instead for "%s".
</s:translate>
</span>
</f:if>
<f:if
condition=
"{resultSet.usedSearch.numberOfResults}"
>
<span
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>
</span>
</f:if>
<f:if
condition=
"{resultSet.hasSpellCheckingSuggestions}"
>
<f:then>
<s:translate
key=
"didYouMean"
>
Did you mean
</s:translate>
<f:for
each=
"{resultSet.spellCheckingSuggestions}"
as=
"suggestion"
>
<f:link.page
additionalParams=
"{q:suggestion.suggestion}"
noCacheHash=
"1"
>
{suggestion.suggestion}
</f:link.page>
</f:for>
?
</f:then>
</f:if>
<f:if
condition=
"{hasSearched}"
>
<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>
<f:if
condition=
"{hasSearched}"
>
<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>
</f:if>
</div>
</div>
</div>
</f:then>
</f:if>
</div>
</f:section>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment