mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +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();
|
@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
|
* @type {Collection.type} This is a collection-type form
|
||||||
*/
|
*/
|
||||||
|
@@ -24,26 +24,6 @@ export class CommunityFormComponent extends ComColFormComponent<Community> {
|
|||||||
*/
|
*/
|
||||||
@Input() dso: Community = new 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
|
* @type {Community.type} This is a community-type form
|
||||||
*/
|
*/
|
||||||
|
@@ -1,9 +1,9 @@
|
|||||||
<div class="container-fluid">
|
<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-comcol-page-logo [logo]="(dso?.logo | async)?.payload"></ds-comcol-page-logo>
|
||||||
<ds-uploader *ngIf="uploadFilesOptions.url"
|
<ds-uploader *ngIf="uploadFilesOptions.url"
|
||||||
[dropMsg]="logoDropMsg"
|
[dropMsg]="type.value + '.edit.logo.upload'"
|
||||||
[dropOverDocumentMsg]="logoDropMsg"
|
[dropOverDocumentMsg]="type.value + '.edit.logo.upload'"
|
||||||
[enableDragOverDocument]="true"
|
[enableDragOverDocument]="true"
|
||||||
[uploadFilesOptions]="uploadFilesOptions"
|
[uploadFilesOptions]="uploadFilesOptions"
|
||||||
(onCompleteItem)="onCompleteItem()"
|
(onCompleteItem)="onCompleteItem()"
|
||||||
|
@@ -41,26 +41,6 @@ export class ComColFormComponent<T extends DSpaceObject> implements OnInit, OnDe
|
|||||||
*/
|
*/
|
||||||
@Input() dso: T;
|
@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
|
* 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
|
* The request was successful, display a success notification
|
||||||
*/
|
*/
|
||||||
public onCompleteItem() {
|
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();
|
this.finishUpload.emit();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -216,7 +196,7 @@ export class ComColFormComponent<T extends DSpaceObject> implements OnInit, OnDe
|
|||||||
* The request was unsuccessful, display an error notification
|
* The request was unsuccessful, display an error notification
|
||||||
*/
|
*/
|
||||||
public onUploadError() {
|
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();
|
this.finishUpload.emit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user