Vyhledávání

* Pro vyhledání celé fráze zadejte text fráze do uvozovek, například „odbor informatických činností". Jinak budou vyhledávána jednotlivá slova.
Kde chcete hledat
Typ výsledku
Při zpracování šablony došlo k chybě.
The following has evaluated to null or missing:
==> pagination.pages?last  [in template "20097#20123#8654143" at line 180, column 21]

----
Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
----

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #if currentPage != pagination.pages?last  [in template "20097#20123#8654143" at line 180, column 1]
----
1<#-- 
2   we need to have correct template locale for date parsing, LR ho nenastavuje 
3--> 
4<#assign originalLocale = .locale /> 
5<#setting locale = locale> 
6 
7<#-- 
8 	src date formátu: modules/apps/portal-search/portal-search-web/src/main/java/com/liferay/portal/search/web/internal/result/display/context/builder/SearchResultSummaryDisplayContextBuilder.java#L883 
9--> 
10<#function formatSearchDate originalFormatted> 
11    <#return (originalFormatted?datetime.medium_short)?date?string.medium> 
12</#function> 
13<#-- omezeni pro zobrazeni rozsypane caje--> 
14<#function isSensisbleContent_Words content> 
15    <#local words = content?split(" ")> 
16    <#local wordRatio = content?length / words?size > 
17    <#if (wordRatio?number < 15) && (wordRatio?number > 6) > 
18        <#return true> 
19    <#else> 
20        <#return false> 
21    </#if> 
22</#function> 
23<#-- omezeni pro zobrazeni rozsypane caje na zaklade pomeru non-alhpa znaku vs ostatnich znaku--> 
24<#function isSensisbleContent_ratio content> 
25    <#local onlyTextContent = htmlUtil.stripHtml(content)/> 
26    <#local nonAlphaNumLength =  onlyTextContent?replace("\\w|[áčďéěíňóřšťůúýžÁČĎÉĚÍŇÓŘŠŤŮÚÝŽ]|[à-ü]|[À-Ü]|\\s","","ri")?length /> 
27    <#local fullLength =  onlyTextContent?length /> 
28    <#local nonAlphaNumRatio = (nonAlphaNumLength / fullLength) /> 
29    <#return nonAlphaNumRatio lt 0.1 /> 
30</#function> 
31<#macro pragueSearchResult assetEntry entry> 
32    <#assign url = entry.getViewURL()/> 
33    <#assign titleIconClassName = "" /> 
34    <#assign nonDefaultThumbnail = {} /> 
35<#-- replace file detail with direct download --> 
36    <#assign title = entry.getHighlightedTitle()/> 
37    <#assign content = '' /> 
38    <#assign showContent = entry.isContentVisible() /> 
39    <#assign ariaLabel = '' /> 
40    <#if showContent> 
41        <#assign content = entry.getContent() /> 
42    </#if> 
43    <#if entry.getClassName() == 'com.liferay.document.library.kernel.model.DLFileEntry' > 
44        <#assign url = entry.getAssetRendererURLDownload() /> 
45        <#assign titleIconClassName = "fa-solid fa-download" /> 
46        <#assign showContent= showContent && isSensisbleContent_ratio(entry.content) /> 
47        <#assign ariaLabel = "Dokument" /> 
48    <#elseif entry.getClassName() == 'com.liferay.journal.model.JournalArticle'> 
49        <#assign brief = pragueFacade.briefMapper().mapAssetEntryToBrief(assetEntry, themeDisplay)/> 
50        <#assign title = brief.title /> 
51        <#assign content = brief.perex /> 
52        <#if brief.image?has_content && brief.image??> 
53 
54            <#assign style = ""/> 
55            <#if brief.image.keepAspectRatio> 
56                <#assign  style += "object-fit: contain;" /> 
57            </#if> 
58            <#if brief.image.coverThumbnailAxisY?has_content && brief.image.coverThumbnailAxisX?has_content> 
59                <#assign  style += "object-position: ${brief.image.coverThumbnailAxisX}% ${brief.image.coverThumbnailAxisY}%;" /> 
60            </#if> 
61            <#if brief.image.url?has_content> 
62                <#assign nonDefaultThumbnail = { 
63                "src": brief.image.url, 
64                "alt": brief.image.alt, 
65                "fileEntryId": brief.image.fileEntryId, 
66                "style": style 
67                } /> 
68            </#if> 
69        </#if> 
70    </#if> 
71    <div class="prg-search--result" ${ariaLabel?has_content?string('aria-label=${ariaLabel}', '') }> 
72        <div class="prg-search--result-main"> 
73            <#if entry.getDocumentFormFieldDisplayContexts()?has_content> 
74                <table> 
75                    <#list entry.getDocumentFormFieldDisplayContexts() as df> 
76                        <tr> 
77                            <th>${df.name}</th> 
78                            <td>${df.valuesToString}</td> 
79                        </tr> 
80                    </#list> 
81                </table> 
82            </#if> 
83 
84            <a class="prg-search-item__link" href="${url}"> 
85                <#if titleIconClassName?has_content> 
86                    <i class="${titleIconClassName} prg-box-icon prg-search-item__title-icon " aria-hidden="true"></i> 
87                </#if> 
88                <h5 class="prg-search-item__heading">${title}</h5> 
89            </a> 
90            <p> 
91                <#if entry.isCreationDateVisible()> 
92                    <span class="prg-search--date">${formatSearchDate(entry.getCreationDateString())}${entry.isContentVisible()?string(' —', '')}</span> 
93                </#if> 
94                <#if entry.content?? && showContent> 
95                    ${content?replace('&amp;nbsp;','&nbsp;')} 
96                </#if> 
97            </p> 
98        </div> 
99        <#if entry.isThumbnailVisible()> 
100            <div class="prg-search--result-picture"> 
101                <a href="${url}" tabindex="-1"> 
102                    <img alt="${htmlUtil.escape(title)}" src="${entry.getThumbnailURLString()}" /> 
103                </a> 
104            </div> 
105        <#elseif nonDefaultThumbnail.src??> 
106            <div class="prg-search--result-picture"> 
107                <a href="${url}" tabindex="-1"> 
108                    <img 
109                            src="${nonDefaultThumbnail.src}" 
110                            alt="${nonDefaultThumbnail.alt}" 
111                            data-fileentryid=${nonDefaultThumbnail.fileEntryId} 
112                            style="${nonDefaultThumbnail.style}" 
113                    /> 
114                </a> 
115            </div> 
116        </#if> 
117    </div> 
118</#macro> 
119<div class="heading-container u-mt--32"> 
120   <h2>Vyhledané záznamy</h2> 
121</div> 
122<div class="prg-search--results-header"> 
123    <h6 class="u-fw--400 u-mb--unset">Celkem záznamů: <strong>${searchContainer.total}</strong></h6> 
124    <div class="prg-search--results-orderby"> 
125        <div class="prg-search-results-orderby-item"> 
126					<span 
127                            aria-hidden="true" 
128                            class="loading-animation loading-animation-sm loading-animation-secondary" 
129                    ></span> 
130            <script> 
131                Liferay.on('searchMoveSort', () => { 
132                    if (document.querySelector('.has-edit-mode-menu')) { 
133                        return; 
134
135                    const item = document.querySelector('.prg-search--results-header .prg-search--results-orderby .prg-search-results-orderby-item'); 
136                    const loading = item.querySelector('.loading-animation'); 
137                    const sortPortletContainer = document.querySelector('.sort-portlet-container'); 
138                    if (loading && sortPortletContainer) { 
139                        loading.remove(); 
140                        const firstSortChild = sortPortletContainer.children.item(0); 
141                        item.appendChild(firstSortChild); 
142                        sortPortletContainer.remove(); 
143
144                }); 
145                Liferay.fire('searchMoveSort'); 
146            </script> 
147        </div> 
148        <div class="prg-search--results-orderby-item"> 
149            <label for="prg-search-form-orderby-pages" class="prg-search--label">Na stránce</label> 
150            <select name="prg-search-form-orderby-pages" class="p-form-select prg-search--select" 
151                    id="prg-search-form-orderby-pages" 
152                    onchange="onDeltaChange(event)"> 
153                <#list [8,12,16] as delta> 
154                    <option value="${delta}" ${(delta == searchContainer.delta)?string('selected','')}>${delta}</option> 
155                </#list> 
156            </select> 
157            <script> 
158                PraguePortal.Components.SlimSelect.init(document.querySelector('#prg-search-form-orderby-pages')); 
159 
160                function onDeltaChange(e) { 
161                    document.location.search = Liferay.Search.SortUtil.updateQueryString("${searchContainer.deltaParam}", 
162                        [e.target.value], 
163                        document.location.search, 
164                    ); 
165
166            </script> 
167        </div> 
168    </div> 
169</div> 
170<div class="prg-search--results"> 
171    <#if entries?has_content> 
172        <#list entries as entry> 
173            <#assign assetEntry = pragueSearch.loadAssetEntry(entry.className, entry.classPK) /> 
174            <@pragueSearchResult assetEntry=assetEntry entry=entry /> 
175        </#list> 
176    </#if> 
177</div> 
178<#assign currentPage = searchContainer.cur /> 
179<#assign pagination =  pragueSearch.pagination(searchContainer, 7) /> 
180<#if currentPage != pagination.pages?last> 
181    <div class="container-centered"> 
182        <a href="${pragueSearch.pageUrl(currentPage+1, searchContainer)}" class="btn-prg btn-prg-primary">Zobrazit 
183            dalších ${searchContainer.delta}</a> 
184    </div> 
185</#if> 
186 
187<#-- We have to hide original LR navigation --> 
188<style> 
189    .prague-pagination ~ form { 
190        display: none; 
191
192</style> 
193<div class="prague-pagination<#if currentPage == pagination.pages?last> u-mt--32</#if>"> 
194    <nav aria-label="pagination" class="p-pagination"> 
195        <ul class="p-pagination__list"> 
196            <#if currentPage != pagination.pages?first> 
197                <li> 
198                    <a href="${pragueSearch.pageUrl(currentPage-1, searchContainer)}" class="p-pagination__control" 
199                       aria-label="Předchozí stránka"> 
200                        <img src="${themeDisplay.pathThemeImages}/chevron-left.svg" 
201                             class="p-pagination__arrow" 
202                             alt="Předchozí stránka" aria-hidden="true"> 
203                    </a> 
204                </li> 
205            </#if> 
206            <#list pagination.pages as page> 
207                <li> 
208                    <a href="${pragueSearch.pageUrl(page, searchContainer)}" 
209                            ${(page == currentPage)?string(' aria-current="page"','')} 
210                       class="p-pagination__item${(page == currentPage)?string(' p-pagination__item--active','')}">${page}</a> 
211                </li> 
212                <#if pagination.showSeparatorAfter(page)> 
213                    <li> 
214                        <span className="p-pagination__item p-pagination__item--separator">...</span> 
215                    </li> 
216                </#if> 
217            </#list> 
218            <#if currentPage != pagination.pages?last> 
219                <li> 
220                    <a href="${pragueSearch.pageUrl(currentPage+1, searchContainer)}" class="p-pagination__control" 
221                       aria-label="Další stránka"> 
222                        <img src="${themeDisplay.pathThemeImages}/chevron-right.svg" class="p-pagination__arrow" 
223                             alt="Další stránka" aria-hidden="true"> 
224                    </a> 
225                </li> 
226            </#if> 
227        </ul> 
228    </nav> 
229</div> 
230<#setting locale = originalLocale /> 
231<style> 
232    .prg-search-item__link { 
233        display: flex; 
234        gap: 1rem; 
235        align-items: baseline; 
236
237 
238    .prg-search-item__title-icon { 
239        position: relative; 
240        bottom: 1px; 
241        font-size: 2rem; 
242
243</style>