mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
77742: Collection template-item loading indicator and error alert
This commit is contained in:
@@ -6,6 +6,8 @@
|
|||||||
<ds-item-metadata [updateService]="itemTemplateService" [item]="itemRD?.payload"></ds-item-metadata>
|
<ds-item-metadata [updateService]="itemTemplateService" [item]="itemRD?.payload"></ds-item-metadata>
|
||||||
<button [routerLink]="getCollectionEditUrl(collection)" class="btn btn-outline-secondary">{{ 'collection.edit.template.cancel' | translate }}</button>
|
<button [routerLink]="getCollectionEditUrl(collection)" class="btn btn-outline-secondary">{{ 'collection.edit.template.cancel' | translate }}</button>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
<ds-loading *ngIf="itemRD?.isLoading" [message]="'collection.edit.template.loading' | translate"></ds-loading>
|
||||||
|
<ds-alert *ngIf="itemRD?.hasFailed" [type]="AlertTypeEnum.Error" [content]="'collection.edit.template.error' | translate"></ds-alert>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -8,6 +8,7 @@ import { ItemTemplateDataService } from '../../core/data/item-template-data.serv
|
|||||||
import { getCollectionEditRoute } from '../collection-page-routing-paths';
|
import { getCollectionEditRoute } from '../collection-page-routing-paths';
|
||||||
import { Item } from '../../core/shared/item.model';
|
import { Item } from '../../core/shared/item.model';
|
||||||
import { getFirstSucceededRemoteDataPayload } from '../../core/shared/operators';
|
import { getFirstSucceededRemoteDataPayload } from '../../core/shared/operators';
|
||||||
|
import { AlertType } from '../../shared/alert/aletr-type';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ds-edit-item-template-page',
|
selector: 'ds-edit-item-template-page',
|
||||||
@@ -28,6 +29,12 @@ export class EditItemTemplatePageComponent implements OnInit {
|
|||||||
*/
|
*/
|
||||||
itemRD$: Observable<RemoteData<Item>>;
|
itemRD$: Observable<RemoteData<Item>>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The AlertType enumeration
|
||||||
|
* @type {AlertType}
|
||||||
|
*/
|
||||||
|
AlertTypeEnum = AlertType;
|
||||||
|
|
||||||
constructor(protected route: ActivatedRoute,
|
constructor(protected route: ActivatedRoute,
|
||||||
public itemTemplateService: ItemTemplateDataService) {
|
public itemTemplateService: ItemTemplateDataService) {
|
||||||
}
|
}
|
||||||
|
@@ -777,10 +777,14 @@
|
|||||||
|
|
||||||
"collection.edit.template.edit-button": "Edit",
|
"collection.edit.template.edit-button": "Edit",
|
||||||
|
|
||||||
|
"collection.edit.template.error": "An error occurred retrieving the template item",
|
||||||
|
|
||||||
"collection.edit.template.head": "Edit Template Item for Collection \"{{ collection }}\"",
|
"collection.edit.template.head": "Edit Template Item for Collection \"{{ collection }}\"",
|
||||||
|
|
||||||
"collection.edit.template.label": "Template item",
|
"collection.edit.template.label": "Template item",
|
||||||
|
|
||||||
|
"collection.edit.template.loading": "Loading template item...",
|
||||||
|
|
||||||
"collection.edit.template.notifications.delete.error": "Failed to delete the item template",
|
"collection.edit.template.notifications.delete.error": "Failed to delete the item template",
|
||||||
|
|
||||||
"collection.edit.template.notifications.delete.success": "Successfully deleted the item template",
|
"collection.edit.template.notifications.delete.success": "Successfully deleted the item template",
|
||||||
|
Reference in New Issue
Block a user