From 72c5618382b5dc1c9f9089aa0b128fee0a260aa2 Mon Sep 17 00:00:00 2001
From: Fabian Thommen <noreply@example.com>
Date: Thu, 10 Aug 2017 15:22:25 +0200
Subject: [PATCH] [TASK] div around search word

- 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>
---
 .../Private/Templates/Search/Search.html      | 26 ++++++++++---------
 1 file changed, 14 insertions(+), 12 deletions(-)

diff --git a/typo3/sysext/indexed_search/Resources/Private/Templates/Search/Search.html b/typo3/sysext/indexed_search/Resources/Private/Templates/Search/Search.html
index 198d09b0bdef..e40b87c28137 100644
--- a/typo3/sysext/indexed_search/Resources/Private/Templates/Search/Search.html
+++ b/typo3/sysext/indexed_search/Resources/Private/Templates/Search/Search.html
@@ -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>
-- 
GitLab