Documentos
Se ha producido un error al procesar la plantilla.
Java method "com.liferay.portal.kernel.util.DateUtil_IW.parseDate(String, String, Locale)" threw an exception when invoked on com.liferay.portal.kernel.util.DateUtil_IW object "com.liferay.portal.kernel.util.DateUtil_IW@1a05e921"; see cause exception in the Java stack trace. ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign fecha_DateObj = dateUtil.pars... [in template "21222#21260#321765" at line 70, column 25] ----
1<#macro length f>
2 <#assign numMegas = (f.getSize()?number/1048576)>
3 <#assign numKas = (f.getSize()?number/1024)>
4 <#setting number_format="0.##">
5 <#if (numMegas>=1)>
6 ${numMegas} MB
7 <#else>
8 ${numKas} KB
9 </#if>
10</#macro>
11<#macro tipoFichero fileMimeT>
12
13 <#if fileMimeT?contains("pdf")>
14 <span class="pdf">pdf</span>
15 <#elseif fileMimeT?contains("doc")>
16 <span class="doc">doc</span>
17 <#elseif fileMimeT?contains("msword")>
18 <span class="doc">doc</span>
19 <#elseif fileMimeT?contains("vnd.openxmlformats-officedocument.wordprocessingml.document")>
20 <span class="doc">doc</span>
21 <#elseif fileMimeT?contains("vnd.oasis.opendocument.text")>
22 <span class="doc">odt</span>
23 <#elseif fileMimeT?contains("xls")>
24 <span class="xls">xls</span>
25 <#elseif fileMimeT?contains("zip") || fileMimeT?contains("x-zip-compressed")>
26 <span class="zip">zip</span>
27 <#elseif fileMimeT?contains("ppt") || fileMimeT?contains("vnd.ms-powerpoint")>
28 <span class="ppt">ppt</span>
29 <#elseif fileMimeT?contains("vnd.openxmlformats-officedocument.presentationml.presentation")>
30 <span class="ppt">pptx</span>
31 <#else>
32 <span>${fileMimeT}</span>
33 </#if>
34</#macro>
35
36<#assign fileLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService")>
37<#assign dLFileEntryService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryService")>
38<#if entries?size > 0 >
39 <#-- Formato del idioma-->
40 <#assign formato_idioma = "yyyy·MM·dd">
41 <#if locale == "es_ES">
42 <#assign formato_idioma = "dd·MM·yyyy">
43 <#elseif locale == "eu_ES">
44 <#assign formato_idioma = "yyyy·MM·dd">
45 <#elseif locale == "en_EN">
46 <#assign formato_idioma = "yyyy·MM·dd">
47 <#elseif locale == "fr_FR">
48 <#assign formato_idioma = "dd·MM·yyyy">
49 <#elseif locale == "de_DE">
50 <#assign formato_idioma = "dd·MM·yyyy">
51 <#elseif locale == "ca_ES">
52 <#assign formato_idioma = "dd·MM·yyyy">
53 <#elseif locale == "gl_ES">
54 <#assign formato_idioma = "dd·MM·yyyy">
55 <#else>
56 <#assign formato_idioma = "yyyy·MM·dd">
57 </#if>
58 <#assign primero = "primero">
59 <div class="documentos">
60 <#foreach entry in entries>
61 <#assign renderer = entry.getAssetRenderer()>
62 <#assign className = renderer.getClassName()>
63 <#if className == "com.liferay.journal.model.JournalArticle">
64 <#assign journalArticle = renderer.getArticle()>
65 <#assign document = saxReaderUtil.read(journalArticle.getContentByLocale(locale.toString()))>
66 <#assign rootElement = document.getRootElement()>
67 <#assign izena = entry.getTitle(locale)>
68
69 <#assign data = document.valueOf("//dynamic-element[@name='Data']/dynamic-content/text()") />
70 <#assign fecha_DateObj = dateUtil.parseDate("yyyy-MM-dd", data,locale)>
71 <#assign data = dateUtil.getDate(fecha_DateObj, formato_idioma, locale)>
72 <#assign deskribapena = document.valueOf("//dynamic-element[@name='Deskribapena']/dynamic-content/text()") />
73 <#assign fitxategia = document.valueOf("//dynamic-element[@name='Fitxategia']/dynamic-content/text()") />
74
75 <#if fitxategia!="">
76 <#assign fitxategia_map = jsonFactoryUtil.createJSONObject(fitxategia) />
77 <#if fitxategia_map.groupId?? && fitxategia_map.groupId?has_content && fitxategia_map.uuid?? && fitxategia_map.uuid?has_content>
78 <#assign fileMi = dLFileEntryService.getFileEntryByUuidAndGroupId(fitxategia_map.uuid?string, getterUtil.getLong(fitxategia_map.groupId))>
79
80 <#assign catLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService")>
81 <#assign articleCatNames = catLocalService.getCategoryNames("com.liferay.journal.model.JournalArticle", getterUtil.getLong(journalArticle.resourcePrimKey))>
82 <#assign miRuta="/documents/${fitxategia_map.groupId}/${fileMi.getFileEntryId()}/${fitxategia_map.title}/${fitxategia_map.uuid}">
83 <div class="documento">
84 <div class="tipo-peso">
85 <#assign fileMimeT = fileMi.getMimeType()>
86 <a class="tipo" href="${miRuta}" target="_blank"><@tipoFichero fileMimeT/></a>
87 <div class="peso"><@length fileMi /></div>
88 </div>
89 <div class="datos">
90 <div class="fecha-categorias">
91 <span class="fecha">${data}</span>
92 <#assign cont = 0>
93 <#foreach catName in articleCatNames>
94 <span class="categoria">${catName}</span>
95 <#assign cont = cont + 1>
96 <#if cont < articleCatNames?size> | </#if>
97 </#foreach>
98 </div>
99 <div class="titulo"><a href="${miRuta}" target="_blank">${izena}</a>
100 </div>
101 <div class="descripcion">${deskribapena}
102 </div>
103 </div>
104 </div>
105 </#if>
106 </#if>
107
108
109 </#if>
110 </#foreach>
111 </div>
112</#if>