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