Payoff - news

News

Agrégateur de contenus

Une erreur s'est produite lors du traitement du modèle.
No compatible overloaded variation was found; wrong number of arguments.
The FTL type of the argument values were: extended_hash+string (Locale wrapped into f.e.b.StringModel).
The matching overload was searched among these members:
    com.liferay.journal.web.internal.asset.model.JournalArticleAssetRenderer.getSummary(javax.portlet.PortletRequest, javax.portlet.PortletResponse),
    com.liferay.asset.kernel.model.BaseAssetRenderer.getSummary()

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #assign summary = assetRenderer.getSu...  [in template "20115#20151#38269" at line 9, column 41]
----
1<#if entries?has_content> 
2	<div class="news-articles"> 
3		<div class="meccanocar-container"> 
4			<div id="${renderResponse.namespace}ArticlesWrapper" class="news-articles-wrapper"> 
5				<#list entries as entry> 
6					<#assign assetRenderer = entry.assetRenderer /> 
7 
8					<#assign title = entry.getTitle(locale) /> 
9					<#assign summary = assetRenderer.getSummary(locale) /> 
10 
11					<#assign thumbnailPath = "" /> 
12 
13					<#if (assetRenderer.article)??> 
14						<#assign thumbnailPath = assetRenderer.article.getArticleImageURL(themeDisplay) ! "" /> 
15					<#else> 
16						<#assign thumbnailPath = assetRenderer.getThumbnailPath(renderRequest) /> 
17					</#if> 
18 
19					<div class="news-articles-item"> 
20						<img class="news-articles-item-small-image" src="${thumbnailPath?html}"> 
21						<div class="news-articles-item-body"> 
22							<span class="date-and-category"> 
23								<strong class="date-and-category-date"> 
24									${entry.publishDate?date?string.long} 
25								</strong> 
26								<#if entry.categories?has_content> 
27
28									<#list entry.categories as category> 
29										<span class="date-and-category-category"> 
30											${category.getTitle(locale)} 
31										</span> 
32									</#list> 
33								</#if> 
34							</span> 
35 
36							<#if title?has_content> 
37							<#assign 
38								viewURL = assetPublisherHelper.getAssetViewURL( 
39									renderRequest, 
40									renderResponse, 
41									entry.getAssetRenderer(), 
42									entry, 
43									!stringUtil.equals(assetLinkBehavior, "showFullContent") 
44
45							/> 
46								<a href="${viewURL}"> 
47									<h3 class="news-articles-item-title">${title}</h3> 
48								</a> 
49							</#if> 
50 
51							<#if summary?has_content> 
52								<div class="news-articles-item-content"> 
53									${summary?html} 
54								</div> 
55							</#if> 
56							<div class="news-articles-item-socials"> 
57								<#setting url_escaping_charset='ISO-8859-1'> 
58								<span><@liferay.language key="share-on" /></span> 
59								<a href="https://www.facebook.com/sharer/sharer.php?u=${viewURL?url?html}" target="_blank" rel="nofollow"> 
60									<i class="icon-facebook"></i> 
61								</a> 
62								<a href="https://twitter.com/intent/tweet?url=${viewURL?url?html}" class="hexagon" target="_blank" rel="nofollow"> 
63									<i class="icon-twitter"></i> 
64								</a> 
65								<a href="https://www.linkedin.com/shareArticle?mini=true&url=${viewURL?url?html}" target="_blank" rel="nofollow"> 
66									<i class="icon-linkedin"></i> 
67								</a> 
68							</div> 
69						</div> 
70					</div> 
71				</#list> 
72			</div> 
73		</div> 
74 
75		<div class="text-center load-more-container"> 
76			<a id="${renderResponse.namespace}loadMoreBtn" class="btn btn-info" href="#!"> 
77				<span class="pull-left"><@liferay.language key="previous-news" /></span> 
78			</a> 
79		</div> 
80 
81	</div> 
82</#if> 
83 
84<script> 
85(function($) { 
86 
87	var $grid = $('#${renderResponse.namespace}ArticlesWrapper'); 
88 
89	$grid.masonry({ 
90		itemSelector: '.news-articles-item', 
91		gutter: 15 
92	}); 
93 
94	$(document).ready(layoutMasonry); 
95 
96	$grid.find('img').on('load', layoutMasonry); 
97 
98	function layoutMasonry() { 
99		$grid.masonry('layout'); 
100
101 
102}(jQuery)); 
103</script> 
104 
105<@liferay_aui.script use="liferay-portlet-url"> 
106(function($) { 
107	var $grid = $('#${renderResponse.namespace}ArticlesWrapper'); 
108 
109	var portletId = '${portletDisplay.id}'; 
110 
111	var $portlet = $('#p_p_id${renderResponse.namespace}'); 
112	var $loadMoreBtn = $('#${renderResponse.namespace}loadMoreBtn') 
113 
114	$loadMoreBtn.click(onLoadMoreBtnClick); 
115 
116	loading = false; 
117 
118	updateLoadMoreBtnHREF(hidePaginatorAndGetNextHREF($portlet)); 
119 
120	function onLoadMoreBtnClick(event) { 
121		if (event.metaKey || event.ctrlKey || loading) { 
122			event.preventDefault(); 
123			return; 
124		} else { 
125			event.preventDefault(); 
126			$loadMoreBtn.attr('disabled', 'true'); 
127			loading = true; 
128			loadMore(event.currentTarget.getAttribute('href')); 
129
130
131 
132	function loadMore(href) { 
133		var portletURL = Liferay.PortletURL.createURL(href); 
134 
135		portletURL.setPortletId(portletId); 
136		portletURL.setWindowState('exclusive'); 
137 
138		$.ajax({url: href, success: function(result){ 
139			var $fragment = $(result); 
140			var $items = $fragment.find('.news-articles-item'); 
141 
142			$grid.append($items); 
143 
144			$grid.masonry('appended', $($items)); 
145 
146			$grid.find('img').on('load', function() { 
147				$grid.masonry('layout'); 
148			}); 
149 
150			updateLoadMoreBtnHREF(hidePaginatorAndGetNextHREF($fragment)); 
151 
152			$loadMoreBtn.removeAttr('disabled'); 
153			loading = false; 
154		}}); 
155
156 
157	function updateLoadMoreBtnHREF(href) { 
158		if (href) { 
159			$loadMoreBtn.attr('href', href); 
160		} else { 
161			$loadMoreBtn.hide(); 
162
163
164 
165	function hidePaginatorAndGetNextHREF(scope) { 
166		var $scope = $(scope); 
167 
168		var $pagination = $scope.find('.lfr-pagination'); 
169 
170		$pagination.hide(); 
171 
172		var $nextLink = $pagination.find('.pager li:not(.last) a').last(); 
173 
174		if (!$nextLink || $nextLink.attr('href') === 'javascript:;') { 
175			return null; 
176
177 
178		if ($nextLink.hasClass('disabled')) { 
179			return null; 
180		} else { 
181			return $nextLink.attr('href'); 
182
183
184 
185}(jQuery)); 
186</@liferay_aui.script>