Skip to content

Commit

Permalink
move iconpack with itemtype icons from search results to liszt_common…
Browse files Browse the repository at this point in the history
…, style icons on page
  • Loading branch information
thomas-sc committed Oct 30, 2024
1 parent 05fe191 commit dead641
Show file tree
Hide file tree
Showing 14 changed files with 230 additions and 7 deletions.
11 changes: 6 additions & 5 deletions Classes/Common/QueryParamsBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
40 changes: 40 additions & 0 deletions Configuration/Iconpack/LisztSearchResultsIconpack.yaml
Original file line number Diff line number Diff line change
@@ -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 <img> tag:
source: "EXT:liszt_common/Resources/Public/Icons/IconPackSearchResults/"
attributes:
class: "lzicon"

svgInline:
# Source folder of the SVG files that are rendered as <svg> 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
10 changes: 8 additions & 2 deletions Resources/Private/Templates/Search/Index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
<html
xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
xmlns:i="http://typo3.org/ns/Quellenform/Iconpack/ViewHelpers"
data-namespace-typo3-fluid="true">



Expand Down Expand Up @@ -34,9 +37,12 @@ <h4 class="">{key}</h4>
{creator.firstName} {creator.lastName}
</f:for>
</div>
<h3 class="searchresults-item-title">
<div class="searchresults-item-title">
<div class="searchresults-item-icon"><i:icon iconfig="lziconsr,musicSheet" preferredRenderTypes="svgSprite" additionalAttributes="{aria-hidden:'true'}" /></div>
<h3 >
{hit._source.title}, {hit._source.title}
</h3>
</div>
</header>
<div class="searchresults-item-details">
{hit._source.date}, {hit._source.pages}, {hit._source.archiveLocation}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions Resources/Public/Icons/IconPackSearchResults/attachment.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions Resources/Public/Icons/IconPackSearchResults/book.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit dead641

Please sign in to comment.