mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
Merge pull request #2421 from hugo-escire/issue/2105
🚸remove thumbnail from file-upload section and show bitstream format …
This commit is contained in:
@@ -29,6 +29,18 @@ export class WorkspaceitemSectionUploadFileObject {
|
||||
value: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* The file format information
|
||||
*/
|
||||
format: {
|
||||
shortDescription: string,
|
||||
description: string,
|
||||
mimetype: string,
|
||||
supportLevel: string,
|
||||
internal: boolean,
|
||||
type: string
|
||||
};
|
||||
|
||||
/**
|
||||
* The file url
|
||||
*/
|
||||
|
@@ -1,16 +1,13 @@
|
||||
<ng-container *ngIf="fileData">
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<!--ds-themed-thumbnail [thumbnail]="bitstreamsList[bitstreamKey].url | async"></ds-themed-thumbnail-->
|
||||
<ds-themed-thumbnail [thumbnail]="fileData?.thumbnail"></ds-themed-thumbnail>
|
||||
</div>
|
||||
<div class="col-md-10">
|
||||
<div class="col-md-12">
|
||||
<div class="float-left w-75">
|
||||
<h3>{{fileName}} <span class="text-muted">({{fileData?.sizeBytes | dsFileSize}})</span></h3>
|
||||
</div>
|
||||
<div class="float-right w-15">
|
||||
<ng-container>
|
||||
<ds-themed-file-download-link [cssClasses]="'btn btn-link-focus'" [isBlank]="true" [bitstream]="getBitstream()" [enableRequestACopy]="false">
|
||||
<ds-themed-file-download-link [cssClasses]="'btn btn-link-focus'" [isBlank]="true"
|
||||
[bitstream]="getBitstream()" [enableRequestACopy]="false">
|
||||
<i class="fa fa-download fa-2x text-normal" aria-hidden="true"></i>
|
||||
</ds-themed-file-download-link>
|
||||
<button class="btn btn-link-focus"
|
||||
@@ -46,7 +43,9 @@
|
||||
<p>{{ 'submission.sections.upload.delete.confirm.info' | translate }}</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" (click)="c('cancel')">{{ 'submission.sections.upload.delete.confirm.cancel' | translate }}</button>
|
||||
<button type="button" class="btn btn-danger" (click)="c('ok')">{{ 'submission.sections.upload.delete.confirm.submit' | translate }}</button>
|
||||
<button type="button" class="btn btn-secondary"
|
||||
(click)="c('cancel')">{{ 'submission.sections.upload.delete.confirm.cancel' | translate }}</button>
|
||||
<button type="button" class="btn btn-danger"
|
||||
(click)="c('ok')">{{ 'submission.sections.upload.delete.confirm.submit' | translate }}</button>
|
||||
</div>
|
||||
</ng-template>
|
||||
|
@@ -15,15 +15,23 @@
|
||||
</ng-container>
|
||||
<ng-container *ngFor="let entry of getAllMetadataValue(fileDescrKey)">
|
||||
<ng-container *ngIf="entry.value !== ''">
|
||||
{{entry.value | dsTruncate:['150']}}
|
||||
{{entry.value | dsTruncate:['150']}}
|
||||
</ng-container>
|
||||
<ng-container *ngIf="entry.value === ''">
|
||||
<span *ngIf="metadata[fileDescrKey].indexOf(entry) === 0" class="text-muted">{{'submission.sections.upload.no-entry' | translate}} {{fileDescrKey}}</span>
|
||||
<span *ngIf="metadata[fileDescrKey].indexOf(entry) === 0"
|
||||
class="text-muted">{{'submission.sections.upload.no-entry' | translate}} {{fileDescrKey}}</span>
|
||||
</ng-container>
|
||||
<span class="clearfix"></span>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
|
||||
|
||||
<div class="mt-1" *ngIf="fileFormat">
|
||||
{{'admin.registries.bitstream-formats.edit.head' | translate:{format: fileFormat} }}
|
||||
</div>
|
||||
<div class="mt-1" *ngIf="fileCheckSum">
|
||||
Checksum {{fileCheckSum.checkSumAlgorithm}}: {{fileCheckSum.value}}
|
||||
</div>
|
||||
<span class="clearfix"></span>
|
||||
<ds-submission-section-upload-access-conditions [accessConditions]="fileData.accessConditions"></ds-submission-section-upload-access-conditions>
|
||||
</div>
|
||||
|
@@ -38,6 +38,13 @@ export class SubmissionSectionUploadFileViewComponent implements OnInit {
|
||||
*/
|
||||
public fileDescrKey = 'Description';
|
||||
|
||||
public fileFormat!: string;
|
||||
|
||||
public fileCheckSum!: {
|
||||
checkSumAlgorithm: string;
|
||||
value: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* Initialize instance variables
|
||||
*/
|
||||
@@ -46,6 +53,8 @@ export class SubmissionSectionUploadFileViewComponent implements OnInit {
|
||||
this.metadata[this.fileTitleKey] = Metadata.all(this.fileData.metadata, 'dc.title');
|
||||
this.metadata[this.fileDescrKey] = Metadata.all(this.fileData.metadata, 'dc.description');
|
||||
}
|
||||
this.fileCheckSum = this.fileData.checkSum;
|
||||
this.fileFormat = this.fileData.format.shortDescription;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user