[#macro renderDocumentCard document]
[#assign documentURL = themeDisplay.getPathContext() + "/documents/" + document.getLong("repositoryId")?c + "/" + document.getLong("folderId")?c + "/" + (document.getString("fileName")!"")?url("UTF-8") + "/" + (document.getString("uuid")!"")?url("UTF-8") /]
[#assign extension = (document.getString("extension"))!"" /]
[#assign imagePreview = ["bmp", "gif", "jpeg", "jpg", "png", "webp"]?seq_contains(extension?lower_case) /]
[#assign pdfPreview = extension?lower_case == "pdf" /]
[#if imagePreview]
[#assign previewURL = documentURL /]
[#elseif pdfPreview]
[#assign previewURL = documentURL + "?documentThumbnail=1" /]
[/#if]
[#if imagePreview || pdfPreview]
[#else]
[/#if]
${extension?upper_case}
[/#macro]
[#assign documents = [
configuration.document1,
configuration.document2,
configuration.document3,
configuration.document4
] /]
[#assign hasDocuments = false /]
[#list documents as document]
[#if document.getLong("classPK") > 0]
[#assign hasDocuments = true /]
[#break]
[/#if]
[/#list]