An error occurred while processing the template.
The following has evaluated to null or missing:
==> vrstaHR  [in template "20155#20195#236108" at line 170, column 24]

----
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: #assign key = vrstaHR + "_" + locale...  [in template "20155#20195#236108" at line 170, column 9]
----
1<#-- TEMPLATE KEY : 268764 --> 
2<#-- TEMPLATE NAME:  HNB Publikacije detalj.ftl --> 
3 
4<#-- Fileter Functions ADT --> 
5<#include "${templatesPath}/4812567" /> 
6 
7<#-- documentlibrary functions --> 
8<#include "_TEMPLATE_CONTEXT_/20155/20182/20513/4891145" /> 
9 
10${asDebug('<br />TEMPLATE KEY: 268764 TEMPLATE ID: 236108 NAME: HNB Publikacije detalj PATH: ${templatesPath}', '')} 
11	 
12<style> 
13    .table-container table, 
14    .table-container table th, 
15    .table-container table td { border:none; background-color: #fff; padding: 6px; } 
16    .table-container table th { text-transform: uppercase; } 
17    .module-publication-details { background:#fff; width:100%; } 
18    .module-publication-details .summary { margin-top:24px; clear:both; } 
19    .module-publication-details .image-container { display:table-cell; vertical-align:top; } 
20    .module-publication-details .image-container img { width:100%; height:100% } 
21    .module-publication-details .attribute-container { display:table-cell; vertical-align:top; } 
22     
23    .module-publication-details a {color: #c81818;} 
24    .related-document-item a {color: #484c50;} 
25 
26    .hnb-body .dark-red a {display: block; width:50%;float: left;} 
27    .hnb-body .dark-red a:hover {color: #fff; background:rgba(240, 32, 32, 1.0);} 
28    .hnb-body .dark-red a:hover i {color: #fff;} 
29 
30    .image-container {width:154px; height:200px;} 
31    .image-container a {width:154px; height:200px; display: block; border:1px solid #d4d4d8;} 
32</style> 
33 
34<#assign dLFileEntryLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService")/> 
35<#assign dLAppLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLAppLocalService")/> 
36 
37<#assign ddmStructureLocalService = serviceLocator.findService("com.liferay.dynamic.data.mapping.service.DDMStructureLocalService")/> 
38<#assign journalConverter = serviceLocator.findService("com.liferay.journal.util.JournalConverter")/> 
39<#assign assetLinkLocalService = serviceLocator.findService("com.liferay.asset.link.service.AssetLinkLocalService")/> 
40<#assign assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService")/> 
41 
42<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")/> 
43<#assign WindowState = staticUtil["javax.portlet.WindowState"] /> 
44<#assign dlUtil = serviceLocator.findService("com.liferay.document.library.kernel.util.DLUtil")> 
45<#assign dlURLHelper = serviceLocator.findService("com.liferay.document.library.util.DLURLHelper") /> 
46 
47<#assign issnMap = { 
48     "Bilten_hr":"1334-0042", "Bilten_en":"1334-0050", 
49     "Bilten o bankama_hr":"1334-0115", "Bilten o bankama_en":"1334-0123", 
50     "Godišnje izvješće_hr":"1334-0093", "Godišnje izvješće_en":"1334-0107", 
51     "Polugodišnja informacija_hr":"1848-7505", "Polugodišnja informacija_en":"1849-3483", 
52     "Financijska stabilnost_hr":"1846-940X", "Financijska stabilnost_en":"1847-0017", 
53     "Makrobonitetna analiza_hr":"1845-6057", "Makrobonitetna analiza_en":" 1845-6332", 
54     "Istraživanja_hr":"1334-0077", "Istraživanja_en":"1334-0131", 
55     "Pregledi_hr":"1334-0085", "Pregledi_en":"1334-014X", 
56     "Platne kartice i kartične transakcije_hr":"1849-790X", "Platne kartice i kartične transakcije_en":"1849-8930", 
57     "Makroekonomska kretanja i prognoze_hr":"2459-8089","Makroekonomska kretanja i prognoze_en":"2459-8607", 
58     "Platne transakcije i računi_hr":"2459-8097", "Platne transakcije i računi_en":"2459-8585", 
59     "Makroprudencijalna dijagnostika_hr":"2459-8704", "Makroprudencijalna dijagnostika_en":"2459-8887" 
60     } /> 
61 
62 
63<#if entries?has_content> 
64    <#list entries as curEntry> 
65 
66        <#assign naslov = curEntry.getTitle(locale)/> 
67        <#assign fileExt = ""/> 
68        <#assign docLink = ""/> 
69        <#assign docTitle = ""/> 
70        <#assign srcImage = ""/> 
71 
72        <#assign assetRenderer = curEntry.getAssetRenderer() /> 
73        <#assign viewURL = assetPublisherHelper.getAssetViewURL(renderRequest, renderResponse, curEntry) /> 
74        <#assign contextURL = assetRenderer.getURLViewInContext(renderRequest, renderResponse, viewURL) /> 
75 
76        <#assign article = assetRenderer.getArticle() /> 
77        <#assign document = saxReaderUtil.read(article.getContentByLocale(themeDisplay.getLanguageId())) /> 
78        <#assign rootElement = document.getRootElement() /> 
79        <#assign ddmStructure = article.getDDMStructure() /> 
80        <#assign fields = journalConverter.getDDMFields(ddmStructure, article.getContent()) /> 
81 
82        <#-- DATE --> 
83        <#assign date_pattern = {"hr_HR":"d.M.yyyy.", "en_US":"d/M/yyyy"}> 
84 
85        <#assign originalLocale = locale /> 
86        <#setting locale = localeUtil.getDefault() /> 
87 
88        <#if fields.get("datum_objave")?has_content && fields.get("datum_objave").getValue(locale)?has_content> 
89        <#assign displayDate = fields.get("datum_objave").getValue(locale) /> 
90         <#assign displayDate = dateUtil.parseDate("yyyy-MM-dd", displayDate, locale) > 
91         <#assign displayDate = dateUtil.getDate(displayDate, date_pattern[locale], locale) > 
92        </#if> 
93 
94        <#if fields.get("datum_azuriranja")?has_content && fields.get("datum_azuriranja").getValue(locale)?has_content> 
95        <#assign modifiedDate = fields.get("datum_azuriranja").getValue(locale) /> 
96         <#assign modifiedDate = dateUtil.parseDate("yyyy-MM-dd", modifiedDate, locale) > 
97         <#assign modifiedDate = dateUtil.getDate(modifiedDate, date_pattern[locale], locale) > 
98        </#if> 
99 
100        <#assign locale = originalLocale /> 
101 
102        <#if fields.get("vrsta")?has_content> 
103            <#assign vrstaHR = fields.get("vrsta").getRenderedValue(localeUtil.fromLanguageId("hr_HR"))/> 
104            <#assign vrsta = fields.get("vrsta").getRenderedValue(locale)/> 
105        </#if> 
106        <#if article.getTitle(locale)?has_content> 
107            <#assign naslov = article.getTitle(locale)/> 
108        </#if> 
109        <#if fields.get("naslov")?has_content> 
110            <#assign naslov_publikacije = fields.get("naslov").getValue(locale)/> 
111        </#if> 
112        <#if fields.get("izdavac")?has_content> 
113            <#assign izdavac = fields.get("izdavac").getValue(locale)?trim/> 
114        </#if> 
115        <#if fields.get("autor")?has_content> 
116            <#assign autor = fields.get("autor").getValue(locale)?trim/> 
117        </#if> 
118        <#if fields.get("godina")?has_content> 
119            <#assign godina = fields.get("godina").getValue(locale)?trim/> 
120        </#if> 
121        <#if fields.get("broj")?has_content> 
122            <#assign broj = fields.get("broj").getValue(locale)?trim/> 
123        </#if> 
124        <#if fields.get("mjesec")?has_content && stringUtil.extractDigits(fields.get("mjesec").getValue(locale))?has_content> 
125            <#assign mjesec = fields.get("mjesec").getRenderedValue(locale)/> 
126            <#assign mjesecAlt = fields.get("mjesec").getValue(locale)/> 
127            <#assign mjesecAlt = mjesecAlt?replace('["', "")?replace('"]', "")/> 
128        </#if> 
129        <#if fields.get("datum")?has_content> 
130            <#assign datum = fields.get("datum").getValue(locale)/> 
131        </#if> 
132        <#if fields.get("dodatak")?has_content> 
133            <#assign dodatak = fields.get("dodatak").getValue(locale)/> 
134        </#if> 
135        <#if fields.get("kretanja")?has_content> 
136            <#assign kretanja = fields.get("kretanja").getValue(locale)/> 
137        </#if> 
138        <#if fields.get("godina_izdanja")?has_content> 
139            <#assign godina_izdanja = fields.get("godina_izdanja").getValue(locale)/> 
140        </#if> 
141        <#if fields.get("jel")?has_content> 
142            <#assign jel = fields.get("jel").getValue(locale)/> 
143        </#if> 
144        <#if fields.get("cip")?has_content> 
145            <#assign cip = fields.get("cip").getValue(locale)/> 
146        </#if> 
147        <#if fields.get("isbn")?has_content> 
148            <#assign isbn = fields.get("isbn").getValue(locale)/> 
149        </#if> 
150        <#if fields.get("opis")?has_content> 
151            <#assign opis = fields.get("opis").getValue(locale)/> 
152        </#if> 
153        <#if fields.get("html")?has_content> 
154            <#if fields.get("html").getValue(locale)?has_content> 
155                <#assign html = fields.get("html").getValue(locale)/> 
156            </#if> 
157        </#if> 
158        <#if fields.get("okviri")?has_content> 
159            ${asDebug('<br />Publikacije detalj: okviri: ${fields.get("okviri")}', "okviri_")} 
160 
161          <#--  <#assign okviri = fields.get("okviri").getValue(locale)/> --> 
162        </#if> 
163        <#assign html_link_text = "HTML"/> 
164        <#if fields.get("html_link_tekst")?has_content> 
165            <#assign html_link_text = fields.get("html_link_tekst").getValue(locale)/> 
166        </#if> 
167        <#if fields.get("kljucne_rijeci")?has_content> 
168            <#assign kljucne_rijeci = fields.get("kljucne_rijeci").getValue(locale)/> 
169        </#if> 
170        <#assign key = vrstaHR + "_" + locale.getLanguage() /> 
171        <#if isbn?has_content> 
172            <#assign issn = isbn /> 
173        <#else> 
174            <#assign issn = issnMap[key]! /> 
175        </#if> 
176 
177				<#if hasValidContent(fields.get("dokument").getValue(locale))> 
178            <#-- CORRECT FOR ONLY 1 ELEMENT IN LIST --> 
179				 
180						<#assign fileEntry = getDLFileEntry(fields.get("dokument").getValue(locale)) /> 
181            <#assign fileEntryURL = resolveFileEntryURL(fields.get("dokument").getValue(locale))> 
182 
183            <#assign fileExt = fileEntry.getExtension() /> 
184            <#assign docTitle = fileEntry.getTitle() /> 
185 
186            <#if fileExt == "pdf"> 
187                <#assign imagePreviewURL = dlURLHelper.getThumbnailSrc(dLAppLocalService.getFileEntry(fileEntry.getFileEntryId()),  themeDisplay) /> 
188 
189                <#if !imagePreviewURL?has_content> 
190                    <#assign srcImage = "/documents/" + groupId + "/" + fileEntry.getFolderId() + "/" + docTitle +"?documentThumbnail=2"/> 
191                </#if> 
192 
193                <#assign srcImage = imagePreviewURL/> 
194            </#if> 
195						 
196            <#assign docLink = fileEntryURL /> 
197            ${asDebug('<br/>Publikacije detalj: Polje dokument: ${fields.get("dokument").getValue(locale)}', "dokument_")} 
198        </#if> 
199 
200        <#if fields.get("kretanja")?has_content && hasValidContent(fields.get("kretanja").getValue(locale))> 
201            <#-- CORRECT FOR ONLY 1 ELEMENT IN LIST --> 
202            						 
203						<#assign fileEntry2 = getDLFileEntry(fields.get("kretanja").getValue(locale))> 
204            <#assign fileEntryURL2 = resolveFileEntryURL(fields.get("kretanja").getValue(locale))> 
205 
206            <#assign fileExt2 = fileEntry2.getExtension() /> 
207 
208            <#assign docLink2 = fileEntryURL2 /> 
209 
210            ${asDebug('<br/>Publikacije detalj: Polje kretanja: ${fields.get("kretanja").getValue(locale)}', "kretanja_")} 
211        </#if> 
212 
213        <#if fields.get("dodatak")?has_content && hasValidContent(fields.get("dodatak").getValue(locale))> 
214            <#-- CORRECT FOR ONLY 1 ELEMENT IN LIST --> 
215					 
216						<#assign fileEntry3 = getDLFileEntry(fields.get("dodatak").getValue(locale))> 
217            <#assign fileEntryURL3 = resolveFileEntryURL(fields.get("dodatak").getValue(locale))> 
218 
219            <#assign fileExt3 = fileEntry3.getExtension() /> 
220 
221            <#assign docLink3 = fileEntryURL3 /> 
222 
223            ${asDebug('<br/>Publikacije detalj: Polje dodatak: ${fields.get("dodatak").getValue(locale)}', "dodatak_")} 
224 
225        </#if> 
226 
227        <#if (vrstaHR == "Bilten" || vrstaHR == "Bilten o bankama" || vrstaHR == "Financijska stabilnost" || vrstaHR == "Makrobonitetna analiza") > 
228            <#assign title = languageUtil.format(locale,"templates.publications.title.type1", [vrsta, broj]) /> 
229                             
230            <#-- ipak koristi naslov iz polja naslov_publikacije a ne tip + broj --> 
231            <#assign title = naslov_publikacije /> 
232        <#elseif (vrstaHR == "Godišnje izvješće") > 
233            <#assign title = languageUtil.format(locale,"templates.publications.title.type2", [vrsta, godina]) /> 
234        <#elseif (vrstaHR == "Istraživanja" || vrstaHR == "Pregledi") > 
235            <#assign title = naslov_publikacije /> 
236        <#elseif (vrstaHR == "Platne kartice i kartične transakcije" || vrstaHR == "Publikacije ESB-a" || vrstaHR == "Polugodišnja informacija" || vrstaHR == "Ostale publikacije" || vrstaHR == "Makroekonomska kretanja i prognoze"  || vrstaHR == "Platne transakcije i računi" || vrstaHR == "Makroprudencijalna dijagnostika") > 
237            <#assign title = naslov /> 
238     <#else> 
239                 <#assign title = naslov_publikacije/> 
240     </#if> 
241 
242     <#if article.getAvailableLanguageIds()?seq_contains(locale) > 
243            <article class="article module-publication-details"> 
244                <h2 class="article-title"> 
245                    ${title} 
246                </h2> 
247                <#if (displayDate?has_content ||  modifiedDate?has_content) || true> 
248                <div class="article-action-icons"> 
249                    <div class="attributes" style="text-align:left;"> 
250                    <#if displayDate?has_content> 
251                      <span class="displayDate">${languageUtil.get(locale,"templates.article.publishDate")}: ${displayDate} </span> 
252                    </#if> 
253                    <#if modifiedDate?has_content && false> 
254                      <span class="separator"></span> 
255                      <span class="modifiedDate">${languageUtil.get(locale,"templates.article.modifiedDate")}: ${modifiedDate} </span> 
256                    </#if> 
257                    </div> 
258<#-- 
259                    <@localeswitch /> 
260--> 
261                    <div class="clear"></div> 
262                </div> 
263                <#else> 
264                    <div class="brd-t-grey margo-b-16"></div> 
265                </#if> 
266                <div> 
267                    <#if srcImage?has_content> 
268                        <div class="image-container"> 
269                            <a href="${docLink}" target="_self" alt="${title}" title="${title}" data_description="${fileEntry.getDescription()}" data_file="${fileEntry.getTitle()}.${fileExt}"> 
270                                <img src="${srcImage}"> 
271                            </a> 
272                        </div> 
273                    </#if> 
274                    <div class="attribute-container pad-l-16"> 
275                         <div class="table-container"> 
276                            <table> 
277                                <tbody> 
278                                    <#if vrsta?has_content> 
279                                                    <tr> 
280                                                        <th>${languageUtil.get(locale,"templates.publications.table.publication")}</th> 
281                                                        <td>${vrsta}</td> 
282                                                    </tr> 
283                                    </#if> 
284                                    <#if broj?has_content && (vrstaHR == "Istraživanja" || vrstaHR == "Pregledi" || vrstaHR == "Statistička i metodološka istraživanja") > 
285                                                    <tr> 
286                                                        <th>${languageUtil.get(locale,"templates.publications.table.issue")}</th> 
287                                                        <td>${broj}</td> 
288                                                    </tr> 
289                                    </#if> 
290                                    <#if autor?has_content && (vrstaHR == "Istraživanja" || vrstaHR == "Pregledi" || vrstaHR == "Ostale publikacije" || vrstaHR == "Statistička i metodološka istraživanja")> 
291                                                    <tr> 
292                                                        <th> 
293                                                        <#if (autor?index_of(" and ") > 0) || (autor?index_of(" i ") > 0) > 
294                                                            ${languageUtil.get(locale,"templates.publications.table.authors")} 
295                                                        <#else> 
296                                                            ${languageUtil.get(locale,"templates.publications.table.author")} 
297                                                        </#if> 
298                                                        </th> 
299                                                        <td>${autor}</td> 
300                                                    </tr> 
301                                    </#if> 
302                                    <#if godina?has_content && mjesec?has_content> 
303                                                    <tr> 
304                                                        <th> 
305                                                            ${languageUtil.get(locale,"templates.publications.table.date")} 
306                                                        </th> 
307                                                        <td <#if locale == localeUtil.fromLanguageId("hr_HR")>class="lowercase"</#if>> 
308                                                        <#if (vrstaHR == "Publikacija ESB-a")> 
309                                                            ${mjesecAlt} / ${godina}<#if locale == localeUtil.fromLanguageId("hr_HR")>.</#if> 
310                                                        <#elseif (vrstaHR == "Godišnje izvješće")> 
311                                                            ${mjesec} ${godina?number + 1}<#if locale == localeUtil.fromLanguageId("hr_HR")>.</#if> 
312                                                        <#else> 
313                                                            ${mjesec} ${godina}<#if locale == localeUtil.fromLanguageId("hr_HR")>.</#if> 
314                                                        </#if> 
315                                                        </td> 
316                                                    </tr> 
317                                    </#if> 
318                                    <#if godina_izdanja?has_content> 
319                                                    <tr> 
320                                                        <th> 
321                                                            ${languageUtil.get(locale,"templates.publications.table.year")} 
322                                                        </th> 
323                                                        <td> 
324                                                            ${godina_izdanja} 
325                                                        </td> 
326                                                    </tr> 
327                                    </#if> 
328                                    <#if kretanja?has_content && vrstaHR == "Bilten" > 
329                                                    <tr> 
330                                                        <th>${languageUtil.get(locale,"templates.publications.table.trends")}</th> 
331                                                        <td> 
332                                      <#if fileExt2?has_content > 
333                                          <i class="${chooseIcon(fileExt2)}"></i> 
334                                          <a href="${docLink2}" target="_self" title="${fileEntry2.getDescription()}" data_title="${fileEntry2.getTitle()}" alt="${fileEntry2.getDescription()}" data_description="${fileEntry2.getDescription()}" data_file="${fileEntry2.getTitle()}.${fileExt2}">${fileEntry2.getDescription()}</a> 
335                                      </#if> 
336                                                        </td> 
337                                                    </tr> 
338                                    </#if> 
339                                    <#if cip?has_content > 
340                                    <tr> 
341                                        <th>CIP</th> 
342                                        <td>${cip}</td> 
343                                    </tr> 
344                                    </#if> 
345                                    <#if jel?has_content > 
346                                    <tr> 
347                                        <th>JEL</th> 
348                                        <td>${jel}</td> 
349                                    </tr> 
350                                    </#if> 
351                                    <#if isbn?has_content> 
352                                    <tr> 
353                                        <th>ISBN</th> 
354                                        <td>${issn}</td> 
355                                    </tr> 
356                                    <#elseif issn?has_content> 
357                                    <tr> 
358                                        <th>ISSN</th> 
359                                        <td>${issn}</td> 
360                                    </tr> 
361                                    </#if> 
362                                    <#if dodatak?has_content> 
363                                    <tr> 
364                                        <th>${languageUtil.get(locale,"templates.publications.table.appendix")}</th> 
365                                        <td> 
366                                        <#if fileExt3?has_content > 
367                                        <i class="${chooseIcon(fileExt3)}"></i> 
368                                        <a href="${docLink3}" target="_self" alt="${fileEntry3.getDescription()}" title="${fileEntry3.getDescription()}" data_title="${fileEntry3.getTitle()}">${fileEntry3.getDescription()}</a> 
369                                        </#if> 
370                                        </td> 
371                                    </tr> 
372                                    </#if> 
373                                </tbody> 
374                            </table> 
375                        </div> 
376                    </div> 
377                </div> 
378 
379				<#assign regularPublication = false/> 
380				<#assign povremenePublikacije = false/> 
381				<#assign htmlPageFURL = ""/> 
382				<#assign assetPublisherId=""/> 
383				<#if vrstaHR == "Bilten" || vrstaHR = "Makroekonomska kretanja i prognoze" || vrstaHR = "Bilten o bankama" || vrstaHR = "Godišnje izvješće" || vrstaHR = "Polugodišnja informacija" || vrstaHR = "Financijska stabilnost" || vrstaHR ="Makroprudencijalna dijagnostika" 
384					   || vrstaHR = "Platne kartice i kartične transakcije" || vrstaHR = "Platne transakcije i računi"> 
385					<#assign regularPublication = true/> 
386					<#assign assetPublisherId="D7cogspaQgU2"/> 
387					 <#if locale == 'en_US'> 
388                        <#assign htmlPageFURL = "/web/guest/analyses-and-publications/regular-publications/html" /> 
389                    <#else> 
390                        <#assign htmlPageFURL = "/web/guest/analize-i-publikacije/redovne-publikacije/html" /> 
391                    </#if> 
392				</#if> 
393				<#if vrstaHR = "Pregledi" || vrstaHR = "Istraživanja" || vrstaHR = "Statistička i metodološka istraživanja"> 
394					<#assign povremenePublikacije = true/> 
395					<#assign assetPublisherId="ifyaTaizWMhG"/> 
396					<#if locale == 'en_US'> 
397                        <#assign htmlPageFURL = "/web/guest/analyses-and-publications/occasional-publications/html" /> 
398                    <#else> 
399                        <#assign htmlPageFURL = "/web/guest/analize-i-publikacije/povremene-publikacije/html" /> 
400                    </#if> 
401 
402				</#if> 
403 
404                <#-- radim duplu provjeru za file jer imamo slucajeva kad imamo samo HTML i tada se ne smije prikazati link download za file --> 
405                <#if fileExt?has_content || html?has_content> 
406                <div class="col-1-1 dark-red margo-b-24 margo-t-24"> 
407					<#if fileExt?has_content> 
408						<a href="${docLink}" target="_self" data_title="${docTitle}" data_description="${fileEntry.getDescription()}" data_file="${fileEntry.getTitle()}.${fileExt}" class="pad-l-16 pad-r-16 pad-t-8 pad-b-8 white-color"> 
409						<i class="${chooseIcon(fileExt)} white-color"></i> 
410						  <#if vrstaHR == "Publikacija ESB-a">Preuzmi Pregled<#else>${languageUtil.get(locale,"templates.link.download")}</#if> 
411						</a> 
412					</#if> 
413 
414					<#if html?has_content > 
415						<a href="${htmlPageFURL}/-/asset_publisher/${assetPublisherId}/content/${article.urlTitle}?articleid=${article.getArticleId()}&p_p_state=maximized" target="_self" class="pad-l-16 pad-r-16 pad-t-8 pad-b-8 white-color" alt="${html_link_text}" title="${html_link_text}"> 
416							<i class="fa fa-html5 white-color"></i> ${html_link_text} 
417						</a> 
418					</#if> 
419                </div> 
420                </#if> 
421 
422                <div> 
423                    <#if kljucne_rijeci?has_content && (vrstaHR == "Istraživanja" || vrstaHR == "Pregledi") > 
424                    <h4>${languageUtil.get(locale,"templates.publications.table.keywords")}</h4> 
425                    <p>${kljucne_rijeci}</p> 
426                    </#if> 
427                    <#if opis?has_content> 
428                    <!--h4>${languageUtil.get(locale,"templates.publications.table.summary")}</h4--> 
429                    <p>${opis}</p> 
430                    </#if> 
431                </div> 
432                 
433                <#-- Okviri --> 
434                <#if okviri?has_content> 
435                    <div> 
436                        <p>${okviri}</p> 
437                    </div> 
438                </#if> 
439                 
440                 <#-- RELATED DOCUMENTS --> 
441                 <@drawAttachments fields/> 
442            </article> 
443            <#-- RELATED ASSETS --> 
444            <#assign currentArticleRelatedLinks = assetLinkLocalService.getDirectLinks(curEntry.getEntryId()) /> 
445            <ul> 
446            <#if currentArticleRelatedLinks?has_content> 
447                <#list currentArticleRelatedLinks as assetLink> 
448                    <#assign linkedAssetEntry = assetEntryLocalService.getEntry(assetLink.entryId2) /> 
449                    <#assign assetRenderer = linkedAssetEntry.getAssetRenderer() /> 
450 
451                    <#assign viewURL = assetPublisherHelper.getAssetViewURL(renderRequest, renderResponse, linkedAssetEntry) /> 
452                    <#assign contextURL = assetRenderer.getURLViewInContext(renderRequest, renderResponse, contextURL) /> 
453 
454                    <li><a href="${contextURL}" alt="${linkedAssetEntry.getTitle(locale)}" title="${linkedAssetEntry.getTitle(locale)}">${linkedAssetEntry.getTitle(locale)}</a></li> 
455 
456                </#list> 
457            </#if> 
458            </ul> 
459            <#-- RELATED ASSETS OVER--> 
460        <#else> 
461            <div class="no-translation">${languageUtil.get(locale,"templates.locale.contentNotAvailable")}</div> 
462        </#if> 
463    </#list> 
464</#if> 
465 
466<#-- fix for Makrobonitetna analiza --> 
467<#if (vrstaHR?has_content && vrstaHR == "Makrobonitetna analiza") > 
468  <#assign articleId = '166922' /> 
469  <#assign article = journalArticleLocalService.getArticle(groupId, articleId)> 
470  ${article.getContentByLocale(locale.toString())?replace("]]>","")} 
471</#if> 
472 
473<#macro localeswitch> 
474  <#list article.getAvailableLanguageIds() as availablelocale> 
475      <#assign langURL = "?p_p_id=82&p_p_lifecycle=1&p_p_state=normal&p_p_mode=view&_82_struts_action=%2Flanguage%2Fview&_82_languageId=" + availablelocale + "&_82_redirect=" + currentURL > 
476      <#if availablelocale != locale> 
477      <a href="${langURL}">${availablelocale[0..1]?upper_case}</a> 
478      </#if> 
479  </#list> 
480</#macro> 
481 
482<#macro drawAttachments fields> 
483	<#local povezaniDokumentiField = fields.get("povezani_dokumenti") /> 
484	 
485	<#if isAdmin> 
486        <#assign debugMessage = "<br />Publikacije detalj: povezani_dokumenti size: ${povezaniDokumentiField.getValue(locale)?size}" /> 
487        <#assign debugMessage = debugMessage + "<br />Publikacije detalj: povezani_dokumenti[0]: ${povezaniDokumentiField.getValue(locale)[0]}" /> 
488        ${asDebug(debugMessage, "povezaniDokumenti_")} 
489	</#if> 
490	 
491  <#if povezaniDokumentiField?has_content && povezaniDokumentiField.getValue(locale)?has_content && (povezaniDokumentiField.getValue(locale)?size >= 1) && hasValidContent(povezaniDokumentiField.getValue(locale)[0]) > 
492                   <#assign nazivBoxa = "" > 
493                   <#assign showPublishDate= false > 
494                   <#assign showModifiedDate = false> 
495                   <#if fields.get("datum_objave_prikaz")?has_content && fields.get("datum_objave_prikaz").getValue(locale)?has_content > 
496                       <#assign showPublishDate= fields.get("datum_objave_prikaz").getValue(locale) > 
497                   </#if> 
498                   <#if fields.get("datum_azuriranja_prikaz")?has_content && fields.get("datum_azuriranja_prikaz").getValue(locale)?has_content> 
499                       <#assign showModifiedDate = fields.get("datum_azuriranja_prikaz").getValue(locale) > 
500                   </#if> 
501                   <#if fields.get("naziv_header_box")?has_content && fields.get("naziv_header_box").getValue(locale)?has_content> 
502                        <#assign nazivBoxa = fields.get("naziv_header_box").getValue(locale) > 
503                   </#if> 
504                  <div class="clear"></div> 
505                  <div class="related-documents"> 
506                    <header> 
507                      <h5 class="pad-t-8 pad-b-8 pad-nq-l-16 margo-b-0 uppercase related-documents-title">${nazivBoxa}</h5> 
508                    </header> 
509 
510                    <ul class="related-documents-list"> 
511                    <#list povezaniDokumentiField.getValue(locale) as row> 
512                         <#if row?has_content && !row?starts_with("{}")> 
513                             <#local fileEntry = getDLFileEntry(row)> 
514                             <#local fileEntryURL = resolveFileEntryURL(row)> 
515                            <li class="related-document-item"> 
516                                <a href="${fileEntryURL}" target="_self" alt="${fileEntry.getDescription()}" title="${fileEntry.getDescription()}" data_title="${fileEntry.getTitle()}" data_description="${fileEntry.getDescription()}" data_file="${fileEntry.getTitle()}.${fileExt}"> 
517                                    <div class="related-document-image }"> 
518                                        <@fileEntryIcon fileEntry /> 
519                                    </div> 
520                                    <#if fileEntry.getDescription()?has_content> 
521                                        <p><span>${fileEntry.getDescription()}</span></p> 
522                                    <#else> 
523                                        <p><span>${fileEntry.getTitle()}</span></p> 
524                                    </#if> 
525                                    <h6 class="ultradark-aux-grey-color related-documents-attributes"> 
526                                      <#if showPublishDate> 
527                                      <span class="displayDate">${languageUtil.get(locale,"templates.article.publishDate")}: ${formatDate(fileEntry.getCreateDate())} </span> 
528                                      </#if> 
529                                      <#if (showPublishDate & showModifiedDate)> 
530                                       <span class="separator"></span> 
531                                       </#if> 
532                                    <#if showModifiedDate> 
533                                      <span class="modifiedDate">${languageUtil.get(locale,"templates.article.modifiedDate")}: ${formatDate(fileEntry.getModifiedDate())} </span> 
534                                    </#if> 
535                                      <#if fileEntry.getSize()?has_content> 
536                                           <#if (showPublishDate || showModifiedDate)> 
537                                           <span class="separator"></span> 
538                                            </#if> 
539                                           ${formatSize(fileEntry.getSize())} 
540                                       </#if> 
541                                   </h6> 
542                                </a> 
543                            </li> 
544                        </#if> 
545                    </#list> 
546                    </ul> 
547                </div> 
548  </#if> 
549</#macro> 
550 
551<#macro fileEntryIcon fileEntry> 
552  <#if fileEntry?has_content> 
553      <#local fileExt = fileEntry.getExtension() /> 
554      <#if fileExt == "pdf"> 
555          <i class="fa fa-file-pdf-o"></i> 
556      <#elseif fileExt == "doc" || fileExt == "docx"> 
557          <i class="fa fa-file-word-o"></i> 
558      <#elseif fileExt == "xls" || fileExt == "xlsx"> 
559          <i class="fa fa-file-excel-o"></i> 
560      <#elseif fileExt == "ppt" || fileExt == "pptx"> 
561          <i class="fa fa-file-powerpoint-o"></i> 
562      <#elseif fileExt == "jpg" || fileExt == "jpeg" || fileExt == "png" || fileExt = "bmp" || fileExt = "gif"> 
563          <i class="fa fa-file-image-o"></i> 
564      <#elseif fileExt == "zip" || fileExt == "rar" || fileExt = "7z" || fileExt == "tar"> 
565          <i class="fa fa-file-archive-o"></i> 
566      <#else> 
567          <i class="fa fa-file-o"></i> 
568      </#if> 
569  </#if> 
570</#macro> 
571 
572<#function formatDate date> 
573		<#assign date_pattern = {"hr_HR":"d.M.yyyy.", "en_US":"d/M/yyyy"}> 
574 
575		<#assign originalLocale = locale /> 
576		<#assign date_pattern = {"hr_HR":"d.M.yyyy.", "en_US":"d/M/yyyy"}> 
577 
578		<#assign originalLocale = locale /> 
579		<#setting locale = localeUtil.getDefault() /> 
580 
581		<#assign formatteddate = dateUtil.getDate(date, date_pattern[locale], locale) > 
582 
583		<#assign locale = originalLocale /> 
584		<#return formatteddate> 
585</#function> 
586 
587<#function formatSize num> 
588  <#assign order = num?round?c?length /> 
589  <#assign thousands = ((order - 1) / 3)?floor /> 
590  <#if (thousands < 0)><#assign thousands = 0 /></#if> 
591  <#assign siMap = [ {"factor": 1, "unit": ""}, {"factor": 1000, "unit": "K"}, {"factor": 1000000, "unit": "M"}, {"factor": 1000000000, "unit":"G"}, {"factor": 1000000000000, "unit": "T"} ]/> 
592  <#assign siStr = (num / (siMap[thousands].factor))?string("0.#") + siMap[thousands].unit /> 
593  <#return siStr /> 
594</#function>