[TASK] div around search word 73/53673/3
authorFabian Thommen <noreply@example.com>
Thu, 10 Aug 2017 13:22:25 +0000 (15:22 +0200)
committerSusanne Moog <susanne.moog@typo3.org>
Mon, 14 Aug 2017 09:28:25 +0000 (11:28 +0200)
- div with css class 'tx-indexedsearch-info-sword' added, to style or hide
this with csc
- only show info about search word if any result is found (as the search
word is already shown in the input field)

Releases: master
Resolves: #82076
Change-Id: I734b84d8e07823ba9a7ed1d2aa86108352139616
Reviewed-on: https://review.typo3.org/53673
Reviewed-by: Henning Liebe <h.liebe@neusta.de>
Tested-by: Henning Liebe <h.liebe@neusta.de>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Joerg Boesche <typo3@joergboesche.de>
Tested-by: Joerg Boesche <typo3@joergboesche.de>
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog <susanne.moog@typo3.org>
typo3/sysext/indexed_search/Resources/Private/Templates/Search/Search.html

index 198d09b..e40b87c 100644 (file)
@@ -6,18 +6,20 @@
        <f:if condition="{result.categoryTitle}">
                <h1 class="tx-indexedsearch-category">{result.categoryTitle}</h1>
        </f:if>
-       <!-- show the info what was searched for -->
-       <f:for each="{searchWords}" as="searchWord" key="key">
-               <f:if condition="{key} > 0">
-                       <f:then>
-                               <f:translate key="searchFor.{searchWord.oper}" />&nbsp;{searchWord.sword}
-                       </f:then>
-                       <f:else>
-                               <f:translate key="searchFor" />&nbsp;{searchWord.sword}
-                       </f:else>
-               </f:if>
-       </f:for>
-       <!-- show the info in which section was searched for -->
+       <f:if condition="{result.count} > 0">
+               <div class="tx-indexedsearch-info-sword">
+                       <f:for each="{searchWords}" as="searchWord" key="key">
+                               <f:if condition="{key} > 0">
+                                       <f:then>
+                                               <f:translate key="searchFor.{searchWord.oper}" />&nbsp;{searchWord.sword}
+                                       </f:then>
+                                       <f:else>
+                                               <f:translate key="searchFor" />&nbsp;{searchWord.sword}
+                                       </f:else>
+                               </f:if>
+                       </f:for>
+               </div>
+       </f:if>
        {result.searchedInSectionInfo}
        <f:if condition="{result.count} > 0">
                <f:then>