1<#assign DLFileEntryLocalServiceUtil = serviceLocator.findService("com.liferay.portlet.documentlibrary.service.DLFileEntryLocalService") />
2<#setting number_format="0" />
3
4<#if (title.data)?has_content>
5 <h1 class="article__heading">
6 ${title.data}
7 </h1>
8</#if>
9
10<#if (description.data)?has_content>
11 <div class="article__main">
12 <div class="mka-cms">
13 <#if (photo.data)?has_content && (title.data)?has_content>
14 <img src="${photo.data}" alt="${title.data}" />
15 </#if>
16 <p>${description.data}</p>
17 </div>
18 </div>
19</#if>
20
21<#assign presentDownloadSection = true />
22<#if !(filesToDownloadHeader.data)?has_content>
23 <#assign presentDownloadSection = false />
24</#if>
25<#list fileTitle.siblings as fileTitle>
26 <#if !(fileTitle.data)?has_content || !(fileTitle.file.data)?has_content>
27 <#assign presentDownloadSection = false />
28 </#if>
29</#list>
30
31<#if (presentDownloadSection)>
32 <div class="file-list b-sep-l-top">
33 <#if (filesToDownloadHeader.data)?has_content>
34 <h2 class="file-list__heading">${filesToDownloadHeader.data}</h2>
35 </#if>
36 <ul class="file-list__files b-transparent-list">
37 <#list fileTitle.siblings as fileTitle>
38 <#if (fileTitle.data)?has_content && (fileTitle.file.data)?has_content>
39 <li>
40 <#assign filePathParts = fileTitle.file.data?split("/") />
41 <#assign fileUuidWithParams = filePathParts[(filePathParts?size)-1] />
42 <#assign fileUuidWithParamsParts = fileUuidWithParams?split("?") />
43 <#assign fileUuid = fileUuidWithParamsParts[0] />
44 <#assign fileEntry = DLFileEntryLocalServiceUtil.getFileEntryByUuidAndGroupId(fileUuid, groupId) />
45 <#assign size = (fileEntry.size/1000) />
46 <a href="${fileTitle.file.data}" target="_blank" class="b-icon-before-download-file">
47 ${fileTitle.data} (${size} KB)
48 </a>
49 </li>
50 </#if>
51 </#list>
52 </ul>
53 </div>
54</#if>