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: ==> asSequence [in template "20155#20195#120498" at line 171, column 56] ---- 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: #local nesluzbeniProcisceniTextSequen... [in template "20155#20195#120498" in macro "drawTable" at line 171, column 13] - Reached through: @drawTable baseFields [in template "20155#20195#120498" at line 112, column 25] ----
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 <#-- ARTICLE -->
80 <div class="article">
81 <h2 class="article-title">${naslov}</h2>
82 <div class="article-action-icons">
83 <div class="col-4-5" style="text-align:left;">
84 <#if baseFields.get("datum_objave")?has_content && baseFields.get("datum_objave").getValue(locale)?has_content>
85 <span class="displayDate">${languageUtil.get(locale,"templates.article.publishDate")}: ${formatDate(baseFields.get("datum_objave").getValue(locale)?date("yyyy-MM-dd"))} </span>
86 </#if>
87 <#if baseFields.get("datum_azuriranja")?has_content && baseFields.get("datum_azuriranja").getValue(locale)?has_content>
88 <span class="separator"></span>
89 <span class="modifiedDate">${languageUtil.get(locale,"templates.article.modifiedDate")}: ${formatDate(baseFields.get("datum_azuriranja").getValue(locale)?date("yyyy-MM-dd"))} </span>
90 </#if>
91 </div>
92 <div class="col-1-5" style="text-align:right;">
93 <#if exportUrl?has_content>
94 <a href='${exportUrl?replace("targetExtension=", "targetExtension=doc")}' target="_self"><i class="fa fa-file-word-o"></i></a>
95 <a href='${exportUrl?replace("targetExtension=", "targetExtension=pdf")}' target="_self"><i class="fa fa-file-pdf-o"></i></a>
96 <a href='${exportUrl?replace("targetExtension=", "targetExtension=txt")}' target="_self"><i class="fa fa-file-text-o"></i></a>
97 </#if>
98 <#if pagePrintUrl?has_content>
99 <a href="javascript:printPage('${pagePrintUrl}')"><i class="fa fa-print"></i></a>
100 <#elseif namespace?has_content>
101 <a href="javascript:${namespace}printPage()"><i class="fa fa-print"></i></a>
102 </#if>
103 </div>
104 <div class="clear"></div>
105 </div>
106
107 <div class="article-content">
108
109 <div class="metadata-container margo-b-16">
110
111 <#-- ATRIBUTI -->
112 <@drawTable baseFields/>
113
114 <#-- POVIJEST -->
115 <@drawHistory historyList true/>
116
117 <#-- DODATAK UPUTA -->
118 <@drawHistory dodatakUputa false/>
119
120 <#-- DODATAK ODLUKA -->
121 <@drawHistory dodatakOdluka false/>
122
123 </div>
124 </div>
125 <#-- YourEurope stuff -->
126 <#assign originFields = getFields(originEntry) />
127
128
129 <#if (originFields.get('youreurope').getValue(locale))!null?? >
130 <#assign prikaziYoureEuropeForm = originFields.get('youreurope').getValue()?string('da','ne') />
131 <#else>
132 <#assign prikaziYoureEuropeForm = "ne" />
133 </#if>
134
135 <#if prikaziYoureEuropeForm == "da" >
136 <#include "${templatesPath}/3692422" />
137 </#if>
138 </div>
139 </#if>
140 <#break>
141 </#list>
142</#if>
143
144<#macro drawTable fields>
145 <div class="table-container">
146 <table>
147 <tbody>
148 <#if fields.get("donositelj").getRenderedValue(locale)?has_content>
149 <tr>
150 <th>${languageUtil.get(locale,"templates.regulations.table.donositelj")}</th>
151 <td>${fields.get("donositelj").getRenderedValue(locale)}</td>
152 </tr>
153 </#if>
154 <#if fields.get("podrucje").getRenderedValue(locale)?has_content>
155 <tr>
156 <th>${languageUtil.get(locale,"templates.regulations.table.podrucje")}</th>
157 <td>${fields.get("podrucje").getRenderedValue(locale)}</td>
158 </tr>
159 </#if>
160 <#if fields.get("vrsta").getRenderedValue(locale)?has_content>
161 <tr>
162 <th>${languageUtil.get(locale,"templates.regulations.table.vrsta")}</th>
163 <td>${fields.get("vrsta").getRenderedValue(locale)}</td>
164 </tr>
165 </#if>
166 </tbody>
167 </table>
168
169 <#if fields.get("nesluzbeni_procisceni_tekst")?has_content && (fields.get("nesluzbeni_procisceni_tekst").getValue(locale)?has_content)>
170
171 <#local nesluzbeniProcisceniTextSequence = asSequence(fields.get("nesluzbeni_procisceni_tekst").getValue(locale)) >
172
173 ${asDebug('<br />nesluzbeni_procisceni_tekst - COUNT: ${nesluzbeniProcisceniTextSequence?size?c}', 'npp_text')}
174
175 <#list nesluzbeniProcisceniTextSequence as nesluzbeniProcisceniText>
176 ${asDebug('<br />nesluzbeni_procisceni_tekst stavka: VALUE[${nesluzbeniProcisceniText?index}]: ${nesluzbeniProcisceniText}', 'npp_item_${nesluzbeniProcisceniText?index}')}
177
178 <#local dlFileEntry = getDLFileEntry(nesluzbeniProcisceniText)>
179 <#if dlFileEntry?has_content>
180 <#local fileEntryURL = resolveFileEntryURL(nesluzbeniProcisceniText)>
181 <#if fileEntryURL?has_content>
182 <a href="${fileEntryURL}" target="_self" data_title="${dlFileEntry.getTitle()}" data_description="${dlFileEntry.getDescription()}" data_file="${dlFileEntry.getTitle()}.${dlFileEntry.getExtension()}">${dlFileEntry.getDescription()}</a>
183 </#if>
184 <#local nn_npt = fields.get("nn_npt").getRenderedValue(locale, 0)>
185 <#if nn_npt?has_content>
186 <br>${nn_npt}
187 </#if>
188
189 <#-- PRILOZI -->
190
191 <@drawAttachmentsTechnical fields=fields parent=dlFileEntry.getTitle() />
192 </#if>
193 </#list>
194
195
196 <#local nesluzbeniProcisceniTextSequence = nesluzbeniProcisceniTextSequence[0] />
197
198 <#if fields.get("nesluzbeni_procisceni_tekstFieldSet")?has_content>
199 ${asDebug('<br />NPP stavka: fieldSet dxp74 expression: ${fields.get("nesluzbeni_procisceni_tekstFieldSet")}', 'npp_fieldSet_dxp74')}
200 </#if>
201 </#if>
202 </div>
203</#macro>
204
205<#macro drawAttachments fields>
206 <#if fields.get("prilog")?has_content && (fields.get("prilog").getValue(locale)?size >= 1)>
207
208 <ul class="margo-t-4 margo-b-8 pad-l-16">
209 <#list fields.get("prilog").getValue(locale) as row>
210
211 <#if row?has_content>
212 <#local fileEntry = getDLFileEntry(row)>
213 <#local fileEntryURL = resolveFileEntryURL(row)>
214
215 <#if fileEntry?has_content>
216 <#assign fileType = getDLFileEntryType(fileEntry)/>
217 <#if fileType?starts_with("HNB Dokument - vrijeme")>
218 <#local fileModifiedDate = fileEntry.getCreateDate()/>
219 <#if fileEntry.getModifiedDate()?has_content >
220 <#local fileModifiedDate = fileEntry.getModifiedDate()/>
221 </#if>
222 <li>
223 <i class="${chooseIcon(fileEntry.getExtension())}"></i>
224 <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>
225 </li>
226 <#else>
227 <li>
228 <i class="${chooseIcon(fileEntry.getExtension())}"></i>
229 <a href="${fileEntryURL}" target="_self" data_title="${fileEntry.getTitle()}" data_description="${fileEntry.getDescription()}" data_file="${fileEntry.getTitle()}.${fileEntry.getExtension()}">${fileEntry.getDescription()}</a>
230
231 ${asDebug('prilog: item: fileType: ${fileType}', 'attachment_${row?index}')}
232 </li>
233 </#if>
234 </#if>
235 </#if>
236 </#list>
237 </ul>
238 </#if>
239</#macro>
240
241<#macro drawAttachmentsTechnical fields parent>
242 <#if fields.get("prilog_tehnicki")?has_content && (fields.get("prilog_tehnicki").getValue(locale)?size >= 1)>
243
244 <ul class="margo-t-4 margo-b-8">
245 <#list fields.get("prilog_tehnicki").getValue(locale) as row>
246 <#local tehnickiPrilog = row>
247
248 <#if tehnickiPrilog?has_content && tehnickiPrilog?contains(parent) >
249 ${asDebug('<br />prilog_tehnicki: ${parent} ${row}', 'prilog_teh_fieldDisplay_${row?index}')}
250 <#local fileEntry = getDLFileEntry(tehnickiPrilog)>
251 <#if fileEntry?has_content>
252 <#local fileEntryURL = resolveFileEntryURL(tehnickiPrilog)>
253 <li>
254 <i class="${chooseIcon(fileEntry.getExtension())}"></i>
255 <a href="${fileEntryURL}" target="_self" data_title="${fileEntry.getTitle()}" data_description="${fileEntry.getDescription()}" data_file="${fileEntry.getTitle()}.${fileEntry.getExtension()}">${fileEntry.getDescription()}</a>
256 </li>
257 </#if>
258 </#if>
259 </#list>
260 </ul>
261 </#if>
262</#macro>
263
264<#macro drawHistory entries drawBase>
265 <#if (( entries?has_content && entries?size > 0) || drawBase)>
266 <div class="margo-t-4 margo-b-8 pad-t-8 pad-b-8 brd-t-grey">
267 <#list entries?reverse as entry>
268 <#if entry.getTitle(locale, false)?has_content >
269 <@drawHistoryItem entry />
270 </#if>
271 </#list>
272 <#if baseEntry.getTitle(locale, false)?has_content && drawBase>
273 <@drawHistoryItem baseEntry />
274 </#if>
275 </div>
276 </#if>
277</#macro>
278
279<#macro drawHistoryItem historyItem>
280 <#if !historyItem?has_content>
281 <#return>
282 </#if>
283
284 <#local fields = getFields(historyItem) />
285
286 <#if (fields.get("dokument")?has_content && fields.get("dokument").getValue(locale)?has_content)
287 || (fields.get("link")?has_content && fields.get("link").getRenderedValue(locale)?has_content) >
288
289 <#-- WRAPPER -->
290 <#if historyItem.getEntryId() == originEntry.getEntryId()>
291 <p style="font-weight:bold;">
292 <span><i class="fa fa-check-square" style="color:#c81818;"></i></span>
293 <#else>
294 <p>
295 </#if>
296
297 <#-- CONTENT -->
298
299 <#if fields.get("najava_naslov")?has_content && fields.get("najava_naslov").getValue(locale)?has_content >
300 <#assign naslov = fields.get("najava_naslov").getValue(locale) />
301 <#else>
302 <#assign naslov = historyItem.getTitle(locale)/>
303 </#if>
304
305 ${naslov}
306
307 <#if fields.get("nn").getRenderedValue(locale)?has_content >
308 <#if fields.get("nn").getRenderedValue(locale)?starts_with("[")>
309 <#assign endIndex=fields.get("nn").getRenderedValue(locale)?last_index_of("]")>
310 <#assign trimedValue= fields.get("nn").getRenderedValue(locale)[endIndex+1..]>
311 <#if trimedValue?has_content >
312 <br>${trimedValue}
313 </#if>
314 <#else>
315 <br>${fields.get("nn").getRenderedValue(locale)}
316 </#if>
317 </#if>
318
319 <#if fields.get("dokument")?has_content && fields.get("dokument").getValue(locale)?has_content >
320 <#local fileEntry = getDLFileEntry(fields.get("dokument").getValue(locale))>
321
322 <#if fileEntry?has_content>
323 <#local fileEntryURL = resolveFileEntryURL(fields.get("dokument").getValue(locale))>
324 </#if>
325 </#if>
326
327 <#if fields.get("link").getRenderedValue(locale)?has_content>
328 <br>
329 <i class="fa fa-external-link"></i>
330 <a href="${fields.get("link").getRenderedValue(locale)}" target="_self">Link</a>
331 <#elseif fileEntryURL?has_content>
332 <#assign fileType = getDLFileEntryType(fileEntry)/>
333 <#local fileModifiedDate ="" />
334 <#-- ovo postoji u makrou drawAttachments - TODO: refactor -->
335 <#if fileType?starts_with("HNB Dokument - vrijeme")>
336 <#local fileModifiedDate = fileEntry.getCreateDate()/>
337 <#if fileEntry.getModifiedDate()?has_content >
338 <#local fileModifiedDate = fileEntry.getModifiedDate()/>
339 </#if>
340 <#local fileModifiedDate = " - " + languageUtil.get(locale,"templates.article.modifiedDate")+": "+ formatDateTime(fileModifiedDate)/>
341 </#if>
342 <br>
343 <i class="${chooseIcon(fileEntry.getExtension())}"></i>
344 <a href="${fileEntryURL}" target="_self" data_title="${fileEntry.getTitle()}">${languageUtil.get(locale,"templates.link.download")}</a>
345 ${fileModifiedDate}
346
347 ${asDebug('Regulativa detalji: prilog: fileType: ${fileType}', 'history_item_')}
348 </#if>
349
350 <#if fields.get("napomena")?has_content && fields.get("napomena").getRenderedValue(locale)?has_content>
351 <br/>
352 <p>
353 <ul class="margo-t-4 margo-b-8">
354 <li><h4>${fields.get("napomena").getRenderedValue(locale)}</h4></li>
355 </ul>
356 </p>
357 </#if>
358
359 <@drawAttachments fields />
360
361 </p>
362 </#if>
363</#macro>
364
365<#function getArticle entry>
366 <#local assetRenderer = entry.getAssetRenderer() />
367 <#local article = assetRenderer.getArticle() />
368 <#return article >
369</#function>
370<#-- review this function and check if it can be refactored. Put coment what is return result -->
371<#function getFields entry>
372 <#local assetRenderer = entry.getAssetRenderer() />
373 <#local article = assetRenderer.getArticle() />
374 <#local ddmStructure = article.getDDMStructure() />
375 <#local fields = journalConverter.getDDMFields(ddmStructure, article.getContent()) />
376 <#return fields >
377</#function>
378
379<#function formatDate date>
380 <#assign date_pattern = {"hr_HR":"d.M.yyyy.", "en_US":"d/M/yyyy"}>
381
382 <#assign formatteddate = dateUtil.getDate(date, date_pattern[locale], locale) >
383
384 <#return formatteddate>
385</#function>
386
387<#function formatDateTime date>
388 <#assign date_pattern = {"hr_HR":"d.M.yyyy.", "en_US":"d/M/yyyy"}>
389 <#assign time_pattern = {"hr_HR":"HH:mm", "en_US":"HH:mm"}>
390
391 <#assign formatteddate = dateUtil.getDate(date, date_pattern[locale], locale) >
392 <#assign formattedtime = dateUtil.getDate(date, time_pattern[locale], locale) >
393 <#if locale == "en_US" >
394 <#return formatteddate+" at "+ formattedtime>
395 <#else>
396 <#return formatteddate+" u "+ formattedtime>
397 </#if>
398</#function>