Commercial Real Estate White Papers
Une erreur s'est produite lors du traitement du gabarit.
Denied resolving class org.apache.velocity.util.ArrayListWrapper by org.apache
1##set javascript array for edit links when applicable
2<script>
3 var editlink=new Array();
4</script>
5
6<div class="ay-block__light">
7 <h3 class="ay-block__light__title ay-block__light__title--blue">$languageUtil.get($locale, "ay-research-wpatr-title")</h3>
8 <div class="ay-block__light--content">
9 #set ($journalArticleService = $serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService"))
10 #set ($journalContent = $serviceLocator.findService("com.liferay.journal.util.JournalContent"))
11
12 #if (!$entries.isEmpty())
13 ##loopy bit
14 #foreach ($curEntry in $entries)
15 #set($renderer = $curEntry.getAssetRenderer() )
16 #set($className = $renderer.getClassName() )
17
18 #if( $className == "com.liferay.portlet.journal.model.JournalArticle" )
19
20 #set ($article = $journalArticleService.getLatestArticle($curEntry.getClassPK()))
21 #set ($articleId = $article.getArticleId())
22 #set ($ddmTemplateKey = "WHITE_PAPERS_ITEM")
23 #set ($viewMode = $renderRequest.getPortletMode())
24 #set ($languageId = $themeDisplay.getLanguageId())
25 #set ($articleGroupId = $article.getGroupId())
26
27 #set ($entryMarkup = $journalContent.getContent($articleGroupId, "$articleId", "$ddmTemplateKey", "$viewMode", "$languageId", $themeDisplay))
28 #set( $linkToBase = "./press-release-detail/-/article/")
29
30
31 ##get display date and article title
32 #set( $displayDate = $article.getDisplayDate())
33 #set( $datePath = $dateTool.format("yyyy/MM/dd/", $displayDate, $locale) )
34 #set( $urlTitle = $article.getUrlTitle() )
35 ##set link to article
36 #set( $link = $linkToBase + $datePath + $urlTitle)
37
38
39
40 ## create edit URL
41 #set ($portletName = $themeDisplay.getPortletDisplay().getPortletName())
42 #set ($plid = $getterUtil.getLong($themeDisplay.getPlid()))
43 #set ($portletURL = $portletURLFactory.create($renderRequest, $portletName, $plid, "RENDER_PHASE"))
44 #set ($windowState = $windowStateFactory.getWindowState("POP_UP"))
45 #set ($assetRenderer = $entry.getAssetRenderer())
46 #set ($editURL = $assetRenderer.getURLEdit($renderRequest,$renderResponse, $windowState, $portletURL))
47 ## <a href="$editURL">Edit Content ($renderRequest) $articleId</a>
48 ##remplace token from template with link
49 $entryMarkup.replace('[link]',"$link")
50
51
52 #end
53 #end
54 #end
55
56 ## sets pagination logic
57
58 #set($delta = 0)
59 #set($deltaStr = $portletPreferences.get("pageDelta").get(0))
60 #if ( $validator.isNotNull($deltaStr) )
61 #set ($delta = $delta.parseInt($deltaStr))
62 #end
63
64
65 #set( $page = 1 )
66 #set( $pageStr = $renderRequest.getParameter("cur") )
67 #if ( $validator.isNotNull($pageStr) )
68 #set ($page = $page.parseInt($pageStr))
69 #end
70
71
72 #set( $numArt = $total )
73 #set( $extraArt = $numArt % $delta )
74
75
76 #if ($numArt > $delta)
77 #if ( $extraArt == 0 )
78 #set( $numPages = ($numArt / $delta) )
79 #else
80 #set( $numPages = ($numArt / $delta) + 1 )
81 #end
82 #else
83 #set ($numPages = 1)
84 #end
85
86 #set($pointer = 0)
87 #if ($page <3)
88 #set ($pointer = 3)
89 #elseif ($page > $numPages - 7)
90 #set ($pointer = $numPages - 7)
91 #else
92 #set ($pointer = $page)
93 #end
94
95 #set($start = $pointer - 7)
96 #if ($start <= 0)
97 #set ($start = 1)
98 #end
99 #set($end = $pointer + 7)
100 #if ($end > $numPages)
101 #set ($end = $numPages)
102 #end
103
104 #set($range = [$start..$end])
105
106 #set( $ppid = $themeDisplay.getPortletDisplay().getId())
107
108 ##sets logic of current number articles displayed displayed
109 #set ( $curEnds = $delta )
110 #set ( $curCounts = 0 )
111 #set ( $curCounts2 = $curCounts.parseInt($page) )
112 #set ( $curEnds2 = ($curEnds * $curCounts2) )
113 #set ( $curStarts = $curEnds2 - $delta + 1)
114 #set($allpros = 0)
115
116
117 ##pagination creation
118 ## sets page number variable
119 #set( $ppid_cur="_"+$ppid+"_cur")
120
121 #if ($numPages > 1 && $delta > 10)
122 <nav class="ay-pagination" style="margin-top:20px;">
123 <ul class="ay-pagination--pagination-list">
124 #if ($page > 1)
125 #set ($prevPagef = $page - 1)
126 <li><a href="?p_p_id=$ppid&$ppid_cur=$prevPagef" class="aoc-button"><svg viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMin slice"><use xlink:href="/o/ay-theme/resources/images/images.svg#arrow-right"></use></svg></a></li>
127 #else
128 <li><svg viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMin slice">
129 <use xlink:href="/o/ay-theme/resources/images/images.svg#arrow-right"></use>
130 </svg></li>
131 #end
132 #foreach($i in $range)
133 #if ($i != $page)
134
135 <li><a href="?p_p_id=$ppid&$ppid_cur=$i" >$i</a></li>
136 #else
137 <li>$page</li>
138 #end
139 #end
140 #if ($page < $numPages)
141 #set ($nextPagef = $page + 1)
142 <li><a href="?p_p_id=$ppid&$ppid_cur=$nextPagef" ><svg viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMin slice"><use xlink:href="/o/ay-theme/resources/images/images.svg#arrow-right"></use></svg></a></li>
143 #else
144 <li><svg viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMin slice">
145 <use xlink:href="/o/ay-theme/resources/images/images.svg#arrow-right"></use>
146 </svg></li>
147 #end
148 </ul>
149 </nav>
150 #end
151
152 <a href="/research/white-papers" class="ay-block__light--link ay-more-link">$languageUtil.get($locale, "ay-gen-more")</a>
153 </div>
154</div>
155
156<style>
157 #ay .ay-column.ay-column__double.portlet-layout .ay-pagination{
158 display:none;
159 }
160
161 #ay .ay-block__light--link.ay-more-link{
162 display: none;
163 }
164
165 .ay-column.ay-column__double.portlet-layout .ay-block__light--link.ay-more-link{
166 display:block;
167 }
168
169</style>
170
171#foreach ($curEntry in $entries)
172 ## create edit URL
173 #set ($portletName = $themeDisplay.getPortletDisplay().getPortletName())
174 #set ($plid = $getterUtil.getLong($themeDisplay.getPlid()))
175 #set ($portletURL = $portletURLFactory.create($renderRequest, $portletName, $plid, "RENDER_PHASE"))
176 #set ($windowState = $windowStateFactory.getWindowState("POP_UP"))
177 #set ($assetRenderer = $$curEntry.getAssetRenderer())
178 #set ($editURL = $assetRenderer.getURLEdit($renderRequest,$renderResponse, $windowState, $portletURL))
179 #if($assetRenderer.hasEditPermission($permissionChecker))
180 <script>
181 editlink.push('$editURL');
182 </script>
183 #end
184#end
185
186##creates edit links for list when logged in
187<script>
188
189 $(window).load(function(){
190 if(editlink.length > 0){
191 //console.log(editlink.length+" "+$(".ay-search-proff-table tr").not(".ay-search-proff-table tr table tr").length)
192 $(".ay-media-post__main--content").each(function(index, value){
193
194 $(this).html($(this).html()+'<a class="ay-adt-editlink" href="javascript:editModal.open(\''+editlink[index]+'\')" >$languageUtil.get($locale, "ay-gen-edit")</a>');
195
196 });
197
198 }
199 })
200
201 var closeModal={
202 close:function(){
203 $('.editModal-container ').remove();
204 }
205 }
206
207 var editModal={
208 open:function(ifo){
209 //alert(ifo);
210 $("body").append('<div class="editModal-container"><a class="ay-edit-model-close" href="javascript:closeModal.close()"> X </a><div><iframe src="'+ifo+'"></iframe></div></div>');
211 }
212 }
213</script>
214
215<style>
216 .ay-media-post__main--content{
217 display:flex;
218 align-items:flex-start;
219 justify-content:flex-start;
220 }
221
222 .ay-media-post__main--content a{
223 display:block;
224 }
225
226 a.ay-adt-editlink{
227 margin-left: auto;
228 }
229 .editModal-container{
230 width:100%;
231 height:100%;
232 position: fixed;
233 top:0;
234 left:0;
235 z-index: 500;
236 background: rgba(255,255,255,.85);
237 display: flex;
238 flex-direction: column;
239 }
240 .editModal-container a{
241 align-self: flex-end;
242 display: block;
243 margin:10px 10px 0 0;
244 font-size: 18px;
245 }
246 .editModal-container div{
247 width:95%;
248 height: 95%;
249 margin:auto;
250 border: 1px solid #ccc;
251 padding:10px;
252 background:#fff;
253 }
254 .editModal-container iframe {
255 width:100%;
256 height: 100%;
257 border: none;
258 }
259</style>