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