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.
The following has evaluated to null or missing: ==> entry['origin'] [in template "20155#20195#120498" at line 59, column 32] ---- Tip: It's the final [] step that caused this error, not those before it. ---- 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 originEntry = entry["origin"] [in template "20155#20195#120498" at line 59, column 9] ----
1<#--
2TEMPLATE KEY : 244077
3TEMPLATE ID : 120498
4TEMPLATE NAME: HNB Regulativa detalj.ftl
5LOCATION : Widget Templates
6TEMPLATE TYPE: Asset Publisher Template
7TEMPLATE HOME: _TEMPLATE_CONTEXT_/20155/20182/20083
8
9TESTIRANJE:
10PORTLET: ArchiveFilterAssetPublisher - custom portlet
11JEDAN DOKUMENT ODLUKE:
12https://webtest.hnb.hr/-/odluka-o-velikim-izlozenostima-kreditnih-institucija
13DVA DOKUMENTA ODLUKE:
14https://webtest.hnb.hr/-/odluka-o-izvjestajima-za-potrebe-supervizije-kreditnih-institucija
15-->
16
17<#-- Fileter Functions ADT -->
18<#include "${templatesPath}/4812567" />
19
20<#-- documentlibrary functions -->
21<#include "_TEMPLATE_CONTEXT_/20155/20182/20513/4891145" />
22
23${asDebug('<br />TEMPLATE KEY: 244077 TEMPLATE ID: 120498 NAME: HNB Regulativa detalji PATH: ${templatesPath}', 'npp_details_fields_1')}
24
25<#assign dLFileEntryLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService")>
26<#assign dLFileEntryTypeLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryTypeLocalService")>
27<#assign dLAppLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLAppLocalService")>
28
29<#assign ddmStructureLocalService = serviceLocator.findService("com.liferay.dynamic.data.mapping.service.DDMStructureLocalService")>
30<#assign journalConverter = serviceLocator.findService("com.liferay.journal.util.JournalConverter")>
31<#assign assetLinkLocalService = serviceLocator.findService("com.liferay.asset.link.service.AssetLinkLocalService" )>
32<#assign assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService" )>
33
34<style>
35 .table-container table,
36 .table-container table th,
37 .table-container table td { border:none; background-color: #fff; padding: 6px; }
38 .table-container table th { text-transform: uppercase; text-align:right; }
39 .table-container table {width:auto;}
40 ul {list-style: none;}
41</style>
42
43<#assign dLFileEntryLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService")>
44<#assign dLFileEntryTypeLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryTypeLocalService")>
45<#assign dLAppLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLAppLocalService")>
46
47<#assign ddmStructureLocalService = serviceLocator.findService("com.liferay.dynamic.data.mapping.service.DDMStructureLocalService")>
48<#assign journalConverter = serviceLocator.findService("com.liferay.journal.util.JournalConverter")>
49<#assign assetLinkLocalService = serviceLocator.findService("com.liferay.asset.link.service.AssetLinkLocalService" )>
50<#assign assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService" )>
51
52<#if entries?has_content>
53 <#list entries as curEntry>
54 <#if !entry??>
55 <br/> Ne postoji odluka - provjerite s urednikom.
56 <#continue />
57 </#if>
58
59 <#assign originEntry = entry['origin'] >
60 <#assign baseEntry = entry['base'] >
61 <#assign historyList = entry['history']! >
62 <#assign dodatakOdluka = entry['dodatak_odluka']! >
63 <#assign dodatakUputa = entry['dodatak_uputa']! >
64
65 <#-- HANDLE LOCALE -->
66 <#if !baseEntry.getAvailableLanguageIds()?seq_contains(locale) >
67 <div class="no-translation">${languageUtil.get(locale,"templates.locale.contentNotAvailable")}</div>
68
69 <#else>
70 <#assign naslov = baseEntry.getTitle(locale)/>
71
72 <#assign baseFields = getFields(baseEntry) />
73 <#assign baseArticle = getArticle(baseEntry) />
74
75 <#if baseFields.get("najava_naslov")?has_content && baseFields.get("najava_naslov").getValue(locale)?has_content >
76 <#assign naslov = baseFields.get("najava_naslov").getValue(locale) />
77 </#if>
78
79 <div style="display: none">
80 <#list baseFields.iterator() as fieldEntry>
81 <br />${fieldEntry.getName()} implementation: repeatable ${fieldEntry.isRepeatable()?string('yes', 'no')}, type: ${fieldEntry.getDataType()}
82 </#list>
83 </div>
84
85 <#-- ARTICLE -->
86 <div class="article">
87 <h2 class="article-title">${naslov}</h2>
88 <div class="article-action-icons">
89 <div class="col-4-5" style="text-align:left;">
90 <#if baseFields.get("datum_objave")?has_content && baseFields.get("datum_objave").getValue(locale)?has_content>
91 <span class="displayDate">${languageUtil.get(locale,"templates.article.publishDate")}: ${formatDate(baseFields.get("datum_objave").getValue(locale)?date("yyyy-MM-dd"))} </span>
92 </#if>
93 <#if baseFields.get("datum_azuriranja")?has_content && baseFields.get("datum_azuriranja").getValue(locale)?has_content>
94 <span class="separator"></span>
95 <span class="modifiedDate">${languageUtil.get(locale,"templates.article.modifiedDate")}: ${formatDate(baseFields.get("datum_azuriranja").getValue(locale)?date("yyyy-MM-dd"))} </span>
96 </#if>
97 </div>
98 <div class="col-1-5" style="text-align:right;">
99 <#if exportUrl?has_content>
100 <a href='${exportUrl?replace("targetExtension=", "targetExtension=doc")}' target="_self"><i class="fa fa-file-word-o"></i></a>
101 <a href='${exportUrl?replace("targetExtension=", "targetExtension=pdf")}' target="_self"><i class="fa fa-file-pdf-o"></i></a>
102 <a href='${exportUrl?replace("targetExtension=", "targetExtension=txt")}' target="_self"><i class="fa fa-file-text-o"></i></a>
103 </#if>
104 <#if pagePrintUrl?has_content>
105 <a href="javascript:printPage('${pagePrintUrl}')"><i class="fa fa-print"></i></a>
106 <#elseif namespace?has_content>
107 <a href="javascript:${namespace}printPage()"><i class="fa fa-print"></i></a>
108 </#if>
109 </div>
110 <div class="clear"></div>
111 </div>
112
113 <div class="article-content">
114
115 <div class="metadata-container margo-b-16">
116
117 <#-- ATRIBUTI -->
118 <@drawTable baseFields/>
119
120 <#-- POVIJEST -->
121 <@drawHistory historyList true/>
122
123 <#-- DODATAK UPUTA -->
124 <@drawHistory dodatakUputa false/>
125
126 <#-- DODATAK ODLUKA -->
127 <@drawHistory dodatakOdluka false/>
128
129 </div>
130 </div>
131 <#-- YourEurope stuff -->
132 <#assign originFields = getFields(originEntry) />
133
134
135 <#if (originFields.get('youreurope').getValue(locale))!null?? >
136 <#assign prikaziYoureEuropeForm = originFields.get('youreurope').getValue()?string('da','ne') />
137 <#else>
138 <#assign prikaziYoureEuropeForm = "ne" />
139 </#if>
140
141 <#if prikaziYoureEuropeForm == "da" >
142 <#include "${templatesPath}/3692422" />
143 </#if>
144 </div>
145 </#if>
146 <#break>
147 </#list>
148</#if>
149
150<#macro drawTable fields>
151 <div class="table-container">
152 <table>
153 <tbody>
154 <#if fields.get("donositelj").getRenderedValue(locale)?has_content>
155 <tr>
156 <th>${languageUtil.get(locale,"templates.regulations.table.donositelj")}</th>
157 <td>${fields.get("donositelj").getRenderedValue(locale)}</td>
158 </tr>
159 </#if>
160 <#if fields.get("podrucje").getRenderedValue(locale)?has_content>
161 <tr>
162 <th>${languageUtil.get(locale,"templates.regulations.table.podrucje")}</th>
163 <td>${fields.get("podrucje").getRenderedValue(locale)}</td>
164 </tr>
165 </#if>
166 <#if fields.get("vrsta").getRenderedValue(locale)?has_content>
167 <tr>
168 <th>${languageUtil.get(locale,"templates.regulations.table.vrsta")}</th>
169 <td>${fields.get("vrsta").getRenderedValue(locale)}</td>
170 </tr>
171 </#if>
172 </tbody>
173 </table>
174
175 <#if fields.get("nesluzbeni_procisceni_tekst")?has_content && (fields.get("nesluzbeni_procisceni_tekst").getValue(locale)?has_content)>
176
177 <#local nesluzbeniProcisceniTextSequence = asSequence(fields.get("nesluzbeni_procisceni_tekst").getValue(locale)) >
178
179 ${asDebug('<br />nesluzbeni_procisceni_tekst - COUNT: ${nesluzbeniProcisceniTextSequence?size?c}', 'npp_text')}
180
181 <#list nesluzbeniProcisceniTextSequence as nesluzbeniProcisceniText>
182 ${asDebug('<br />nesluzbeni_procisceni_tekst stavka: VALUE[${nesluzbeniProcisceniText?index}]: ${nesluzbeniProcisceniText}', 'npp_item_${nesluzbeniProcisceniText?index}')}
183
184 <#local dlFileEntry = getDLFileEntry(nesluzbeniProcisceniText)>
185 <#if dlFileEntry?has_content>
186 <#local fileEntryURL = resolveFileEntryURL(nesluzbeniProcisceniText)>
187 <#if fileEntryURL?has_content>
188 <a href="${fileEntryURL}" target="_self" data_title="${dlFileEntry.getTitle()}" data_description="${dlFileEntry.getDescription()}" data_file="${dlFileEntry.getTitle()}.${dlFileEntry.getExtension()}">${dlFileEntry.getDescription()}</a>
189 </#if>
190 <#local nn_npt = fields.get("nn_npt").getRenderedValue(locale, 0)>
191 <#if nn_npt?has_content>
192 <br>${nn_npt}
193 </#if>
194
195 <#-- PRILOZI -->
196
197 <@drawAttachmentsTechnical fields=fields parent=dlFileEntry.getTitle() />
198 </#if>
199 </#list>
200
201
202 <#local nesluzbeniProcisceniTextSequence = nesluzbeniProcisceniTextSequence[0] />
203
204 <#if fields.get("nesluzbeni_procisceni_tekstFieldSet")?has_content>
205 ${asDebug('<br />NPP stavka: fieldSet dxp74 expression: ${fields.get("nesluzbeni_procisceni_tekstFieldSet")}', 'npp_fieldSet_dxp74')}
206 </#if>
207 </#if>
208 </div>
209</#macro>
210
211<#macro drawAttachments fields>
212 <#if fields.get("prilog")?has_content && (fields.get("prilog").getValue(locale)?size >= 1)>
213
214 <ul class="margo-t-4 margo-b-8 pad-l-16">
215 <#list fields.get("prilog").getValue(locale) as row>
216
217 <#if row?has_content>
218 <#local fileEntry = getDLFileEntry(row)>
219 <#local fileEntryURL = resolveFileEntryURL(row)>
220
221 <#if fileEntry?has_content>
222 <#assign fileType = getDLFileEntryType(fileEntry)/>
223 <#if fileType?starts_with("HNB Dokument - vrijeme")>
224 <#local fileModifiedDate = fileEntry.getCreateDate()/>
225 <#if fileEntry.getModifiedDate()?has_content >
226 <#local fileModifiedDate = fileEntry.getModifiedDate()/>
227 </#if>
228 <li>
229 <i class="${chooseIcon(fileEntry.getExtension())}"></i>
230 <a href="${fileEntryURL}" target="_self" data_title="${fileEntry.getTitle()}" data_description="${fileEntry.getDescription()}" data_file="${fileEntry.getTitle()}.${fileEntry.getExtension()}">${fileEntry.getDescription()} - ${languageUtil.get(locale,"templates.article.modifiedDate")}: ${formatDateTime(fileModifiedDate)}</a>
231 </li>
232 <#else>
233 <li>
234 <i class="${chooseIcon(fileEntry.getExtension())}"></i>
235 <a href="${fileEntryURL}" target="_self" data_title="${fileEntry.getTitle()}" data_description="${fileEntry.getDescription()}" data_file="${fileEntry.getTitle()}.${fileEntry.getExtension()}">${fileEntry.getDescription()}</a>
236
237 ${asDebug('prilog: item: fileType: ${fileType}', 'attachment_${row?index}')}
238 </li>
239 </#if>
240 </#if>
241 </#if>
242 </#list>
243 </ul>
244 </#if>
245</#macro>
246
247<#macro drawAttachmentsTechnical fields parent>
248 <#if fields.get("prilog_tehnicki")?has_content && (fields.get("prilog_tehnicki").getValue(locale)?size >= 1)>
249
250 <ul class="margo-t-4 margo-b-8">
251 <#list fields.get("prilog_tehnicki").getValue(locale) as row>
252 <#local tehnickiPrilog = row>
253
254 <#if tehnickiPrilog?has_content && tehnickiPrilog?contains(parent) >
255 ${asDebug('<br />prilog_tehnicki: ${parent} ${row}', 'prilog_teh_fieldDisplay_${row?index}')}
256 <#local fileEntry = getDLFileEntry(tehnickiPrilog)>
257 <#if fileEntry?has_content>
258 <#local fileEntryURL = resolveFileEntryURL(tehnickiPrilog)>
259 <li>
260 <i class="${chooseIcon(fileEntry.getExtension())}"></i>
261 <a href="${fileEntryURL}" target="_self" data_title="${fileEntry.getTitle()}" data_description="${fileEntry.getDescription()}" data_file="${fileEntry.getTitle()}.${fileEntry.getExtension()}">${fileEntry.getDescription()}</a>
262 </li>
263 </#if>
264 </#if>
265 </#list>
266 </ul>
267 </#if>
268</#macro>
269
270<#macro drawHistory entries drawBase>
271 <#if (( entries?has_content && entries?size > 0) || drawBase)>
272 <div class="margo-t-4 margo-b-8 pad-t-8 pad-b-8 brd-t-grey">
273 <#list entries?reverse as entry>
274 <#if entry.getTitle(locale, false)?has_content >
275 <@drawHistoryItem entry />
276 </#if>
277 </#list>
278 <#if baseEntry.getTitle(locale, false)?has_content && drawBase>
279 <@drawHistoryItem baseEntry />
280 </#if>
281 </div>
282 </#if>
283</#macro>
284
285<#macro drawHistoryItem historyItem>
286 <#if !historyItem?has_content>
287 <#return>
288 </#if>
289
290 <#local fields = getFields(historyItem) />
291
292 <#if (fields.get("dokument")?has_content && fields.get("dokument").getValue(locale)?has_content)
293 || (fields.get("link")?has_content && fields.get("link").getRenderedValue(locale)?has_content) >
294
295 <#-- WRAPPER -->
296 <#if historyItem.getEntryId() == originEntry.getEntryId()>
297 <p style="font-weight:bold;">
298 <span><i class="fa fa-check-square" style="color:#c81818;"></i></span>
299 <#else>
300 <p>
301 </#if>
302
303 <#-- CONTENT -->
304
305 <#if fields.get("najava_naslov")?has_content && fields.get("najava_naslov").getValue(locale)?has_content >
306 <#assign naslov = fields.get("najava_naslov").getValue(locale) />
307 <#else>
308 <#assign naslov = historyItem.getTitle(locale)/>
309 </#if>
310
311 ${naslov}
312
313 <#if fields.get("nn").getRenderedValue(locale)?has_content >
314 <#if fields.get("nn").getRenderedValue(locale)?starts_with("[")>
315 <#assign endIndex=fields.get("nn").getRenderedValue(locale)?last_index_of("]")>
316 <#assign trimedValue= fields.get("nn").getRenderedValue(locale)[endIndex+1..]>
317 <#if trimedValue?has_content >
318 <br>${trimedValue}
319 </#if>
320 <#else>
321 <br>${fields.get("nn").getRenderedValue(locale)}
322 </#if>
323 </#if>
324
325 <#if fields.get("dokument")?has_content && fields.get("dokument").getValue(locale)?has_content >
326 <#local fileEntry = getDLFileEntry(fields.get("dokument").getValue(locale))>
327
328 <#if fileEntry?has_content>
329 <#local fileEntryURL = resolveFileEntryURL(fields.get("dokument").getValue(locale))>
330 </#if>
331 </#if>
332
333 <#if fields.get("link").getRenderedValue(locale)?has_content>
334 <br>
335 <i class="fa fa-external-link"></i>
336 <a href="${fields.get("link").getRenderedValue(locale)}" target="_self">Link</a>
337 <#elseif fileEntryURL?has_content>
338 <#assign fileType = getDLFileEntryType(fileEntry)/>
339 <#local fileModifiedDate ="" />
340 <#-- ovo postoji u makrou drawAttachments - TODO: refactor -->
341 <#if fileType?starts_with("HNB Dokument - vrijeme")>
342 <#local fileModifiedDate = fileEntry.getCreateDate()/>
343 <#if fileEntry.getModifiedDate()?has_content >
344 <#local fileModifiedDate = fileEntry.getModifiedDate()/>
345 </#if>
346 <#local fileModifiedDate = " - " + languageUtil.get(locale,"templates.article.modifiedDate")+": "+ formatDateTime(fileModifiedDate)/>
347 </#if>
348 <br>
349 <i class="${chooseIcon(fileEntry.getExtension())}"></i>
350 <a href="${fileEntryURL}" target="_self" data_title="${fileEntry.getTitle()}">${languageUtil.get(locale,"templates.link.download")}</a>
351 ${fileModifiedDate}
352
353 ${asDebug('Regulativa detalji: prilog: fileType: ${fileType}', 'history_item_')}
354 </#if>
355
356 <#if fields.get("napomena")?has_content && fields.get("napomena").getRenderedValue(locale)?has_content>
357 <br/>
358 <p>
359 <ul class="margo-t-4 margo-b-8">
360 <li><h4>${fields.get("napomena").getRenderedValue(locale)}</h4></li>
361 </ul>
362 </p>
363 </#if>
364
365 <@drawAttachments fields />
366
367 </p>
368 </#if>
369</#macro>
370
371<#function getArticle entry>
372 <#local assetRenderer = entry.getAssetRenderer() />
373 <#local article = assetRenderer.getArticle() />
374 <#return article >
375</#function>
376<#-- review this function and check if it can be refactored. Put coment what is return result -->
377<#function getFields entry>
378 <#local assetRenderer = entry.getAssetRenderer() />
379 <#local article = assetRenderer.getArticle() />
380 <#local ddmStructure = article.getDDMStructure() />
381 <#local fields = journalConverter.getDDMFields(ddmStructure, article.getContent()) />
382 <#return fields >
383</#function>
384
385<#function formatDate date>
386 <#assign date_pattern = {"hr_HR":"d.M.yyyy.", "en_US":"d/M/yyyy"}>
387
388 <#assign formatteddate = dateUtil.getDate(date, date_pattern[locale], locale) >
389
390 <#return formatteddate>
391</#function>
392
393<#function formatDateTime date>
394 <#assign date_pattern = {"hr_HR":"d.M.yyyy.", "en_US":"d/M/yyyy"}>
395 <#assign time_pattern = {"hr_HR":"HH:mm", "en_US":"HH:mm"}>
396
397 <#assign formatteddate = dateUtil.getDate(date, date_pattern[locale], locale) >
398 <#assign formattedtime = dateUtil.getDate(date, time_pattern[locale], locale) >
399 <#if locale == "en_US" >
400 <#return formatteddate+" at "+ formattedtime>
401 <#else>
402 <#return formatteddate+" u "+ formattedtime>
403 </#if>
404</#function>