mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-08 02:24:11 +00:00
54472: Added metadata to community/collection creation
This commit is contained in:
@@ -22,11 +22,11 @@
|
||||
</div>
|
||||
<div class="col-12 form-group">
|
||||
<label for="collection-license" class="font-weight-bold">{{ 'collection.edit.license' | translate }}</label>
|
||||
<textarea [(ngModel)]="license" name="news" id="collection-license" class="form-control" aria-label="Collection License" rows="6" ></textarea>
|
||||
<textarea [(ngModel)]="license" name="license" id="collection-license" class="form-control" aria-label="Collection License" rows="6" ></textarea>
|
||||
</div>
|
||||
<div class="col-12 form-group">
|
||||
<label for="collection-provenance" class="font-weight-bold">{{ 'collection.edit.provenance' | translate }}</label>
|
||||
<textarea [(ngModel)]="provenance" name="news" id="collection-provenance" class="form-control" aria-label="Collection Provenance" rows="6" ></textarea>
|
||||
<textarea [(ngModel)]="provenance" name="provenance" id="collection-provenance" class="form-control" aria-label="Collection Provenance" rows="6" ></textarea>
|
||||
</div>
|
||||
<div class="col-12 form-group">
|
||||
<button type="button" class="btn btn-secondary" id="collection-cancel" (click)="cancel()">{{ 'collection.edit.cancel' | translate }}</button>
|
||||
|
@@ -33,7 +33,14 @@ export class CreateCollectionPageComponent {
|
||||
|
||||
onSubmit(data: any) {
|
||||
const collection = Object.assign(new Collection(), {
|
||||
name: data.name
|
||||
name: data.name,
|
||||
metadata: [
|
||||
{ key: 'dc.description', value: data.introductory },
|
||||
{ key: 'dc.description.abstract', value: data.description },
|
||||
{ key: 'dc.rights', value: data.copyright },
|
||||
{ key: 'dc.rights.license', value: data.license }
|
||||
// TODO: metadata for news and provenance
|
||||
]
|
||||
});
|
||||
this.parentUUID$.subscribe((uuid: string) => {
|
||||
let response$: Observable<ResponseCacheEntry>;
|
||||
|
@@ -31,7 +31,13 @@ export class CreateCommunityPageComponent {
|
||||
|
||||
onSubmit(data: any) {
|
||||
const community = Object.assign(new Community(), {
|
||||
name: data.name
|
||||
name: data.name,
|
||||
metadata: [
|
||||
{ key: 'dc.description', value: data.introductory },
|
||||
{ key: 'dc.description.abstract', value: data.description },
|
||||
{ key: 'dc.rights', value: data.copyright }
|
||||
// TODO: metadata for news
|
||||
]
|
||||
});
|
||||
this.parentUUID$.subscribe((uuid: string) => {
|
||||
let response$: Observable<ResponseCacheEntry>;
|
||||
|
@@ -89,6 +89,11 @@ export abstract class ComColDataService<TNormalized extends NormalizedObject, TD
|
||||
if (parentUUID) {
|
||||
urlParams += '&parent=' + parentUUID;
|
||||
}
|
||||
if (comcol.metadata) {
|
||||
for (const i of Object.keys(comcol.metadata)) {
|
||||
urlParams += '&' + comcol.metadata[i].key + '=' + comcol.metadata[i].value;
|
||||
}
|
||||
}
|
||||
return urlParams;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user