Temeljne funkcije
- Monetarna politika
- Operacije na tržištu prije uvođenja eura
- Upravljanje financijskom imovinom
- Financijska stabilnost
- Supervizija
- Sanacija
- Platni promet
- Međunarodni odnosi
Došlo je do pogreške prilikom obrade predloška.
Java method "com.sun.proxy.$Proxy71.getFileEntryByUuidAndGroupId(String, long)" threw an exception when invoked on com.sun.proxy.$Proxy71 object "com.liferay.document.library.internal.service.SubscriptionDLAppLocalServiceWrapper@5ed61d63"; see cause exception in the Java stack trace. ---- FTL stack trace ("~" means nesting-related): - Failed at: #return dLAppLocalService.getFileEntr... [in template "20155#20195#120498" in function "getFileEntry" at line 359, column 5] - Reached through: @drawTable baseFields [in template "20155#20195#120498" at line 94, column 25] ----
1<#-- HNB Regulative Detail.ftl -->
2<#assign dLFileEntryLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService")>
3<#assign dLFileEntryTypeLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryTypeLocalService")>
4<#assign dLAppLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLAppLocalService")>
5
6<#assign ddmStructureLocalService = serviceLocator.findService("com.liferay.dynamic.data.mapping.service.DDMStructureLocalService")>
7<#assign journalConverter = serviceLocator.findService("com.liferay.journal.util.JournalConverter")>
8<#assign assetLinkLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetLinkLocalService" )>
9<#assign assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService" )>
10
11<style>
12 .table-container table,
13 .table-container table th,
14 .table-container table td { border:none; background-color: #fff; padding: 6px; }
15 .table-container table th { text-transform: uppercase; text-align:right; }
16 .table-container table {width:auto;}
17 ul {list-style: none;}
18</style>
19
20<#assign dLFileEntryLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService")>
21<#assign dLFileEntryTypeLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryTypeLocalService")>
22<#assign dLAppLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLAppLocalService")>
23
24<#assign ddmStructureLocalService = serviceLocator.findService("com.liferay.dynamic.data.mapping.service.DDMStructureLocalService")>
25<#assign journalConverter = serviceLocator.findService("com.liferay.journal.util.JournalConverter")>
26<#assign assetLinkLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetLinkLocalService" )>
27<#assign assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService" )>
28
29<style>
30 .table-container table,
31 .table-container table th,
32 .table-container table td { border:none; background-color: #fff; padding: 6px; }
33 .table-container table th { text-transform: uppercase; text-align:right; }
34 .table-container table {width:auto;}
35 ul {list-style: none;}
36</style>
37
38<#if entries?has_content>
39 <#list entries as curEntry>
40
41 <#assign originEntry = entry['origin'] >
42 <#assign baseEntry = entry['base'] >
43 <#assign historyList = entry['history']! >
44 <#assign dodatakOdluka = entry['dodatak_odluka']! >
45 <#assign dodatakUputa = entry['dodatak_uputa']! >
46
47 <#-- HANDLE LOCALE -->
48 <#if !baseEntry.getAvailableLanguageIds()?seq_contains(locale) >
49 <div class="no-translation">${languageUtil.get(locale,"templates.locale.contentNotAvailable")}</div>
50
51 <#else>
52 <#assign naslov = baseEntry.getTitle(locale)/>
53
54 <#assign baseFields = getFields(baseEntry) />
55 <#assign baseArticle = getArticle(baseEntry) />
56
57 <#if baseFields.get("najava_naslov")?has_content && baseFields.get("najava_naslov").getValue(locale)?has_content >
58 <#assign naslov = baseFields.get("najava_naslov").getValue(locale) />
59 </#if>
60
61 <#-- ARTICLE -->
62 <div class="article">
63 <h2 class="article-title">${naslov}</h2>
64 <div class="article-action-icons">
65 <div class="col-4-5" style="text-align:left;">
66 <#if baseFields.get("datum_objave")?has_content && baseFields.get("datum_objave").getValue(locale)?has_content>
67 <span class="displayDate">${languageUtil.get(locale,"templates.article.publishDate")}: ${formatDate(baseFields.get("datum_objave").getValue(locale)?date("yyyy-MM-dd"))} </span>
68 </#if>
69 <#if baseFields.get("datum_azuriranja")?has_content && baseFields.get("datum_azuriranja").getValue(locale)?has_content>
70 <span class="separator"></span>
71 <span class="modifiedDate">${languageUtil.get(locale,"templates.article.modifiedDate")}: ${formatDate(baseFields.get("datum_azuriranja").getValue(locale)?date("yyyy-MM-dd"))} </span>
72 </#if>
73 </div>
74 <div class="col-1-5" style="text-align:right;">
75 <#if exportUrl?has_content>
76 <a href='${exportUrl?replace("targetExtension=", "targetExtension=doc")}' target="_self"><i class="fa fa-file-word-o"></i></a>
77 <a href='${exportUrl?replace("targetExtension=", "targetExtension=pdf")}' target="_self"><i class="fa fa-file-pdf-o"></i></a>
78 <a href='${exportUrl?replace("targetExtension=", "targetExtension=txt")}' target="_self"><i class="fa fa-file-text-o"></i></a>
79 </#if>
80 <#if pagePrintUrl?has_content>
81 <a href="javascript:printPage('${pagePrintUrl}')"><i class="fa fa-print"></i></a>
82 <#elseif namespace?has_content>
83 <a href="javascript:${namespace}printPage()"><i class="fa fa-print"></i></a>
84 </#if>
85 </div>
86 <div class="clear"></div>
87 </div>
88
89 <div class="article-content">
90
91 <div class="metadata-container margo-b-16">
92
93 <#-- ATRIBUTI -->
94 <@drawTable baseFields/>
95
96 <#-- POVIJEST -->
97 <@drawHistory historyList true/>
98
99 <#-- DODATAK UPUTA -->
100 <@drawHistory dodatakUputa false/>
101
102 <#-- DODATAK ODLUKA -->
103 <@drawHistory dodatakOdluka false/>
104
105 </div>
106 </div>
107 <#-- YourEurope stuff -->
108 <#assign originFields = getFields(originEntry) />
109
110
111 <#if (originFields.get('youreurope').getValue(locale))!null?? >
112 <#assign prikaziYoureEuropeForm = originFields.get('youreurope').getValue()?string('da','ne') />
113 <#else>
114 <#assign prikaziYoureEuropeForm = "ne" />
115 </#if>
116
117 <#-- assign prikaziYoureEuropeForm = originFields.get('youreurope').getValue()?string('da','ne') /-->
118
119 <#-- ovo daje ispravno rješenje
120 ${originFields.get('youreurope').getValue()?c}
121 -->
122
123 <#if prikaziYoureEuropeForm == "da" >
124 <#include "${templatesPath}/3692422" />
125 </#if>
126 </div>
127 </#if>
128 <#break>
129 </#list>
130</#if>
131
132<#macro drawTable fields>
133 <div class="table-container">
134 <table>
135 <tbody>
136 <#--
137 <#if fields.get("podvrsta").getRenderedValue(locale)?has_content>
138 <tr>
139 <th>PODVRSTA</th>
140 <td>${fields.get("podvrsta").getRenderedValue(locale)}</td>
141 </tr>
142 </#if>
143 -->
144 <#if fields.get("donositelj").getRenderedValue(locale)?has_content>
145 <tr>
146 <th>${languageUtil.get(locale,"templates.regulations.table.donositelj")}</th>
147 <td>${fields.get("donositelj").getRenderedValue(locale)}</td>
148 </tr>
149 </#if>
150 <#if fields.get("podrucje").getRenderedValue(locale)?has_content>
151 <tr>
152 <th>${languageUtil.get(locale,"templates.regulations.table.podrucje")}</th>
153 <td>${fields.get("podrucje").getRenderedValue(locale)}</td>
154 </tr>
155 </#if>
156 <#if fields.get("vrsta").getRenderedValue(locale)?has_content>
157 <tr>
158 <th>${languageUtil.get(locale,"templates.regulations.table.vrsta")}</th>
159 <td>${fields.get("vrsta").getRenderedValue(locale)}</td>
160 </tr>
161 </#if>
162 </tbody>
163 </table>
164 <#if fields.get("nesluzbeni_procisceni_tekst")?has_content && (fields.get("nesluzbeni_procisceni_tekst").getValue(locale)?size > 0)>
165 <#list fields.get("nesluzbeni_procisceni_tekst").getValue(locale) as cur_nesluzbeni_procisceni_tekst>
166 <p>
167 <#local doc = cur_nesluzbeni_procisceni_tekst>
168 <#if doc?has_content>
169 <#local fileEntry = getFileEntry(doc)>
170 <#local fileEntryURL = getFileEntryURL(fileEntry)>
171 <#if fileEntryURL?has_content>
172 <a href="${fileEntryURL}" target="_self" data_title="${fileEntry.getTitle()}">${fileEntry.getDescription()}</a>
173 </#if>
174 </#if>
175 <#local nn_npt = fields.get("nn_npt").getRenderedValue(locale, cur_nesluzbeni_procisceni_tekst?index)>
176 <#if nn_npt?has_content>
177 <br>${nn_npt}
178 </#if>
179 </p>
180 <#-- PRILOZI -->
181 <@drawAttachmentsTechnical baseArticle cur_nesluzbeni_procisceni_tekst?index/>
182 </#list>
183 </#if>
184 </div>
185</#macro>
186
187<#macro drawAttachments fields>
188 <#if fields.get("prilog")?has_content && (fields.get("prilog").getValue(locale)?size >= 1)>
189 <ul class="margo-t-4 margo-b-8 pad-l-16">
190 <#list fields.get("prilog").getValue(locale) as row>
191
192 <#if row?has_content>
193 <#local fileEntry = getDLFileEntry(row)>
194 <#local fileEntryURL = getFileEntryURL(fileEntry)>
195
196 <#if fileEntry?has_content>
197 <#assign fileType = getDLFileEntryType(fileEntry)/>
198 <#if fileType?starts_with("HNB Dokument - vrijeme")>
199 <#local fileModifiedDate = fileEntry.getCreateDate()/>
200 <#if fileEntry.getModifiedDate()?has_content >
201 <#local fileModifiedDate = fileEntry.getModifiedDate()/>
202 </#if>
203 <li><@fileEntryIcon fileEntry /><a href="${fileEntryURL}" target="_self" data_title="${fileEntry.getTitle()}">${fileEntry.getDescription()} - ${languageUtil.get(locale,"templates.article.modifiedDate")}: ${formatDateTime(fileModifiedDate)}</a></li>
204 <#else>
205 <li><@fileEntryIcon fileEntry /><a href="${fileEntryURL}" target="_self" data_title="${fileEntry.getTitle()}">${fileEntry.getDescription()}</a></li>
206 </#if>
207 </#if>
208 </#if>
209 </#list>
210 </ul>
211 </#if>
212</#macro>
213
214<#macro drawAttachmentsTechnical article index>
215 <#assign document = saxReaderUtil.read(article.getContent()) />
216 <#assign root = document.getRootElement() />
217 <#assign xPathTehnickiPrilozi = saxReaderUtil.createXPath("dynamic-element[@name='nesluzbeni_procisceni_tekst'][${index+1}]/dynamic-element[@name='prilog_tehnicki']/dynamic-content[@language-id='${locale}']") />
218 <#local prilozi = xPathTehnickiPrilozi.selectNodes(root)>
219 <#if (prilozi?size > 0) >
220 <ul class="margo-t-4 margo-b-8">
221 <#list prilozi as row>
222 <#local tehnickiPrilog = row.getStringValue()>
223 <#if tehnickiPrilog?has_content>
224 <#local fileEntry = getFileEntry(tehnickiPrilog)>
225 <#local fileEntryURL = getFileEntryURL(fileEntry)>
226 <#if fileEntry?has_content>
227 <li><@fileEntryIcon fileEntry /><a href="${fileEntryURL}" target="_self" data_title="${fileEntry.getTitle()}">${fileEntry.getDescription()}</a></li>
228 </#if>
229 </#if>
230 </#list>
231 </ul>
232 </#if>
233</#macro>
234
235<#macro drawHistory entries drawBase>
236 <#if (( entries?has_content && entries?size > 0) || drawBase)>
237 <div class="margo-t-4 margo-b-8 pad-t-8 pad-b-8 brd-t-grey">
238 <#list entries?reverse as entry>
239 <#if entry.getTitle(locale, false)?has_content >
240 <@drawHistoryItem entry />
241 </#if>
242 </#list>
243 <#if baseEntry.getTitle(locale, false)?has_content && drawBase>
244 <@drawHistoryItem baseEntry />
245 </#if>
246 </div>
247 </#if>
248</#macro>
249
250<#macro drawHistoryItem entry>
251 <#if !entry?has_content>
252 <#return>
253 </#if>
254 <#local fields = getFields(entry) />
255 <#if (fields.get("dokument")?has_content && fields.get("dokument").getValue(locale)?has_content)
256 || (fields.get("link")?has_content && fields.get("link").getRenderedValue(locale)?has_content) >
257
258 <#-- WRAPPER -->
259 <#if entry.getEntryId() == originEntry.getEntryId()>
260 <p style="font-weight:bold;">
261 <span><i class="fa fa-check-square" style="color:#c81818;"></i></span>
262 <#else>
263 <p>
264 </#if>
265 <#-- CONTENT -->
266 <#if fields.get("dokument")?has_content && fields.get("dokument").getValue(locale)?has_content >
267 <#local fileEntry = getDLFileEntry(fields.get("dokument").getValue(locale))>
268 <#local fileEntryURL = getFileEntryURL(fileEntry)>
269 </#if>
270
271 <#if fields.get("najava_naslov")?has_content && fields.get("najava_naslov").getValue(locale)?has_content >
272 <#assign naslov = fields.get("najava_naslov").getValue(locale) />
273 <#else>
274 <#assign naslov = entry.getTitle(locale)/>
275 </#if>
276
277 ${naslov}
278
279 <#if fields.get("nn").getRenderedValue(locale)?has_content >
280 <#if fields.get("nn").getRenderedValue(locale)?starts_with("[")>
281 <#assign endIndex=fields.get("nn").getRenderedValue(locale)?last_index_of("]")>
282 <#assign trimedValue= fields.get("nn").getRenderedValue(locale)[endIndex+1..]>
283 <#if trimedValue?has_content >
284 <br>${trimedValue}
285 </#if>
286 <#else>
287 <br>${fields.get("nn").getRenderedValue(locale)}
288 </#if>
289 </#if>
290 <#if fields.get("link").getRenderedValue(locale)?has_content>
291 <br>
292 <i class="fa fa-external-link"></i>
293 <a href="${fields.get("link").getRenderedValue(locale)}" target="_self">Link</a>
294 <#elseif fileEntryURL?has_content>
295 <#assign fileType = getDLFileEntryType(fileEntry)/>
296 <#local fileModifiedDate ="" />
297 <#if fileType?starts_with("HNB Dokument - vrijeme")>
298 <#local fileModifiedDate = fileEntry.getCreateDate()/>
299 <#if fileEntry.getModifiedDate()?has_content >
300 <#local fileModifiedDate = fileEntry.getModifiedDate()/>
301 </#if>
302 <#local fileModifiedDate = " - "+languageUtil.get(locale,"templates.article.modifiedDate")+": "+ formatDateTime(fileModifiedDate)/>
303 </#if>
304 <br>
305 <@fileEntryIcon fileEntry />
306 <a href="${fileEntryURL}" target="_self" data_title="${fileEntry.getTitle()}">${languageUtil.get(locale,"templates.link.download")}</a>${fileModifiedDate}
307 </#if>
308
309 <#-- PRIKAZ NAPOMENE -->
310 <#if fields.get("napomena")?has_content && fields.get("napomena").getRenderedValue(locale)?has_content>
311 <br/>
312 <p>
313 <ul class="margo-t-4 margo-b-8">
314 <li><h4>${fields.get("napomena").getRenderedValue(locale)}</h4></li>
315 </ul>
316 </p>
317 </#if>
318
319 <#-- ATTACHEMNTS -->
320 <@drawAttachments fields />
321
322 <#-- ENDCONTENT -->
323 <#-- END WRAPPER -->
324 </p>
325 </#if>
326</#macro>
327
328<#macro fileEntryIcon fileEntry>
329 <#if fileEntry?has_content>
330 <#local fileExt = fileEntry.getExtension() />
331 <#if fileExt == "pdf">
332 <i class="fa fa-file-pdf-o"></i>
333 <#elseif fileExt == "doc" || fileExt == "docx">
334 <i class="fa fa-file-word-o"></i>
335 <#elseif fileExt == "xls" || fileExt == "xlsx">
336 <i class="fa fa-file-excel-o"></i>
337 <#elseif fileExt == "csv">
338 <i class="fa fa-file-text-o"></i>
339 <#elseif fileExt == "ppt" || fileExt == "pptx">
340 <i class="fa fa-file-powerpoint-o"></i>
341 <#elseif fileExt == "jpg" || fileExt == "jpeg" || fileExt == "png" || fileExt = "bmp" || fileExt = "gif">
342 <i class="fa fa-file-image-o"></i>
343 <#elseif fileExt == "zip" || fileExt == "rar" || fileExt = "7z" || fileExt == "tar">
344 <i class="fa fa-file-archive-o"></i>
345 <#else>
346 <i class="fa fa-file-o"></i>
347 </#if>
348 </#if>
349</#macro>
350
351<#function getFileEntry fieldValue>
352 <#local fileJSONObject = jsonFactoryUtil.createJSONObject(fieldValue)>
353 <#local fileEntryUUID = fileJSONObject.getString("uuid")>
354 <#if (fileJSONObject.getLong("groupId") > 0)>
355 <#local fileEntryGroupId = fileJSONObject.getLong("groupId")>
356 <#else>
357 <#local fileEntryGroupId = scopeGroupId>
358 </#if>
359 <#return dLAppLocalService.getFileEntryByUuidAndGroupId(fileEntryUUID, fileEntryGroupId)!"">
360</#function>
361
362<#function getDLFileEntry fieldValue>
363 <#local fileJSONObject = jsonFactoryUtil.createJSONObject(fieldValue)>
364 <#local fileEntryUUID = fileJSONObject.getString("uuid")>
365 <#if (fileJSONObject.getLong("groupId") > 0)>
366 <#local fileEntryGroupId = fileJSONObject.getLong("groupId")>
367 <#else>
368 <#local fileEntryGroupId = scopeGroupId>
369 </#if>
370 <#attempt>
371 <#return dLFileEntryLocalService.getDLFileEntryByUuidAndGroupId(fileEntryUUID, fileEntryGroupId)!"">
372 <#recover>
373 </#attempt>
374 <#return "" >
375</#function>
376
377
378<#function getDLFileEntryType fileEntryDL>
379 <#if fileEntryDL?has_content >
380 <#local fileEntryTypeId = fileEntryDL.getFileEntryTypeId() />
381 <#local fileEntryType = dLFileEntryTypeLocalService.getDLFileEntryType(fileEntryTypeId) />
382 <#return fileEntryType.getName(locale) />
383 <#else >
384 <#return "" />
385 </#if>
386</#function>
387
388<#function getFileEntryURL fileEntry>
389 <#if fileEntry?has_content >
390 <#return themeDisplay.getPathContext() + "/documents/" + fileEntry.getRepositoryId()?c + "/" + fileEntry.getFolderId()?c + "/" + httpUtil.encodeURL(htmlUtil.unescape(fileEntry.getTitle()), true) + "/" + fileEntry.getUuid()>
391 <#else>
392 <#return "#" >
393 </#if>
394</#function>
395
396<#function getArticle entry>
397 <#local assetRenderer = entry.getAssetRenderer() />
398 <#local article = assetRenderer.getArticle() />
399 <#return article >
400</#function>
401
402<#function getFields entry>
403 <#local assetRenderer = entry.getAssetRenderer() />
404 <#local article = assetRenderer.getArticle() />
405 <#local ddmStructure = ddmStructureLocalService.getStructure(groupId, entry.getClassNameId(), article.getStructureId()) />
406 <#local fields = journalConverter.getDDMFields(ddmStructure, article.getContent()) />
407 <#return fields >
408</#function>
409
410<#function formatDate date>
411 <#assign date_pattern = {"hr_HR":"d.M.yyyy.", "en_US":"d/M/yyyy"}>
412
413 <#assign formatteddate = dateUtil.getDate(date, date_pattern[locale], locale) >
414
415 <#return formatteddate>
416</#function>
417
418<#function formatDateTime date>
419 <#assign date_pattern = {"hr_HR":"d.M.yyyy.", "en_US":"d/M/yyyy"}>
420 <#assign time_pattern = {"hr_HR":"HH:mm", "en_US":"HH:mm"}>
421
422 <#assign formatteddate = dateUtil.getDate(date, date_pattern[locale], locale) >
423 <#assign formattedtime = dateUtil.getDate(date, time_pattern[locale], locale) >
424 <#if locale == "en_US" >
425 <#return formatteddate+" at "+ formattedtime>
426 <#else>
427 <#return formatteddate+" u "+ formattedtime>
428 </#if>
429</#function>