1<#assign langue = locale?substring(0,locale?last_index_of("_"))>
2<#assign GroupLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.GroupLocalService")>
3<#assign main_group = GroupLocalService.getGroup(groupId)/>
4<#assign main_group_short_name = main_group.getFriendlyURL() />
5
6<#assign serviceContext = staticUtil["com.liferay.portal.kernel.service.ServiceContextThreadLocal"].getServiceContext()>
7<#assign httpServletRequest = serviceContext.getRequest()>
8
9<div class="topics-index-wrapper"><div class="topics-index-list">
10 <#assign themeDisplayCurURL = themeDisplay.getURLCurrent()>
11
12 <#if entries?has_content>
13 <#list entries as entry>
14 <#assign assetRenderer = entry.getAssetRenderer()>
15 <#assign article_url_title = ""+assetRenderer.getArticle().getUrlTitle(locale)>
16 <#assign xml = saxReaderUtil.read(assetRenderer.getArticle().getContentByLocale(locale))>
17 <#assign title = assetRenderer.getTitle(locale)>
18 <#if title?ends_with(" ?")><#assign title = title?substring(0 , title?length - 2) + " ?"></#if>
19 <#if title?ends_with(" !")><#assign title = title?substring(0 , title?length - 2) + " !"></#if>
20 <#assign chapo = xml.valueOf("//dynamic-element[@name='ART_CHAPO']/dynamic-content/text()")>
21 <#assign ART_DATE_BEGIN = xml.valueOf("//dynamic-element[@name='ART_DATE_BEGIN']/dynamic-content/text()")>
22 <#assign ART_HOUR_BEGIN = xml.valueOf("//dynamic-element[@name='ART_HOUR_BEGIN']/dynamic-content/text()")>
23 <#assign ART_MINUTE_BEGIN = xml.valueOf("//dynamic-element[@name='ART_MINUTE_BEGIN']/dynamic-content/text()")>
24 <#assign EVENT_TYPE = xml.valueOf("//dynamic-element[@name='EVENT_TYPE']/dynamic-content/text()")>
25 <#assign originalImageUrl = xml.valueOf("//dynamic-element[@name='ART_IMAGE']/dynamic-content/text()")>
26 <#assign imageUrl = fileEntryUtil.getImageUrlByFormat(assetRenderer.getGroupId(), originalImageUrl, "vignette")>
27
28 <div class="topics-index-item">
29 <a href="/${langue}/bank${main_group_short_name}/event/-/blogpost/${article_url_title}">
30 <div class="topics-index-item-image">
31 <img alt="${title}" src="${imageUrl}"/>
32 </div>
33 <div class="wrap-hashtag"><div class="slide_hashtag" style="text-decoration:none !important;text-transform:none;">${EVENT_TYPE}</div></div>
34 <div class="topics-index-item-title">${title}</div>
35 <div class="slide_text_date" style="color:#333 !important;" id="dateEvent_${entry_index}"></div>
36 <#--<div class="topics-index-item-text">
37 <#if (chapo?length>220)>
38 <#assign chapo = chapo?substring(0,216)>
39 <#assign chapo = chapo?substring(0,chapo?last_index_of(" "))>
40 ${chapo} ...
41 <#else>
42 ${chapo}
43 </#if>
44 </div>-->
45 </a>
46 </div>
47 <script>
48 $(document).ready(function() {
49 let dateEvent = new Date('${ART_DATE_BEGIN}T${ART_HOUR_BEGIN}:${ART_MINUTE_BEGIN}:00');
50 let dateEventString = '';
51 <#if langue == "fr">
52 dateEventString += dateEvent.toLocaleString('${locale}'.replace('_','-'), {weekday:'long'});
53 dateEventString += ' ';
54 dateEventString += dateEvent.toLocaleString('${locale}'.replace('_','-'), {day:'numeric'});
55 dateEventString += ' ';
56 dateEventString += dateEvent.toLocaleString('${locale}'.replace('_','-'), {month:'long'});
57 dateEventString += ' ';
58 dateEventString += dateEvent.toLocaleString('${locale}'.replace('_','-'), {year:'numeric'});
59 dateEventString += ' à ${ART_HOUR_BEGIN}h${ART_MINUTE_BEGIN}';
60 </#if>
61 <#if langue == "en">
62 dateEventString += dateEvent.toLocaleString('${locale}'.replace('_','-'), {weekday:'long'});
63 dateEventString += ' ';
64 dateEventString += dateEvent.toLocaleString('${locale}'.replace('_','-'), {day:'numeric'});
65 dateEventString += ' ';
66 dateEventString += dateEvent.toLocaleString('${locale}'.replace('_','-'), {month:'long'});
67 dateEventString += ' ';
68 dateEventString += dateEvent.toLocaleString('${locale}'.replace('_','-'), {year:'numeric'});
69 dateEventString += ' at ${ART_HOUR_BEGIN}:${ART_MINUTE_BEGIN}';
70 </#if>
71 <#if langue == "de">
72 dateEventString += dateEvent.toLocaleString('${locale}'.replace('_','-'), {weekday:'long'});
73 dateEventString += ' ';
74 dateEventString += dateEvent.toLocaleString('${locale}'.replace('_','-'), {day:'numeric'});
75 dateEventString += '. ';
76 dateEventString += dateEvent.toLocaleString('${locale}'.replace('_','-'), {month:'long'});
77 dateEventString += ' ';
78 dateEventString += dateEvent.toLocaleString('${locale}'.replace('_','-'), {year:'numeric'});
79 dateEventString += ', ${ART_HOUR_BEGIN}.${ART_MINUTE_BEGIN} Uhr';
80 </#if>
81 <#if langue == "nl">
82 dateEventString += dateEvent.toLocaleString('${locale}'.replace('_','-'), {weekday:'long'});
83 dateEventString += ' ';
84 dateEventString += dateEvent.toLocaleString('${locale}'.replace('_','-'), {day:'numeric'});
85 dateEventString += ' ';
86 dateEventString += dateEvent.toLocaleString('${locale}'.replace('_','-'), {month:'long'});
87 dateEventString += ' ';
88 dateEventString += dateEvent.toLocaleString('${locale}'.replace('_','-'), {year:'numeric'});
89 dateEventString += ' om ${ART_HOUR_BEGIN}.${ART_MINUTE_BEGIN} u.';
90 </#if>
91 setTimeout(function(){$("#dateEvent_${entry_index}").html(dateEventString)}, 1000);
92 });
93 </script>
94 </#list>
95 </#if>
96</div></div>
97
98<script>
99 $(document).ready(function() {
100 $('.lfr-pagination').addClass('article-wrapper');
101 $('.lfr-pagination li a').addClass('btn').addClass('style1');
102 });
103</script>