1<#assign assetVocabularyService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetVocabularyLocalService")>
2<#assign articleId = .vars['reserved-article-id'].data />
3<#assign JournalArticleService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") />
4
5<#assign journalArticle = JournalArticleService.getLatestArticle(groupId, articleId) />
6
7<#assign resourcePK = journalArticle.getResourcePrimKey() />
8<#assign AssetEntryService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService") />
9<#assign assetEntry = AssetEntryService.getEntry('com.liferay.journal.model.JournalArticle', resourcePK) />
10
11<#assign destinataires = getCategoriesOfVocabulary(assetEntry, "Destinataires") />
12
13
14
15<#assign local_download_answer = "réponse comme PDF" />
16<if locale = "de_DE">
17 <#assign local_download_answer = "Antwort als PDF" />
18
19<div style="margin: 0.5em 0;padding: 0.5em;background-color: #f5f5f5;">
20<h3 style="font-size: 1em; margin-bottom: 0em; margin-top: 0em;">
21 <#assign article_title = .vars['reserved-article-title'].data />
22 ${article_title}
23</h3>
24<@getDestinataire />
25
26<br />
27<span class="muted">
28<#assign dateFormat = "dd.MM.yyyy" />
29${dateUtil.getDate(assetEntry.getPublishDate(), dateFormat, locale)}
30</span>
31<a href="${reponse.getData()}" target="_blank">
32
33<#assign local_reponse_conseil = "Réponse du Conseil d'Etat à la consultation" />
34<#assign local_reponse_commune = "Prise de position commune des cantons - Postition du Conseil d'Etat" />
35<#if locale = "de_DE">
36 <#assign local_reponse_conseil = "Antwort des Staatsrats" />
37 <#assign local_reponse_commune = "Gemeinsame Stellungname der Kantone, Antwort des Staatsrats" />
38</#if>
39<#if type.getData() == "1">
40 ${local_reponse_conseil}
41<#else>
42 ${local_reponse_commune}
43</#if>
44 (PDF)
45</a>
46<br />
47
48
49</div>
50
51<#macro getDestinataire>
52 <#if destinataires?size != 0>
53 <#list destinataires as cur_cat>
54 <#if (cur_cat.getDescription(locale)?trim)!="" >
55 ${cur_cat.getDescription(locale)?trim}
56 </#if>
57 </#list>
58 </#if>
59
60</#macro>
61
62<#function getCategoriesOfVocabulary assetEntry vocabularyName>
63
64 <#assign categories = assetEntry.getCategories() />
65 <#assign categorylist = [] />
66 <#list categories as category>
67 <#assign vocabulary = assetVocabularyService.getVocabulary(category.vocabularyId)/>
68 <#if vocabulary.name == vocabularyName>
69 <#-- <#assign categorylist = categorylist + [ category.getTitle(locale) ] /> -->
70 <#assign categorylist = categorylist + [ category ] />
71 </#if>
72 </#list>
73 <#return categorylist />
74
75</#function>