<div class="wbfile card card-default">
  <div class="card-body">
    <div class="top-row clearfix">
      <span class="float-left">
        <span class="text-muted" data-ng-if="ctx === 'download'"><span data-translate>Filename</span>:</span>
        <span class="filename">{{wbfile.name}}</span>
      </span>
      <span class="float-right">
        <span>
          <span class="download-button btn btn-sm btn-primary" data-ng-click="downloadWBFile(wbfile)">
            <i class="fa-solid fa-download"></i>
          </span>
          <button data-ng-if="Authentication.session.role === 'receiver'" class="btn btn-sm btn-danger" data-ng-click="deleteWBFile(wbfile)" data-single-click>
            <i class="fa-solid fa-trash"></i>
          </button>
        </span>
      </span>
    </div>
    <div class="file-info-row">
      <span>
        <span data-translate>From</span>: <span>{{receivers_by_id[wbfile.author].name}}</span>
      </span>
      <span class="px-1">
        <span data-translate>Date</span>: <span>{{wbfile.creation_date | date:'dd-MM-yyyy HH:MM'}}</span>
      </span>
      <span class="px-1">
        <span data-translate>Size:</span> <span>{{wbfile.size | byteFmt:2}}</span>
      </span>
      <span class="px-1" data-ng-if="ctx === 'rtip'">
        <span data-translate>Number of downloads</span>: <span>{{wbfile.downloads}}</span>
      </span>
    </div>
    <div data-ng-if="wbfile.description">
      <span>
        <span data-translate>Description</span>:
      </span>
      <span>{{wbfile.description}}</span>
    </div>
  </div>
</div>
