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