diff --git a/Classes/Common/QueryParamsBuilder.php b/Classes/Common/QueryParamsBuilder.php index c77cbe8..92be7b6 100644 --- a/Classes/Common/QueryParamsBuilder.php +++ b/Classes/Common/QueryParamsBuilder.php @@ -38,14 +38,15 @@ public static function createElasticParams(string $bibIndex, array $searchParams } else { $params['body']['query'] = [ 'bool' => [ - 'must' => [[ - 'query_string' => [ - 'query' => $searchParams['searchText'] - ] - ]] + 'must' => [ + ['query_string' => ['query' => $searchParams['searchText']]], + ] ] ]; } + if (isset($searchParams['f_itemType']) && $searchParams['f_itemType'] !== "") { + $params['body']['query']['bool']['filter']['term']['itemType.keyword'] = $searchParams['f_itemType']; + } return $params; } diff --git a/Configuration/Iconpack/LisztSearchResultsIconpack.yaml b/Configuration/Iconpack/LisztSearchResultsIconpack.yaml new file mode 100644 index 0000000..7b1fcca --- /dev/null +++ b/Configuration/Iconpack/LisztSearchResultsIconpack.yaml @@ -0,0 +1,40 @@ +iconpack: + title: "Liszt Custom Icons for Search Results in LQWV" + # The key of the iconpack (!) + key: "lziconsr" + version: 1.0.0 + + renderTypes: + svg: + # Source folder of the SVG files, which are rendered as tag: + source: "EXT:liszt_common/Resources/Public/Icons/IconPackSearchResults/" + attributes: + class: "lzicon" + + svgInline: + # Source folder of the SVG files that are rendered as tag (inline SVG): + source: "EXT:liszt_common/Resources/Public/Icons/IconPackSearchResults/" + attributes: + class: "lzicon-inline" + fill: "currentColor" + + + svgSprite: + source: "EXT:liszt_common/Resources/Public/Icons/IconPackSearchResults/IconSpritesSearchResults.svg" + attributes: + class: "lzicon-sprite" + fill: "currentColor" + + # Define here which icons are provided by this iconpack + # In this case, the values here correspond to the file names (without file name extension) + icons: + - auctionCatalog + - lisztDocument + - book + - attachment + - encyclopediaArticle + - essay + - journalArticle + - lisztDocument + - musicSheet + - thesis diff --git a/Resources/Private/Templates/Search/Index.html b/Resources/Private/Templates/Search/Index.html index 022a15e..0496eab 100644 --- a/Resources/Private/Templates/Search/Index.html +++ b/Resources/Private/Templates/Search/Index.html @@ -1,4 +1,7 @@ - + @@ -34,9 +37,12 @@

{key}

{creator.firstName} {creator.lastName} -

+
+
+

{hit._source.title}, {hit._source.title}

+
{hit._source.date}, {hit._source.pages}, {hit._source.archiveLocation} diff --git a/Resources/Public/Icons/IconPackSearchResults/IconSpritesSearchResults.svg b/Resources/Public/Icons/IconPackSearchResults/IconSpritesSearchResults.svg new file mode 100644 index 0000000..d7d164d --- /dev/null +++ b/Resources/Public/Icons/IconPackSearchResults/IconSpritesSearchResults.svg @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Resources/Public/Icons/IconPackSearchResults/attachment.svg b/Resources/Public/Icons/IconPackSearchResults/attachment.svg new file mode 100644 index 0000000..3acd51f --- /dev/null +++ b/Resources/Public/Icons/IconPackSearchResults/attachment.svg @@ -0,0 +1,11 @@ + + + + + + + + + + diff --git a/Resources/Public/Icons/IconPackSearchResults/auctionCatalog.svg b/Resources/Public/Icons/IconPackSearchResults/auctionCatalog.svg new file mode 100644 index 0000000..0c0ab16 --- /dev/null +++ b/Resources/Public/Icons/IconPackSearchResults/auctionCatalog.svg @@ -0,0 +1,7 @@ + + + + + + diff --git a/Resources/Public/Icons/IconPackSearchResults/book.svg b/Resources/Public/Icons/IconPackSearchResults/book.svg new file mode 100644 index 0000000..ee6c2aa --- /dev/null +++ b/Resources/Public/Icons/IconPackSearchResults/book.svg @@ -0,0 +1,7 @@ + + + + + + diff --git a/Resources/Public/Icons/IconPackSearchResults/encyclopediaArticle.svg b/Resources/Public/Icons/IconPackSearchResults/encyclopediaArticle.svg new file mode 100644 index 0000000..1dcc447 --- /dev/null +++ b/Resources/Public/Icons/IconPackSearchResults/encyclopediaArticle.svg @@ -0,0 +1,7 @@ + + + + + + diff --git a/Resources/Public/Icons/IconPackSearchResults/essay.svg b/Resources/Public/Icons/IconPackSearchResults/essay.svg new file mode 100644 index 0000000..532f2a1 --- /dev/null +++ b/Resources/Public/Icons/IconPackSearchResults/essay.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + diff --git a/Resources/Public/Icons/IconPackSearchResults/journalArticle.svg b/Resources/Public/Icons/IconPackSearchResults/journalArticle.svg new file mode 100644 index 0000000..f7cd08e --- /dev/null +++ b/Resources/Public/Icons/IconPackSearchResults/journalArticle.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + diff --git a/Resources/Public/Icons/IconPackSearchResults/lisztDocument.svg b/Resources/Public/Icons/IconPackSearchResults/lisztDocument.svg new file mode 100644 index 0000000..bcd5a02 --- /dev/null +++ b/Resources/Public/Icons/IconPackSearchResults/lisztDocument.svg @@ -0,0 +1,9 @@ + + + + + + + diff --git a/Resources/Public/Icons/IconPackSearchResults/musicSheet.svg b/Resources/Public/Icons/IconPackSearchResults/musicSheet.svg new file mode 100644 index 0000000..c699d42 --- /dev/null +++ b/Resources/Public/Icons/IconPackSearchResults/musicSheet.svg @@ -0,0 +1,9 @@ + + + + + + + diff --git a/Resources/Public/Icons/IconPackSearchResults/thesis.svg b/Resources/Public/Icons/IconPackSearchResults/thesis.svg new file mode 100644 index 0000000..ae2a011 --- /dev/null +++ b/Resources/Public/Icons/IconPackSearchResults/thesis.svg @@ -0,0 +1,9 @@ + + + + + + + diff --git a/ext_localconf.php b/ext_localconf.php index d8d8b0d..f3e537f 100644 --- a/ext_localconf.php +++ b/ext_localconf.php @@ -28,3 +28,11 @@ ExtensionManagementUtility::addPageTSConfig( '' ); + +if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('iconpack')) { + \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance( + \Quellenform\Iconpack\IconpackRegistry::class + )->registerIconpack( + 'EXT:liszt_common/Configuration/Iconpack/LisztSearchResultsIconpack.yaml', + ); +}