From 4c8ec8a4f22fcc4930b898581de098e317e08b5d Mon Sep 17 00:00:00 2001 From: Hugo Dominguez Date: Fri, 4 Aug 2023 12:44:13 -0600 Subject: [PATCH 1/3] =?UTF-8?q?=F0=9F=9A=B8remove=20thumbnail=20from=20fil?= =?UTF-8?q?e-upload=20section=20and=20show=20bitstream=20format=20and=20ch?= =?UTF-8?q?ecksum?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...workspaceitem-section-upload-file.model.ts | 16 ++++++++++++-- .../file/section-upload-file.component.html | 15 +++++++------ .../section-upload-file-view.component.html | 12 +++++++++-- .../section-upload-file-view.component.ts | 21 ++++++++++++++----- 4 files changed, 47 insertions(+), 17 deletions(-) diff --git a/src/app/core/submission/models/workspaceitem-section-upload-file.model.ts b/src/app/core/submission/models/workspaceitem-section-upload-file.model.ts index 177473b7d58..59a8faf6342 100644 --- a/src/app/core/submission/models/workspaceitem-section-upload-file.model.ts +++ b/src/app/core/submission/models/workspaceitem-section-upload-file.model.ts @@ -1,5 +1,5 @@ -import { SubmissionUploadFileAccessConditionObject } from './submission-upload-file-access-condition.model'; -import { WorkspaceitemSectionFormObject } from './workspaceitem-section-form.model'; +import {SubmissionUploadFileAccessConditionObject} from './submission-upload-file-access-condition.model'; +import {WorkspaceitemSectionFormObject} from './workspaceitem-section-form.model'; /** * An interface to represent submission's upload section file entry. @@ -29,6 +29,18 @@ export class WorkspaceitemSectionUploadFileObject { value: string; }; + /** + * The file check sum + */ + format: { + shortDescription: string, + description: string, + mimetype: string, + supportLevel: string, + internal: boolean, + type: string + }; + /** * The file url */ diff --git a/src/app/submission/sections/upload/file/section-upload-file.component.html b/src/app/submission/sections/upload/file/section-upload-file.component.html index 8999853d722..cd0ee512fde 100644 --- a/src/app/submission/sections/upload/file/section-upload-file.component.html +++ b/src/app/submission/sections/upload/file/section-upload-file.component.html @@ -1,16 +1,13 @@
-
- - -
-
+

{{fileName}} ({{fileData?.sizeBytes | dsFileSize}})

- +
diff --git a/src/app/submission/sections/upload/file/view/section-upload-file-view.component.html b/src/app/submission/sections/upload/file/view/section-upload-file-view.component.html index b84ef6f6a8c..cc12b5dea63 100644 --- a/src/app/submission/sections/upload/file/view/section-upload-file-view.component.html +++ b/src/app/submission/sections/upload/file/view/section-upload-file-view.component.html @@ -15,15 +15,23 @@
- {{entry.value | dsTruncate:['150']}} + {{entry.value | dsTruncate:['150']}} - {{'submission.sections.upload.no-entry' | translate}} {{fileDescrKey}} + {{'submission.sections.upload.no-entry' | translate}} {{fileDescrKey}} + +
+ {{'admin.registries.bitstream-formats.edit.head' | translate:{format: fileFormat} }} +
+
+ Checksum {{fileCheckSum.checkSumAlgorithm}}: {{fileCheckSum.value}} +
diff --git a/src/app/submission/sections/upload/file/view/section-upload-file-view.component.ts b/src/app/submission/sections/upload/file/view/section-upload-file-view.component.ts index bb2fea20f83..b0ea2487e10 100644 --- a/src/app/submission/sections/upload/file/view/section-upload-file-view.component.ts +++ b/src/app/submission/sections/upload/file/view/section-upload-file-view.component.ts @@ -1,9 +1,11 @@ -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 { isNotEmpty } from '../../../../../shared/empty.util'; -import { Metadata } from '../../../../../core/shared/metadata.utils'; -import { MetadataMap, MetadataValue } from '../../../../../core/shared/metadata.models'; +import { + WorkspaceitemSectionUploadFileObject +} from '../../../../../core/submission/models/workspaceitem-section-upload-file.model'; +import {isNotEmpty} from '../../../../../shared/empty.util'; +import {Metadata} from '../../../../../core/shared/metadata.utils'; +import {MetadataMap, MetadataValue} from '../../../../../core/shared/metadata.models'; /** * This component allow to show bitstream's metadata @@ -38,6 +40,13 @@ export class SubmissionSectionUploadFileViewComponent implements OnInit { */ public fileDescrKey = 'Description'; + public fileFormat!: string; + + public fileCheckSum!: { + checkSumAlgorithm: string; + value: string; + }; + /** * 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.fileDescrKey] = Metadata.all(this.fileData.metadata, 'dc.description'); } + this.fileCheckSum = this.fileData.checkSum; + this.fileFormat = this.fileData.format.shortDescription; } /** From 13e4052c4da07014a1c01087bfc6d293a8bb71c5 Mon Sep 17 00:00:00 2001 From: Hugo Dominguez Date: Fri, 8 Sep 2023 11:51:42 -0600 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=8E=A8revert=20unnecessary=20format?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../workspaceitem-section-upload-file.model.ts | 4 ++-- .../file/view/section-upload-file-view.component.ts | 12 +++++------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/app/core/submission/models/workspaceitem-section-upload-file.model.ts b/src/app/core/submission/models/workspaceitem-section-upload-file.model.ts index 59a8faf6342..785d7c402fa 100644 --- a/src/app/core/submission/models/workspaceitem-section-upload-file.model.ts +++ b/src/app/core/submission/models/workspaceitem-section-upload-file.model.ts @@ -1,5 +1,5 @@ -import {SubmissionUploadFileAccessConditionObject} from './submission-upload-file-access-condition.model'; -import {WorkspaceitemSectionFormObject} from './workspaceitem-section-form.model'; +import { SubmissionUploadFileAccessConditionObject } from './submission-upload-file-access-condition.model'; +import { WorkspaceitemSectionFormObject } from './workspaceitem-section-form.model'; /** * An interface to represent submission's upload section file entry. diff --git a/src/app/submission/sections/upload/file/view/section-upload-file-view.component.ts b/src/app/submission/sections/upload/file/view/section-upload-file-view.component.ts index b0ea2487e10..b15b0ab3211 100644 --- a/src/app/submission/sections/upload/file/view/section-upload-file-view.component.ts +++ b/src/app/submission/sections/upload/file/view/section-upload-file-view.component.ts @@ -1,11 +1,9 @@ -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 {isNotEmpty} from '../../../../../shared/empty.util'; -import {Metadata} from '../../../../../core/shared/metadata.utils'; -import {MetadataMap, MetadataValue} from '../../../../../core/shared/metadata.models'; +import { WorkspaceitemSectionUploadFileObject } from '../../../../../core/submission/models/workspaceitem-section-upload-file.model'; +import { isNotEmpty } from '../../../../../shared/empty.util'; +import { Metadata } from '../../../../../core/shared/metadata.utils'; +import { MetadataMap, MetadataValue } from '../../../../../core/shared/metadata.models'; /** * This component allow to show bitstream's metadata From 01c8a4d9c3347cb5b30d4d912a3f7e18b81f989a Mon Sep 17 00:00:00 2001 From: Tim Donohue Date: Fri, 8 Sep 2023 14:28:23 -0500 Subject: [PATCH 3/3] Update workspaceitem-section-upload-file.model.ts Fix code comment --- .../models/workspaceitem-section-upload-file.model.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/core/submission/models/workspaceitem-section-upload-file.model.ts b/src/app/core/submission/models/workspaceitem-section-upload-file.model.ts index 785d7c402fa..725e646d761 100644 --- a/src/app/core/submission/models/workspaceitem-section-upload-file.model.ts +++ b/src/app/core/submission/models/workspaceitem-section-upload-file.model.ts @@ -30,7 +30,7 @@ export class WorkspaceitemSectionUploadFileObject { }; /** - * The file check sum + * The file format information */ format: { shortDescription: string,