Files
dspace-angular/src/app/submission/sections/upload/file/file.component.html

57 lines
3.5 KiB
HTML

<ng-container *ngIf="fileData">
<div class="row">
<div class="col-md-2">
<!--ds-thumbnail [thumbnail]="bitstreamsList[bitstreamKey].url | async"></ds-thumbnail-->
<ds-thumbnail [thumbnail]="fileData?.thumbnail"></ds-thumbnail>
</div>
<div class="col-md-10">
<div class="float-left w-75">
<h3>{{fileName}} <span class="text-muted">({{fileData?.sizeBytes | dsFileSize}})</span></h3>
</div>
<div class="float-right w-15" [class.sticky-buttons]="!readMode">
<ng-container *ngIf="readMode">
<button class="btn btn-link" (click)="downloadBitstreamFile(); $event.stopPropagation()"><i class="fa fa-download fa-2x text-normal" aria-hidden="true"></i></button>
<!--<a href="{{fileData.url}}" title="Download file" target="_blank"><i class="fa fa-download text-normal mr-3" aria-hidden="true"></i></a>-->
<button class="btn btn-link" (click)="$event.preventDefault();switchMode();"><i class="fa fa-pencil-square-o fa-2x text-normal"></i></button>
<button class="btn btn-link" (click)="$event.preventDefault();confirmDelete(content);"><i class="fa fa-trash fa-2x text-danger"></i></button>
</ng-container>
<ng-container *ngIf="!readMode">
<button class="btn btn-link" (click)="saveBitstreamData($event);" title="Save metadata"><i class="fa fa-floppy-o fa-2x text-success"></i></button>
<button class="btn btn-link" (click)="$event.preventDefault();switchMode();" title="Cancel"><i class="fa fa-ban fa-2x text-warning"></i></button>
<button class="btn btn-link" (click)="$event.preventDefault();confirmDelete(content);" title="Delete bitstream"><i class="fa fa-trash fa-2x text-danger"></i></button>
</ng-container>
</div>
<div class="clearfix"></div>
<ds-submission-upload-section-file-view *ngIf="readMode"
[fileData]="fileData"></ds-submission-upload-section-file-view>
<ds-submission-upload-section-file-edit *ngIf="!readMode"
[availableAccessConditionGroups]="availableAccessConditionGroups"
[availableAccessConditionOptions]="availableAccessConditionOptions"
[collectionId]="collectionId"
[collectionPolicyType]="collectionPolicyType"
[configMetadataForm]="configMetadataForm"
[fileData]="fileData"
[fileId]="fileId"
[fileIndex]="fileIndex"
[formId]="formId"
[sectionId]="sectionId"></ds-submission-upload-section-file-edit>
</div>
</div>
</ng-container>
<ng-template #content let-c="close" let-d="dismiss">
<div class="modal-header">
<h4 class="modal-title text-danger">Delete file</h4>
<button type="button" class="close" aria-label="Close" (click)="d('cancel')">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p>This operation can't be undone. Are you sure?</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" (click)="c('cancel')">Cancel</button>
<button type="button" class="btn btn-danger" (click)="c('ok')">Yes, I'm sure</button>
</div>
</ng-template>