diff --git a/src/themes/custom/app/submission/sections/upload/file/section-upload-file.component.html b/src/themes/custom/app/submission/sections/upload/file/section-upload-file.component.html new file mode 100644 index 0000000000..8999853d72 --- /dev/null +++ b/src/themes/custom/app/submission/sections/upload/file/section-upload-file.component.html @@ -0,0 +1,52 @@ + + + + + + + + + {{fileName}} ({{fileData?.sizeBytes | dsFileSize}}) + + + + + + + + + + + + + + + + + + + + + + + + {{ 'submission.sections.upload.delete.confirm.title' | translate }} + + × + + + + {{ 'submission.sections.upload.delete.confirm.info' | translate }} + + + diff --git a/src/themes/custom/app/submission/sections/upload/file/section-upload-file.component.scss b/src/themes/custom/app/submission/sections/upload/file/section-upload-file.component.scss new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/submission/sections/upload/file/section-upload-file.component.ts b/src/themes/custom/app/submission/sections/upload/file/section-upload-file.component.ts new file mode 100644 index 0000000000..00431cbbe2 --- /dev/null +++ b/src/themes/custom/app/submission/sections/upload/file/section-upload-file.component.ts @@ -0,0 +1,89 @@ +import { + Component, Input, ViewChild +} from '@angular/core'; + +import { + SubmissionFormsModel +} from 'src/app/core/config/models/config-submission-forms.model'; +import { + SubmissionSectionUploadFileEditComponent +} from 'src/app/submission/sections/upload/file/edit/section-upload-file-edit.component'; +import { + SubmissionSectionUploadFileComponent as BaseComponent +} from 'src/app/submission/sections/upload/file/section-upload-file.component'; + +/** + * This component represents a single bitstream contained in the submission + */ +@Component({ + selector: 'ds-submission-upload-section-file', + // styleUrls: ['./section-upload-file.component.scss'], + styleUrls: ['../../../../../../../app/submission/sections/upload/file/section-upload-file.component.scss'], + // templateUrl: './section-upload-file.component.html' + templateUrl: '../../../../../../../app/submission/sections/upload/file/section-upload-file.component.html' +}) +export class SubmissionSectionUploadFileComponent + extends BaseComponent { + + /** + * The list of available access condition + * @type {Array} + */ + @Input() availableAccessConditionOptions: any[]; + + /** + * The submission id + * @type {string} + */ + @Input() collectionId: string; + + /** + * Define if collection access conditions policy type : + * POLICY_DEFAULT_NO_LIST : is not possible to define additional access group/s for the single file + * POLICY_DEFAULT_WITH_LIST : is possible to define additional access group/s for the single file + * @type {number} + */ + @Input() collectionPolicyType: number; + + /** + * The configuration for the bitstream's metadata form + * @type {SubmissionFormsModel} + */ + @Input() configMetadataForm: SubmissionFormsModel; + + /** + * The bitstream id + * @type {string} + */ + @Input() fileId: string; + + /** + * The bitstream array key + * @type {string} + */ + @Input() fileIndex: string; + + /** + * The bitstream id + * @type {string} + */ + @Input() fileName: string; + + /** + * The section id + * @type {string} + */ + @Input() sectionId: string; + + /** + * The submission id + * @type {string} + */ + @Input() submissionId: string; + + /** + * The [[SubmissionSectionUploadFileEditComponent]] reference + * @type {SubmissionSectionUploadFileEditComponent} + */ + @ViewChild(SubmissionSectionUploadFileEditComponent) fileEditComp: SubmissionSectionUploadFileEditComponent; +} diff --git a/src/themes/custom/lazy-theme.module.ts b/src/themes/custom/lazy-theme.module.ts index adf3a888c1..6f442eafcc 100644 --- a/src/themes/custom/lazy-theme.module.ts +++ b/src/themes/custom/lazy-theme.module.ts @@ -141,6 +141,7 @@ import { import { NgxGalleryModule } from '@kolkov/ngx-gallery'; import { WorkspaceItemsDeletePageComponent } from './app/workspace-items-delete-page/workspace-items-delete/workspace-items-delete.component'; import { ThumbnailComponent } from './app/thumbnail/thumbnail.component'; +import { SubmissionSectionUploadFileComponent } from './app/submission/sections/upload/file/section-upload-file.component'; const DECLARATIONS = [ FileSectionComponent, @@ -217,6 +218,7 @@ const DECLARATIONS = [ MediaViewerVideoComponent, WorkspaceItemsDeletePageComponent, ThumbnailComponent, + SubmissionSectionUploadFileComponent, ]; @NgModule({
{{ 'submission.sections.upload.delete.confirm.info' | translate }}