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
59
Issues
59
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
654e37ed
Commit
654e37ed
authored
Jun 07, 2018
by
Thomas Löffler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a document wrap for better difference between exact match and result
parent
9e98edbe
Pipeline
#4559
passed with stages
in 5 minutes and 47 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
76 additions
and
58 deletions
+76
-58
html/typo3conf/ext/ter_layout/Resources/Private/Partials/Solr/Result/Document.html
...yout/Resources/Private/Partials/Solr/Result/Document.html
+74
-56
html/typo3conf/ext/ter_layout/Resources/Private/Templates/Solr/Results.html
.../ter_layout/Resources/Private/Templates/Solr/Results.html
+2
-2
No files found.
html/typo3conf/ext/ter_layout/Resources/Private/Partials/Solr/Result/Document.html
View file @
654e37ed
...
@@ -2,62 +2,80 @@
...
@@ -2,62 +2,80 @@
xmlns:f=
"http://typo3.org/ns/TYPO3/Fluid/ViewHelpers"
xmlns:f=
"http://typo3.org/ns/TYPO3/Fluid/ViewHelpers"
xmlns:s=
"http://typo3.org/ns/ApacheSolrForTypo3/Solr/ViewHelpers"
>
xmlns:s=
"http://typo3.org/ns/ApacheSolrForTypo3/Solr/ViewHelpers"
>
<f:section
name=
"Document"
>
<
{
f:if
(
condition:exactMatch
,
then:
'
div
',
else:
'
li
')}
class=
"card card-size-medium mb-3{f:if(condition:exactMatch, then: ' border-primary bg-light')}"
<f:section
name=
"DocumentWrap"
>
data-document-score=
"{document.score}"
<f:if
condition=
"{exactMatchFound}"
>
data-document-id=
"{document.id}"
<f:then>
data-document-url=
"{document.url}"
<div
class=
"card card-size-medium mb-3 border-primary bg-light"
>
data-document-score=
"{document.score}"
<f:if
condition=
"{document.isElevated}"
>
data-document-id=
"{document.id}"
<div
class=
"results-elevated-label"
>
data-document-url=
"{document.url}"
<s:translate
key=
"sponsored"
/>
>
</div>
<f:render
section=
"Document"
arguments=
"{_all}"
/>
</f:if>
<div
class=
"card-body"
>
<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>
<small>
<f:format.crop
maxCharacters=
"{f:if(condition:exactMatch, then: '360', else: '180')}"
respectWordBoundaries=
"true"
>
{s:document.highlightResult(resultSet:resultSet, document:document, fieldName:'content')}
</f:format.crop>
<br>
<em>
Uploaded on
<f:format.date
format=
"d M Y"
>
@{document.extensionLastUpload_intS}
</f:format.date>
<f:if
condition=
"{document.author}"
>
by
<f:format.crop
maxCharacters=
"{f:if(condition:exactMatch, then: '100', else: '50')}"
>
{document.author}
</f:format.crop>
</f:if>
</em>
</small>
</p>
<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>
<f:if
condition=
"{document.hasManual_boolS}"
>
<li
class=
"list-inline-item badge badge-info"
><i
class=
"fa fa-book"
></i>
Has manual
</li>
</f:if>
</ul>
</div>
</div>
</f:then>
<f:else>
<li
class=
"card card-size-medium mb-3"
data-document-score=
"{document.score}"
data-document-id=
"{document.id}"
data-document-url=
"{document.url}"
>
<f:render
section=
"Document"
arguments=
"{_all}"
/>
</li>
</f:else>
</f:if>
</f:section>
<f:section
name=
"Document"
>
<f:if
condition=
"{document.isElevated}"
>
<div
class=
"results-elevated-label"
>
<s:translate
key=
"sponsored"
/>
</div>
</f:if>
<div
class=
"card-body"
>
<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>
<small>
<f:format.crop
maxCharacters=
"{f:if(condition:exactMatchFound, then: '360', else: '180')}"
respectWordBoundaries=
"true"
>
{s:document.highlightResult(resultSet:resultSet, document:document, fieldName:'content')}
</f:format.crop>
<br>
<em>
Uploaded on
<f:format.date
format=
"d M Y"
>
@{document.extensionLastUpload_intS}
</f:format.date>
<f:if
condition=
"{document.author}"
>
by
<f:format.crop
maxCharacters=
"{f:if(condition:exactMatchFound, then: '100', else: '50')}"
>
{document.author}
</f:format.crop>
</f:if>
</em>
</small>
</p>
<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>
<f:if
condition=
"{document.hasManual_boolS}"
>
<li
class=
"list-inline-item badge badge-info"
><i
class=
"fa fa-book"
></i>
Has manual
</li>
</f:if>
</ul>
</div>
</div>
<f:if
condition=
"{document.insecure_boolS}"
>
</div
>
<f:else
>
<f:if
condition=
"{document.insecure_boolS}"
>
<a
class=
"btn {f:if(condition:exactMatch, then: 'btn-primary', else: 'btn-outline-primary')} btn-block mb-0"
href=
"{document.extensionDownloadZipUrl_stringS}"
>
<f:else
>
<i
class=
"fa fa-download"
></i>
Download version {document.extensionVersion_stringS} as ZIP
<a
class=
"btn {f:if(condition:exactMatchFound, then: 'btn-primary', else: 'btn-outline-primary')} btn-block mb-0"
href=
"{document.extensionDownloadZipUrl_stringS}"
>
<
/a>
<
i
class=
"fa fa-download"
></i>
Download version {document.extensionVersion_stringS} as ZIP
</
f:else
>
</
a
>
</f:
if
>
</f:
else
>
</
{
f:if
(condition:exactMatch,
then:
'div',
else:
'li')}
>
</
f:if
>
</f:section>
</f:section>
html/typo3conf/ext/ter_layout/Resources/Private/Templates/Solr/Results.html
View file @
654e37ed
...
@@ -45,14 +45,14 @@
...
@@ -45,14 +45,14 @@
<s:widget.resultPaginate
resultSet=
"{resultSet}"
configuration=
"{templatePath:'EXT:ter_layout/Resources/Private/Templates/Solr/ViewHelpers/Widget/ResultPaginate/Index.html'}"
>
<s:widget.resultPaginate
resultSet=
"{resultSet}"
configuration=
"{templatePath:'EXT:ter_layout/Resources/Private/Templates/Solr/ViewHelpers/Widget/ResultPaginate/Index.html'}"
>
<f:variable
name=
"exactMatchFound"
value=
"0"
/>
<f:variable
name=
"exactMatchFound"
value=
"0"
/>
<f:if
condition=
"{resultSet.usedQuery.queryString -> f:format.case(mode:'lower')} == {documents.0.extensionKey_stringS}"
>
<f:if
condition=
"{resultSet.usedQuery.queryString -> f:format.case(mode:'lower')} == {documents.0.extensionKey_stringS}"
>
<f:render
partial=
"Result/Document"
section=
"Document"
arguments=
"{resultSet:resultSet, document:documents.0, exactMatch: 1}"
/>
<f:render
partial=
"Result/Document"
section=
"Document"
arguments=
"{resultSet:resultSet, document:documents.0, exactMatch
Found
: 1}"
/>
<f:variable
name=
"exactMatchFound"
value=
"1"
/>
<f:variable
name=
"exactMatchFound"
value=
"1"
/>
</f:if>
</f:if>
<ol
start=
"{pagination.displayRangeStart}"
class=
"results-list list-unstyled card-container"
>
<ol
start=
"{pagination.displayRangeStart}"
class=
"results-list list-unstyled card-container"
>
<f:for
each=
"{documents}"
as=
"document"
iteration=
"iterator"
>
<f:for
each=
"{documents}"
as=
"document"
iteration=
"iterator"
>
<f:if
condition=
"{exactMatchFound} && {iterator.isFirst}"
>
<f:if
condition=
"{exactMatchFound} && {iterator.isFirst}"
>
<f:else>
<f:else>
<f:render
partial=
"Result/Document"
section=
"Document"
arguments=
"{resultSet:resultSet, document:document}"
/>
<f:render
partial=
"Result/Document"
section=
"Document
Wrap
"
arguments=
"{resultSet:resultSet, document:document}"
/>
</f:else>
</f:else>
</f:if>
</f:if>
</f:for>
</f:for>
...
...
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