mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
Make theme-able.
This commit is contained in:
@@ -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<SubmissionSectionUploadFileComponent> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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<any> {
|
||||||
|
return import(`../../../../../themes/${themeName}/app/submission/sections/upload/file/section-upload-file.component`);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected importUnthemedComponent(): Promise<any> {
|
||||||
|
return import(`./section-upload-file.component`);
|
||||||
|
}
|
||||||
|
}
|
@@ -28,7 +28,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ng-container *ngFor="let fileEntry of fileList">
|
<ng-container *ngFor="let fileEntry of fileList">
|
||||||
<ds-submission-upload-section-file
|
<ds-themed-submission-upload-section-file
|
||||||
[availableAccessConditionOptions]="availableAccessConditionOptions"
|
[availableAccessConditionOptions]="availableAccessConditionOptions"
|
||||||
[collectionId]="collectionId"
|
[collectionId]="collectionId"
|
||||||
[collectionPolicyType]="collectionPolicyType"
|
[collectionPolicyType]="collectionPolicyType"
|
||||||
@@ -37,7 +37,7 @@
|
|||||||
[fileIndex]="fileList.indexOf(fileEntry)"
|
[fileIndex]="fileList.indexOf(fileEntry)"
|
||||||
[fileName]="fileNames[fileList.indexOf(fileEntry)]"
|
[fileName]="fileNames[fileList.indexOf(fileEntry)]"
|
||||||
[sectionId]="sectionData.id"
|
[sectionId]="sectionData.id"
|
||||||
[submissionId]="submissionId"></ds-submission-upload-section-file>
|
[submissionId]="submissionId"></ds-themed-submission-upload-section-file>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<hr/>
|
<hr/>
|
||||||
|
@@ -49,6 +49,7 @@ import { ResearchEntitiesModule } from '../entity-groups/research-entities/resea
|
|||||||
import { ThemedSubmissionEditComponent } from './edit/themed-submission-edit.component';
|
import { ThemedSubmissionEditComponent } from './edit/themed-submission-edit.component';
|
||||||
import { ThemedSubmissionSubmitComponent } from './submit/themed-submission-submit.component';
|
import { ThemedSubmissionSubmitComponent } from './submit/themed-submission-submit.component';
|
||||||
import { ThemedSubmissionImportExternalComponent } from './import-external/themed-submission-import-external.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 { FormModule } from '../shared/form/form.module';
|
||||||
import { NgbAccordionModule, NgbCollapseModule, NgbModalModule } from '@ng-bootstrap/ng-bootstrap';
|
import { NgbAccordionModule, NgbCollapseModule, NgbModalModule } from '@ng-bootstrap/ng-bootstrap';
|
||||||
import { SubmissionSectionAccessesComponent } from './sections/accesses/section-accesses.component';
|
import { SubmissionSectionAccessesComponent } from './sections/accesses/section-accesses.component';
|
||||||
@@ -104,6 +105,7 @@ const DECLARATIONS = [
|
|||||||
PublisherPolicyComponent,
|
PublisherPolicyComponent,
|
||||||
PublicationInformationComponent,
|
PublicationInformationComponent,
|
||||||
MetadataInformationComponent,
|
MetadataInformationComponent,
|
||||||
|
ThemedSubmissionSectionUploadFileComponent,
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
Reference in New Issue
Block a user