mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
65240: Message cleanup
This commit is contained in:
@@ -24,26 +24,6 @@ export class CollectionFormComponent extends ComColFormComponent<Collection> {
|
||||
*/
|
||||
@Input() dso: Collection = new Collection();
|
||||
|
||||
/**
|
||||
* i18n key for the logo's label
|
||||
*/
|
||||
protected logoLabelMsg = 'collection.edit.logo.label';
|
||||
|
||||
/**
|
||||
* i18n key for the logo's drop message
|
||||
*/
|
||||
protected logoDropMsg = 'collection.edit.logo.upload';
|
||||
|
||||
/**
|
||||
* i18n key for the logo's upload success message
|
||||
*/
|
||||
protected logoSuccessMsg = 'collection.edit.logo.notifications.success';
|
||||
|
||||
/**
|
||||
* i18n key for the logo's upload error message
|
||||
*/
|
||||
protected logoErrorMsg = 'collection.edit.logo.notifications.error';
|
||||
|
||||
/**
|
||||
* @type {Collection.type} This is a collection-type form
|
||||
*/
|
||||
|
@@ -24,26 +24,6 @@ export class CommunityFormComponent extends ComColFormComponent<Community> {
|
||||
*/
|
||||
@Input() dso: Community = new Community();
|
||||
|
||||
/**
|
||||
* i18n key for the logo's label
|
||||
*/
|
||||
protected logoLabelMsg = 'community.edit.logo.label';
|
||||
|
||||
/**
|
||||
* i18n key for the logo's drop message
|
||||
*/
|
||||
protected logoDropMsg = 'community.edit.logo.upload';
|
||||
|
||||
/**
|
||||
* i18n key for the logo's upload success message
|
||||
*/
|
||||
protected logoSuccessMsg = 'community.edit.logo.notifications.success';
|
||||
|
||||
/**
|
||||
* i18n key for the logo's upload error message
|
||||
*/
|
||||
protected logoErrorMsg = 'community.edit.logo.notifications.error';
|
||||
|
||||
/**
|
||||
* @type {Community.type} This is a community-type form
|
||||
*/
|
||||
|
@@ -1,9 +1,9 @@
|
||||
<div class="container-fluid">
|
||||
<label>{{logoLabelMsg | translate}}</label>
|
||||
<label>{{type.value + '.edit.logo.label' | translate}}</label>
|
||||
<ds-comcol-page-logo [logo]="(dso?.logo | async)?.payload"></ds-comcol-page-logo>
|
||||
<ds-uploader *ngIf="uploadFilesOptions.url"
|
||||
[dropMsg]="logoDropMsg"
|
||||
[dropOverDocumentMsg]="logoDropMsg"
|
||||
[dropMsg]="type.value + '.edit.logo.upload'"
|
||||
[dropOverDocumentMsg]="type.value + '.edit.logo.upload'"
|
||||
[enableDragOverDocument]="true"
|
||||
[uploadFilesOptions]="uploadFilesOptions"
|
||||
(onCompleteItem)="onCompleteItem()"
|
||||
|
@@ -41,26 +41,6 @@ export class ComColFormComponent<T extends DSpaceObject> implements OnInit, OnDe
|
||||
*/
|
||||
@Input() dso: T;
|
||||
|
||||
/**
|
||||
* i18n key for the logo's label
|
||||
*/
|
||||
protected logoLabelMsg: string;
|
||||
|
||||
/**
|
||||
* i18n key for the logo's drop message
|
||||
*/
|
||||
protected logoDropMsg: string;
|
||||
|
||||
/**
|
||||
* i18n key for the logo's upload success message
|
||||
*/
|
||||
protected logoSuccessMsg: string;
|
||||
|
||||
/**
|
||||
* i18n key for the logo's upload error message
|
||||
*/
|
||||
protected logoErrorMsg: string;
|
||||
|
||||
/**
|
||||
* Type of DSpaceObject that the form represents
|
||||
*/
|
||||
@@ -208,7 +188,7 @@ export class ComColFormComponent<T extends DSpaceObject> implements OnInit, OnDe
|
||||
* The request was successful, display a success notification
|
||||
*/
|
||||
public onCompleteItem() {
|
||||
this.notificationsService.success(null, this.translate.get(this.logoSuccessMsg));
|
||||
this.notificationsService.success(null, this.translate.get(this.type.value + '.edit.logo.notifications.success'));
|
||||
this.finishUpload.emit();
|
||||
}
|
||||
|
||||
@@ -216,7 +196,7 @@ export class ComColFormComponent<T extends DSpaceObject> implements OnInit, OnDe
|
||||
* The request was unsuccessful, display an error notification
|
||||
*/
|
||||
public onUploadError() {
|
||||
this.notificationsService.error(null, this.translate.get(this.logoErrorMsg));
|
||||
this.notificationsService.error(null, this.translate.get(this.type.value + '.edit.logo.notifications.error'));
|
||||
this.finishUpload.emit();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user