Při zpracování šablony došlo k chybě.
The following has evaluated to null or missing: ==> pracovisteEntry.getAssetRenderer() [in template "20115#20151#190760" at line 80, column 62] ---- 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: pracovisteRenderer = pracovisteEntry... [in template "20115#20151#190760" at line 80, column 41] ----
1<script type="text/javascript" src="https://api.mapy.cz/loader.js">
2</script>
3<script type="text/javascript">
4 Loader.load();
5</script>
6<#assign
7 journalArticlePattern = "^\\{.*\"classPK\":\"(\\d*?)\".*\\}$"
8
9 AssetCategoryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService")
10 AssetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService")
11 JournalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")
12/>
13<div class="box" id="obsah" >
14 <div class="box__inner">
15 <div class="box__block">
16 <div class="row">
17 <div class="col-xs-12">
18 <h2>Kontaktní pracoviště ${nazev.getData()}</h2>
19 </div>
20 </div>
21 </div>
22
23 <#if oznameni?? && oznameni.getData()?has_content>
24 <#assign showOznameni = false />
25 <#if oznameni.datumPlatnosti?? && oznameni.datumPlatnosti.getData()?has_content>
26 <#assign
27 datumPlatnosti = oznameni.datumPlatnosti.getData()?date("yyyy-MM-dd")
28 nowDate = dateUtil.newDate()?string("yyyy-MM-dd")?date("yyyy-MM-dd")
29 />
30
31 <#if datumPlatnosti gte nowDate>
32 <#assign showOznameni = true />
33 </#if>
34 </#if>
35 <#if showOznameni>
36 <div class="box__block">
37 <div class="row">
38 <div class="col-xs-12">
39 <div class="message">
40 <div class="row">
41 <div class="col-xs-12 col-sm-2 mb-a-20 mt-a-20">
42 <img src="/o/mpsv-theme/images/icons/info.svg" title="Důležité sdělení" alt="Důležité sdělení" class="message__icon">
43 </div>
44 <div class="col-xs-12 col-sm-8 mb-a-20 mt-a-20">
45 <h3>Oznámení</h3>
46 <div >
47 ${oznameni.getData()}
48 </div>
49 </div>
50 </div>
51 </div>
52 </div>
53 </div>
54 </div>
55 </#if>
56 </#if>
57
58 <div class="box__block">
59 <div class="row">
60 <div class="col-xs-12">
61 <#assign
62 zprZam = []
63 statSoc = []
64 hmotNouze = []
65 socSluzby = []
66 davky = []
67 sluzby = {}
68 />
69 <#list pracoviste.getSiblings() as cur_pracoviste>
70 <#assign res = cur_pracoviste.getData()?matches(journalArticlePattern) />
71 <#if res >
72 <#assign
73 className = "com.liferay.journal.model.JournalArticle"
74 classPK = res?groups[1]
75
76 pracovisteEntry = AssetEntryLocalService.fetchEntry(className, classPK?number)!""
77 />
78 <#if pracovisteEntry?has_content>
79 <#assign
80 pracovisteRenderer = pracovisteEntry.getAssetRenderer()
81 pracovisteJA = pracovisteRenderer.getArticle()!""
82 />
83 <#if pracovisteJA?has_content>
84 <#assign
85 doc = saxReaderUtil.read(pracovisteJA.getContent())
86 zkratka = doc.valueOf("//dynamic-element[@name='zkratka']/dynamic-content/text()")
87
88 zprZamAdresa = doc.valueOf("//dynamic-element[@name='zprZamAdresa']/dynamic-content/text()")
89 statSocAdresa = doc.valueOf("//dynamic-element[@name='statSocAdresa']/dynamic-content/text()")
90 hmotNouzeAdresa = doc.valueOf("//dynamic-element[@name='hmotNouzeAdresa']/dynamic-content/text()")
91 socSluzbyAdresa = doc.valueOf("//dynamic-element[@name='socSluzbyAdresa']/dynamic-content/text()")
92 davkyAdresa = doc.valueOf("//dynamic-element[@name='davkyAdresa']/dynamic-content/text()")
93 text = "<a href='#" + zkratka + "' onclick='" + zkratka?replace('-', '') + "GeocodeAddress()' class='pr-a-10'>" + pracovisteJA.getTitle(locale) +"</a>"
94
95 sluzbyNodes = doc.selectNodes("//dynamic-element[@name='sluzba']")
96 />
97 <#if zprZamAdresa?has_content>
98 <#assign zprZam = zprZam + [ text ] />
99 </#if>
100 <#if statSocAdresa?has_content>
101 <#assign statSoc = statSoc + [ text ] />
102 </#if>
103 <#if hmotNouzeAdresa?has_content>
104 <#assign hmotNouze = hmotNouze + [ text ] />
105 </#if>
106 <#if socSluzbyAdresa?has_content>
107 <#assign socSluzby = socSluzby + [ text ] />
108 </#if>
109 <#if davkyAdresa?has_content>
110 <#assign davky = davky + [ text ] />
111 </#if>
112
113 <#if sluzbyNodes?size gt 0>
114 <#list 1..sluzbyNodes?size as index>
115 <#assign
116 sluzbaNazev = doc.valueOf("(//dynamic-element[@name='sluzba'])[" + index + "]/dynamic-element[@name='sluzbaNazev']/dynamic-content/text()")
117 newValue = [ text ]
118 />
119 <#if sluzbaNazev?has_content>
120 <#list sluzby?keys as key>
121 <#if key == sluzbaNazev>
122 <#assign
123 existsInMap = true
124 oldValue = sluzby[key]
125 newValue = oldValue + [ text ]
126 >
127 <#break />
128 </#if>
129 </#list>
130
131 <#assign sluzby = sluzby + { sluzbaNazev : newValue } >
132 </#if>
133 </#list>
134 </#if>
135 </#if>
136 </#if>
137 </#if>
138 </#list>
139 <table class="table-responsive">
140 <thead>
141 <tr>
142 <th colspan="2">Kontaktní pracoviště zajišťuje následující služby:</th>
143 </tr>
144 </thead>
145 <tbody>
146 <@printSluzbaTableRow nazev="Zprostředkování zaměstnání" itemList=zprZam />
147 <@printSluzbaTableRow nazev="Státní sociální podpora" itemList=statSoc />
148 <@printSluzbaTableRow nazev="Hmotná nouze" itemList=hmotNouze />
149 <@printSluzbaTableRow nazev="Příspěvek na péči" itemList=socSluzby />
150 <@printSluzbaTableRow nazev="Dávky pro osoby se zdravotním postižením" itemList=davky />
151 <#list sluzby?keys as key>
152 <@printSluzbaTableRow nazev=key itemList=sluzby[key] />
153 </#list>
154 </tbody>
155 </table>
156 </div>
157 </div>
158 </div>
159 <#if vedouci?? && vedouci.getData()?has_content>
160 <div class="box__block">
161 <div class="row">
162 <div class="col-xs-12 col-md-6">
163 <table class="table-responsive">
164 <tbody>
165 <tr>
166 <th>Elektronická pošta podatelny</th>
167 <td>
168 <a href="mailto:${adresaPodatelny.getData()}">
169 ${adresaPodatelny.getData()}
170 </a>
171 </td>
172 </tr>
173 <tr>
174 <th>ID datové schránky</th>
175 <td>${idDatoveSchranky.getData()}</td>
176 </tr>
177 <tr>
178 <th>Kontaktní telefon</th>
179 <!--<td>+420 844 844 803</td-->
180 <td><a href="/web/cz/callcentrum-zamestnanost">Callcentrum zaměstnanost</a><br /><a href="/web/cz/callcentrum-socialni-davky">Callcentrum sociální dávky</a></td>
181 </tr>
182 </tbody>
183 </table>
184 </div>
185 </div>
186 <div class="row">
187 <div class="col-xs-12 col-sm-3">
188 <#assign district = request.getAttribute("district")!>
189 <#assign path = request.getAttribute("path")!>
190 <#assign region = request.getParameterValues("region")!>
191
192 <#if district?has_content>
193 <#assign district = "/" + district[0]>
194 </#if>
195
196 <#if path?has_content && region?has_content>
197 <#assign
198 deskyPath = path + "/uredni-deska/" + region[0]
199 pracovistePath = path + "/kontaktni-pracoviste/" + region[0]
200 />
201 <#else>
202 <#assign
203 journalArticle = JournalArticleLocalService.getArticle(groupId, .vars["reserved-article-id"].data)
204 categories = AssetCategoryLocalService.getCategories("com.liferay.journal.model.JournalArticle", journalArticle.getResourcePrimKey())
205 deskyPath = "/web/cz/uredni-deska"
206 />
207 <#if categories?size == 1>
208 <#assign deskyPath = deskyPath + "/-/categories/" + categories?first.getCategoryId() />
209 </#if>
210 </#if>
211 <a href="${deskyPath}" class="with-icon">Úřední deska</a>
212 </div>
213 <div class="col-xs-12 col-sm-3">
214 <a class="with-icon js-scroll-to-office-hours" style="cursor: pointer;">
215 Úřední hodiny
216 </a>
217 </div>
218 <!--<div class="col-xs-12 col-sm-6">
219 <#list themeDisplay.getLayout().getChildren() as childLayout>
220 <#if childLayout.getHTMLTitle(locale) == "Kontakty na zaměstnance">
221 <a href="${childLayout.getFriendlyURL(locale)?substring(1)}" class="with-icon">Kontakty na zaměstnance</a>
222 <#break>
223 </#if>
224 </#list>
225 </div>-->
226 </div>
227 </div>
228 <div class="box__block">
229 <div class="row">
230 <div class="col-xs-12 col-md-6">
231 <table class="table-responsive manager__table">
232 <tbody>
233 <tr>
234 <th>${vedouci.pozice.getData()}</th>
235 <td>
236 ${vedouci.getData()}
237 <#if vedouci.cv?? && vedouci.cv.getData()?has_content>
238 <a href="${vedouci.cv.getData()}" title="Profesní životopis" target="_blank"><img src="/documents/37855/697547/ico-pdf.png" alt="Profesní životopis" class="file-icon"></a>
239 </#if>
240 </td>
241 </tr>
242 <#if vedouci.telefon?? && vedouci.telefon.getData()?has_content>
243 <tr>
244 <th>Telefon</th>
245 <td>
246 ${vedouci.telefon.getData()}
247 </td>
248 </tr>
249 </#if>
250 <#if vedouci.email?? && vedouci.email.getData()?has_content>
251 <tr>
252 <th>E-mail</th>
253 <td>
254 <a href="mailto:${vedouci.email.getData()}">${vedouci.email.getData()}</a>
255 </td>
256 </tr>
257 </#if>
258 </tbody>
259 </table>
260 </div>
261 </div>
262 </div>
263 </#if>
264
265 <div class="box__block">
266 <#if pracoviste.getSiblings()?size gt 1>
267 <div class="row">
268 <div class="col-xs-12 col-md-6 col-lg-4">
269 <div class="dropdown">
270 <button class="dropdown__selected" title="Dropdown" aria-haspopup="true" aria-expanded="false" tabindex="0">
271 <span>Vyberte kontaktní pracoviště ze seznamu...</span>
272 </button>
273 <ul class="dropdown__menu" role="menu" aria-hidden="true">
274 <#if pracoviste.getSiblings()?has_content>
275 <#list pracoviste.getSiblings() as cur_pracoviste>
276 <#assign res = cur_pracoviste.getData()?matches(journalArticlePattern) />
277 <#if res >
278 <#assign
279 className = "com.liferay.journal.model.JournalArticle"
280 classPK = res?groups[1]
281
282 pracovisteEntry = AssetEntryLocalService.fetchEntry(className, classPK?number)!""
283 />
284 <#if pracovisteEntry?has_content>
285 <#assign
286 pracovisteRenderer = pracovisteEntry.getAssetRenderer()
287 pracovisteJA = pracovisteRenderer.getArticle()!""
288 />
289 <#if pracovisteJA?has_content>
290 <#assign
291 doc = saxReaderUtil.read(pracovisteJA.getContent())
292
293 zkratka = doc.valueOf("//dynamic-element[@name='zkratka']/dynamic-content/text()")
294 />
295 <li class="dropdown__item" role="presentation">
296 <a href="#${zkratka}" class="dropdown__link" role="menuitem" title="${pracovisteJA.getTitle(locale)}" tabindex="0" xxonclick="${zkratka?replace('-', '')}GeocodeAddress()">
297 <span>${pracovisteJA.getTitle(locale)}</span>
298 </a>
299 </li>
300 </#if>
301 </#if>
302 </#if>
303 </#list>
304 </#if>
305 </ul>
306 </div>
307 </div>
308 </div>
309 </#if>
310
311 <#if pracoviste.getSiblings()?has_content>
312 <#assign
313 hidden = ""
314 />
315 <#list pracoviste.getSiblings() as cur_pracoviste>
316 <#assign res = cur_pracoviste.getData()?matches(journalArticlePattern) />
317 <#if res >
318 <#assign
319 className = "com.liferay.journal.model.JournalArticle"
320 classPK = res?groups[1]
321
322 pracovisteEntry = AssetEntryLocalService.fetchEntry(className, classPK?number)!""
323 />
324 <#if pracovisteEntry?has_content>
325 <#assign
326 pracovisteRenderer = pracovisteEntry.getAssetRenderer()
327 pracovisteJA = pracovisteRenderer.getArticle()!""
328 />
329 <#if pracovisteJA?has_content>
330 <#assign
331 doc = saxReaderUtil.read(pracovisteJA.getContent())
332
333 zkratka = doc.valueOf("//dynamic-element[@name='zkratka']/dynamic-content/text()")
334 />
335 <section class="form__tab" id="${zkratka}" ${hidden}>
336 ${JournalArticleLocalService.getArticleContent(pracovisteJA, pracovisteJA.getDDMTemplateKey(), "VIEW", locale, null, themeDisplay)}
337 </section>
338 <#assign
339 hidden = " hidden=\"hidden\""
340 />
341 </#if>
342 </#if>
343 </#if>
344 </#list>
345 </#if>
346 </div>
347 </div>
348</div>
349
350<#macro printSluzbaTableRow nazev itemList>
351 <tr>
352 <th>${nazev}</th>
353 <td>
354 <#list itemList as item>
355 ${htmlUtil.unescape(item)}
356 </#list>
357 </td>
358 </tr>
359</#macro>
360
361<script type="text/javascript">
362 window.addEventListener('hashchange', showSectionBasedOnHash, false);
363 showSectionBasedOnHash();
364
365 function showSectionBasedOnHash() {
366 var hash = window.location.hash;
367
368 if (hash !== "#obsah") {
369 var sections = document.querySelectorAll('#obsah section');
370
371 for (var i = 0; i < sections.length; i++) {
372 sections[i].setAttribute('hidden', 'hidden');
373 }
374
375 var hashSectionElement = document.querySelector('#obsah section' + hash);
376 hashSectionElement.removeAttribute('hidden');
377 hashSectionElement.scrollIntoView();
378
379 closeDropdown();
380
381 setDropdownDefaultText(hashSectionElement.querySelector('h2').textContent);
382
383 if (hash) {
384 // prekresli mapu
385 var fnName = hash.replace("#", "").split("-").join("") + "GeocodeAddress";
386 window[fnName]();
387 }
388 } else {
389 setDropdownDefaultText();
390 }
391 }
392 <#-- prevzane z temy z front.js -->
393 function closeDropdown() {
394 var dropdownParent = $('#obsah .dropdown'),
395 dropdownSelected = dropdownParent.find( '.dropdown__selected' ),
396 dropdownMenu = dropdownParent.find( '.dropdown__menu' ),
397 dropdownOC = 'dropdown--open';
398
399 dropdownParent.removeClass( dropdownOC );
400
401 dropdownMenu.attr( 'aria-hidden', 'true' );
402
403 dropdownMenu
404 .find( 'a' )
405 .attr( 'tabIndex', -1 );
406
407 dropdownSelected
408 .attr( 'aria-expanded', 'false' )
409 .blur();
410 }
411
412 function setDropdownDefaultText(text) {
413 var dropdownSpanElement = $('#obsah .dropdown__selected span');
414 dropdownSpanElement.html(text);
415 }
416
417 // SCROLL TO OFFICE HOURS
418
419 var btn = document.querySelector('.js-scroll-to-office-hours');
420 if (btn) {
421 btn.addEventListener('click', scrollToOfficeHours, false);
422 }
423
424 function scrollToOfficeHours() {
425 var findContainer = document;
426 var hash = window.location.hash;
427
428 if (hash) {
429 var section = document.querySelector('#obsah section' + hash);
430 if (section) {
431 findContainer = section;
432 }
433 }
434
435 var officeHours = findContainer.querySelector('#office-hours');
436 if (officeHours) {
437 officeHours.scrollIntoView();
438 }
439 }
440</script>
441<style>
442@media screen and (min-width: 660px) {
443.manager__table tr > th:first-child {
444 width: 150px;
445 }
446}
447.asseco-theme.body__wrapper img.file-icon {
448 margin-bottom: 0.5em !important;
449}
450.asseco-theme.body__wrapper .smap img {
451 margin-bottom: 0;
452}
453.asseco-theme.body__wrapper .portlet-journal-content .journal-content-article .smap img {
454 max-width: none;
455}
456.asseco-theme.body__wrapper #obsah .form__tab {
457 padding-bottom: 0px;
458}
459.asseco-theme.body__wrapper .form__tab .box {
460 overflow: visible;
461}
462.asseco-theme.body__wrapper .form__tab .box {
463 border-radius: 0;
464 box-shadow: none;
465 margin-bottom: 0;
466 border-bottom: none;
467 padding: 0;
468}
469.asseco-theme.body__wrapper .form__tab .box .box__inner {
470 padding: 0!important;
471}
472@media (min-width: 1200px) {
473 .asseco-theme.body__wrapper #obsah .box__inner {
474 padding: 50px 40px 25px;
475 }
476}
477
478@media (min-width: 1200px) {
479 .asseco-theme.body__wrapper #obsah.box .box__block + .box__block {
480 padding-top: 45px;
481 }
482}
483</style>