diff --git a/src/app/bitstream-page/bitstream-page-routing.module.ts b/src/app/bitstream-page/bitstream-page-routing.module.ts index c2abe511a4..3960ccb743 100644 --- a/src/app/bitstream-page/bitstream-page-routing.module.ts +++ b/src/app/bitstream-page/bitstream-page-routing.module.ts @@ -1,6 +1,5 @@ import { NgModule } from '@angular/core'; import { RouterModule } from '@angular/router'; -import { EditBitstreamPageComponent } from './edit-bitstream-page/edit-bitstream-page.component'; import { AuthenticatedGuard } from '../core/auth/authenticated.guard'; import { BitstreamPageResolver } from './bitstream-page.resolver'; import { BitstreamDownloadPageComponent } from './bitstream-download-page/bitstream-download-page.component'; @@ -13,6 +12,7 @@ import { LegacyBitstreamUrlResolver } from './legacy-bitstream-url.resolver'; import { BitstreamBreadcrumbResolver } from '../core/breadcrumbs/bitstream-breadcrumb.resolver'; import { BitstreamBreadcrumbsService } from '../core/breadcrumbs/bitstream-breadcrumbs.service'; import { I18nBreadcrumbResolver } from '../core/breadcrumbs/i18n-breadcrumb.resolver'; +import { ThemedEditBitstreamPageComponent } from './edit-bitstream-page/themed-edit-bitstream-page.component'; const EDIT_BITSTREAM_PATH = ':id/edit'; const EDIT_BITSTREAM_AUTHORIZATIONS_PATH = ':id/authorizations'; @@ -49,7 +49,7 @@ const EDIT_BITSTREAM_AUTHORIZATIONS_PATH = ':id/authorizations'; }, { path: EDIT_BITSTREAM_PATH, - component: EditBitstreamPageComponent, + component: ThemedEditBitstreamPageComponent, resolve: { bitstream: BitstreamPageResolver, breadcrumb: BitstreamBreadcrumbResolver, diff --git a/src/app/bitstream-page/bitstream-page.module.ts b/src/app/bitstream-page/bitstream-page.module.ts index 992f714bf9..9bbe3d200c 100644 --- a/src/app/bitstream-page/bitstream-page.module.ts +++ b/src/app/bitstream-page/bitstream-page.module.ts @@ -7,6 +7,7 @@ import { BitstreamAuthorizationsComponent } from './bitstream-authorizations/bit import { FormModule } from '../shared/form/form.module'; import { ResourcePoliciesModule } from '../shared/resource-policies/resource-policies.module'; import { BitstreamDownloadPageComponent } from './bitstream-download-page/bitstream-download-page.component'; +import { ThemedEditBitstreamPageComponent } from './edit-bitstream-page/themed-edit-bitstream-page.component'; /** * This module handles all components that are necessary for Bitstream related pages @@ -22,6 +23,7 @@ import { BitstreamDownloadPageComponent } from './bitstream-download-page/bitstr declarations: [ BitstreamAuthorizationsComponent, EditBitstreamPageComponent, + ThemedEditBitstreamPageComponent, BitstreamDownloadPageComponent, ] }) diff --git a/src/app/bitstream-page/edit-bitstream-page/themed-edit-bitstream-page.component.ts b/src/app/bitstream-page/edit-bitstream-page/themed-edit-bitstream-page.component.ts new file mode 100644 index 0000000000..dcca28a495 --- /dev/null +++ b/src/app/bitstream-page/edit-bitstream-page/themed-edit-bitstream-page.component.ts @@ -0,0 +1,22 @@ +import { Component } from '@angular/core'; +import { EditBitstreamPageComponent } from './edit-bitstream-page.component'; +import { ThemedComponent } from '../../shared/theme-support/themed.component'; + +@Component({ + selector: 'ds-themed-edit-bitstream-page', + styleUrls: [], + templateUrl: '../../shared/theme-support/themed.component.html', +}) +export class ThemedEditBitstreamPageComponent extends ThemedComponent { + protected getComponentName(): string { + return 'EditBitstreamPageComponent'; + } + + protected importThemedComponent(themeName: string): Promise { + return import(`../../../themes/${themeName}/app/bitstream-page/edit-bitstream-page/edit-bitstream-page.component`); + } + + protected importUnthemedComponent(): Promise { + return import('./edit-bitstream-page.component'); + } +} diff --git a/src/app/item-page/edit-item-page/edit-item-page.module.ts b/src/app/item-page/edit-item-page/edit-item-page.module.ts index 7692df8924..5a2b5ba1f1 100644 --- a/src/app/item-page/edit-item-page/edit-item-page.module.ts +++ b/src/app/item-page/edit-item-page/edit-item-page.module.ts @@ -39,6 +39,8 @@ import { IdentifierDataComponent } from '../../shared/object-list/identifier-dat import { ItemRegisterDoiComponent } from './item-register-doi/item-register-doi.component'; import { DsoSharedModule } from '../../dso-shared/dso-shared.module'; import { ItemCurateComponent } from './item-curate/item-curate.component'; +import { ThemedItemStatusComponent } from './item-status/themed-item-status.component'; + /** * Module that contains all components related to the Edit Item page administrator functionality @@ -67,6 +69,7 @@ import { ItemCurateComponent } from './item-curate/item-curate.component'; ItemPublicComponent, ItemDeleteComponent, ItemStatusComponent, + ThemedItemStatusComponent, ItemRelationshipsComponent, ItemBitstreamsComponent, ItemVersionHistoryComponent, @@ -89,6 +92,9 @@ import { ItemCurateComponent } from './item-curate/item-curate.component'; IdentifierDataService, ObjectValuesPipe ], + exports: [ + ItemOperationComponent, + ] }) export class EditItemPageModule { diff --git a/src/app/item-page/edit-item-page/edit-item-page.routing.module.ts b/src/app/item-page/edit-item-page/edit-item-page.routing.module.ts index 9923748338..22eb624db7 100644 --- a/src/app/item-page/edit-item-page/edit-item-page.routing.module.ts +++ b/src/app/item-page/edit-item-page/edit-item-page.routing.module.ts @@ -6,7 +6,6 @@ import { ItemReinstateComponent } from './item-reinstate/item-reinstate.componen import { ItemPrivateComponent } from './item-private/item-private.component'; import { ItemPublicComponent } from './item-public/item-public.component'; import { ItemDeleteComponent } from './item-delete/item-delete.component'; -import { ItemStatusComponent } from './item-status/item-status.component'; import { ItemBitstreamsComponent } from './item-bitstreams/item-bitstreams.component'; import { ItemCollectionMapperComponent } from './item-collection-mapper/item-collection-mapper.component'; import { ItemMoveComponent } from './item-move/item-move.component'; @@ -42,6 +41,7 @@ import { ItemPageCollectionMapperGuard } from './item-page-collection-mapper.gua import { ThemedDsoEditMetadataComponent } from '../../dso-shared/dso-edit-metadata/themed-dso-edit-metadata.component'; import { ItemPageRegisterDoiGuard } from './item-page-register-doi.guard'; import { ItemCurateComponent } from './item-curate/item-curate.component'; +import { ThemedItemStatusComponent } from './item-status/themed-item-status.component'; /** * Routing module that handles the routing for the Edit Item page administrator functionality @@ -67,7 +67,7 @@ import { ItemCurateComponent } from './item-curate/item-curate.component'; }, { path: 'status', - component: ItemStatusComponent, + component: ThemedItemStatusComponent, data: { title: 'item.edit.tabs.status.title', showBreadcrumbs: true }, canActivate: [ItemPageStatusGuard] }, diff --git a/src/app/item-page/edit-item-page/item-status/themed-item-status.component.ts b/src/app/item-page/edit-item-page/item-status/themed-item-status.component.ts new file mode 100644 index 0000000000..eac5a53702 --- /dev/null +++ b/src/app/item-page/edit-item-page/item-status/themed-item-status.component.ts @@ -0,0 +1,23 @@ +import { Component } from '@angular/core'; +import { ThemedComponent } from '../../../shared/theme-support/themed.component'; +import { ItemStatusComponent } from './item-status.component'; + +@Component({ + selector: 'ds-themed-item-status', + styleUrls: [], + templateUrl: '../../../shared/theme-support/themed.component.html', +}) +export class ThemedItemStatusComponent extends ThemedComponent { + protected getComponentName(): string { + return 'ItemStatusComponent'; + } + + protected importThemedComponent(themeName: string): Promise { + return import(`../../../../themes/${themeName}/app/item-page/edit-item-page/item-status/item-status.component`); + } + + protected importUnthemedComponent(): Promise { + return import('./item-status.component'); + } + +} diff --git a/src/app/shared/context-help-wrapper/context-help-wrapper.component.html b/src/app/shared/context-help-wrapper/context-help-wrapper.component.html index b031d0f42d..083b8163ff 100644 --- a/src/app/shared/context-help-wrapper/context-help-wrapper.component.html +++ b/src/app/shared/context-help-wrapper/context-help-wrapper.component.html @@ -2,7 +2,7 @@
- {{elem.text}} + {{elem.text}} {{ elem }} diff --git a/src/app/shared/search/search-filters/search-filter/search-filter.component.html b/src/app/shared/search/search-filters/search-filter/search-filter.component.html index 13457cc008..a6fb0021b7 100644 --- a/src/app/shared/search/search-filters/search-filter/search-filter.component.html +++ b/src/app/shared/search/search-filters/search-filter/search-filter.component.html @@ -3,7 +3,7 @@ diff --git a/src/app/submission/form/collection/submission-form-collection.component.html b/src/app/submission/form/collection/submission-form-collection.component.html index c1227eeccc..a78d737640 100644 --- a/src/app/submission/form/collection/submission-form-collection.component.html +++ b/src/app/submission/form/collection/submission-form-collection.component.html @@ -25,7 +25,7 @@ class="btn btn-outline-primary" (blur)="onClose()" (click)="onClose()" - [disabled]="(processingChange$ | async) || collectionModifiable == false" + [disabled]="(processingChange$ | async) || collectionModifiable == false || isReadonly" ngbDropdownToggle> {{ selectedCollectionName$ | async }} diff --git a/src/app/submission/form/collection/submission-form-collection.component.spec.ts b/src/app/submission/form/collection/submission-form-collection.component.spec.ts index c4ac4eff76..c76de83b83 100644 --- a/src/app/submission/form/collection/submission-form-collection.component.spec.ts +++ b/src/app/submission/form/collection/submission-form-collection.component.spec.ts @@ -252,6 +252,12 @@ describe('SubmissionFormCollectionComponent Component', () => { expect(dropDown).toBeFalsy(); }); + it('the dropdown button should be disabled when isReadonly is true', () => { + comp.isReadonly = true; + fixture.detectChanges(); + expect(dropdowBtn.nativeNode.attributes.disabled).toBeDefined(); + }); + it('should be simulated when the drop-down menu is closed', () => { spyOn(comp, 'onClose'); comp.onClose(); diff --git a/src/app/submission/form/collection/submission-form-collection.component.ts b/src/app/submission/form/collection/submission-form-collection.component.ts index b985a1c73b..964f86577a 100644 --- a/src/app/submission/form/collection/submission-form-collection.component.ts +++ b/src/app/submission/form/collection/submission-form-collection.component.ts @@ -65,6 +65,11 @@ export class SubmissionFormCollectionComponent implements OnChanges, OnInit { */ @Input() submissionId; + /** + * Flag to indicate if the submission dropdown is read only + */ + @Input() isReadonly = false; + /** * An event fired when a different collection is selected. * Event's payload equals to new SubmissionObject. diff --git a/src/app/submission/form/submission-form.component.html b/src/app/submission/form/submission-form.component.html index f75af08f8e..4a916cfe23 100644 --- a/src/app/submission/form/submission-form.component.html +++ b/src/app/submission/form/submission-form.component.html @@ -8,12 +8,15 @@
+ +
{ @@ -156,6 +157,32 @@ describe('SubmissionFormComponent Component', () => { done(); }); + it('should return the visibility object of the collection section', () => { + comp.submissionDefinition = submissionDefinition; + fixture.detectChanges(); + const result = compAsAny.getCollectionVisibility(); + expect(result).toEqual({ + main: VisibilityType.HIDDEN, + other: VisibilityType.HIDDEN, + }); + }); + + it('should return true if collection section visibility is hidden', () => { + comp.submissionDefinition = submissionDefinition; + fixture.detectChanges(); + expect(comp.isSectionHidden).toBe(true); + }); + + it('should return false for isSectionReadonly when collection section visibility is not READONLY', () => { + const visibility = { + main: VisibilityType.READONLY, + other: VisibilityType.READONLY, + }; + comp.submissionDefinition = Object.assign({}, submissionDefinition, { visibility: visibility }); + fixture.detectChanges(); + expect(comp.isSectionReadonly).toBe(false); + }); + it('should update properly on collection change', (done) => { comp.collectionId = collectionId; comp.submissionId = submissionId; diff --git a/src/app/submission/form/submission-form.component.ts b/src/app/submission/form/submission-form.component.ts index 0e17e128bc..216aefcfc3 100644 --- a/src/app/submission/form/submission-form.component.ts +++ b/src/app/submission/form/submission-form.component.ts @@ -9,7 +9,7 @@ import { HALEndpointService } from '../../core/shared/hal-endpoint.service'; import { SubmissionObject } from '../../core/submission/models/submission-object.model'; import { WorkspaceitemSectionsObject } from '../../core/submission/models/workspaceitem-sections.model'; -import { hasValue, isNotEmpty } from '../../shared/empty.util'; +import { hasValue, isNotEmpty, isNotUndefined } from '../../shared/empty.util'; import { UploaderOptions } from '../../shared/upload/uploader/uploader-options.model'; import { SubmissionObjectEntry } from '../objects/submission-objects.reducer'; import { SectionDataObject } from '../sections/models/section-data.model'; @@ -18,6 +18,10 @@ import { Item } from '../../core/shared/item.model'; import { SectionsType } from '../sections/sections-type'; import { SectionsService } from '../sections/sections.service'; import { SubmissionError } from '../objects/submission-error.model'; +import { SubmissionSectionVisibility } from './../../core/config/models/config-submission-section.model'; +import { SubmissionSectionModel } from './../../core/config/models/config-submission-section.model'; +import { VisibilityType } from '../sections/visibility-type'; +import isEqual from 'lodash/isEqual'; /** * This component represents the submission form. @@ -188,6 +192,42 @@ export class SubmissionFormComponent implements OnChanges, OnDestroy { } } + /** + * Returns the visibility object of the collection section + */ + private getCollectionVisibility(): SubmissionSectionVisibility { + const submissionSectionModel: SubmissionSectionModel = + this.submissionDefinition.sections.page.find( + (section) => isEqual(section.sectionType, SectionsType.Collection) + ); + + return isNotUndefined(submissionSectionModel.visibility) ? submissionSectionModel.visibility : null; + } + + /** + * Getter to see if the collection section visibility is hidden + */ + get isSectionHidden(): boolean { + const visibility = this.getCollectionVisibility(); + return ( + hasValue(visibility) && + isEqual(visibility.main, VisibilityType.HIDDEN) && + isEqual(visibility.other, VisibilityType.HIDDEN) + ); + } + + /** + * Getter to see if the collection section visibility is readonly + */ + get isSectionReadonly(): boolean { + const visibility = this.getCollectionVisibility(); + return ( + hasValue(visibility) && + isEqual(visibility.main, VisibilityType.READONLY) && + isEqual(visibility.other, VisibilityType.READONLY) + ); + } + /** * Unsubscribe from all subscriptions, destroy instance variables * and reset submission state @@ -239,6 +279,8 @@ export class SubmissionFormComponent implements OnChanges, OnDestroy { protected getSectionsList(): Observable { return this.submissionService.getSubmissionSections(this.submissionId).pipe( filter((sections: SectionDataObject[]) => isNotEmpty(sections)), - map((sections: SectionDataObject[]) => sections)); + map((sections: SectionDataObject[]) => + sections.filter((section: SectionDataObject) => !isEqual(section.sectionType,SectionsType.Collection))), + ); } } diff --git a/src/app/submission/sections/sections-type.ts b/src/app/submission/sections/sections-type.ts index 6fb7380822..6bca8a7252 100644 --- a/src/app/submission/sections/sections-type.ts +++ b/src/app/submission/sections/sections-type.ts @@ -8,4 +8,5 @@ export enum SectionsType { AccessesCondition = 'accessCondition', SherpaPolicies = 'sherpaPolicy', Identifiers = 'identifiers', + Collection = 'collection', } diff --git a/src/app/submission/sections/sherpa-policies/publication-information/publication-information.component.html b/src/app/submission/sections/sherpa-policies/publication-information/publication-information.component.html index 3c35da8f08..534b95397e 100644 --- a/src/app/submission/sections/sherpa-policies/publication-information/publication-information.component.html +++ b/src/app/submission/sections/sherpa-policies/publication-information/publication-information.component.html @@ -23,7 +23,7 @@

- + {{journal.url}}

@@ -35,7 +35,7 @@

- + {{publisher.name}}

diff --git a/src/app/submission/sections/sherpa-policies/publisher-policy/publisher-policy.component.html b/src/app/submission/sections/sherpa-policies/publisher-policy/publisher-policy.component.html index 87370cf7e3..96e42202b3 100644 --- a/src/app/submission/sections/sherpa-policies/publisher-policy/publisher-policy.component.html +++ b/src/app/submission/sections/sherpa-policies/publisher-policy/publisher-policy.component.html @@ -8,7 +8,7 @@

diff --git a/src/app/submission/sections/upload/file/section-upload-file.component.spec.ts b/src/app/submission/sections/upload/file/section-upload-file.component.spec.ts index 4fea8d3f25..4f62ceef6c 100644 --- a/src/app/submission/sections/upload/file/section-upload-file.component.spec.ts +++ b/src/app/submission/sections/upload/file/section-upload-file.component.spec.ts @@ -175,7 +175,7 @@ describe('SubmissionSectionUploadFileComponent test suite', () => { it('should init file data properly', () => { uploadService.getFileData.and.returnValue(observableOf(fileData)); - comp.ngOnChanges(); + comp.ngOnChanges({}); expect(comp.fileData).toEqual(fileData); }); diff --git a/src/app/submission/sections/upload/file/section-upload-file.component.ts b/src/app/submission/sections/upload/file/section-upload-file.component.ts index a8e05fcf40..26fb9445cb 100644 --- a/src/app/submission/sections/upload/file/section-upload-file.component.ts +++ b/src/app/submission/sections/upload/file/section-upload-file.component.ts @@ -1,4 +1,13 @@ -import { ChangeDetectorRef, Component, Input, OnChanges, OnInit, ViewChild } from '@angular/core'; +import { + ChangeDetectorRef, + Component, + Input, + OnChanges, + OnDestroy, + OnInit, + SimpleChanges, + ViewChild +} from '@angular/core'; import { BehaviorSubject, Subscription } from 'rxjs'; import { filter } from 'rxjs/operators'; @@ -27,7 +36,7 @@ import { NgbModalOptions } from '@ng-bootstrap/ng-bootstrap/modal/modal-config'; styleUrls: ['./section-upload-file.component.scss'], templateUrl: './section-upload-file.component.html', }) -export class SubmissionSectionUploadFileComponent implements OnChanges, OnInit { +export class SubmissionSectionUploadFileComponent implements OnChanges, OnInit, OnDestroy { /** * The list of available access condition @@ -168,13 +177,13 @@ export class SubmissionSectionUploadFileComponent implements OnChanges, OnInit { /** * Retrieve bitstream's metadata */ - ngOnChanges() { + ngOnChanges(changes: SimpleChanges): void { if (this.availableAccessConditionOptions) { // Retrieve file state this.subscriptions.push( this.uploadService - .getFileData(this.submissionId, this.sectionId, this.fileId).pipe( - filter((bitstream) => isNotUndefined(bitstream))) + .getFileData(this.submissionId, this.sectionId, this.fileId) + .pipe(filter((bitstream) => isNotUndefined(bitstream))) .subscribe((bitstream) => { this.fileData = bitstream; } diff --git a/src/app/submission/sections/upload/file/themed-section-upload-file.component.ts b/src/app/submission/sections/upload/file/themed-section-upload-file.component.ts new file mode 100644 index 0000000000..9e0a265c3c --- /dev/null +++ b/src/app/submission/sections/upload/file/themed-section-upload-file.component.ts @@ -0,0 +1,93 @@ +import { Component, Input } from '@angular/core'; +import { SubmissionFormsModel } from 'src/app/core/config/models/config-submission-forms.model'; +import { ThemedComponent } from 'src/app/shared/theme-support/themed.component'; +import { SubmissionSectionUploadFileComponent } from './section-upload-file.component'; + +@Component({ + selector: 'ds-themed-submission-upload-section-file', + styleUrls: [], + templateUrl: '../../../../shared/theme-support/themed.component.html' +}) +export class ThemedSubmissionSectionUploadFileComponent + extends ThemedComponent { + + /** + * 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; + + protected inAndOutputNames: (keyof SubmissionSectionUploadFileComponent & keyof this)[] = [ + 'availableAccessConditionOptions', + 'collectionId', + 'collectionPolicyType', + 'configMetadataForm', + 'fileId', + 'fileIndex', + 'fileName', + 'sectionId', + 'submissionId' + ]; + + protected getComponentName(): string { + return 'SubmissionSectionUploadFileComponent'; + } + + protected importThemedComponent(themeName: string): Promise { + return import(`../../../../../themes/${themeName}/app/submission/sections/upload/file/section-upload-file.component`); + } + + protected importUnthemedComponent(): Promise { + return import(`./section-upload-file.component`); + } +} diff --git a/src/app/submission/sections/upload/section-upload.component.html b/src/app/submission/sections/upload/section-upload.component.html index 8a19f66220..b57b454288 100644 --- a/src/app/submission/sections/upload/section-upload.component.html +++ b/src/app/submission/sections/upload/section-upload.component.html @@ -28,7 +28,7 @@ - + [submissionId]="submissionId">

diff --git a/src/app/submission/sections/visibility-type.ts b/src/app/submission/sections/visibility-type.ts new file mode 100644 index 0000000000..b2e167285c --- /dev/null +++ b/src/app/submission/sections/visibility-type.ts @@ -0,0 +1,4 @@ +export enum VisibilityType { + HIDDEN = 'HIDDEN', + READONLY = 'READONLY', +} diff --git a/src/app/submission/submission.module.ts b/src/app/submission/submission.module.ts index 91f782225a..cf0ab2b369 100644 --- a/src/app/submission/submission.module.ts +++ b/src/app/submission/submission.module.ts @@ -49,6 +49,7 @@ import { ResearchEntitiesModule } from '../entity-groups/research-entities/resea import { ThemedSubmissionEditComponent } from './edit/themed-submission-edit.component'; import { ThemedSubmissionSubmitComponent } from './submit/themed-submission-submit.component'; import { ThemedSubmissionImportExternalComponent } from './import-external/themed-submission-import-external.component'; +import { ThemedSubmissionSectionUploadFileComponent } from './sections/upload/file/themed-section-upload-file.component'; import { FormModule } from '../shared/form/form.module'; import { NgbAccordionModule, NgbCollapseModule, NgbModalModule } from '@ng-bootstrap/ng-bootstrap'; import { SubmissionSectionAccessesComponent } from './sections/accesses/section-accesses.component'; @@ -104,6 +105,7 @@ const DECLARATIONS = [ PublisherPolicyComponent, PublicationInformationComponent, MetadataInformationComponent, + ThemedSubmissionSectionUploadFileComponent, ]; @NgModule({ diff --git a/src/assets/i18n/en.json5 b/src/assets/i18n/en.json5 index 93418dc189..88b5e17a01 100644 --- a/src/assets/i18n/en.json5 +++ b/src/assets/i18n/en.json5 @@ -849,6 +849,8 @@ "browse.startsWith.type_text": "Filter results by typing the first few letters", + "browse.startsWith.input": "Filter", + "browse.title": "Browsing {{ collection }} by {{ field }}{{ startsWith }} {{ value }}", "browse.title.page": "Browsing {{ collection }} by {{ field }} {{ value }}", @@ -4061,7 +4063,7 @@ "submission.general.cancel": "Cancel", - "submission.general.cannot_submit": "You have not the privilege to make a new submission.", + "submission.general.cannot_submit": "You don't have permission to make a new submission.", "submission.general.deposit": "Deposit", diff --git a/src/themes/custom/app/bitstream-page/edit-bitstream-page/edit-bitstream-page.component.html b/src/themes/custom/app/bitstream-page/edit-bitstream-page/edit-bitstream-page.component.html new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/bitstream-page/edit-bitstream-page/edit-bitstream-page.component.scss b/src/themes/custom/app/bitstream-page/edit-bitstream-page/edit-bitstream-page.component.scss new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/bitstream-page/edit-bitstream-page/edit-bitstream-page.component.ts b/src/themes/custom/app/bitstream-page/edit-bitstream-page/edit-bitstream-page.component.ts new file mode 100644 index 0000000000..f8ca14addb --- /dev/null +++ b/src/themes/custom/app/bitstream-page/edit-bitstream-page/edit-bitstream-page.component.ts @@ -0,0 +1,13 @@ +import { EditBitstreamPageComponent as BaseComponent } from '../../../../../app/bitstream-page/edit-bitstream-page/edit-bitstream-page.component'; +import { ChangeDetectionStrategy, Component } from '@angular/core'; + +@Component({ + selector: 'ds-edit-bitstream-page', + // styleUrls: ['./edit-bitstream-page.component.scss'], + styleUrls: ['../../../../../app/bitstream-page/edit-bitstream-page/edit-bitstream-page.component.scss'], + // templateUrl: './edit-bitstream-page.component.html', + templateUrl: '../../../../../app/bitstream-page/edit-bitstream-page/edit-bitstream-page.component.html', + changeDetection: ChangeDetectionStrategy.OnPush +}) +export class EditBitstreamPageComponent extends BaseComponent { +} diff --git a/src/themes/custom/app/item-page/edit-item-page/item-status/item-status.component.html b/src/themes/custom/app/item-page/edit-item-page/item-status/item-status.component.html new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/item-page/edit-item-page/item-status/item-status.component.ts b/src/themes/custom/app/item-page/edit-item-page/item-status/item-status.component.ts new file mode 100644 index 0000000000..95acec2275 --- /dev/null +++ b/src/themes/custom/app/item-page/edit-item-page/item-status/item-status.component.ts @@ -0,0 +1,16 @@ +import { ChangeDetectionStrategy, Component } from '@angular/core'; +import { fadeIn, fadeInOut } from '../../../../../../app/shared/animations/fade'; +import { ItemStatusComponent as BaseComponent } from '../../../../../../app/item-page/edit-item-page/item-status/item-status.component'; + +@Component({ + selector: 'ds-item-status', + // templateUrl: './item-status.component.html', + templateUrl: '../../../../../../app/item-page/edit-item-page/item-status/item-status.component.html', + changeDetection: ChangeDetectionStrategy.Default, + animations: [ + fadeIn, + fadeInOut + ] +}) +export class ItemStatusComponent extends BaseComponent { +} 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..e69de29bb2 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..369af4e36c --- /dev/null +++ b/src/themes/custom/app/submission/sections/upload/file/section-upload-file.component.ts @@ -0,0 +1,18 @@ +import { Component } from '@angular/core'; +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 { +} diff --git a/src/themes/custom/lazy-theme.module.ts b/src/themes/custom/lazy-theme.module.ts index adf3a888c1..33a618871b 100644 --- a/src/themes/custom/lazy-theme.module.ts +++ b/src/themes/custom/lazy-theme.module.ts @@ -141,6 +141,10 @@ 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'; +import { ItemStatusComponent } from './app/item-page/edit-item-page/item-status/item-status.component'; +import { EditBitstreamPageComponent } from './app/bitstream-page/edit-bitstream-page/edit-bitstream-page.component'; +import { FormModule } from '../../app/shared/form/form.module'; const DECLARATIONS = [ FileSectionComponent, @@ -217,6 +221,9 @@ const DECLARATIONS = [ MediaViewerVideoComponent, WorkspaceItemsDeletePageComponent, ThumbnailComponent, + SubmissionSectionUploadFileComponent, + ItemStatusComponent, + EditBitstreamPageComponent, ]; @NgModule({ @@ -275,6 +282,7 @@ const DECLARATIONS = [ DsoSharedModule, SystemWideAlertModule, NgxGalleryModule, + FormModule, ], declarations: DECLARATIONS, exports: [