forked from hazza/dspace-angular
🚸remove thumbnail from file-upload section and show bitstream format and checksum
(cherry picked from commit 4c8ec8a4f2
)
This commit is contained in:

committed by
github-actions[bot]
![github-actions[bot]](/assets/img/avatar_default.png)
parent
a0a8607628
commit
b7b3db5ba8
@@ -29,6 +29,18 @@ export class WorkspaceitemSectionUploadFileObject {
|
|||||||
value: string;
|
value: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The file check sum
|
||||||
|
*/
|
||||||
|
format: {
|
||||||
|
shortDescription: string,
|
||||||
|
description: string,
|
||||||
|
mimetype: string,
|
||||||
|
supportLevel: string,
|
||||||
|
internal: boolean,
|
||||||
|
type: string
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The file url
|
* The file url
|
||||||
*/
|
*/
|
||||||
|
@@ -1,16 +1,13 @@
|
|||||||
<ng-container *ngIf="fileData">
|
<ng-container *ngIf="fileData">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-2">
|
<div class="col-md-12">
|
||||||
<!--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="float-left w-75">
|
<div class="float-left w-75">
|
||||||
<h3>{{fileName}} <span class="text-muted">({{fileData?.sizeBytes | dsFileSize}})</span></h3>
|
<h3>{{fileName}} <span class="text-muted">({{fileData?.sizeBytes | dsFileSize}})</span></h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="float-right w-15">
|
<div class="float-right w-15">
|
||||||
<ng-container>
|
<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>
|
<i class="fa fa-download fa-2x text-normal" aria-hidden="true"></i>
|
||||||
</ds-themed-file-download-link>
|
</ds-themed-file-download-link>
|
||||||
<button class="btn btn-link-focus"
|
<button class="btn btn-link-focus"
|
||||||
@@ -46,7 +43,9 @@
|
|||||||
<p>{{ 'submission.sections.upload.delete.confirm.info' | translate }}</p>
|
<p>{{ 'submission.sections.upload.delete.confirm.info' | translate }}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<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-secondary"
|
||||||
<button type="button" class="btn btn-danger" (click)="c('ok')">{{ 'submission.sections.upload.delete.confirm.submit' | translate }}</button>
|
(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>
|
</div>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
@@ -18,12 +18,20 @@
|
|||||||
{{entry.value | dsTruncate:['150']}}
|
{{entry.value | dsTruncate:['150']}}
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container *ngIf="entry.value === ''">
|
<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>
|
</ng-container>
|
||||||
<span class="clearfix"></span>
|
<span class="clearfix"></span>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</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>
|
<span class="clearfix"></span>
|
||||||
<ds-submission-section-upload-access-conditions [accessConditions]="fileData.accessConditions"></ds-submission-section-upload-access-conditions>
|
<ds-submission-section-upload-access-conditions [accessConditions]="fileData.accessConditions"></ds-submission-section-upload-access-conditions>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -1,6 +1,8 @@
|
|||||||
import {Component, Input, OnInit} from '@angular/core';
|
import {Component, Input, OnInit} from '@angular/core';
|
||||||
|
|
||||||
import { WorkspaceitemSectionUploadFileObject } from '../../../../../core/submission/models/workspaceitem-section-upload-file.model';
|
import {
|
||||||
|
WorkspaceitemSectionUploadFileObject
|
||||||
|
} from '../../../../../core/submission/models/workspaceitem-section-upload-file.model';
|
||||||
import {isNotEmpty} from '../../../../../shared/empty.util';
|
import {isNotEmpty} from '../../../../../shared/empty.util';
|
||||||
import {Metadata} from '../../../../../core/shared/metadata.utils';
|
import {Metadata} from '../../../../../core/shared/metadata.utils';
|
||||||
import {MetadataMap, MetadataValue} from '../../../../../core/shared/metadata.models';
|
import {MetadataMap, MetadataValue} from '../../../../../core/shared/metadata.models';
|
||||||
@@ -38,6 +40,13 @@ export class SubmissionSectionUploadFileViewComponent implements OnInit {
|
|||||||
*/
|
*/
|
||||||
public fileDescrKey = 'Description';
|
public fileDescrKey = 'Description';
|
||||||
|
|
||||||
|
public fileFormat!: string;
|
||||||
|
|
||||||
|
public fileCheckSum!: {
|
||||||
|
checkSumAlgorithm: string;
|
||||||
|
value: string;
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize instance variables
|
* Initialize instance variables
|
||||||
*/
|
*/
|
||||||
@@ -46,6 +55,8 @@ export class SubmissionSectionUploadFileViewComponent implements OnInit {
|
|||||||
this.metadata[this.fileTitleKey] = Metadata.all(this.fileData.metadata, 'dc.title');
|
this.metadata[this.fileTitleKey] = Metadata.all(this.fileData.metadata, 'dc.title');
|
||||||
this.metadata[this.fileDescrKey] = Metadata.all(this.fileData.metadata, 'dc.description');
|
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