{{ error.status }}
{{ error.title }}
diff --git a/projects/rero/ng-core/src/lib/menu/menu-widget/menu-widget.component.html b/projects/rero/ng-core/src/lib/menu/menu-widget/menu-widget.component.html
deleted file mode 100644
index d58f77f4..00000000
--- a/projects/rero/ng-core/src/lib/menu/menu-widget/menu-widget.component.html
+++ /dev/null
@@ -1,117 +0,0 @@
-
-@if (menu) {
-
-}
-
-
- @if (item.hasExtra('iconClass')) {
-
- }
- @if (!item.hasLabelAttribute('hideLabel')) {
- @if (item.getPrefix(); as prefix) {
- {{ prefix.name }}
- }
- {{ item.getName() }}
- @if (item.getSuffix(); as suffix) {
- {{ suffix.name }}
- }
- }
-
diff --git a/projects/rero/ng-core/src/lib/menu/menu-widget/menu-widget.component.spec.ts b/projects/rero/ng-core/src/lib/menu/menu-widget/menu-widget.component.spec.ts
deleted file mode 100644
index 97593557..00000000
--- a/projects/rero/ng-core/src/lib/menu/menu-widget/menu-widget.component.spec.ts
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * RERO angular core
- * Copyright (C) 2020 RERO
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, version 3 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
- */
-import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
-
-import { MenuWidgetComponent } from './menu-widget.component';
-import { TranslateModule } from '@ngx-translate/core';
-import { RouterModule } from '@angular/router';
-
-describe('MenuWidgetComponent', () => {
- let component: MenuWidgetComponent;
- let fixture: ComponentFixture;
-
- beforeEach(waitForAsync(() => {
- TestBed.configureTestingModule({
- imports: [
- RouterModule.forRoot([]),
- TranslateModule.forRoot()
- ],
- declarations: [
- MenuWidgetComponent
- ]
- })
- .compileComponents();
- }));
-
- beforeEach(() => {
- fixture = TestBed.createComponent(MenuWidgetComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/projects/rero/ng-core/src/lib/menu/menu-widget/menu-widget.component.ts b/projects/rero/ng-core/src/lib/menu/menu-widget/menu-widget.component.ts
deleted file mode 100644
index a98c20e0..00000000
--- a/projects/rero/ng-core/src/lib/menu/menu-widget/menu-widget.component.ts
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * RERO angular core
- * Copyright (C) 2020 RERO
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, version 3 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
- */
-import { Component, Input, Output, EventEmitter } from '@angular/core';
-import { MenuItemInterface } from '../menu-item-interface';
-import { MenuItem } from '../menu-item';
-
-@Component({
- selector: 'ng-core-menu-widget',
- templateUrl: './menu-widget.component.html'
-})
-export class MenuWidgetComponent {
-
- /** Menu items */
- @Input() menu: MenuItemInterface;
-
- /** Event */
- @Output() clickItem = new EventEmitter();
-
- /**
- * Emit a event on click item menu
- * @param item - MenuItem
- */
- doClick(item: MenuItem | MenuItemInterface) {
- this.clickItem.emit(item);
- }
-}
diff --git a/projects/rero/ng-core/src/lib/record/detail/detail-button/detail-button.component.html b/projects/rero/ng-core/src/lib/record/detail/detail-button/detail-button.component.html
index ff4a8a83..d3189309 100644
--- a/projects/rero/ng-core/src/lib/record/detail/detail-button/detail-button.component.html
+++ b/projects/rero/ng-core/src/lib/record/detail/detail-button/detail-button.component.html
@@ -14,7 +14,7 @@
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see .
-->
-
diff --git a/projects/rero/ng-core/src/lib/record/detail/detail-button/detail-button.component.ts b/projects/rero/ng-core/src/lib/record/detail/detail-button/detail-button.component.ts
index 69339ca5..5ca302c3 100644
--- a/projects/rero/ng-core/src/lib/record/detail/detail-button/detail-button.component.ts
+++ b/projects/rero/ng-core/src/lib/record/detail/detail-button/detail-button.component.ts
@@ -87,15 +87,11 @@ export class DetailButtonComponent {
* @param record - the current record
*/
deleteRecord(record: any): void {
- this.recordEvent.emit({ action: 'delete', record });
- }
-
- /**
- * Show a modal containing message given in parameter.
- * @param message - message to display into modal
- */
- showDeleteMessage(message: string) {
- this.deleteMessageEvent.emit(message.replace(new RegExp('\n', 'g'), ' '));
+ if (this.deleteStatus().can) {
+ this.recordEvent.emit({ action: 'delete', record });
+ } else {
+ this.deleteMessageEvent.emit(this.deleteStatus().message.replace(new RegExp('\n', 'g'), ' '));
+ }
}
/** Go back to previous page */
diff --git a/projects/rero/ng-core/src/lib/record/detail/detail.component.html b/projects/rero/ng-core/src/lib/record/detail/detail.component.html
index 666121f9..7f33e0c3 100644
--- a/projects/rero/ng-core/src/lib/record/detail/detail.component.html
+++ b/projects/rero/ng-core/src/lib/record/detail/detail.component.html
@@ -14,7 +14,7 @@
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see .
-->
-