diff --git a/package-lock.json b/package-lock.json
index 242f99bc1..ac1175d62 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -4251,6 +4251,11 @@
"resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.4.1.tgz",
"integrity": "sha512-tbx5cHubwE6e2ZG7nqM3g/FZ5PQEDMWmMGNrCUBVRPHXTJaH7CBDdsLeu3eCh3B1tzAxTnAbtmrzvWEvT2NNEA=="
},
+ "bootstrap-slider": {
+ "version": "10.6.2",
+ "resolved": "https://registry.npmjs.org/bootstrap-slider/-/bootstrap-slider-10.6.2.tgz",
+ "integrity": "sha512-8JTPZB9QVOdrGzYF3YgC3YW6ssfPeBvBwZnXffiZ7YH/zz1D0EKlZvmQsm/w3N0XjVNYQEoQ0ax+jHrErV4K1Q=="
+ },
"boxen": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/boxen/-/boxen-4.2.0.tgz",
@@ -10683,6 +10688,14 @@
"resolved": "https://registry.npmjs.org/ngx-bootstrap/-/ngx-bootstrap-5.6.2.tgz",
"integrity": "sha512-6YHXtdXkGH3w0NQoaUgNYAcrj064Lv5RTO284ha/hvpNTrh55yQz2cVh0VvwBk3MjyY2tdmLH4SuCJDszYdYiw=="
},
+ "ngx-bootstrap-slider": {
+ "version": "1.8.0",
+ "resolved": "https://registry.npmjs.org/ngx-bootstrap-slider/-/ngx-bootstrap-slider-1.8.0.tgz",
+ "integrity": "sha512-wegiLxOyRDEyofi1AEM8503Uq/x9IIYLNlALWp49X0Yh0KEsEN+P94fQtBLIY2v50mstoivMhQmBDitXVzU6/w==",
+ "requires": {
+ "bootstrap-slider": "^10.2.0"
+ }
+ },
"ngx-build-plus": {
"version": "9.0.6",
"resolved": "https://registry.npmjs.org/ngx-build-plus/-/ngx-build-plus-9.0.6.tgz",
diff --git a/package.json b/package.json
index 34ca8949e..5896b3086 100644
--- a/package.json
+++ b/package.json
@@ -82,6 +82,7 @@
"lodash-es": "4.17.14",
"moment": "^2.24.0",
"ngx-bootstrap": "^5.6.2",
+ "ngx-bootstrap-slider": "^1.8.0",
"ngx-toastr": "^10.2.0",
"ngx-toggle-switch": "^2.0.5",
"rxjs": "^6.4.0",
diff --git a/projects/admin/src/app/app.component.spec.ts b/projects/admin/src/app/app.component.spec.ts
index fea505b1f..96fffd51d 100644
--- a/projects/admin/src/app/app.component.spec.ts
+++ b/projects/admin/src/app/app.component.spec.ts
@@ -27,7 +27,6 @@ import { RecordModule } from '@rero/ng-core';
import { HttpClientModule } from '@angular/common/http';
import { TranslateModule } from '@ngx-translate/core';
import { FormsModule } from '@angular/forms';
-import { InterfaceInfoComponent } from './interface-info/interface-info.component';
describe('AppComponent', () => {
beforeEach(async(() => {
@@ -45,8 +44,7 @@ describe('AppComponent', () => {
],
declarations: [
AppComponent,
- MenuComponent,
- InterfaceInfoComponent
+ MenuComponent
]
}).compileComponents();
}));
diff --git a/projects/admin/src/app/app.component.ts b/projects/admin/src/app/app.component.ts
index 6d1db6d1f..c2f3d0193 100644
--- a/projects/admin/src/app/app.component.ts
+++ b/projects/admin/src/app/app.component.ts
@@ -142,11 +142,10 @@ export class AppComponent implements OnInit, OnDestroy {
this.localStorageService.updateDate(User.STORAGE_KEY);
}
}
-
- // Library Switch menu show only on homepage
- this.librarySwitchService.show(
- (event.url === '/') ? true : false
- );
+ // Library Switch menu is enabled only on homepage
+ // We use this restriction to avoid problems if user is on page using the current library value (my library, some forms, ...)
+ // To avoid all potential problem, the simplest way is to enable the menu only on the homepage.
+ this.librarySwitchService.enable( event.url === '/');
})
);
}
diff --git a/projects/admin/src/app/app.module.ts b/projects/admin/src/app/app.module.ts
index 2f9ccf6c9..3ea21c960 100644
--- a/projects/admin/src/app/app.module.ts
+++ b/projects/admin/src/app/app.module.ts
@@ -30,7 +30,6 @@ import { ErrorPageComponent } from './error/error-page/error-page.component';
import { FrontpageBoardComponent } from './frontpage/frontpage-board/frontpage-board.component';
import { FrontpageComponent } from './frontpage/frontpage.component';
import { NoCacheHeaderInterceptor } from './interceptor/no-cache-header.interceptor';
-import { InterfaceInfoComponent } from './interface-info/interface-info.component';
import { MenuComponent } from './menu/menu.component';
import { BioInformationsPipe } from './pipe/bio-informations.pipe';
import { BirthDatePipe } from './pipe/birth-date.pipe';
@@ -151,10 +150,8 @@ import { OrderLineComponent } from './record/detail-view/acquisition-order-detai
ItemTransactionComponent,
ItemTransactionsComponent,
PatronDetailViewComponent,
- InterfaceInfoComponent,
RefComponent,
RemoteAutocompleteInputTypeComponent,
- InterfaceInfoComponent,
VendorDetailViewComponent,
VendorBriefViewComponent,
AddressTypeComponent,
diff --git a/projects/admin/src/app/interface-info/interface-info.component.html b/projects/admin/src/app/interface-info/interface-info.component.html
deleted file mode 100644
index dd842e9ac..000000000
--- a/projects/admin/src/app/interface-info/interface-info.component.html
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
Current library: {{ libraryName }}
-
-
diff --git a/projects/admin/src/app/interface-info/interface-info.component.ts b/projects/admin/src/app/interface-info/interface-info.component.ts
deleted file mode 100644
index 8da6c8c25..000000000
--- a/projects/admin/src/app/interface-info/interface-info.component.ts
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * RERO ILS UI
- * Copyright (C) 2019 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 } from '@angular/core';
-import { UserService } from '../service/user.service';
-import { LibrarySwitchService } from '../service/library-switch.service';
-
-@Component({
- selector: 'admin-interface-info',
- templateUrl: './interface-info.component.html'
-})
-export class InterfaceInfoComponent {
-
- /**
- * Constructor
- * @param librarySwitchService - LibrarySwitchService
- * @param userService - UserService
- */
- constructor(
- private librarySwitchService: LibrarySwitchService,
- private userService: UserService
- ) { }
-
- /**
- * Get Library name
- * @return null or string
- */
- get libraryName() {
- if (!this.librarySwitchService.currentLibrary) {
- return;
- }
- return this.librarySwitchService.currentLibrary.name;
- }
-
- /**
- * the user is system admin
- * @return boolean
- */
- get isSystemLibrarian() {
- return this.userService.hasRole('system_librarian');
- }
-}
diff --git a/projects/admin/src/app/menu/menu.component.html b/projects/admin/src/app/menu/menu.component.html
index 269444173..e4763d480 100644
--- a/projects/admin/src/app/menu/menu.component.html
+++ b/projects/admin/src/app/menu/menu.component.html
@@ -14,7 +14,6 @@
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see .
-->
-