1<#assign journalArticleLocalService= serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")>
2<#assign currentArticle= journalArticleLocalService.getArticle( getterUtil.getLong( groupId), .vars["reserved-article-id"].data)>
3<#assign assetCategoryServiceUtil= serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryService")>
4<#assign category= assetCategoryServiceUtil.getCategories("com.liferay.journal.model.JournalArticle", getterUtil.getLong( currentArticle.getResourcePrimKey()))>
5
6<#assign groupLocalService= serviceLocator.findService("com.liferay.portal.kernel.service.GroupLocalService")>
7<#assign group= groupLocalService.getGroup( getterUtil.getLong( groupId))>
8
9<#assign scopeGroupId= getterUtil.getLong( themeDisplay.scopeGroupId)>
10
11<#assign articleUrl="/web/agenda/-/"+ .vars["reserved-article-url-title"].data>
12<div class="agenda_portada_column1 col-lg-4 col-md-6 mb-4">
13<section>
14 <article>
15 <!--Categoria-->
16 <#if category?has_content>
17 <ul class="categoria-activitat d-flex align-items-end flex-column">
18 <#list category as categoria>
19 <#if categoria.vocabularyId== getterUtil.getLong("32620")>
20 <li>${categoria.name}</li>
21 </#if>
22 </#list>
23 </ul>
24 </#if>
25 <!--Imatge-->
26 <#assign urlImgEntry= "">
27 <#assign altAuxImg= "">
28 <#if act_img_interior.getData()?has_content>
29 <#assign urlImgEntry= act_img_interior.getData()>
30 <#elseif act_img_interior.urlExterna?? && act_img_interior.urlExterna.getData()?has_content>
31 <#assign urlImgEntry= act_img_interior.urlExterna.getData()>
32 </#if>
33 <#if urlImgEntry?has_content>
34 <#if act_img_interior.act_img_alt.getData()?has_content>
35 <#assign altAuxImg= act_img_interior.act_img_alt.getData()>
36 </#if>
37
38 <#-------------------------------------------------------------------------UNIFICACION PLANTILLAS METAINFO IMATGES INI------------------------------------------------------------------------->
39 <#if urlImgEntry?has_content>
40
41 <#----------------------------METAINFO_IMG_GETINFO INI---------------------------->
42
43 <#assign DLFileEntryUtil= serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService")>
44
45 <#assign uuIdImagen= staticUtil['com.liferay.portal.kernel.util.HttpComponentsUtil'].getParameter( urlImgEntry,"uuid",false)>
46 <#if uuIdImagen!="">
47
48 <#assign groupIdImagen= staticUtil['com.liferay.portal.kernel.util.HttpComponentsUtil'].getParameter( urlImgEntry,"groupId",false)>
49
50 <#assign current= DLFileEntryUtil.fetchDLFileEntryByUuidAndGroupId( uuIdImagen, getterUtil.getLong( groupIdImagen))>
51
52 </#if>
53 <#----------------------------METAINFO_IMG_GETINFO FIN---------------------------->
54 <#if current?has_content>
55
56 <#assign structureId="IMATGES">
57 <#assign templateId="IMATGES">
58
59 <#----------------------------METAINFO_EXIST_CONTENT INI---------------------------->
60
61 <#assign journalArticleLocalService= serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")>
62
63 <#assign companyId= current.getCompanyId()>
64 <#assign group_Id= scopeGroupId>
65 <#if current?? && current.getGroupId()?has_content>
66 <#assign group_Id= current.getGroupId()>
67 </#if>
68 <#assign type="general">
69 <#assign title= current.getDescription()>
70
71 <#assign isEmpty=true>
72 <#assign articles="">
73 <#assign currentArticle="">
74
75 <#assign folders=[]>
76 <#assign andOperator=true>
77 <#assign articles= journalArticleLocalService.search( getterUtil.getLong( companyId), getterUtil.getLong( group_Id), folders,0,null,null, title,null,null, type, structureId, templateId,null,null,0,null, andOperator,-1,-1, null)!"">
78 <#if articles?has_content || articles?length gt 0>
79 <#list articles as article>
80 <#if stringUtil.equalsIgnoreCase(article.getTitle(),title)>
81 <#if isEmpty>
82 <#assign isEmpty=false>
83 <#assign currentArticle= article>
84 <#else>
85 <#if currentArticle.getVersion()< article.getVersion()>
86 <#assign currentArticle= article>
87 </#if>
88 </#if>
89 </#if>
90 </#list>
91 </#if>
92
93 <#----------------------------METAINFO_EXIST_CONTENT FIN-------------------------- -->
94 <#if !currentArticle?has_content>
95 <img src="${urlImgEntry}" alt="${altAuxImg}" title="" class="img_section" />
96 <#if altAuxImg?has_content>
97 <p class="m-0 p-0">${altAuxImg}</p>
98 </#if>
99 <#else><#----------------------------IMATGES FIN-------------------------- -->
100
101 <#assign document= saxReaderUtil.read( currentArticle.getContent())>
102
103 <#assign img_autor= document.selectSingleNode("/root/dynamic-element[@name= esc.simg_autor esc.s]/dynamic-content[@language-id= esc.s locale esc.s]")>
104 <#assign img_titol= document.selectSingleNode("/root/dynamic-element[@name= esc.simg_titol esc.s]/dynamic-content[@language-id= esc.s locale esc.s]")>
105 <#assign img_alt= document.selectSingleNode("/root/dynamic-element[@name= esc.simg_alt esc.s]/dynamic-content[@language-id= esc.s locale esc.s]")>
106 <#assign img_imatge= document.selectSingleNode("/root/dynamic-element[@name= esc.simg_imatge esc.s]/dynamic-content")>
107
108
109 <img src="${img_imatge.getText()}" class="img_section" alt="${img_alt.getText()}" title="${img_alt.getText()}">
110 <p>${img_titol.getText()}<br />${img_autor.getText()}</p>
111
112 <#----------------------------IMATGES FIN-------------------------- -->
113 </#if>
114 <#else>
115
116 <img src="${urlImgEntry}" alt="${altAuxImg}" title="" class="img_section" />
117 <#if altAuxImg?has_content>
118 <!--<p>${altAuxImg}</p> -->
119 </#if>
120 </#if>
121 </#if>
122 <#-------------------------------------------------------------------------UNIFICACION PLANTILLAS METAINFO IMATGES INI------------------------------------------------------------------------->
123
124 </#if>
125 <!--Titol-->
126 <div class="titol-activitat" ><a alt="${act_titol.getData()}" title="${act_titol.getData()}" href="${articleUrl}">${act_titol.getData()}</a></div>
127 <!--Resum-->
128 <#if act_resum?? && act_resum.getData()?has_content>
129 <div class="resum-activitat mx-2">${act_resum.getData()}</div>
130 </#if>
131 <!--Dades-->
132 <div class="dades-activitat mx-2 row">
133 <div class="data mt-2">
134 <#assign dataInicial_Data= getterUtil.getString( dataInicial.getData())>
135 <#if dataInicial_Data?has_content>
136 <#assign dataInicial_DateObj= dateUtil.parseDate("yyyy-MM-dd", dataInicial_Data, locale)>
137 </#if>
138
139 <#assign dataFinal_Data= getterUtil.getString( dataFinal.getData())>
140
141 <#if dataFinal_Data?has_content>
142 <#assign dataFinal_DateObj= dateUtil.parseDate("yyyy-MM-dd", dataFinal_Data, locale)>
143 <#assign dataActivitatF = dateUtil.getDate(dataFinal_DateObj,"dd/MM/yyyy",locale)>
144 </#if>
145
146 <#if dataInicial_DateObj?? && dataInicial_DateObj?has_content>
147 <#assign dataActivitat = dateUtil.getDate(dataInicial_DateObj,"dd/MM/yyyy",locale)>
148 </#if>
149
150 <#if dataInicial_Data!= dataFinal_Data>
151
152 <#assign finsText>
153 <@liferay.language key="parc.activitat.fins" />
154 </#assign>
155 <#assign dataActivitat = "Del " + dataActivitat + " " + finsText + " " + dataActivitatF>
156
157 </#if>
158 <#if dataActivitat??>
159 <i class="fa-solid fa-calendar-days icon-large"></i> ${dataActivitat}
160 </#if>
161
162 </div>
163
164 <#if act_horari.getData()?has_content>
165 <div class="horari mt-2 w-100">
166 <#--<strong><@liferay.language key="parc.activitat.horari"/>:</strong> -->
167 <i class="fa-solid fa-clock icon-large"></i> ${act_horari.getData()}<br />
168 </div>
169 </#if>
170 <#if act_lloc1.getData()?has_content >
171 <div class="lloc mt-2 w-100">
172 <i class="fa-solid fa-location-dot"></i>
173
174 <#if act_lloc1.getData()?has_content>
175 <#--<strong><@liferay.language key="place"/>:</strong>-->
176 ${act_lloc1.getData()} <br />
177 <#if act_lloc2.getData()?has_content>
178 ${act_lloc2.getData()} <br />
179 </#if>
180 <#if act_poblacio?? && act_poblacio.getData()?has_content>
181 <#--<strong>Població:</strong>-->
182 ${act_poblacio.getData()}<br />
183 </#if>
184 </#if>
185
186 </div>
187 </#if>
188 <#if category?has_content>
189 <div class="parc mt-2">
190 <ul class="parc-activitat p-0">
191 <#list category as categoria>
192 <#if categoria.vocabularyId== getterUtil.getLong("32255")>
193 <li>${categoria.name}</li>
194 </#if>
195 </#list>
196 </ul>
197 </div>
198 </#if>
199 </div>
200 </article>
201</section>
202</div>