Eduki publikatzailea
Deialdi gaurkotuak
Errorea gertatu da txantiloia prozesatzerakoan.
Java method "com.sun.proxy.$Proxy911.getArticleContent(com.liferay.journal.model.JournalArticle, String, String, String, com.liferay.portal.kernel.portlet.PortletRequestModel, com.liferay.portal.kernel.theme.ThemeDisplay)" threw an exception when invoked on com.sun.proxy.$Proxy911 object "com.liferay.journal.service.impl.JournalArticleLocalServiceImpl@2a47f8d2"; see cause exception in the Java stack trace. ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign articleContent = journalArtic... [in template "10112#522485#8158018" at line 154, column 41] ----
1<#assign liferay_ui = taglibLiferayHash["/META-INF/liferay-ui.tld"] />
2
3<#-- Identificador de contenido dentro del publicador. Por defecto empieza en 0, excepto si hay filtrado por categoria o si se ignora el parametro compartido "categoryId", lo que supone no destacar el primer contenido del listado -->
4<#assign itemNumber = 0 />
5
6<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") />
7<#assign ddmStructureLocalService = serviceLocator.findService("com.liferay.dynamic.data.mapping.service.DDMStructureLocalService") />
8<#assign ddmFieldLocalServiceUtil = serviceLocator.findService("com.liferay.dynamic.data.mapping.service.DDMFieldLocalService") />
9
10<ul class="asset-list asset-list-summary">
11
12 <#list entries as entry>
13
14 <#assign entry = entry />
15
16 <#assign assetRenderer = entry.getAssetRenderer() />
17
18 <#assign entryTitle = htmlUtil.escape(assetRenderer.getTitle(locale)) />
19
20 <#assign viewURL = assetPublisherHelper.getAssetViewURL(renderRequest, renderResponse, entry) />
21
22 <#--- Si el contenido web tiene página de visualización (página detalle) se hará uso de la friendly URL--->
23 <#if assetRenderer?has_content && assetRenderer.getArticle??>
24 <#assign journalArticle = assetRenderer.getArticle() />
25 <#if journalArticle?has_content>
26 <#assign layoutUuid = journalArticle.getLayoutUuid() />
27 <#if layoutUuid?has_content >
28 <#assign urlViewContext = assetRenderer.getURLViewInContext(renderRequest, renderResponse, viewURL) />
29 <#assign viewURL = urlViewContext />
30 </#if>
31 </#if>
32 </#if>
33
34
35
36 <#-- Si la URL para mostrar el contenido completo es de la parte publica del sitio web guest se quita de la URL -->
37 <#assign guestPublicSiteURL = "/web/guest" />
38 <#if viewURL?contains(guestPublicSiteURL) >
39 <#assign viewURL = viewURL?replace(guestPublicSiteURL, "") />
40 </#if>
41
42 <li class="asset-summary item-${itemNumber}">
43 <div class="lfr-meta-actions asset-actions">
44 <@getEditIcon />
45 </div>
46
47 <#-- Si el publicador muestra solo contenidos, se muestra cada contenido con la plantilla summary correspondiente al tipo del contenido si existe dicha plantilla, sino aparece mensaje de error -->
48
49 <#assign journalArticleClass = "com.liferay.journal.model.JournalArticle" />
50 <#assign ddmTemplateKey = 0 />
51
52 <#if assetRenderer.getClassName() == journalArticleClass >
53 <#assign journalArticle = assetRenderer.getArticle() />
54 <#assign ddmStructure = journalArticle.getDDMStructure() />
55 <#assign ddmFormValues = ddmFieldLocalServiceUtil.getDDMFormValues(ddmStructure.getDDMForm(), journalArticle.getId())/>
56 <#assign ddmFormFieldValuesMap = ddmFormValues.getDDMFormFieldValuesMap(true)>
57 <#assign structureName = ddmStructure.getName() />
58
59 <#-- Si existe la estructura/tipo de contenido -->
60 <#if ddmStructure?? >
61 <#assign templateName = "Summary" />
62 <#assign ddmTemplates = ddmStructure.getTemplates() />
63
64 <#-- ---------- Si la estructura/tipo de contenido tiene asociadas plantillas/visualizaciones -->
65 <#assign isCall = false />
66 <#assign isOutStanding = false />
67 <#assign isHelp = false />
68
69 <#if (ddmTemplates??)>
70 <#list ddmTemplates as ddmTemplate>
71 <#-- Si la plantilla/visualizacion es de tipo resumen -->
72 <#if ddmTemplate.getName()?contains("Summary") || ddmTemplate.getName()?contains("Laburpena") || ddmTemplate.getName()?contains("Resumen") >
73 <#assign ddmTemplateKeyStr = ddmTemplate.getTemplateKey()/>
74 <#assign ddmTemplateKey = getterUtil.getLongStrict(ddmTemplateKeyStr)/>
75 </#if>
76
77 <#if structureName?contains("Call")>
78 <#assign isCall = true />
79 <#elseif structureName?contains("Outstanding")>
80 <#assign isOutStanding = true />
81 <#elseif structureName?contains("Subvention")>
82 <#assign isHelp = true />
83 </#if>
84 </#list>
85 </#if> <#-- ddmTemplate -->
86
87 <#-- Si existe la plantilla de nombre Summary -->
88 <#if (ddmTemplateKey != 0)>
89 <#if isCall>
90
91 <#assign infoStateUrl = '' />
92 <#assign provisionalStateUrl = '' />
93 <#assign finalStateUrl = '' />
94 <#assign ref = '' />
95
96 <#list ddmFormFieldValuesMap as key,ddmFormFieldValues>
97 <#list ddmFormFieldValues as ddmFormFieldValue>
98 <#if ddmFormFieldValue.getName()=="ehuinfostateurl" && ddmFormFieldValue.getValue()?? && ddmFormFieldValue.getValue().getString(locale)?has_content>
99 <#assign infoStateUrl = ddmFormFieldValue.getValue().getString(locale) />
100 </#if>
101
102 <#if ddmFormFieldValue.getName()=="ehuprovisionalstateurl" && ddmFormFieldValue.getValue()?? && ddmFormFieldValue.getValue().getString(locale)?has_content>
103 <#assign provisionalStateUrl = ddmFormFieldValue.getValue().getString(locale) />
104 </#if>
105
106 <#if ddmFormFieldValue.getName()=="ehufinalstateurl" && ddmFormFieldValue.getValue()?? && ddmFormFieldValue.getValue().getString(locale)?has_content>
107 <#assign finalStateUrl = ddmFormFieldValue.getValue().getString(locale) />
108 </#if>
109
110 </#list>
111 </#list>
112
113
114 <#if infoStateUrl?? && !validator.isBlank(infoStateUrl)>
115 <#assign ref = infoStateUrl />
116 </#if><#-- infoUrl -->
117
118 <#if provisionalStateUrl?? && !validator.isBlank(provisionalStateUrl)>
119 <#assign ref = provisionalStateUrl />
120 </#if><#-- provisionalUrl -->
121
122 <#if finalStateUrl?? && !validator.isBlank(finalStateUrl)>
123 <#assign ref = finalStateUrl />
124 </#if><#-- finalUrl -->
125
126 <#assign protocol = "http">
127 <#if request?? && request?contains("https")>
128 <#assign protocol = "https">
129 </#if>
130 <#assign refProtocol = "http">
131 <#if ref?? && ref?contains("https")>
132 <#assign refProtocol = "https">
133 </#if>
134
135 <#if ref?? && !validator.isBlank( ref )>
136 <#if refProtocol??>
137 <#if ref?contains( refProtocol )>
138 <#assign viewURL = ref/>
139 <#else>
140 <#assign viewURL = refProtocol + "://" + ref/>
141 </#if>
142 <#else>
143 <#assign viewURL = protocol + "://" + ref/>
144 </#if> <#-- refProtocol -->
145 </#if> <#-- ref -->
146
147 </#if><#-- if call -->
148
149 <#assign assetObject = assetRenderer.getAssetObject()/>
150 <#if !isOutStanding >
151 <a href="${viewURL}">
152 </#if><#-- if isOutStanding -->
153
154 <#assign articleContent = journalArticleLocalService.getArticleContent(assetObject, ddmTemplateKeyStr,"VIEW", locale, null, themeDisplay) >
155
156 <#-- Se controla que exista el article -->
157 <#if journalArticleLocalService.fetchDisplayArticle(assetObject.getGroupId(),journalArticle.getArticleId())?? >
158
159
160 <#-- Cambio para que el nombre del link en el publicador no sea demasiado grande y salte error de accesibilidad en informe del ministerio.
161 En los contenidos Ayuda pintamos ahora solo el título para no pintar un texto demasiado largo en el link. El resto lo pintamos tras cerrar el link -->
162 <#if isHelp>
163 <#assign ehutitle = '' />
164
165 <#list ddmFormFieldValuesMap as key,ddmFormFieldValues>
166 <#list ddmFormFieldValues as ddmFormFieldValue>
167
168 <#if ddmFormFieldValue.getName()=="ehutitle" && ddmFormFieldValue.getValue()?? && ddmFormFieldValue.getValue().getString(locale)?has_content>
169 <#assign ehutitle = ddmFormFieldValue.getValue().getString(locale) />
170 </#if>
171 </#list>
172 </#list>
173
174 ${ehutitle}
175
176 <#else>
177 ${articleContent}
178 </#if> <#-- if help -->
179
180 </#if> <#-- if fetchDisplayArticle -->
181
182 <#if !isOutStanding >
183 </a>
184 <#if isHelp>
185 ${articleContent}
186 </#if>
187 </#if><#-- if isOutStanding -->
188
189 <#-- Si NO existe la plantilla de nombre Summary mensaje de error -->
190 <#else>
191 <div class="alert alert-error"> ${ddmStructure.getNameCurrentValue()} <@liferay.language key="ehu.error.structure-has-no-summary-template-select-another-template" /></div>
192 </#if>
193
194 <@getMetadataField fieldName="tags" />
195
196 <@getMetadataField fieldName="create-date" />
197
198 <@getMetadataField fieldName="view-count" />
199
200 <@getMetadataField fieldName="author" />
201
202 <@getRatings />
203
204 <@getRelatedAssets />
205
206 <@getDiscussion />
207 </#if> <#-- si existe la estructura -->
208 <#assign itemNumber = itemNumber + 1 />
209
210 <#-- si no es un journalArticleClass-->
211 <#else>
212 <h3 class="asset-title">
213 <#if assetRenderer?has_content && assetRenderer.getIconPath?has_content>
214 <a href="${viewURL}"><img alt="" src="${assetRenderer.getIconPath(renderRequest)}" />${entryTitle}</a>
215 </#if>
216 </h3>
217
218 <@getMetadataField fieldName="tags" />
219
220 <@getMetadataField fieldName="create-date" />
221
222 <@getMetadataField fieldName="view-count" />
223
224 <div class="asset-content">
225 <@getSocialBookmarks />
226
227 <div class="asset-summary">
228 <@getMetadataField fieldName="author" />
229
230 ${htmlUtil.escape(assetRenderer.getSummary(renderRequest, renderResponse))}
231
232 <a href="${viewURL}"><@liferay.language key="read-more" /><span class="sr-only"><@liferay.language key="about" />${entryTitle}</span> »</a>
233 </div>
234
235 <@getRatings />
236
237 <@getRelatedAssets />
238
239 <@getDiscussion />
240 </div>
241 </#if>
242
243 </li>
244 </#list>
245</ul>
246
247<#macro getDiscussion >
248 <#if enableComments??>
249 <#if assetRenderer?? && assetRenderer.getDiscussionPath()?? && (enableComments == "true")>
250 <br />
251
252 <#assign discussionURL = renderResponse.createActionURL() />
253
254 ${discussionURL.setParameter("struts_action", "/asset_publisher/" + assetRenderer.getDiscussionPath())}
255
256 <@liferay_ui["discussion"]
257 className=entry.getClassName()
258 classPK=entry.getClassPK()
259 formAction=discussionURL?string
260 formName="fm" + entry.getClassPK()
261 ratingsEnabled=enableCommentRatings == "true"
262 redirect=portalUtil.getCurrentURL(request)
263 userId=assetRenderer.getUserId()
264 />
265 </#if>
266 </#if>
267</#macro>
268
269<#macro getEditIcon>
270 <#if assetRenderer.hasEditPermission(themeDisplay.getPermissionChecker())>
271 <#assign editPortletURL = assetRenderer.getURLEdit(renderRequest, renderResponse, windowStateFactory.getWindowState("NORMAL"), themeDisplay.getURLCurrent())!"" />
272
273 <#if validator.isNotNull(editPortletURL)>
274 <#assign title = languageUtil.format(locale, "edit-x", entryTitle) />
275
276 <@liferay_ui["icon"]
277 image="edit"
278 message=title
279 url=editPortletURL.toString()
280 />
281 </#if>
282 </#if>
283</#macro>
284
285<#macro getFlagsIcon>
286 <#if enableFlags??>
287 <#if enableFlags == "true">
288 <@liferay_ui["flags"]
289 className=entry.getClassName()
290 classPK=entry.getClassPK()
291 contentTitle=entry.getTitle(locale)
292 label=false
293 reportedUserId=entry.getUserId()
294 />
295 </#if>
296 </#if>
297</#macro>
298
299<#macro getMetadataField
300 fieldName
301>
302 <#if stringUtil.split(metadataFields)?seq_contains(fieldName)>
303 <span class="metadata-entry metadata-${fieldName}">
304 <#assign dateFormat = "dd MMM yyyy - HH:mm:ss" />
305
306 <#if fieldName == "author">
307 ${portalUtil.getUserName(assetRenderer.getUserId(), assetRenderer.getUserName())}
308 <#elseif fieldName == "categories">
309 <@liferay_ui["asset-categories-summary"]
310 className=entry.getClassName()
311 classPK=entry.getClassPK()
312 portletURL=renderResponse.createRenderURL()
313 />
314 <#elseif fieldName == "create-date">
315 ${dateUtil.getDate(entry.getCreateDate(), dateFormat, locale)}
316 <#elseif fieldName == "expiration-date">
317 ${dateUtil.getDate(entry.getExpirationDate(), dateFormat, locale)}
318 <#elseif fieldName == "modified-date">
319 ${dateUtil.getDate(entry.getModifiedDate(), dateFormat, locale)}
320 <#elseif fieldName == "priority">
321 ${entry.getPriority()}
322 <#elseif fieldName == "publish-date">
323 ${dateUtil.getDate(entry.getPublishDate(), dateFormat, locale)}
324 <#elseif fieldName == "tags">
325 <@liferay_ui["asset-tags-summary"]
326 className=entry.getClassName()
327 classPK=entry.getClassPK()
328 portletURL=renderResponse.createRenderURL()
329 />
330 <#elseif fieldName == "view-count">
331 <@liferay_ui["icon"]
332 image="history"
333 />
334
335 ${entry.getViewCount()} <@liferay.language key="views" />
336 </#if>
337 </span>
338 </#if>
339</#macro>
340
341<#macro getPrintIcon>
342 <#if enablePrint??>
343 <#if enablePrint == "true" >
344 <#assign printURL = renderResponse.createRenderURL() />
345
346 ${printURL.setParameter("struts_action", "/asset_publisher/view_content")}
347 ${printURL.setParameter("assetEntryId", entry.getEntryId()?string)}
348 ${printURL.setParameter("viewMode", "print")}
349 ${printURL.setParameter("type", entry.getAssetRendererFactory().getType())}
350
351 <#if (validator.isNotNull(assetRenderer.getUrlTitle()))>
352 <#if (assetRenderer.getGroupId() != themeDisplay.getScopeGroupId())>
353 ${printURL.setParameter("groupId", assetRenderer.getGroupId()?string)}
354 </#if>
355
356 ${printURL.setParameter("urlTitle", assetRenderer.getUrlTitle())}
357 </#if>
358
359 ${printURL.setWindowState("pop_up")}
360
361 <@liferay_ui["icon"]
362 image="print"
363 message="print"
364 url="javascript:Liferay.Util.openWindow({id:'" + renderResponse.getNamespace() + "printAsset', title: '" + languageUtil.format(locale, "print-x-x", ["sr-only", entryTitle]) + "', uri: '" + htmlUtil.escapeURL(printURL.toString()) + "'});"
365 />
366 </#if>
367 </#if>
368</#macro>
369
370<#macro getRatings>
371 <#if enableRatings??>
372 <#if (enableRatings == "true")>
373 <div class="asset-ratings">
374 <@liferay_ui["ratings"]
375 className=entry.getClassName()
376 classPK=entry.getClassPK()
377 />
378 </div>
379 </#if>
380 </#if>
381</#macro>
382
383<#macro getRelatedAssets>
384 <#if enableRelatedAssets??>
385 <#if assetEntry?? && enableRelatedAssets == "true">
386 <@liferay_ui["asset-links"]
387 assetEntryId=entry.getEntryId()/>
388 </#if>
389 </#if>
390</#macro>
391
392<#macro getSocialBookmarks>
393 <#if enableSocialBookmarks??>
394 <#if enableSocialBookmarks?has_content && enableSocialBookmarks == "true">
395 <@liferay_ui["social-bookmarks"]
396 displayStyle="${socialBookmarksDisplayStyle}"
397 target="_blank"
398 title=entry.getTitle(locale)
399 url=viewURL
400 />
401 </#if>
402 </#if>
403</#macro>
—
5 elementu orrialdeko
Albisteak
Errorea gertatu da txantiloia prozesatzerakoan.
Java method "com.sun.proxy.$Proxy911.getArticleContent(com.liferay.journal.model.JournalArticle, String, String, String, com.liferay.portal.kernel.portlet.PortletRequestModel, com.liferay.portal.kernel.theme.ThemeDisplay)" threw an exception when invoked on com.sun.proxy.$Proxy911 object "com.liferay.journal.service.impl.JournalArticleLocalServiceImpl@2a47f8d2"; see cause exception in the Java stack trace. ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign articleContent = journalArtic... [in template "10112#522485#8158018" at line 154, column 41] ----
1<#assign liferay_ui = taglibLiferayHash["/META-INF/liferay-ui.tld"] />
2
3<#-- Identificador de contenido dentro del publicador. Por defecto empieza en 0, excepto si hay filtrado por categoria o si se ignora el parametro compartido "categoryId", lo que supone no destacar el primer contenido del listado -->
4<#assign itemNumber = 0 />
5
6<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") />
7<#assign ddmStructureLocalService = serviceLocator.findService("com.liferay.dynamic.data.mapping.service.DDMStructureLocalService") />
8<#assign ddmFieldLocalServiceUtil = serviceLocator.findService("com.liferay.dynamic.data.mapping.service.DDMFieldLocalService") />
9
10<ul class="asset-list asset-list-summary">
11
12 <#list entries as entry>
13
14 <#assign entry = entry />
15
16 <#assign assetRenderer = entry.getAssetRenderer() />
17
18 <#assign entryTitle = htmlUtil.escape(assetRenderer.getTitle(locale)) />
19
20 <#assign viewURL = assetPublisherHelper.getAssetViewURL(renderRequest, renderResponse, entry) />
21
22 <#--- Si el contenido web tiene página de visualización (página detalle) se hará uso de la friendly URL--->
23 <#if assetRenderer?has_content && assetRenderer.getArticle??>
24 <#assign journalArticle = assetRenderer.getArticle() />
25 <#if journalArticle?has_content>
26 <#assign layoutUuid = journalArticle.getLayoutUuid() />
27 <#if layoutUuid?has_content >
28 <#assign urlViewContext = assetRenderer.getURLViewInContext(renderRequest, renderResponse, viewURL) />
29 <#assign viewURL = urlViewContext />
30 </#if>
31 </#if>
32 </#if>
33
34
35
36 <#-- Si la URL para mostrar el contenido completo es de la parte publica del sitio web guest se quita de la URL -->
37 <#assign guestPublicSiteURL = "/web/guest" />
38 <#if viewURL?contains(guestPublicSiteURL) >
39 <#assign viewURL = viewURL?replace(guestPublicSiteURL, "") />
40 </#if>
41
42 <li class="asset-summary item-${itemNumber}">
43 <div class="lfr-meta-actions asset-actions">
44 <@getEditIcon />
45 </div>
46
47 <#-- Si el publicador muestra solo contenidos, se muestra cada contenido con la plantilla summary correspondiente al tipo del contenido si existe dicha plantilla, sino aparece mensaje de error -->
48
49 <#assign journalArticleClass = "com.liferay.journal.model.JournalArticle" />
50 <#assign ddmTemplateKey = 0 />
51
52 <#if assetRenderer.getClassName() == journalArticleClass >
53 <#assign journalArticle = assetRenderer.getArticle() />
54 <#assign ddmStructure = journalArticle.getDDMStructure() />
55 <#assign ddmFormValues = ddmFieldLocalServiceUtil.getDDMFormValues(ddmStructure.getDDMForm(), journalArticle.getId())/>
56 <#assign ddmFormFieldValuesMap = ddmFormValues.getDDMFormFieldValuesMap(true)>
57 <#assign structureName = ddmStructure.getName() />
58
59 <#-- Si existe la estructura/tipo de contenido -->
60 <#if ddmStructure?? >
61 <#assign templateName = "Summary" />
62 <#assign ddmTemplates = ddmStructure.getTemplates() />
63
64 <#-- ---------- Si la estructura/tipo de contenido tiene asociadas plantillas/visualizaciones -->
65 <#assign isCall = false />
66 <#assign isOutStanding = false />
67 <#assign isHelp = false />
68
69 <#if (ddmTemplates??)>
70 <#list ddmTemplates as ddmTemplate>
71 <#-- Si la plantilla/visualizacion es de tipo resumen -->
72 <#if ddmTemplate.getName()?contains("Summary") || ddmTemplate.getName()?contains("Laburpena") || ddmTemplate.getName()?contains("Resumen") >
73 <#assign ddmTemplateKeyStr = ddmTemplate.getTemplateKey()/>
74 <#assign ddmTemplateKey = getterUtil.getLongStrict(ddmTemplateKeyStr)/>
75 </#if>
76
77 <#if structureName?contains("Call")>
78 <#assign isCall = true />
79 <#elseif structureName?contains("Outstanding")>
80 <#assign isOutStanding = true />
81 <#elseif structureName?contains("Subvention")>
82 <#assign isHelp = true />
83 </#if>
84 </#list>
85 </#if> <#-- ddmTemplate -->
86
87 <#-- Si existe la plantilla de nombre Summary -->
88 <#if (ddmTemplateKey != 0)>
89 <#if isCall>
90
91 <#assign infoStateUrl = '' />
92 <#assign provisionalStateUrl = '' />
93 <#assign finalStateUrl = '' />
94 <#assign ref = '' />
95
96 <#list ddmFormFieldValuesMap as key,ddmFormFieldValues>
97 <#list ddmFormFieldValues as ddmFormFieldValue>
98 <#if ddmFormFieldValue.getName()=="ehuinfostateurl" && ddmFormFieldValue.getValue()?? && ddmFormFieldValue.getValue().getString(locale)?has_content>
99 <#assign infoStateUrl = ddmFormFieldValue.getValue().getString(locale) />
100 </#if>
101
102 <#if ddmFormFieldValue.getName()=="ehuprovisionalstateurl" && ddmFormFieldValue.getValue()?? && ddmFormFieldValue.getValue().getString(locale)?has_content>
103 <#assign provisionalStateUrl = ddmFormFieldValue.getValue().getString(locale) />
104 </#if>
105
106 <#if ddmFormFieldValue.getName()=="ehufinalstateurl" && ddmFormFieldValue.getValue()?? && ddmFormFieldValue.getValue().getString(locale)?has_content>
107 <#assign finalStateUrl = ddmFormFieldValue.getValue().getString(locale) />
108 </#if>
109
110 </#list>
111 </#list>
112
113
114 <#if infoStateUrl?? && !validator.isBlank(infoStateUrl)>
115 <#assign ref = infoStateUrl />
116 </#if><#-- infoUrl -->
117
118 <#if provisionalStateUrl?? && !validator.isBlank(provisionalStateUrl)>
119 <#assign ref = provisionalStateUrl />
120 </#if><#-- provisionalUrl -->
121
122 <#if finalStateUrl?? && !validator.isBlank(finalStateUrl)>
123 <#assign ref = finalStateUrl />
124 </#if><#-- finalUrl -->
125
126 <#assign protocol = "http">
127 <#if request?? && request?contains("https")>
128 <#assign protocol = "https">
129 </#if>
130 <#assign refProtocol = "http">
131 <#if ref?? && ref?contains("https")>
132 <#assign refProtocol = "https">
133 </#if>
134
135 <#if ref?? && !validator.isBlank( ref )>
136 <#if refProtocol??>
137 <#if ref?contains( refProtocol )>
138 <#assign viewURL = ref/>
139 <#else>
140 <#assign viewURL = refProtocol + "://" + ref/>
141 </#if>
142 <#else>
143 <#assign viewURL = protocol + "://" + ref/>
144 </#if> <#-- refProtocol -->
145 </#if> <#-- ref -->
146
147 </#if><#-- if call -->
148
149 <#assign assetObject = assetRenderer.getAssetObject()/>
150 <#if !isOutStanding >
151 <a href="${viewURL}">
152 </#if><#-- if isOutStanding -->
153
154 <#assign articleContent = journalArticleLocalService.getArticleContent(assetObject, ddmTemplateKeyStr,"VIEW", locale, null, themeDisplay) >
155
156 <#-- Se controla que exista el article -->
157 <#if journalArticleLocalService.fetchDisplayArticle(assetObject.getGroupId(),journalArticle.getArticleId())?? >
158
159
160 <#-- Cambio para que el nombre del link en el publicador no sea demasiado grande y salte error de accesibilidad en informe del ministerio.
161 En los contenidos Ayuda pintamos ahora solo el título para no pintar un texto demasiado largo en el link. El resto lo pintamos tras cerrar el link -->
162 <#if isHelp>
163 <#assign ehutitle = '' />
164
165 <#list ddmFormFieldValuesMap as key,ddmFormFieldValues>
166 <#list ddmFormFieldValues as ddmFormFieldValue>
167
168 <#if ddmFormFieldValue.getName()=="ehutitle" && ddmFormFieldValue.getValue()?? && ddmFormFieldValue.getValue().getString(locale)?has_content>
169 <#assign ehutitle = ddmFormFieldValue.getValue().getString(locale) />
170 </#if>
171 </#list>
172 </#list>
173
174 ${ehutitle}
175
176 <#else>
177 ${articleContent}
178 </#if> <#-- if help -->
179
180 </#if> <#-- if fetchDisplayArticle -->
181
182 <#if !isOutStanding >
183 </a>
184 <#if isHelp>
185 ${articleContent}
186 </#if>
187 </#if><#-- if isOutStanding -->
188
189 <#-- Si NO existe la plantilla de nombre Summary mensaje de error -->
190 <#else>
191 <div class="alert alert-error"> ${ddmStructure.getNameCurrentValue()} <@liferay.language key="ehu.error.structure-has-no-summary-template-select-another-template" /></div>
192 </#if>
193
194 <@getMetadataField fieldName="tags" />
195
196 <@getMetadataField fieldName="create-date" />
197
198 <@getMetadataField fieldName="view-count" />
199
200 <@getMetadataField fieldName="author" />
201
202 <@getRatings />
203
204 <@getRelatedAssets />
205
206 <@getDiscussion />
207 </#if> <#-- si existe la estructura -->
208 <#assign itemNumber = itemNumber + 1 />
209
210 <#-- si no es un journalArticleClass-->
211 <#else>
212 <h3 class="asset-title">
213 <#if assetRenderer?has_content && assetRenderer.getIconPath?has_content>
214 <a href="${viewURL}"><img alt="" src="${assetRenderer.getIconPath(renderRequest)}" />${entryTitle}</a>
215 </#if>
216 </h3>
217
218 <@getMetadataField fieldName="tags" />
219
220 <@getMetadataField fieldName="create-date" />
221
222 <@getMetadataField fieldName="view-count" />
223
224 <div class="asset-content">
225 <@getSocialBookmarks />
226
227 <div class="asset-summary">
228 <@getMetadataField fieldName="author" />
229
230 ${htmlUtil.escape(assetRenderer.getSummary(renderRequest, renderResponse))}
231
232 <a href="${viewURL}"><@liferay.language key="read-more" /><span class="sr-only"><@liferay.language key="about" />${entryTitle}</span> »</a>
233 </div>
234
235 <@getRatings />
236
237 <@getRelatedAssets />
238
239 <@getDiscussion />
240 </div>
241 </#if>
242
243 </li>
244 </#list>
245</ul>
246
247<#macro getDiscussion >
248 <#if enableComments??>
249 <#if assetRenderer?? && assetRenderer.getDiscussionPath()?? && (enableComments == "true")>
250 <br />
251
252 <#assign discussionURL = renderResponse.createActionURL() />
253
254 ${discussionURL.setParameter("struts_action", "/asset_publisher/" + assetRenderer.getDiscussionPath())}
255
256 <@liferay_ui["discussion"]
257 className=entry.getClassName()
258 classPK=entry.getClassPK()
259 formAction=discussionURL?string
260 formName="fm" + entry.getClassPK()
261 ratingsEnabled=enableCommentRatings == "true"
262 redirect=portalUtil.getCurrentURL(request)
263 userId=assetRenderer.getUserId()
264 />
265 </#if>
266 </#if>
267</#macro>
268
269<#macro getEditIcon>
270 <#if assetRenderer.hasEditPermission(themeDisplay.getPermissionChecker())>
271 <#assign editPortletURL = assetRenderer.getURLEdit(renderRequest, renderResponse, windowStateFactory.getWindowState("NORMAL"), themeDisplay.getURLCurrent())!"" />
272
273 <#if validator.isNotNull(editPortletURL)>
274 <#assign title = languageUtil.format(locale, "edit-x", entryTitle) />
275
276 <@liferay_ui["icon"]
277 image="edit"
278 message=title
279 url=editPortletURL.toString()
280 />
281 </#if>
282 </#if>
283</#macro>
284
285<#macro getFlagsIcon>
286 <#if enableFlags??>
287 <#if enableFlags == "true">
288 <@liferay_ui["flags"]
289 className=entry.getClassName()
290 classPK=entry.getClassPK()
291 contentTitle=entry.getTitle(locale)
292 label=false
293 reportedUserId=entry.getUserId()
294 />
295 </#if>
296 </#if>
297</#macro>
298
299<#macro getMetadataField
300 fieldName
301>
302 <#if stringUtil.split(metadataFields)?seq_contains(fieldName)>
303 <span class="metadata-entry metadata-${fieldName}">
304 <#assign dateFormat = "dd MMM yyyy - HH:mm:ss" />
305
306 <#if fieldName == "author">
307 ${portalUtil.getUserName(assetRenderer.getUserId(), assetRenderer.getUserName())}
308 <#elseif fieldName == "categories">
309 <@liferay_ui["asset-categories-summary"]
310 className=entry.getClassName()
311 classPK=entry.getClassPK()
312 portletURL=renderResponse.createRenderURL()
313 />
314 <#elseif fieldName == "create-date">
315 ${dateUtil.getDate(entry.getCreateDate(), dateFormat, locale)}
316 <#elseif fieldName == "expiration-date">
317 ${dateUtil.getDate(entry.getExpirationDate(), dateFormat, locale)}
318 <#elseif fieldName == "modified-date">
319 ${dateUtil.getDate(entry.getModifiedDate(), dateFormat, locale)}
320 <#elseif fieldName == "priority">
321 ${entry.getPriority()}
322 <#elseif fieldName == "publish-date">
323 ${dateUtil.getDate(entry.getPublishDate(), dateFormat, locale)}
324 <#elseif fieldName == "tags">
325 <@liferay_ui["asset-tags-summary"]
326 className=entry.getClassName()
327 classPK=entry.getClassPK()
328 portletURL=renderResponse.createRenderURL()
329 />
330 <#elseif fieldName == "view-count">
331 <@liferay_ui["icon"]
332 image="history"
333 />
334
335 ${entry.getViewCount()} <@liferay.language key="views" />
336 </#if>
337 </span>
338 </#if>
339</#macro>
340
341<#macro getPrintIcon>
342 <#if enablePrint??>
343 <#if enablePrint == "true" >
344 <#assign printURL = renderResponse.createRenderURL() />
345
346 ${printURL.setParameter("struts_action", "/asset_publisher/view_content")}
347 ${printURL.setParameter("assetEntryId", entry.getEntryId()?string)}
348 ${printURL.setParameter("viewMode", "print")}
349 ${printURL.setParameter("type", entry.getAssetRendererFactory().getType())}
350
351 <#if (validator.isNotNull(assetRenderer.getUrlTitle()))>
352 <#if (assetRenderer.getGroupId() != themeDisplay.getScopeGroupId())>
353 ${printURL.setParameter("groupId", assetRenderer.getGroupId()?string)}
354 </#if>
355
356 ${printURL.setParameter("urlTitle", assetRenderer.getUrlTitle())}
357 </#if>
358
359 ${printURL.setWindowState("pop_up")}
360
361 <@liferay_ui["icon"]
362 image="print"
363 message="print"
364 url="javascript:Liferay.Util.openWindow({id:'" + renderResponse.getNamespace() + "printAsset', title: '" + languageUtil.format(locale, "print-x-x", ["sr-only", entryTitle]) + "', uri: '" + htmlUtil.escapeURL(printURL.toString()) + "'});"
365 />
366 </#if>
367 </#if>
368</#macro>
369
370<#macro getRatings>
371 <#if enableRatings??>
372 <#if (enableRatings == "true")>
373 <div class="asset-ratings">
374 <@liferay_ui["ratings"]
375 className=entry.getClassName()
376 classPK=entry.getClassPK()
377 />
378 </div>
379 </#if>
380 </#if>
381</#macro>
382
383<#macro getRelatedAssets>
384 <#if enableRelatedAssets??>
385 <#if assetEntry?? && enableRelatedAssets == "true">
386 <@liferay_ui["asset-links"]
387 assetEntryId=entry.getEntryId()/>
388 </#if>
389 </#if>
390</#macro>
391
392<#macro getSocialBookmarks>
393 <#if enableSocialBookmarks??>
394 <#if enableSocialBookmarks?has_content && enableSocialBookmarks == "true">
395 <@liferay_ui["social-bookmarks"]
396 displayStyle="${socialBookmarksDisplayStyle}"
397 target="_blank"
398 title=entry.getTitle(locale)
399 url=viewURL
400 />
401 </#if>
402 </#if>
403</#macro>
—
5 elementu orrialdeko
Eduki publikatzailea
Banner