Servicios
Une erreur s'est produite en traitant le calibre.
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				<p> 
118					${stringUtil.shorten(htmlUtil.extractText(assetRenderer.getSummary(locale)), 350)} 
119				</p> 
120				<a href="${viewURL}"><@liferay.language key="read-more" /><span class="hide-accessible"><@liferay.language key="about" />${entryTitle}</span> &raquo;</a> 
121			</div> 
122 
123			<@getRatings /> 
124 
125			<@getRelatedAssets /> 
126 
127			<@getDiscussion /> 
128			 
129		</div> 
130	</div> 
131 
132</#list> 
133</div> 
134 
135<#macro getDiscussion> 
136	<#if validator.isNotNull(assetRenderer.getDiscussionPath()) && (enableComments == "true")> 
137		<br /> 
138 
139		<#assign discussionURL = renderResponse.createActionURL() /> 
140 
141		${discussionURL.setParameter("struts_action", "/asset_publisher/" + assetRenderer.getDiscussionPath())} 
142 
143		<@liferay_ui["discussion"] 
144			className=entry.getClassName() 
145			classPK=entry.getClassPK() 
146			formAction=discussionURL?string 
147			formName="fm" + entry.getClassPK() 
148			ratingsEnabled=enableCommentRatings == "true" 
149			redirect=portalUtil.getCurrentURL(request) 
150			userId=assetRenderer.getUserId() 
151		/> 
152	</#if> 
153</#macro> 
154 
155<#macro getEditIcon> 
156	<#if assetRenderer.hasEditPermission(themeDisplay.getPermissionChecker())> 
157		<#assign redirectURL = renderResponse.createRenderURL() /> 
158 
159		${redirectURL.setParameter("struts_action", "/asset_publisher/add_asset_redirect")} 
160		${redirectURL.setWindowState("pop_up")} 
161 
162		<#assign editPortletURL = assetRenderer.getURLEdit(renderRequest, renderResponse, windowStateFactory.getWindowState("pop_up"), redirectURL)!"" /> 
163 
164		<#if validator.isNotNull(editPortletURL)> 
165			<#assign title = languageUtil.format(locale, "edit-x", entryTitle) /> 
166 
167			<@liferay_ui["icon"] 
168				image="edit" 
169				message=title 
170				url="javascript:Liferay.Util.openWindow({dialog: {width: 960}, id:'" + renderResponse.getNamespace() + "editAsset', title: '" + title + "', uri:'" + htmlUtil.escapeURL(editPortletURL.toString()) + "'});" 
171			/> 
172		</#if> 
173	</#if> 
174</#macro> 
175 
176<#macro getFlagsIcon> 
177	<#if enableFlags == "true"> 
178		<@liferay_ui["flags"] 
179			className=entry.getClassName() 
180			classPK=entry.getClassPK() 
181			contentTitle=entry.getTitle(locale) 
182			label=false 
183			reportedUserId=entry.getUserId() 
184		/> 
185	</#if> 
186</#macro> 
187 
188<#macro getMetadataField 
189	fieldName 
190
191	<#if stringUtil.split(metadataFields)?seq_contains(fieldName)> 
192		<span class="metadata-entry metadata-${fieldName}"> 
193			<#assign dateFormat = "dd MMM yyyy" /> 
194 
195			<#if fieldName == "author"> 
196				<@liferay.language key="by" /> ${portalUtil.getUserName(assetRenderer.getUserId(), assetRenderer.getUserName())} 
197			<#elseif fieldName == "categories"> 
198				<@liferay_ui["asset-categories-summary"] 
199					className=entry.getClassName() 
200					classPK=entry.getClassPK() 
201					portletURL=renderResponse.createRenderURL() 
202				/> 
203			<#elseif fieldName == "create-date"> 
204				${dateUtil.getDate(entry.getCreateDate(), dateFormat, locale, themeDisplay.getTimeZone())} 
205			<#elseif fieldName == "expiration-date"> 
206				${dateUtil.getDate(entry.getExpirationDate(), dateFormat, locale, themeDisplay.getTimeZone())} 
207			<#elseif fieldName == "modified-date"> 
208				${dateUtil.getDate(entry.getModifiedDate(), dateFormat, locale, themeDisplay.getTimeZone())} 
209			<#elseif fieldName == "priority"> 
210				${entry.getPriority()} 
211			<#elseif fieldName == "publish-date"> 
212				<#if entry.getClassName() = "com.liferay.portlet.journal.model.JournalArticle"> 
213					<div class="date">${dateUtil.getDate(entry.getPublishDate(), dateFormat, locale, themeDisplay.getTimeZone())}</div> 
214				</#if> 
215				 
216				<#if entry.getClassName() = "com.liferay.calendar.model.CalendarBooking"> 
217					<div class="date">${dateUtil.getDate(assetRenderer.getDisplayDate(), dateFormat, locale, themeDisplay.getTimeZone())}</div> 
218				</#if> 
219			<#elseif fieldName == "tags"> 
220				<@liferay_ui["asset-tags-summary"] 
221					className=entry.getClassName() 
222					classPK=entry.getClassPK() 
223					portletURL=renderResponse.createRenderURL() 
224				/> 
225			<#elseif fieldName == "view-count"> 
226				<@liferay_ui["icon"] 
227					image="history" 
228				/> 
229 
230				${entry.getViewCount()} <@liferay.language key="views" /> 
231			</#if> 
232		</span> 
233	</#if> 
234</#macro> 
235 
236<#macro getPrintIcon> 
237	<#if enablePrint == "true" > 
238		<#assign printURL = renderResponse.createRenderURL() /> 
239 
240		${printURL.setParameter("struts_action", "/asset_publisher/view_content")} 
241		${printURL.setParameter("assetEntryId", entry.getEntryId()?string)} 
242		${printURL.setParameter("viewMode", "print")} 
243		${printURL.setParameter("type", entry.getAssetRendererFactory().getType())} 
244 
245		<#if (validator.isNotNull(assetRenderer.getUrlTitle()))> 
246			<#if (assetRenderer.getGroupId() != themeDisplay.getScopeGroupId())> 
247				${printURL.setParameter("groupId", assetRenderer.getGroupId()?string)} 
248			</#if> 
249 
250			${printURL.setParameter("urlTitle", assetRenderer.getUrlTitle())} 
251		</#if> 
252 
253		${printURL.setWindowState("pop_up")} 
254 
255		<@liferay_ui["icon"] 
256			image="print" 
257			message="print" 
258			url="javascript:Liferay.Util.openWindow({id:'" + renderResponse.getNamespace() + "printAsset', title: '" + languageUtil.format(locale, "print-x-x", ["hide-accessible", entryTitle]) + "', uri: '" + htmlUtil.escapeURL(printURL.toString()) + "'});" 
259		/> 
260	</#if> 
261</#macro> 
262 
263<#macro getRatings> 
264	<#if (enableRatings == "true")> 
265		<div class="asset-ratings"> 
266			<@liferay_ui["ratings"] 
267				className=entry.getClassName() 
268				classPK=entry.getClassPK() 
269			/> 
270		</div> 
271	</#if> 
272</#macro> 
273 
274<#macro getRelatedAssets> 
275	<#if enableRelatedAssets == "true"> 
276		<@liferay_ui["asset-links"] 
277			assetEntryId=entry.getEntryId() 
278		/> 
279	</#if> 
280</#macro> 
281 
282<#macro getSocialBookmarks> 
283	<#if enableSocialBookmarks == "true"> 
284		<@liferay_ui["social-bookmarks"] 
285			displayStyle="${socialBookmarksDisplayStyle}" 
286			target="_blank" 
287			title=entry.getTitle(locale) 
288			url=viewURL 
289		/> 
290	</#if> 
291</#macro>