Corporación
Luis Miguel Serrador Marciel
Información
Partido Político:
PSOE
An error occurred while processing the template.
Error on line 31, column 25 in 10154#10194#305728
journalTool.getJournalArticleByAssetEntry(entry) is undefined.
It cannot be assigned to journalArticle
1<#assign journalTool = utilLocator.findUtil("lportal-6.2-GA3-hook", "as.asac.velocity.tools.JournalTool")/> 
2<#assign dlTool= utilLocator.findUtil("lportal-6.2-GA3-hook", "as.asac.velocity.tools.DLTool")/> 
3<#assign assetPublisherTool = utilLocator.findUtil("lportal-6.2-GA3-hook", "as.asac.velocity.tools.AssetPublisherTool")/> 
4 
5<#assign spanClass = "span8">		 
6 
7<#assign liferay_ui = taglibLiferayHash["/WEB-INF/tld/liferay-ui.tld"] /> 
8<#assign portletURL = assetPublisherTool.getAssetPublisherPortletURL(renderResponse, themeDisplay, portletSetupLinkToLayoutUuid) /> 
9 
10<div class="template-assets"> 
11<#list entries as entry> 
12	<#assign entry = entry /> 
13 
14	<#assign assetRenderer = entry.getAssetRenderer() /> 
15 
16	<#assign entryTitle = entry.getTitle(locale) /> 
17	<#if entry.getClassName() = "com.liferay.portlet.journal.model.JournalArticle"> 
18		<#assign entryTitle = journalTool.getJournalArticleTitleFromAsset(entry, ["Titulo","Nombre"], locale) /> 
19	</#if> 
20 
21	<#assign viewURL = assetPublisherTool.getAssetViewURL(renderRequest, renderResponse, entry, portletURL) /> 
22 
23	<#if assetLinkBehavior != "showFullContent"> 
24		<#assign viewURL = assetRenderer.getURLViewInContext(renderRequest, renderResponse, viewURL) /> 
25	</#if> 
26 
27	<div class="template list row-fluid"> 
28		 
29		 
30		<#if entry.getClassName() = "com.liferay.portlet.journal.model.JournalArticle"> 
31			<#assign journalArticle = journalTool.getJournalArticleByAssetEntry(entry) /> 
32			<#if validator.isNotNull(journalArticle.getSmallImageURL())> 
33				<#assign imagePath = dlTool.getThumbnail(journalArticle.getSmallImageURL(), 2)> 
34				<#assign imageBg = htmlUtil.escape(imagePath)>				 
35				<span class="span4 image-wrapper image-wrapper-cover" style="background-image: url(${htmlUtil.escape(imagePath)});">				   
36					<img class="image" src="${htmlUtil.escape(imagePath)}" alt="<@liferay.language key="image" /> ${htmlUtil.escape(entryTitle)}"/> 
37				</span> 
38			<#else> 
39				<#assign imagePath = themeDisplay.getCompanyLogo()> 
40				<span class="span4 image-wrapper image-wrapper-initial" style="background-image: url(${htmlUtil.escape(imagePath)});">				   
41					<img class="image" src="${htmlUtil.escape(imagePath)}" alt="<@liferay.language key="image" /> ${htmlUtil.escape(entryTitle)}"/> 
42				</span> 
43			</#if> 
44		<#elseif entry.getClassName() = "com.liferay.calendar.model.CalendarBooking"> 
45			 
46			<#if validator.isNotNull(assetRenderer.getThumbnailPath(renderRequest))> 
47				<#assign imagePath = assetRenderer.getThumbnailPath(renderRequest)> 
48				<#assign imageBg = htmlUtil.escape(imagePath)>				 
49				<span class="span4 image-wrapper image-wrapper-cover" style="background-image: url(${htmlUtil.escape(imagePath)});">				   
50					<img class="image" src="${htmlUtil.escape(imagePath)}" alt="<@liferay.language key="image" /> ${htmlUtil.escape(entryTitle)}"/> 
51				</span> 
52			<#else> 
53				<#assign imagePath = themeDisplay.getCompanyLogo()> 
54				<span class="span4 image-wrapper image-wrapper-initial" style="background-image: url(${htmlUtil.escape(imagePath)});">				   
55					<img class="image" src="${htmlUtil.escape(imagePath)}" alt="<@liferay.language key="image" /> ${htmlUtil.escape(entryTitle)}"/> 
56				</span> 
57			</#if> 
58		<#else> 
59			<#assign imagePath = themeDisplay.getCompanyLogo()> 
60			<span class="span4 image-wrapper image-wrapper-initial" style="background-image: url(${htmlUtil.escape(imagePath)});">				   
61				<img class="image" src="${htmlUtil.escape(imagePath)}" alt="<@liferay.language key="image" /> ${htmlUtil.escape(entryTitle)}"/> 
62			</span> 
63		</#if> 
64		 
65		<div class="${spanClass}"> 
66		 
67			<div class="lfr-meta-actions asset-actions"> 
68				<@getPrintIcon /> 
69 
70				<@getFlagsIcon /> 
71 
72				<@getEditIcon /> 
73			</div> 
74			 
75			<@getMetadataField fieldName="create-date" /> 
76			 
77			<@getMetadataField fieldName="expiration-date" /> 
78			 
79			<@getMetadataField fieldName="modified-date" /> 
80			 
81			<@getMetadataField fieldName="publish-date" /> 
82 
83			<a class="title" href="${viewURL}">${entryTitle}</a> 
84			 
85			<#if enableSocialBookmarks == "true"> 
86				<a id="share-link-image-${entry.getEntryId()}" class="share-link-image"><@liferay.language key="share" /></a>  
87				<script type="text/javascript"> 
88					AUI().ready( 
89						'aui-node', 
90						function(A) { 
91							if (typeof stWidget != 'undefined') 
92								stWidget.addEntry({ 
93										"onhover":false, 
94										 "service":"sharethis", 
95										 "element":document.getElementById('share-link-image-${entry.getEntryId()}'), 
96										 "url":"${htmlUtil.escape(viewURL)}", 
97										 "title":"${htmlUtil.escape(entryTitle)}", 
98										 "type":"custom", 
99										 "image":"${htmlUtil.escapeURL(imagePath)}" 
100								 }); 
101							  
102					 }); 
103				</script> 
104			</#if> 
105 
106			<@getMetadataField fieldName="tags" /> 
107			 
108			<@getMetadataField fieldName="priority" /> 
109			 
110			<@getMetadataField fieldName="categories" /> 
111 
112			<@getMetadataField fieldName="view-count" /> 
113			 
114			<@getMetadataField fieldName="author" /> 
115 
116			<div class="text"> 
117				${stringUtil.shorten(htmlUtil.extractText(assetRenderer.getSummary(locale)), 350)} 
118				<a href="${viewURL}"><@liferay.language key="read-more" /><span class="hide-accessible"><@liferay.language key="about" />${entryTitle}</span> &raquo;</a> 
119			</div> 
120 
121			<@getRatings /> 
122 
123			<@getRelatedAssets /> 
124 
125			<@getDiscussion /> 
126			 
127		</div> 
128	</div> 
129 
130</#list> 
131</div> 
132 
133<#macro getDiscussion> 
134	<#if validator.isNotNull(assetRenderer.getDiscussionPath()) && (enableComments == "true")> 
135		<br /> 
136 
137		<#assign discussionURL = renderResponse.createActionURL() /> 
138 
139		${discussionURL.setParameter("struts_action", "/asset_publisher/" + assetRenderer.getDiscussionPath())} 
140 
141		<@liferay_ui["discussion"] 
142			className=entry.getClassName() 
143			classPK=entry.getClassPK() 
144			formAction=discussionURL?string 
145			formName="fm" + entry.getClassPK() 
146			ratingsEnabled=enableCommentRatings == "true" 
147			redirect=portalUtil.getCurrentURL(request) 
148			userId=assetRenderer.getUserId() 
149		/> 
150	</#if> 
151</#macro> 
152 
153<#macro getEditIcon> 
154	<#if assetRenderer.hasEditPermission(themeDisplay.getPermissionChecker())> 
155		<#assign redirectURL = renderResponse.createRenderURL() /> 
156 
157		${redirectURL.setParameter("struts_action", "/asset_publisher/add_asset_redirect")} 
158		${redirectURL.setWindowState("pop_up")} 
159 
160		<#assign editPortletURL = assetRenderer.getURLEdit(renderRequest, renderResponse, windowStateFactory.getWindowState("pop_up"), redirectURL)!"" /> 
161 
162		<#if validator.isNotNull(editPortletURL)> 
163			<#assign title = languageUtil.format(locale, "edit-x", entryTitle) /> 
164 
165			<@liferay_ui["icon"] 
166				image="edit" 
167				message=title 
168				url="javascript:Liferay.Util.openWindow({dialog: {width: 960}, id:'" + renderResponse.getNamespace() + "editAsset', title: '" + title + "', uri:'" + htmlUtil.escapeURL(editPortletURL.toString()) + "'});" 
169			/> 
170		</#if> 
171	</#if> 
172</#macro> 
173 
174<#macro getFlagsIcon> 
175	<#if enableFlags == "true"> 
176		<@liferay_ui["flags"] 
177			className=entry.getClassName() 
178			classPK=entry.getClassPK() 
179			contentTitle=entry.getTitle(locale) 
180			label=false 
181			reportedUserId=entry.getUserId() 
182		/> 
183	</#if> 
184</#macro> 
185 
186<#macro getMetadataField 
187	fieldName 
188
189	<#if stringUtil.split(metadataFields)?seq_contains(fieldName)> 
190		<span class="metadata-entry metadata-${fieldName}"> 
191			<#assign dateFormat = "dd MMM yyyy" /> 
192 
193			<#if fieldName == "author"> 
194				<@liferay.language key="by" /> ${portalUtil.getUserName(assetRenderer.getUserId(), assetRenderer.getUserName())} 
195			<#elseif fieldName == "categories"> 
196				<@liferay_ui["asset-categories-summary"] 
197					className=entry.getClassName() 
198					classPK=entry.getClassPK() 
199					portletURL=renderResponse.createRenderURL() 
200				/> 
201			<#elseif fieldName == "create-date"> 
202				${dateUtil.getDate(entry.getCreateDate(), dateFormat, locale, themeDisplay.getTimeZone())} 
203			<#elseif fieldName == "expiration-date"> 
204				${dateUtil.getDate(entry.getExpirationDate(), dateFormat, locale, themeDisplay.getTimeZone())} 
205			<#elseif fieldName == "modified-date"> 
206				${dateUtil.getDate(entry.getModifiedDate(), dateFormat, locale, themeDisplay.getTimeZone())} 
207			<#elseif fieldName == "priority"> 
208				${entry.getPriority()} 
209			<#elseif fieldName == "publish-date"> 
210				<#if entry.getClassName() = "com.liferay.portlet.journal.model.JournalArticle"> 
211					<div class="date">${dateUtil.getDate(entry.getPublishDate(), dateFormat, locale, themeDisplay.getTimeZone())}</div> 
212				</#if> 
213				 
214				<#if entry.getClassName() = "com.liferay.calendar.model.CalendarBooking"> 
215					<div class="date">${dateUtil.getDate(assetRenderer.getDisplayDate(), dateFormat, locale, themeDisplay.getTimeZone())}</div> 
216				</#if> 
217			<#elseif fieldName == "tags"> 
218				<@liferay_ui["asset-tags-summary"] 
219					className=entry.getClassName() 
220					classPK=entry.getClassPK() 
221					portletURL=renderResponse.createRenderURL() 
222				/> 
223			<#elseif fieldName == "view-count"> 
224				<@liferay_ui["icon"] 
225					image="history" 
226				/> 
227 
228				${entry.getViewCount()} <@liferay.language key="views" /> 
229			</#if> 
230		</span> 
231	</#if> 
232</#macro> 
233 
234<#macro getPrintIcon> 
235	<#if enablePrint == "true" > 
236		<#assign printURL = renderResponse.createRenderURL() /> 
237 
238		${printURL.setParameter("struts_action", "/asset_publisher/view_content")} 
239		${printURL.setParameter("assetEntryId", entry.getEntryId()?string)} 
240		${printURL.setParameter("viewMode", "print")} 
241		${printURL.setParameter("type", entry.getAssetRendererFactory().getType())} 
242 
243		<#if (validator.isNotNull(assetRenderer.getUrlTitle()))> 
244			<#if (assetRenderer.getGroupId() != themeDisplay.getScopeGroupId())> 
245				${printURL.setParameter("groupId", assetRenderer.getGroupId()?string)} 
246			</#if> 
247 
248			${printURL.setParameter("urlTitle", assetRenderer.getUrlTitle())} 
249		</#if> 
250 
251		${printURL.setWindowState("pop_up")} 
252 
253		<@liferay_ui["icon"] 
254			image="print" 
255			message="print" 
256			url="javascript:Liferay.Util.openWindow({id:'" + renderResponse.getNamespace() + "printAsset', title: '" + languageUtil.format(locale, "print-x-x", ["hide-accessible", entryTitle]) + "', uri: '" + htmlUtil.escapeURL(printURL.toString()) + "'});" 
257		/> 
258	</#if> 
259</#macro> 
260 
261<#macro getRatings> 
262	<#if (enableRatings == "true")> 
263		<div class="asset-ratings"> 
264			<@liferay_ui["ratings"] 
265				className=entry.getClassName() 
266				classPK=entry.getClassPK() 
267			/> 
268		</div> 
269	</#if> 
270</#macro> 
271 
272<#macro getRelatedAssets> 
273	<#if enableRelatedAssets == "true"> 
274		<@liferay_ui["asset-links"] 
275			assetEntryId=entry.getEntryId() 
276		/> 
277	</#if> 
278</#macro> 
279 
280<#macro getSocialBookmarks> 
281	<#if enableSocialBookmarks == "true"> 
282		<@liferay_ui["social-bookmarks"] 
283			displayStyle="${socialBookmarksDisplayStyle}" 
284			target="_blank" 
285			title=entry.getTitle(locale) 
286			url=viewURL 
287		/> 
288	</#if> 
289</#macro>