<commit_before>[#ftl]
[#include "layout.ftl"]
[@clientLeftPane "ClientsAndAccounts"]
    <span id="page.id" title="UploadedFiles"></span>
    <div class="content">
        <a href="uploadNewFile.ftl?entityId=${entityId}&entityType=${entityType}&backPageUrl=${backPageUrl}">
        [@spring.message "upload.selectNewFile" /]
        </a>
        <br/><br/>
        <table id="uploadedFiles" class="datatable">
            <thead>
                <tr>
                    <th>
                        <span class='fontnormalbold'>
                        [@spring.message "upload.name" /]
                        <span>
                    </th>
                    <th>
                        <span class='fontnormalbold'>
                        [@spring.message "upload.size" /]
                        <span>
                    </th>
                    <th>
                        <span class='fontnormalbold'>
                        [@spring.message "upload.date" /]
                        <span>
                    </th>
                    <th>
                        <span class='fontnormalbold'>
                        [@spring.message "Description" /]
                        <span>
                    </th>
                    <th>
                        <span class='fontnormalbold'>
                        [@spring.message "upload.actions" /]
                        <span>
                    </th>
                </tr>
            </thead>
            <tbody>
            [#list uploadedFiles as file]
                <tr>
                    <td>
                    [#if file.name?length > 30]${file.name?substring(0,30)}...
                    [#else]${file.name}
                    [/#if]
                    </td>
                    <td>${file.size}</td>
                    <td>${file.uploadDate}</td>
                    <td>${file.description}</td>
                    <td>
                        [#assign question][@spring.message "upload.deleteConfirmQuestion" /][/#assign]
                        <a href="viewUploadedFiles.ftl?entityId=${entityId}&entityType=${entityType}&backPageUrl=${backPageUrl}&deleteFileId=${file.uploadedFileId}" onclick="return confirm('${question}')" >Delete</a> / 
                        
                        [#if file.existOnDisk]
                            <a href="viewUploadedFiles.ftl?entityId=${entityId}&entityType=${entityType}&backPageUrl=${backPageUrl}&downloadFileId=${file.uploadedFileId}">Download</a>
                        [#else]
                            <span class="red">[@spring.message "upload.fileNotFound" /]</span>
                        [/#if]
                    </td>
                </tr>
            [/#list]
            </tbody>
        </table>
        [@widget.datatable "uploadedFiles" /]
        [@form.returnToPage "${backPageUrl}" "button.back" "loanaccountpayments.button.back"/]
    </div>
[/@clientLeftPane]<commit_msg>MIFOS-6078: Fixed stack trace during downloading file<commit_after>[#ftl]
[#include "layout.ftl"]
[@clientLeftPane "ClientsAndAccounts"]
    <span id="page.id" title="UploadedFiles"></span>
    <div class="content">
        <a href="uploadNewFile.ftl?entityId=${entityId}&entityType=${entityType}&backPageUrl=${backPageUrl}">
        [@spring.message "upload.selectNewFile" /]
        </a>
        <br/><br/>
        <table id="uploadedFiles" class="datatable">
            <thead>
                <tr>
                    <th>
                        <span class='fontnormalbold'>
                        [@spring.message "upload.name" /]
                        <span>
                    </th>
                    <th>
                        <span class='fontnormalbold'>
                        [@spring.message "upload.size" /]
                        <span>
                    </th>
                    <th>
                        <span class='fontnormalbold'>
                        [@spring.message "upload.date" /]
                        <span>
                    </th>
                    <th>
                        <span class='fontnormalbold'>
                        [@spring.message "Description" /]
                        <span>
                    </th>
                    <th>
                        <span class='fontnormalbold'>
                        [@spring.message "upload.actions" /]
                        <span>
                    </th>
                </tr>
            </thead>
            <tbody>
            [#list uploadedFiles as file]
                <tr>
                    <td>
                    [#if file.name?length > 30]${file.name?substring(0,30)}...
                    [#else]${file.name}
                    [/#if]
                    </td>
                    <td>${file.size}</td>
                    <td>${file.uploadDate}</td>
                    <td>${file.description}</td>
                    <td>
                        [#assign question][@spring.message "upload.deleteConfirmQuestion" /][/#assign]
                        <a href="viewUploadedFiles.ftl?entityId=${entityId}&entityType=${entityType}&backPageUrl=${backPageUrl}&deleteFileId=${file.uploadedFileId?c}" onclick="return confirm('${question}')" >Delete</a> / 
                        
                        [#if file.existOnDisk]
                            <a href="viewUploadedFiles.ftl?entityId=${entityId}&entityType=${entityType}&backPageUrl=${backPageUrl}&downloadFileId=${file.uploadedFileId?c}">Download</a>
                        [#else]
                            <span class="red">[@spring.message "upload.fileNotFound" /]</span>
                        [/#if]
                    </td>
                </tr>
            [/#list]
            </tbody>
        </table>
        [@widget.datatable "uploadedFiles" /]
        [@form.returnToPage "${backPageUrl}" "button.back" "loanaccountpayments.button.back"/]
    </div>
[/@clientLeftPane]
{'fraction_non_alphanumeric': 0.14193984454207503, 'fraction_numerical': 0.0023656640757012504, 'mean_word_length': 1.1617969320672024, 'pattern_counts': {'":': 0, '<': 111, '<?xml version=': 0, '>': 113, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 5, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '380041', 'n_tokens_mistral': 1596, 'n_tokens_neox': 1461, 'n_words': 219}