La santé des entrepreneurs, bonne mais exposée
Une erreur s'est produite lors du traitement du modèle.
?sort_by(...) failed at sequence index 1 (0-based): All key values in the sequence must be strings, because the first key value was that. However, the key value of the current item isn't a string but a date_or_time_or_datetime (wrapper: f.t.SimpleDate). ---- FTL stack trace ("~" means nesting-related): - Failed at: #list articles?sort_by("date")?revers... [in template "20096#20122#ARTICLE" at line 289, column 25] ----
1<#assign actualLocale= .locale />
2<#setting locale="fr_FR">
3
4<#assign journalArticleId = .vars['reserved-article-id'].data />
5<#assign journalArticleResourceLocalServiceUtil = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") />
6<#assign article = journalArticleResourceLocalServiceUtil.getArticle(getterUtil.getLong(scopeGroupId), journalArticleId)>
7<#assign assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService") />
8<#assign asset = assetEntryLocalService.getEntry('com.liferay.journal.model.JournalArticle', article.getResourcePrimKey()) >
9<#assign categories = asset.getCategories() />
10<#assign tags = asset.getTags() />
11<#assign ck=objectUtil("com.liferay.portal.kernel.util.CookieKeys") />
12
13<#assign showAllArticle = false />
14<#if (Request["canSeeArticles"]?? && Request["canSeeArticles"]==true)>
15 <#assign showAllArticle = true />
16<#else>
17 <#attempt>
18 <#if !ck.getCookie(request, "CK_RL01")?has_content || ck.getCookie(request, "CK_RL01")?number lte propsUtil.get("er.nb.article.before.block")?number>
19 <#assign showAllArticle = true />
20 </#if>
21 <#recover>
22 </#attempt>
23 <script>
24 updateNbViews();
25 </script>
26</#if>
27
28<div class="row mt-lg-5">
29 <div class="article-detail mustShowTeaser col-lg-8 offset-lg-2">
30 <div class="categories-container">
31 <#assign bolFirst = true />
32 <#list categories as category>
33 <#if category.getName() != 'A la Une'>
34 <#if ! bolFirst>
35 <hr class="mx-2 divider">
36 </#if>
37 <h2 id="category" class="acumin-condensed strong h3">
38 <a href='/recherche?q="${category.getName()}"&category=${category.getCategoryId()}'
39 style="">${category.getName()}</a>
40 </h2>
41 <#assign bolFirst = false />
42
43 </#if>
44 </#list>
45 </div>
46 <h1 class="acumin-condensed strong display-4 mb-4">
47 ${article.getTitle(locale)}
48 </h1>
49 <#if (Image.getData())?? && Image.getData() != "">
50 <figure class="figure mb-4">
51
52 <img alt="${Image.getAttribute("alt")}" data-fileentryid="${Image.getAttribute("fileEntryId")}"
53 src="${Image.getData()}"/>
54 <#if Image.getAttribute("alt")?? && Image.getAttribute("alt") != "">
55 <figcaption>
56 <span class="strong acumin-semicondensed">
57 ${Image.getAttribute("alt")}
58 </span>
59 <#if CreditPhoto ?? && CreditPhoto.getData()?? >
60 <span class="small text-grey ms-1">${CreditPhoto.getData()}</span>
61 </#if>
62 </figcaption>
63 </#if>
64 </#if>
65 </figure>
66 <div class="d-flex img-container hide-small">
67 <#if (photoAuteur.getData())?? && photoAuteur.getData() != "">
68 <picture><img class="mb-4 mb-lg-5 mr-3" src="${photoAuteur.getData()}" alt=""></picture>
69 </#if>
70 <div class="d-flex flex-column justify-content-start mb-4 mb-lg-5 border-start-blue" style="width: 350px;">
71 <span class="small ms-4 text-dark">
72 <#if (Auteur.getData())??>
73 ${Auteur.getData()}
74 </#if>
75 </span>
76 <div>
77 <div class="ms-4">
78 <span class="text-muted small" style="width: fit-content">
79 <#assign DateDePublication_Data = getterUtil.getString(DateDePublication.getData())>
80 <#if validator.isNotNull(DateDePublication_Data)>
81 <#assign DateDePublication_DateObj = dateUtil.parseDate("yyyy-MM-dd", DateDePublication_Data, locale)>
82 Publié ${dateUtil.getDate(DateDePublication_DateObj, "EEEE dd MMMM yyyy", locale)}
83 </#if>
84 </span><br>
85 <span class="text-muted small" style="width: fit-content">
86 <#assign DateDeModification_Data = getterUtil.getString(DateDeModification.getData())>
87 <#if validator.isNotNull(DateDeModification_Data)>
88 <#assign DateDeModification_DateObj = dateUtil.parseDate("yyyy-MM-dd", DateDeModification_Data, locale)>
89 Modifié ${dateUtil.getDate(DateDeModification_DateObj, "EEEE dd MMMM yyyy", locale)}
90 </#if>
91 </span>
92 </div>
93 <div class="copiedLinkMessage" style="width: fit-content; align-self: end">Lien copié</div>
94 </div>
95 <div style="display: flex;">
96 <nav class="icons-nav-container d-flex mt-3 ms-4">
97 <a onclick="window.print()" class="text-dark me-3">
98 <svg xmlns="http://www.w3.org/2000/svg" width="23" height="23" fill="currentColor"
99 viewBox="0 0 16 16">
100 <g id="print" class="st0">
101 <path class="st1" d="M11.3,7.2c-0.4,0-0.7,0.3-0.7,0.7s0.3,0.7,0.7,0.7C11.7,8.7,12,8.4,12,8C12,7.6,11.7,7.2,11.3,7.2z M11.3,8.3
102 c-0.2,0-0.4-0.2-0.4-0.4c0-0.2,0.2-0.4,0.4-0.4l0,0c0.2,0,0.4,0.2,0.4,0.4C11.7,8.2,11.5,8.3,11.3,8.3z"/>
103 <path class="st1" d="M14.4,5.8h-0.8V2.5c0-0.1,0-0.2-0.1-0.2l-2.2-2.2C11.3,0,11.2,0,11.1,0H2.6C2.5,0,2.4,0.1,2.4,0.3v5.6H1.6
104 c-0.6,0-1,0.5-1,1v5.9c0,0.6,0.5,1,1,1h0.8v1.9c0,0.2,0.1,0.3,0.3,0.3h10.6c0.2,0,0.3-0.1,0.3-0.3v-1.9h0.8c0.6,0,1-0.5,1-1V6.9
105 C15.4,6.3,15,5.8,14.4,5.8z M13,12.3v3H3v-3H13z M3,5.8V0.6h8l2,2.1v3.2H3V5.8z M13.3,11.7H2.7l0,0l0,0c-0.2,0-0.3,0.1-0.3,0.3v1.2
106 H1.6c-0.1,0-0.2,0-0.3-0.1s-0.1-0.2-0.1-0.3V6.9c0-0.2,0.2-0.4,0.4-0.4h12.8l0,0c0.1,0,0.2,0,0.3,0.1s0.1,0.2,0.1,0.3v5.9
107 c0,0.2-0.2,0.4-0.4,0.4h-0.8V12C13.6,11.8,13.5,11.7,13.3,11.7z"/>
108 <path class="st1" d="M13.1,7.2c-0.4,0-0.7,0.3-0.7,0.7s0.3,0.7,0.7,0.7s0.7-0.3,0.7-0.7C13.9,7.6,13.5,7.2,13.1,7.2z M13.1,8.3
109 c-0.2,0-0.4-0.2-0.4-0.4c0-0.2,0.2-0.4,0.4-0.4l0,0l0,0c0.2,0,0.4,0.2,0.4,0.4C13.5,8.2,13.3,8.3,13.1,8.3z"/>
110 <path class="st1" d="M4.7,7.8H2.8l0,0C2.7,7.8,2.7,7.9,2.7,8c0,0.1,0.1,0.2,0.2,0.2h1.8c0,0,0.1,0,0.1-0.1L4.9,8
111 C4.9,8,4.9,7.9,4.7,7.8C4.8,7.8,4.8,7.8,4.7,7.8z"/>
112 </g>
113 </svg>
114 </a>
115 <a id="aFacebook" href="https://www.facebook.com/sharer/sharer.php?u=" class="text-dark me-3">
116 <svg xmlns="http://www.w3.org/2000/svg" width="23" height="23" fill="currentColor"
117 viewBox="0 0 16 16">
118 <g id="facebook">
119 <path d="M9.3,5.1V4.4c0-0.5,0.1-0.6,0.4-0.6h2.2V0H9.1C6.7,0,5.5,1.1,5.5,3.3v1.9H3.6v3.1h1.9V16h3.8V8.3h2.3l0.3-3.1V5.1
120 C11.9,5.1,9.3,5.1,9.3,5.1z M8.7,7.7v7.7H6.1V7.7H4.2v-2h1.9V3.3c0-1.8,1-2.7,3.1-2.7h2.2v2.6H9.7c-0.8,0-1,0.5-1,1.1v1.4h2.5
121 l-0.2,2H8.7z"/>
122 </g>
123 </svg>
124 </a>
125 <a id="aLinkedin" href="https://www.linkedin.com/sharing/share-offsite/?url="
126 class="text-dark me-3">
127 <svg xmlns="http://www.w3.org/2000/svg" width="23" height="23" fill="currentColor"
128 viewBox="0 0 16 16">
129 <g id="linkedin">
130 <path d="M15.9,15.6h-3.7V10c0-0.7-0.2-1.2-0.5-1.6c-0.3-0.3-0.7-0.5-1.1-0.5c-0.9,0-1.7,0.7-1.7,2.1v5.7H5.1V4.8h3.7v0.8
131 c1-1,2.6-1.4,4.1-1c1.9,0.5,2.9,2,2.9,4.2V15.6z M12.7,15.1h2.7V8.9c0-1.9-0.9-3.3-2.5-3.7c-1.6-0.4-3.4,0.2-4,1.4L8.3,7.6V5.4H5.7
132 v9.7h2.6V10c0-1.7,1.2-2.6,2.3-2.6c0.6,0,1.1,0.2,1.5,0.7c0.4,0.5,0.7,1.1,0.7,1.9V15.1z M3.8,15.6H0V4.8h3.8V15.6z M0.5,15.1h2.7
133 V5.4H0.5V15.1z M1.9,4.1C0.8,4.1,0,3.3,0,2.2s0.8-1.9,1.9-1.9c1,0,1.9,0.8,1.9,1.9S2.9,4.1,1.9,4.1z M1.9,0.9
134 c-0.7,0-1.3,0.6-1.3,1.3s0.6,1.3,1.3,1.3c0.7,0,1.3-0.6,1.3-1.3S2.6,0.9,1.9,0.9z"/>
135 </g>
136 </svg>
137 </a>
138 <a id="aTwitter" href="https://twitter.com/intent/tweet?url=" class="text-dark me-3">
139 <svg xmlns="http://www.w3.org/2000/svg" width="23" height="23" fill="currentColor"
140 viewBox="0 0 16 16">
141 <g>
142 <path d="M11.733 15.8H16L9.467 7.2 9.333 7.001l-0.133 -0.133 0.135 -0.199 0.199 -0.199 5.333 -6.068h-1.333l-4.467 5.067 -0.267 0.267 -0.199 0.267 -0.199 -0.199 -0.267 -0.333L4.4 0.4H0l6.201 8.133 0.133 0.199 0.133 0.133 -0.133 0.133 -0.199 0.199 -5.733 6.533h1.333l4.867 -5.6 0.267 -0.267 0.199 -0.199 0.199 0.199 0.267 0.333 4.2 5.6zM1.667 1.801 1.333 1.268l-0.333 -0.4h3.067l0.067 0.067 0.067 0.133 10 13.2 0.4 0.533 0.267 0.4H12l-0.067 -0.067 -0.067 -0.133 -10.201 -13.2z"/>
143 </g>
144 </svg>
145
146 </a>
147 <a id="mailTo"
148 href="mailto:?subject=Entreprise Romande-${.vars['reserved-article-title'].data}&body="
149 class="text-dark me-3">
150 <svg xmlns="http://www.w3.org/2000/svg" width="23" height="23" fill="currentColor"
151 viewBox="0 0 16 16">
152 <path id="email" class="st0" d="M15.7,2.6H0.3l0,0C0.1,2.7,0,2.8,0,2.9v11.3c0,0.2,0.1,0.3,0.3,0.3h15.4c0.2,0,0.3-0.1,0.3-0.3V2.9
153 C16,2.8,15.9,2.6,15.7,2.6z M15.4,3.9v10H0.6v-10l7.2,5.8c0.1,0.1,0.3,0.1,0.4,0L15.4,3.9z M8,9.1L0.8,3.2h14.5L8,9.1z"/>
154 </svg>
155 </a>
156 <a id="copyLink" class="text-dark" style="cursor: pointer;">
157 <svg xmlns="http://www.w3.org/2000/svg" width="23" height="23" fill="currentColor"
158 viewBox="0 0 16 16">
159 <g id="link" class="st0">
160 <path id="Trace_733" class="st1" d="M9.1,10.3c-0.8,0-1.7-0.3-2.3-0.9L6.8,9.3C6.7,9.2,6.7,9,6.8,8.8c0.1-0.1,0.4-0.1,0.5,0
161 l0.1,0.1c1,1,2.5,1,3.5,0l3.6-3.6c0.5-0.5,0.7-1.1,0.7-1.7c0-0.7-0.3-1.3-0.7-1.7C14,1.3,13.4,1,12.8,1c-0.7,0-1.3,0.3-1.7,0.7
162 L8.5,4.3c-0.1,0.1-0.4,0.1-0.5,0c-0.1-0.1-0.1-0.4,0-0.5c0,0,0,0,0,0l2.6-2.6C11.8,0,13.8,0,15,1.2c0.6,0.6,0.9,1.4,0.9,2.3
163 c0,0.8-0.3,1.7-0.9,2.3l-3.6,3.6C10.8,10,10,10.3,9.1,10.3z"/>
164 <path id="Trace_734" class="st1" d="M3.2,15.7c-1.8,0-3.2-1.4-3.2-3.2c0-0.8,0.3-1.7,0.9-2.3l3.6-3.6C5.2,6.1,6,5.7,6.9,5.7l0,0
165 c0.8,0,1.7,0.3,2.3,0.9l0.1,0.1c0.1,0.1,0.1,0.4,0,0.5C9,7.4,8.8,7.4,8.7,7.2L8.6,7.2C8.1,6.7,7.5,6.4,6.9,6.4l0,0
166 c-0.7,0-1.3,0.3-1.7,0.7l-3.6,3.6c-1,1-1,2.5,0,3.5C1.9,14.8,2.6,15,3.2,15l0,0c0.7,0,1.3-0.3,1.7-0.7l2.6-2.6
167 c0.1-0.1,0.4-0.1,0.5,0c0.1,0.1,0.1,0.3,0,0.5l-2.6,2.6C4.9,15.4,4,15.7,3.2,15.7z"/>
168 </g>
169 </svg>
170 </a>
171 </nav>
172 </div>
173 </div>
174 </div>
175 <div class="mb-4 mb-lg-5" id="chapeau">
176 <p class="mb-4 mb-lg-5 text-secondary lead">
177 <#if (selectedTag.getData())??>
178 <#assign AssetTagLocalServiceUtil = serviceLocator.findService("com.liferay.asset.kernel.service.AssetTagLocalService") />
179 <#assign classNameLocalServiceUtil = serviceLocator.findService("com.liferay.portal.kernel.service.ClassNameLocalService") />
180
181 <#assign groupId = themeDisplay.getScopeGroupId() />
182 <#assign classNameId = classNameLocalServiceUtil.getClassNameId("com.liferay.journal.model.JournalArticle") />
183 <#assign tagName = selectedTag.getData()?lower_case />
184 <#if AssetTagLocalServiceUtil.fetchTag(groupId, tagName)?? >
185 <#assign selectedTagLfr = AssetTagLocalServiceUtil.fetchTag(groupId, tagName) />
186 <a href='/recherche<#if selectedTagLfr?? && selectedTagLfr != "" >?q="${selectedTagLfr.getName()}"&tag=${selectedTagLfr.getName()}</#if>'
187 class="text-pink strong me-2 small">
188 <#else>
189 <#assign selectedTagLfr = "" />
190 <a href='/recherche?q="${tagName}"'
191 class="text-pink strong me-2 small">
192 </#if>
193
194 #${selectedTag.getData()}
195 </a>
196 </#if>
197 <#if (Chapeau.getData())??>
198 ${Chapeau.getData()}
199 </#if>
200 </p>
201 </div>
202 <#if showAllArticle>
203 <#if (Body.getData())??>
204 ${Body.getData()}
205 </#if>
206 <nav class="nav mb-3">
207 <#list tags as tag>
208 <a href='/recherche<#if tag?? && tag != "" >?q="${tag.getName()}"&tag=${tag.getName()}</#if>'
209 class="nav-link px-0 text-pink strong me-4">
210 #${tag.getName()}
211 </a>
212 </#list>
213 </nav>
214 <#else>
215 <#if (Body.getData())??>
216 <#assign shortBody = stringUtil.shorten(htmlUtil.stripHtml(Body.getData()), 300) />
217 ${shortBody}
218 </#if>
219 <div id="show-teaser"></div>
220 <script>
221 checkNbViews(${propsUtil.get("er.nb.article.before.block")?number}, ${themeDisplay.isSignedIn()?string});
222 </script>
223 </#if>
224
225 <#-- RELATED PART -->
226 <#assign urlPrefix = themeDisplay.getPortalURL() + themeDisplay.getLayout().getGroup()
227 .getPathFriendlyURL(! themeDisplay.getLayout().isPublicLayout(),themeDisplay) + themeDisplay.getLayout().getGroup().getFriendlyURL()/>
228 <#assign urlPrefix = urlPrefix + "/-/" />
229 <#assign
230 articles = []
231 assetLinkLocalService = serviceLocator.findService("com.liferay.asset.link.service.AssetLinkLocalService")
232 assetLinks = assetLinkLocalService.getLinks(asset.getEntryId())
233 AssetEntryService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryService")
234 />
235 <#-- RELATED ASSET -->
236 <#if assetLinks?size gt 0>
237 <#list assetLinks as item>
238 <#if item.entryId1 == asset.getEntryId()>
239
240 <#attempt>
241 <#assign assetRelated = AssetEntryService.fetchEntry(item.entryId2) />
242 <#assign linkArticle = journalArticleResourceLocalServiceUtil.getLatestArticle(assetRelated.getClassPK()) />
243 <#assign void = getDataFromArticle(linkArticle, articles, urlPrefix) />
244 <#recover>
245 </#attempt>
246 </#if>
247 </#list>
248 <#--DEBUT CODE LISTE DES ARTICLES EN LIEN-->
249 <#else>
250 <#assign assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService") />
251 <#assign journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") />
252 <#assign article = journalArticleLocalService.getArticle(getterUtil.getLong(scopeGroupId), .vars['reserved-article-id'].data)>
253 <#assign asset = assetEntryLocalService.getEntry('com.liferay.journal.model.JournalArticle', article.getResourcePrimKey()) >
254 <#assign categoriesIds = []>
255 <#assign categories = asset.getCategories() />
256 <#if categories?? && categories?has_content>
257 <#list categories as categ>
258 <#assign categoriesIds = categoriesIds + [categ.getCategoryId()]>
259 </#list>
260 </#if>
261 <#assign AssetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService") />
262 <#assign assetEntryQuery = objectUtil("com.liferay.asset.kernel.service.persistence.AssetEntryQuery") />
263 <#assign searchParam = assetEntryQuery.setAnyCategoryIds(categoriesIds) />
264 <#assign search2Param = assetEntryQuery.setClassName("com.liferay.journal.model.JournalArticle") />
265 <#assign groupIds = [scopeGroupId] />
266 <#assign scopeGroup = assetEntryQuery.setGroupIds(groupIds) />
267 <#assign orderByDate = assetEntryQuery.setOrderByCol1("displayDate") />
268 <#assign searchEntries = AssetEntryLocalService.getEntries(assetEntryQuery) />
269 <#if searchEntries?has_content>
270 <#list searchEntries as curEntry>
271 <#if curEntry.getAssetRenderer()??>
272 <#assign renderer = curEntry.getAssetRenderer() >
273 <#assign className = renderer.getClassName() >
274 <#assign journalArticle = renderer.getArticle() >
275 <#assign void = getDataFromArticle(journalArticle, articles, urlPrefix) />
276 </#if>
277 </#list>
278 </#if>
279 </#if>
280 <!-- Affichage -->
281 <#if articles?has_content>
282 <section class="hide-for-print pb-3 pb-lg-5 card-list">
283 <div class="">
284 <h2 class="text-bold acumin-condensed mb-4 theme-title text-blue d-block">
285 Articles en lien
286 </h2>
287 <div class="row">
288 <#assign cpt =0 />
289 <#list articles?sort_by("date")?reverse as curEntry>
290 <div class="col-12 col-lg-4">
291 <div class="card card-type mb-3 mb-lg-0 mt-5">
292 <#if curEntry.get('image')?? && curEntry.get('image') != "">
293 <#assign jsonImage = curEntry.get('image') />
294 <#if jsonImage?? >
295 <div class="img-holder mb-2">
296 <a href="${curEntry.get('url')}">
297 <#assign jsonImage = jsonImage?replace("\\u", "\\\\u")>
298 <#assign jsonImage = jsonImage?eval />
299 <#if jsonImage?? && jsonImage.uuid??>
300 <#assign iuuid = jsonImage.uuid />
301 <#assign igid = jsonImage.groupId />
302 <#assign imageURL = "/c/document_library/get_file?uuid=" + iuuid + "&groupId=" + igid />
303 <figure>
304 <img class="img-fluid" src="${imageURL}"
305 alt="${jsonImage.alt}">
306 </figure>
307 </#if>
308 </a>
309 </div>
310 </#if>
311 </#if>
312 <div class="card-content py-2 d-inline">
313 <#if (curEntry.get('selectedTag'))??>
314 <#assign AssetTagLocalServiceUtil = serviceLocator.findService("com.liferay.asset.kernel.service.AssetTagLocalService") />
315 <#assign classNameLocalServiceUtil = serviceLocator.findService("com.liferay.portal.kernel.service.ClassNameLocalService") />
316
317 <#assign groupId = themeDisplay.getScopeGroupId() />
318 <#assign classNameId = classNameLocalServiceUtil.getClassNameId("com.liferay.journal.model.JournalArticle") />
319 <#assign tagName = curEntry.get('selectedTag')?lower_case />
320 <#if AssetTagLocalServiceUtil.fetchTag(groupId, tagName)?? >
321 <#assign selectedTagLfr = AssetTagLocalServiceUtil.fetchTag(groupId, tagName) />
322 <a href='/recherche<#if selectedTagLfr?? && selectedTagLfr != "" >?q="${selectedTagLfr.getName()}"&tag=${selectedTagLfr.getName()}</#if>'
323 class="text-pink d-inline me-2">
324 <#else>
325 <#assign selectedTagLfr = "" />
326 <a href='/recherche?q="${tagName}"'
327 class="text-pink d-inline me-2">
328 </#if>
329
330 #<span
331 class="text-bold">${curEntry.get('selectedTag')}</span>
332 </a>
333 </#if>
334 </div>
335 <h2 class="card-title h4">
336 <a class="text-dark" href="${curEntry.get('url')}">${curEntry.get('titre')}
337 </a>
338 </h2>
339 <div class="d-flex align-items-center justify-content-between">
340 <#if curEntry.get('DateDePublication')?? >
341 <#assign DateDePublication_DateObj = dateUtil.parseDate("yyyy-MM-dd", curEntry.get('DateDePublication'), locale)>
342 <span class="text-muted small">Publié ${dateUtil.getDate(DateDePublication_DateObj, "EEEE dd MMMM yyyy", locale)}</span>
343 </#if>
344 </div>
345 </div>
346 </div>
347 <#if cpt == 2>
348 <#break />
349 </#if>
350 <#assign cpt = cpt +1 />
351 </#list>
352 </div>
353 </div>
354 </section>
355 </#if>
356 <script type="text/javascript">
357 window.addEventListener("load", function () {
358 document.getElementById("mailTo").href += window.location;
359 document.getElementById("aTwitter").href += window.location;
360 document.getElementById("aFacebook").href += window.location;
361 document.getElementById("aLinkedin").href += window.location;
362
363 document.getElementById("aTwitter").target = "_blank";
364 document.getElementById("aFacebook").target = "_blank";
365 document.getElementById("aLinkedin").target = "_blank";
366 var copiedLinkMessageElement = document.querySelector(".article-detail .copiedLinkMessage");
367 document.getElementById("copyLink").addEventListener("click", function () {
368 var url = window.location.href;
369 navigator.clipboard.writeText(url)
370 .then(function () {
371 if (copiedLinkMessageElement) {
372 const url = window.location.href;
373 navigator.clipboard.writeText(url)
374 .catch((e) => alert(e));
375 copiedLinkMessageElement.classList.add("fadeIn");
376 setTimeout(function () {
377 copiedLinkMessageElement.classList.remove("fadeIn");
378 copiedLinkMessageElement.style.visibility = "hidden"
379 }, 3000);
380 } else {
381 console.log("Error : copy Link not found");
382 }
383 }.bind(this))
384 .catch(function () {
385 alert("Erreur lors de la copie du lien");
386 });
387 });
388 });
389
390 insertGalleryFromTag(${groupId});
391 </script>
392 </div>
393</div>
394
395<#function getDataFromArticle journalArticle articles urlPrefix>
396 <#assign structure = journalArticle.getDDMStructure() />
397
398 <#assign displayDate = "" />
399 <#if journalArticle.getDisplayDate()?? >
400 <#assign displayDate = journalArticle.getDisplayDate()?date />
401 </#if>
402 <#if displayDate?? && (structure.structureKey == "ARTICLE" || structure.structureKey == "OPINION") && .vars['reserved-article-id'].data != journalArticle.getArticleId() >
403 <#assign Title = journalArticle.getTitle() />
404 <#assign document = saxReaderUtil.read(journalArticle.getContentByLocale(locale)) >
405 <#assign rootElement = document.getRootElement() >
406 <#assign xPathSelectorItem = saxReaderUtil.createXPath("dynamic-element[@name='DateDePublication']") >
407 <#if xPathSelectorItem.selectSingleNode(rootElement)?? && xPathSelectorItem.selectSingleNode(rootElement).selectSingleNode("dynamic-content")?? >
408 <#assign ItemNode = xPathSelectorItem.selectSingleNode(rootElement).selectSingleNode("dynamic-content") >
409 <#assign DateDePublication = ItemNode.getStringValue() />
410 </#if>
411
412 <#assign xPathSelectorItem = saxReaderUtil.createXPath("dynamic-element[@name='TempsDeLecture']") >
413 <#if xPathSelectorItem.selectSingleNode(rootElement)?? && xPathSelectorItem.selectSingleNode(rootElement).selectSingleNode("dynamic-content")?? >
414 <#assign ItemNode = xPathSelectorItem.selectSingleNode(rootElement).selectSingleNode("dynamic-content") >
415 <#assign TempsDeLecture = ItemNode.getStringValue() />
416 </#if>
417
418 <#assign selectedTag = "" />
419 <#assign xPathSelectorItem = saxReaderUtil.createXPath("dynamic-element[@name='selectedTag']") >
420 <#if xPathSelectorItem.selectSingleNode(rootElement)?? && xPathSelectorItem.selectSingleNode(rootElement).selectSingleNode("dynamic-content")?? >
421 <#assign ItemNode = xPathSelectorItem.selectSingleNode(rootElement).selectSingleNode("dynamic-content") >
422 <#assign selectedTag = ItemNode.getStringValue() />
423 </#if>
424 <#assign xPathSelectorItem = saxReaderUtil.createXPath("dynamic-element[@name='Image']") >
425 <#if xPathSelectorItem.selectSingleNode(rootElement)?? && xPathSelectorItem.selectSingleNode(rootElement).selectSingleNode("dynamic-content")?? >
426 <#assign ItemNode = xPathSelectorItem.selectSingleNode(rootElement).selectSingleNode("dynamic-content") >
427 <#assign image = ItemNode.getStringValue() />
428 </#if>
429 <#assign url = urlPrefix + journalArticle.getUrlTitle() />
430 <#assign jsonObj = jsonFactoryUtil.createJSONObject() />
431 <#assign dateObj = jsonObj.put("date", displayDate) />
432 <#assign titreObj = jsonObj.put("titre", Title) />
433 <#assign titreObj = jsonObj.put("selectedTag", selectedTag) />
434 <#assign DateDePublication = jsonObj.put("DateDePublication", DateDePublication) />
435 <#if image??>
436 <#assign imageObj = jsonObj.put("image", image) />
437 </#if>
438 <#assign url = jsonObj.put("url", urlPrefix + journalArticle.getUrlTitle()) />
439 <#assign articles = articles + [jsonObj]>
440 </#if>
441 <#return "" />
442</#function>
443
444<#setting locale = actualLocale />
insérer code pub ici