<div id="TipPageFilesInfoBox" class="card card-default" data-ng-init="collapsed = false">
  <div class="card-header clearfix" data-ng-click="collapsed = !collapsed" data-ng-keypress="eventDismiss(); $event.stopPropagation();">
    <span data-translate>Attachments</span>
    <span class="float-right">
      <i data-ng-if="!collapsed" class="fa-solid fa-chevron-up" data-uib-tooltip="{{'Collapse' | translate}}"></i>
      <i data-ng-if="collapsed" class="fa-solid fa-chevron-down" data-uib-tooltip="{{'Expand' | translate}}"></i>
    </span>
  </div>
  <div class="card-body" data-ng-show="!collapsed">
    <div data-ng-show="tip.rfiles.length" class="table-responsive">
      <table class="table table-striped" id="fileList">
        <thead>
          <tr>
            <th data-translate>Filename</th>
            <th data-translate>Upload date</th>
            <th data-translate>Type</th>
            <th data-translate>File size</th>
          </tr>
        </thead>
        <tbody id="fileListBody">
          <tr id="file-{{$index}}" data-ng-repeat="file in tip.rfiles | orderBy:'creation_date'">
            <td>{{file.name}}</td>
            <td>{{file.creation_date | date:'dd-MM-yyyy HH:mm'}}</td>
            <td>{{file.type}}</td>
            <td>{{file.size | byteFmt:2}}</td>
          </tr>
        </tbody>
      </table>
    </div>
    <br />
    <div data-ng-if="tip.status !== 'closed'">
      <div data-ng-include="'views/partials/rfile_upload_button.html'"></div>
      <div data-ng-include="'views/partials/rfile_upload_status.html'"></div>
      <div data-ng-show="Utils.hasPausedFileUploads(uploads)">
        <button id="files-action-confirm" class="btn btn-sm btn-outline-secondary" data-ng-click="Utils.resumeFileUploads(uploads)">
          <i class="fa-solid fa-upload"></i>
          <span data-translate>Confirm</span>
        </button>
      </div>
      <div data-ng-show="Utils.isUploading(uploads)">
        <div data-ng-include="'views/partials/rfiles_upload_status.html'"></div>
      </div>
    </div>
  </div>
</div>
