Search publications
An error occurred while processing the template.
For "." left-hand operand: Expected a hash, but this has evaluated to a string (wrapper: f.t.SimpleScalar): ==> fileEntry [in template "20155#20195#236110" at line 136, column 36] ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign fileExt = fileEntry.getExtens... [in template "20155#20195#236110" at line 136, column 17] ----
1<#-- TEMPLATE KEY : 270628 -->
2<#-- TEMPLATE NAME: Lista publikacija.ftl -->
3
4<#include "${templatesPath}/4812567" />
5<#include "${templatesPath}/ADT-FUNCTIONS" />
6
7<#-- documentlibrary functions -->
8<#include "_TEMPLATE_CONTEXT_/20155/20182/20513/4891145" />
9
10${asDebug('<br />TEMPLATE KEY: 270628 TEMPLATE ID: 236110 NAME: Lista publikacija PATH: ${templatesPath}', '')}
11
12<#assign dLFileEntryLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService")>
13<#assign dLAppLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLAppLocalService")>
14
15<#assign ddmStructureLocalService = serviceLocator.findService("com.liferay.dynamic.data.mapping.service.DDMStructureLocalService")>
16<#assign journalConverter = serviceLocator.findService("com.liferay.journal.util.JournalConverter")>
17<#assign assetLinkLocalService = serviceLocator.findService("com.liferay.asset.link.service.AssetLinkLocalService" )>
18<#assign assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService" )>
19
20<#assign dlURLHelper = serviceLocator.findService("com.liferay.document.library.util.DLURLHelper")>
21
22<style>
23 .hnb-body .article-module.lucene .article-linebanner, .hnb-body .article-module.lucene .entry-container {min-height:100px;}
24 .hnb-body .grey a { width:100%; height:32px;}
25 .hnb-body .grey a:hover {color: #fff; background:rgba(240, 32, 32, 1.0);}
26 .hnb-body .grey a:hover i {color: #fff;}
27 .hnb-body .grey div {margin-top:5px}
28</style>
29
30<div class="article-module lucene">
31 <#if entries?has_content>
32 <#list entries as curEntry>
33 <#assign naslov = curEntry.getTitle(locale)/>
34 <#assign fileExt = ""/>
35 <#assign docLink = ""/>
36 <#assign docTitle = ""/>
37 <#assign srcImage = ""/>
38 <#assign html = ""/>
39
40 <#assign assetRenderer = curEntry.getAssetRenderer() />
41 <#assign viewURL = assetPublisherHelper.getAssetViewURL(renderRequest, renderResponse, curEntry) />
42 <#assign contextURL = assetRenderer.getURLViewInContext(renderRequest, renderResponse, viewURL) />
43
44 <#assign article = assetRenderer.getArticle() />
45 <#assign document = saxReaderUtil.read(article.getContentByLocale(themeDisplay.getLanguageId())) />
46 <#assign rootElement = document.getRootElement() />
47 <#assign ddmStructure = article.getDDMStructure() />
48 <#assign fields = journalConverter.getDDMFields(ddmStructure, article.getContent()) />
49
50 <#-- DATE -->
51 <#assign date_pattern = {"hr_HR":"d.M.yyyy.", "en_US":"d/M/yyyy"}>
52
53 <#assign originalLocale = locale />
54 <#setting locale = localeUtil.getDefault() />
55
56 <#if displayDate?has_content>
57 <#assign displayDate = dateUtil.getDate(displayDate, date_pattern[locale], locale) >
58 </#if>
59 <#if modifiedDate?has_content>
60 <#assign modifiedDate = dateUtil.getDate(modifiedDate, date_pattern[locale], locale) >
61 </#if>
62
63 <#assign locale = originalLocale />
64
65 <#if fields.get("vrsta")?has_content>
66 <#assign vrstaHR = fields.get("vrsta").getRenderedValue(localeUtil.fromLanguageId("hr_HR"))/>
67 <#assign vrsta = fields.get("vrsta").getRenderedValue(locale)/>
68 </#if>
69 <#if article.getTitle(locale)?has_content>
70 <#assign naslov = article.getTitle(locale)/>
71 </#if>
72 <#if fields.get("naslov")?has_content>
73 <#assign naslov_publikacije = fields.get("naslov").getValue(locale)/>
74 </#if>
75 <#if fields.get("izdavac")?has_content>
76 <#assign izdavac = fields.get("izdavac").getValue(locale)?trim/>
77 </#if>
78 <#if fields.get("autor")?has_content>
79 <#assign autor = fields.get("autor").getValue(locale)?trim/>
80 </#if>
81 <#if fields.get("godina")?has_content>
82 <#assign godina = fields.get("godina").getValue(locale)?trim/>
83 </#if>
84 <#if fields.get("broj")?has_content>
85 <#assign broj = fields.get("broj").getValue(locale)?trim/>
86 </#if>
87 <#if fields.get("mjesec")?has_content && stringUtil.extractDigits(fields.get("mjesec").getValue(locale))?has_content>
88 <#assign mjesec = fields.get("mjesec").getRenderedValue(locale)/>
89 <#assign mjesecAlt = fields.get("mjesec").getValue(locale)/>
90 <#assign mjesecAlt = mjesecAlt?replace('["', "")?replace('"]', "")/>
91 </#if>
92 <#if fields.get("datum")?has_content>
93 <#assign datum = fields.get("datum").getValue(locale)/>
94 </#if>
95 <#if fields.get("dodatak")?has_content>
96 <#assign dodatak = fields.get("dodatak").getValue(locale)/>
97 </#if>
98 <#if fields.get("kretanja")?has_content>
99 <#assign kretanja = fields.get("kretanja").getValue(locale)/>
100 </#if>
101 <#if fields.get("godina_izdanja")?has_content>
102 <#assign godina_izdanja = fields.get("godina_izdanja").getValue(locale)/>
103 </#if>
104 <#if fields.get("jel")?has_content>
105 <#assign jel = fields.get("jel").getValue(locale)/>
106 </#if>
107 <#if fields.get("cip")?has_content>
108 <#assign cip = fields.get("cip").getValue(locale)/>
109 </#if>
110 <#if fields.get("isbn")?has_content>
111 <#assign isbn = fields.get("isbn").getValue(locale)/>
112 </#if>
113 <#if fields.get("opis")?has_content>
114 <#assign opis = fields.get("opis").getValue(locale)/>
115 </#if>
116 <#if fields.get("kljucne_rijeci")?has_content>
117 <#assign kljucne_rijeci = fields.get("kljucne_rijeci").getValue(locale)/>
118 </#if>
119 <#-- HTML polje -->
120 <#if fields.get("html")?has_content>
121 <#if fields.get("html").getValue(locale)?has_content>
122 <#assign html = fields.get("html").getValue(locale)/>
123 </#if>
124 </#if>
125 <#assign html_link_text ="HTML"/>
126 <#if fields.get("html_link_tekst")?has_content>
127 <#assign html_link_text = fields.get("html_link_tekst").getValue(locale)/>
128 </#if>
129
130 <#assign key = vrstaHR + "_" + locale.getLanguage() />
131
132 <#if fields.get("dokument").getValue(locale)?has_content>
133 <#-- CORRECT FOR ONLY 1 ELEMENT IN LIST -->
134 <#assign fileEntry = getDLFileEntry(fields.get("dokument").getValue(locale)) />
135 <#assign fileEntryURL = resolveFileEntryURL(fields.get("dokument").getValue(locale))>
136 <#assign fileExt = fileEntry.getExtension() />
137 <#assign docTitle = fileEntry.getTitle() />
138
139 <#if fileExt == "pdf" && false>
140 <#assign imagePreview = dlURLHelper.getImagePreviewURL(dLAppLocalService.getFileEntry(fileEntry.getFileEntryId()), themeDisplay) />
141 <#if !imagePreview?contains("file_system") >
142 <#assign srcImage = "/documents/" + groupId + "/" + fileEntry.getFolderId() + "/" + docTitle +"?documentThumbnail=2"/>
143 </#if>
144 </#if>
145 <#assign docLink = fileEntryURL />
146 </#if>
147
148 <#if (vrstaHR == "Bilten" || vrstaHR == "Bilten o bankama" || vrstaHR == "Financijska stabilnost" || vrstaHR == "Makrobonitetna analiza") >
149 <#assign title = languageUtil.format(locale,"templates.publications.title.type1", [vrsta, broj]) />
150
151 <#-- ipak koristi naslov iz polja naslov_publikacije a ne tip + broj -->
152 <#assign title = naslov_publikacije />
153 <#elseif (vrstaHR == "Godišnje izvješće") >
154 <#assign title = languageUtil.format(locale,"templates.publications.title.type2", [vrsta, godina]) />
155 <#elseif (vrstaHR == "Istraživanja" || vrstaHR == "Pregledi" || vrstaHR = "Statistička i metodološka istraživanja") >
156 <#assign title = naslov_publikacije />
157 <#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") >
158 <#assign title = naslov />
159 <#else>
160 <#assign title = naslov_publikacije/>
161 </#if>
162
163 <div class="entry-container brd-grey margo-t-8 col-1-1">
164 <div class="article-linebanner">
165 <h4 class="title">
166 <#if contextURL?has_content>
167 <a href="${contextURL}">
168 ${title}
169 </a>
170 <#else>
171 ${title}
172 </#if>
173 </h4>
174 <h5>
175 <table>
176 <tbody>
177 <#if vrsta?has_content && (vrstaHR == "Istraživanja" || vrstaHR == "Pregledi" || vrstaHR == "Publikacija ESB-a" || vrstaHR == "Ostale publikacije" || vrstaHR == "Statistička i metodološka istraživanja")>
178 <tr>
179 <th>${languageUtil.get(locale,"templates.publications.table.publication")}</th>
180 <td>${vrsta}</td>
181 </tr>
182 </#if>
183 <#if godina?has_content && mjesec?has_content>
184 <tr>
185 <th>
186 ${languageUtil.get(locale,"templates.publications.table.date")}
187 </th>
188 <td <#if locale == localeUtil.fromLanguageId("hr_HR")>class="lowercase"</#if>>
189 <#if (vrstaHR == "Publikacija ESB-a")>
190 ${mjesecAlt} / ${godina}<#if locale == localeUtil.fromLanguageId("hr_HR")>.</#if>
191 <#elseif (vrstaHR == "Godišnje izvješće")>
192 ${mjesec} ${godina?number + 1}<#if locale == localeUtil.fromLanguageId("hr_HR")>.</#if>
193 <#else>
194 ${mjesec} ${godina}<#if locale == localeUtil.fromLanguageId("hr_HR")>.</#if>
195 </#if>
196 </td>
197 </tr>
198 </#if>
199 <#if broj?has_content && (vrstaHR == "Istraživanja" || vrstaHR == "Pregledi" || vrstaHR == "Statistička i metodološka istraživanja")>
200 <tr>
201 <th>${languageUtil.get(locale,"templates.publications.table.issue")}</th>
202 <td>${broj}</td>
203 </tr>
204 </#if>
205 <#if autor?has_content && (vrstaHR == "Istraživanja" || vrstaHR == "Pregledi" || vrstaHR == "Ostale publikacije" || vrstaHR == "Statistička i metodološka istraživanja")>
206 <tr>
207 <th>
208 <#if (autor?index_of(" and ") > 0) || (autor?index_of(" i ") > 0) >
209 ${languageUtil.get(locale,"templates.publications.table.authors")}
210 <#else>
211 ${languageUtil.get(locale,"templates.publications.table.author")}
212 </#if>
213 </th>
214 <td>${autor}</td>
215 </tr>
216 </#if>
217 </tbody>
218 </table>
219 </h5>
220 </div>
221
222 <#-- tu ide kemija oko 2 portletID-a za redovne i povremene publikacije -->
223 <#-- hardcodirane vrijednosti portletID-a i URL -->
224
225 <#assign htmlPageFURL = ""/>
226 <#assign html_portletID = ""/>
227 <#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"
228 || vrstaHR = "Platne kartice i kartične transakcije" || vrstaHR = "Platne transakcije i računi">
229 <#assign html_portletID="D7cogspaQgU2"/>
230 <#if locale == 'en_US'>
231 <#assign htmlPageFURL = "/web/guest/analyses-and-publications/regular-publications/html" />
232 <#else>
233 <#assign htmlPageFURL = "/web/guest/analize-i-publikacije/redovne-publikacije/html" />
234 </#if>
235 </#if>
236 <#if vrstaHR = "Pregledi" || vrstaHR = "Istraživanja" || vrstaHR = "Statistička i metodološka istraživanja">
237 <#assign html_portletID = "ifyaTaizWMhG"/>
238 <#if locale == 'en_US'>
239 <#assign htmlPageFURL = "/web/guest/analyses-and-publications/occasional-publications/html" />
240 <#else>
241 <#assign htmlPageFURL = "/web/guest/analize-i-publikacije/povremene-publikacije/html" />
242 </#if>
243 </#if>
244
245 <div class="col-1-1 hf32 grey margo-t-16">
246 <#if docLink?has_content>
247 <div class="gray left"><a href="${docLink}" target="_self" class="pad-l-16 pad-r-16 pad-t-8 pad-b-8 white-color" data_title="${docTitle}" data_description="${fileEntry.getDescription()}" data_file="${fileEntry.getTitle()}.${fileExt}">
248 <i class="${chooseIcon(fileExt)} white-color"></i>
249 <#if vrstaHR == "Publikacija ESB-a">Preuzmi Pregled<#else>${languageUtil.get(locale,"templates.link.download")}</#if>
250 </a></div>
251 </#if>
252 <#if html?has_content>
253 <div class="gray">
254 <a href="${htmlPageFURL}/-/asset_publisher/${html_portletID}/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">
255 <i class="fa fa-html5 white-color"></i> ${html_link_text}
256 </a>
257 </div>
258 </#if>
259 </div>
260 </div>
261
262 </#list>
263 </#if>
264</div>