An error occurred while processing the template.
Denied resolving class org.apache.velocity.util.ArrayListWrapper by org.apache
1#set( $defaultLocale = $portalUtil.getSiteDefaultLocale($groupId).toString() )
2#set( $LayoutLocalService = $serviceLocator.findService("com.liferay.portal.kernel.service.LayoutLocalService") )
3#set( $portalUrl = $themeDisplay.getPortalURL())
4
5#set( $GroupLocalService = $serviceLocator.findService("com.liferay.portal.kernel.service.GroupLocalService") )
6#set( $CompanyLocalService = $serviceLocator.findService("com.liferay.portal.kernel.service.CompanyLocalService") )
7#set( $group = $GroupLocalService.getGroup($groupId) )
8#set( $basePortalUrl = $company.getPortalURL($groupId) )
9#set( $siteFriendlyUrl = $group.getFriendlyURL() )
10#set( $pathPublicUrl = $portalUtil.getPathFriendlyURLPublic() )
11#set( $localePrefix = "/" + $locale.getLanguage() + "_" + $locale.getCountry() )
12
13#set( $linkToBase = $localePrefix + $pathPublicUrl + $siteFriendlyUrl )
14#set( $linkToMore = $localePrefix + $pathPublicUrl + $siteFriendlyUrl )
15
16#set( $layoutPreferenceArray = $getterUtil.getStringValues($portletPreferences.get("portletSetupLinkToLayoutUuid")) )
17#if( $layoutPreferenceArray.size() > 0 )
18
19 #set( $linkToLayoutUuid = $layoutPreferenceArray.get(0) )
20 #set( $linkToLayout = $LayoutLocalService.getLayoutByUuidAndCompanyId($linkToLayoutUuid,$themeDisplay.getCompanyId()) )
21
22 #set( $linkToBase = $localePrefix + $pathPublicUrl + $siteFriendlyUrl + $linkToLayout.getFriendlyURL($locale) )
23 #set( $linkToMore = $localePrefix + $pathPublicUrl + $siteFriendlyUrl + $linkToLayout.getFriendlyURL($locale) )
24
25#end
26
27
28##set javascript array for edit links when applicable
29<script>
30 var editlink=new Array();
31</script>
32
33<div class="ay-block__light">
34 <h3 class="ay-block__light__title ay-block__light__title--blue">$languageUtil.get($locale, "ay-media-ceo-video-audio-title")</h3>
35 <div class="ay-block__light--content">
36 #set ($journalArticleService = $serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService"))
37 #set ($journalContent = $serviceLocator.findService("com.liferay.journal.util.JournalContent"))
38
39 #if (!$entries.isEmpty())
40 ##loopy bit
41 #foreach ($curEntry in $entries)
42 #set($renderer = $curEntry.getAssetRenderer() )
43 #set($className = $renderer.getClassName() )
44
45 #if( $className == "com.liferay.journal.model.JournalArticle" )
46
47 #set ($article = $journalArticleService.getLatestArticle($curEntry.getClassPK()))
48 #set ($articleId = $article.getArticleId())
49 #set ($ddmTemplateKey = "CEO_AUDIO_VIDEO")
50 #set ($viewMode = $renderRequest.getPortletMode())
51 #set ($languageId = $themeDisplay.getLanguageId())
52 #set ($articleGroupId = $article.getGroupId())
53
54 #set ($entryMarkup = $journalContent.getContent($articleGroupId, "$articleId", "$ddmTemplateKey", "$viewMode", "$languageId", $themeDisplay))
55 #set( $linkToBase = "./press-release-detail/-/article/")
56
57
58 ##get display date and article title
59 #set( $displayDate = $article.getDisplayDate())
60 #set( $datePath = $dateTool.format("yyyy/MM/dd/", $displayDate, $locale) )
61 #set( $urlTitle = $article.getUrlTitle() )
62 ##set link to article
63 #set( $link = $linkToBase + $datePath + $urlTitle)
64
65
66
67 ## create edit URL
68 #set ($portletName = $themeDisplay.getPortletDisplay().getPortletName())
69 #set ($plid = $getterUtil.getLong($themeDisplay.getPlid()))
70 #set ($portletURL = $portletURLFactory.create($renderRequest, $portletName, $plid, "RENDER_PHASE"))
71 #set ($windowState = $windowStateFactory.getWindowState("POP_UP"))
72 #set ($assetRenderer = $entry.getAssetRenderer())
73 #set ($editURL = $assetRenderer.getURLEdit($renderRequest,$renderResponse, $windowState, $portletURL))
74 ## <a href="$editURL">Edit Content ($renderRequest) $articleId</a>
75 ##remplace token from template with link
76 $entryMarkup.replace('[link]',"$link")
77
78
79 #end
80 #end
81 #end
82 <a href="$linkToMore" class="ay-block__light--link ay-more-link">$languageUtil.get($locale, "ay-gen-more")</a>
83 <style> #ay .ay-column.ay-column__double.portlet-layout .ay-pagination{ display:none; } #ay .ay-block__light--link.ay-more-link{ display: none; } #ay .ay-column.ay-column__double.portlet-layout .ay-block__light--link.ay-more-link{ display:block; } </style>
84 </div>
85
86 #foreach ($curEntry in $entries)
87 ## create edit URL
88 #set ($portletName = $themeDisplay.getPortletDisplay().getPortletName())
89 #set ($plid = $getterUtil.getLong($themeDisplay.getPlid()))
90 #set ($portletURL = $portletURLFactory.create($renderRequest, $portletName, $plid, "RENDER_PHASE"))
91 #set ($windowState = $windowStateFactory.getWindowState("POP_UP"))
92 #set ($assetRenderer = $curEntry.getAssetRenderer())
93 #set ($editURL = $assetRenderer.getURLEdit($renderRequest,$renderResponse, $windowState, $portletURL))
94 #if($assetRenderer.hasEditPermission($permissionChecker))
95 <script>
96 editlink.push('$editURL');
97 </script>
98 #end
99 #end
100</div>
101##creates edit links for list when logged in
102<script>
103
104 $(window).load(function(){
105 if(editlink.length > 0){
106 //console.log(editlink.length+" "+$(".ay-search-proff-table tr").not(".ay-search-proff-table tr table tr").length)
107 $(".ay-media-post__main--content").each(function(index, value){
108
109 $(this).html($(this).html()+'<a class="ay-adt-editlink" href="javascript:editModal.open(\''+editlink[index]+'\')" >$languageUtil.get($locale, "ay-gen-edit")</a>');
110
111 });
112
113 }
114 })
115
116 var closeModal={
117 close:function(){
118 $('.editModal-container ').remove();
119 }
120 }
121
122 var editModal={
123 open:function(ifo){
124 //alert(ifo);
125 $("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>');
126 }
127 }
128</script>
129
130<style>
131 .ay-media-post__main--content{
132 display:flex;
133 align-items:flex-start;
134 justify-content:flex-start;
135 }
136
137 .ay-media-post__main--content a{
138 display:block;
139 }
140
141 a.ay-adt-editlink{
142 margin-left: auto;
143 }
144 .editModal-container{
145 width:100%;
146 height:100%;
147 position: fixed;
148 top:0;
149 left:0;
150 z-index: 500;
151 background: rgba(255,255,255,.85);
152 display: flex;
153 flex-direction: column;
154 }
155 .editModal-container a{
156 align-self: flex-end;
157 display: block;
158 margin:10px 10px 0 0;
159 font-size: 18px;
160 }
161 .editModal-container div{
162 width:95%;
163 height: 95%;
164 margin:auto;
165 border: 1px solid #ccc;
166 padding:10px;
167 background:#fff;
168 }
169 .editModal-container iframe {
170 width:100%;
171 height: 100%;
172 border: none;
173 }
174</style>