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-3 col-md-4 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("32255") && scopeGroupId==10534) || categoria.vocabularyId== getterUtil.getLong("32620")>
20 <li>${categoria.name}</li>
21 <#break>
22 </#if>
23 </#list>
24 </ul>
25 </#if>
26 <!--Imatge-->
27 <#assign urlImgEntry= "">
28 <#assign altAuxImg= "">
29 <#if act_img_interior.getData()?has_content>
30 <#assign urlImgEntry= act_img_interior.getData()>
31 <#elseif act_img_interior.urlExterna?? && act_img_interior.urlExterna.getData()?has_content>
32 <#assign urlImgEntry= act_img_interior.urlExterna.getData()>
33 </#if>
34 <#if urlImgEntry?has_content>
35 <#if act_img_interior.act_img_alt.getData()?has_content>
36 <#assign altAuxImg= act_img_interior.act_img_alt.getData()>
37 </#if>
38
39 <#-------------------------------------------------------------------------UNIFICACION PLANTILLAS METAINFO IMATGES INI------------------------------------------------------------------------->
40 <#if urlImgEntry?has_content>
41
42 <#----------------------------METAINFO_IMG_GETINFO INI---------------------------->
43
44 <#assign DLFileEntryUtil= serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService")>
45
46 <#assign uuIdImagen= staticUtil['com.liferay.portal.kernel.util.HttpComponentsUtil'].getParameter( urlImgEntry,"uuid",false)!"">
47
48 <#if uuIdImagen!="">
49
50 <#assign groupIdImagen= httpUtil.getParameter( urlImgEntry,"groupId",false)>
51
52 <#assign current= DLFileEntryUtil.fetchDLFileEntryByUuidAndGroupId( uuIdImagen, getterUtil.getLong( groupIdImagen))!"">
53
54 </#if>
55 <#----------------------------METAINFO_IMG_GETINFO FIN---------------------------->
56 <#if current?has_content>
57
58 <#assign structureId="IMATGES">
59 <#assign templateId="IMATGES">
60
61 <#----------------------------METAINFO_EXIST_CONTENT INI---------------------------->
62
63 <#assign journalArticleLocalService= serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")>
64
65 <#assign companyId= current.getCompanyId()>
66 <#assign group_Id= scopeGroupId>
67 <#if current?? && current.getGroupId()?has_content>
68 <#assign group_Id= current.getGroupId()>
69 </#if>
70 <#assign type="general">
71 <#assign title= current.getDescription()>
72
73 <#assign isEmpty=true>
74 <#assign articles="">
75 <#assign currentArticle="">
76
77 <#assign folders=[]>
78 <#assign andOperator=true>
79 <#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)!"">
80 <#if articles?has_content || articles?length gt 0>
81 <#list articles as article>
82 <#if stringUtil.equalsIgnoreCase(article.getTitle(),title)>
83 <#if isEmpty>
84 <#assign isEmpty=false>
85 <#assign currentArticle= article>
86 <#else>
87 <#if currentArticle.getVersion()< article.getVersion()>
88 <#assign currentArticle= article>
89 </#if>
90 </#if>
91 </#if>
92 </#list>
93 </#if>
94
95 <#----------------------------METAINFO_EXIST_CONTENT FIN-------------------------- -->
96 <#if !currentArticle?has_content>
97 <img src="${urlImgEntry}" alt="${altAuxImg}" title="" class="img_section" />
98
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
111
112 <#----------------------------IMATGES FIN-------------------------- -->
113 </#if>
114 <#else>
115
116 <img src="${urlImgEntry}" alt="${altAuxImg}" title="" class="img_section" />
117 </#if>
118 </#if>
119 <#-------------------------------------------------------------------------UNIFICACION PLANTILLAS METAINFO IMATGES INI------------------------------------------------------------------------->
120
121 </#if>
122 <!--Titol-->
123 <div class="titol-activitat text-left" ><a alt="${act_titol.getData()}" title="${act_titol.getData()}" href="${articleUrl}">${act_titol.getData()}</a></div>
124 <!--Resum-->
125 <#if act_resum?? && act_resum.getData()?has_content>
126 <div class="resum-activitat text-left mx-2">${act_resum.getData()}</div>
127 </#if>
128 <!--Dades-->
129 <div class="dades-activitat mx-2 row">
130 <div class="data mt-2">
131 <#assign dataInicial_Data= getterUtil.getString( dataInicial.getData())>
132 <#if dataInicial_Data?has_content>
133 <#assign dataInicial_DateObj= dateUtil.parseDate("yyyy-MM-dd", dataInicial_Data, locale)>
134 </#if>
135
136 <#assign dataFinal_Data= getterUtil.getString( dataFinal.getData())>
137
138 <#if dataFinal_Data?has_content>
139 <#assign dataFinal_DateObj= dateUtil.parseDate("yyyy-MM-dd", dataFinal_Data, locale)>
140 <#assign dataActivitatF = dateUtil.getDate(dataFinal_DateObj,"dd/MM/yyyy",locale)>
141 </#if>
142
143 <#if dataInicial_DateObj?? && dataInicial_DateObj?has_content>
144 <#assign dataActivitat = dateUtil.getDate(dataInicial_DateObj,"dd/MM/yyyy",locale)>
145 </#if>
146
147 <#if dataInicial_Data!= dataFinal_Data>
148
149 <#assign finsText>
150 <@liferay.language key="parc.activitat.fins" />
151 </#assign>
152 <#assign dataActivitat = "Del " + dataActivitat + " " + finsText + " " + dataActivitatF>
153
154 </#if>
155 <#if dataActivitat??>
156 <i class="icon-calendar icon-large"></i> ${dataActivitat}
157 </#if>
158
159
160 </div>
161
162 <#if act_horari.getData()?has_content>
163 <div class="horari mt-2 w-100">
164 <!--<strong><@liferay.language key="parc.activitat.horari"/>:</strong> -->
165 <i class="icon-time icon-large"></i> ${act_horari.getData()}<br />
166 </div>
167 </#if>
168 <#if act_lloc1.getData()?has_content >
169 <div class="lloc mt-2 w-100">
170 <i class="icon-map-marker"></i>
171
172 <#if act_lloc1.getData()?has_content>
173 <!--<strong><@liferay.language key="place"/>:</strong>-->
174 ${act_lloc1.getData()} <br />
175 <#if act_lloc2.getData()?has_content>
176 ${act_lloc2.getData()} <br />
177 </#if>
178 <#if act_poblacio?? && act_poblacio.getData()?has_content>
179 <!--<strong>Població:</strong>-->
180 ${act_poblacio.getData()}<br />
181 </#if>
182 </#if>
183
184 </div>
185 </#if>
186 <#if category?has_content>
187 <div class="parc mt-2">
188 <ul class="parc-activitat p-0">
189 <#list category as categoria>
190 <#if categoria.vocabularyId== getterUtil.getLong("32255")>
191 <li>${categoria.name}</li>
192 </#if>
193 </#list>
194 </ul>
195 </div>
196 </#if>
197 </div>
198 </article>
199</section>
200</div>