diff --git a/src/Site/views/languageforge/container/languageforge.html.twig b/src/Site/views/languageforge/container/languageforge.html.twig
index 74cabe0485..61aa16e198 100644
--- a/src/Site/views/languageforge/container/languageforge.html.twig
+++ b/src/Site/views/languageforge/container/languageforge.html.twig
@@ -81,7 +81,7 @@
- -
+
-
Settings
@@ -95,7 +95,7 @@
{% endverbatim %}
- -
+
-
Share
diff --git a/src/Site/views/languageforge/theme/default/sass/_global.scss b/src/Site/views/languageforge/theme/default/sass/_global.scss
index 2767afa19a..0924148c17 100644
--- a/src/Site/views/languageforge/theme/default/sass/_global.scss
+++ b/src/Site/views/languageforge/theme/default/sass/_global.scss
@@ -264,18 +264,6 @@
}
}
- #settings-dropdown-button:not(.app-settings-available) {
- .dropdown-toggle {
- visibility: hidden;
- }
- }
-
- #settings-dropdown-button.app-settings-available {
- .dropdown-toggle {
- visibility: visible;
- }
- }
-
#settingsBtn {
margin: 12px;
margin-right: 6px;
@@ -287,7 +275,7 @@
font-size: 1rem;
}
}
-
+
#settingsBtn::after {
display:none;
}
diff --git a/src/angular-app/bellows/core/navbar.controller.ts b/src/angular-app/bellows/core/navbar.controller.ts
index b6070c35b9..b1430a718f 100644
--- a/src/angular-app/bellows/core/navbar.controller.ts
+++ b/src/angular-app/bellows/core/navbar.controller.ts
@@ -24,15 +24,21 @@ export class NavbarController implements angular.IController {
displayShareButton: boolean;
projectTypeNames: ProjectTypeNames;
siteName: string;
+ isLexiconProject: boolean = false;
- static $inject = ['$uibModal',
- 'projectService', 'sessionService',
+ static $inject = [
+ '$scope',
+ '$uibModal',
+ 'projectService',
+ 'sessionService',
'offlineCacheUtils',
'applicationHeaderService'];
- constructor(private readonly $modal: ModalService,
+ constructor(private readonly $scope: angular.IScope,
+ private readonly $modal: ModalService,
private readonly projectService: ProjectService, private readonly sessionService: SessionService,
private readonly offlineCacheUtils: OfflineCacheUtilsService,
- private readonly applicationHeaderService: ApplicationHeaderService) { }
+ private readonly applicationHeaderService: ApplicationHeaderService,
+ ) { }
$onInit(): void {
this.projectTypeNames = this.projectService.data.projectTypeNames;
@@ -72,10 +78,18 @@ export class NavbarController implements angular.IController {
this.displayShareButton =
(this.currentUserIsProjectManager || (this.project.allowSharing && this.session.data.userIsProjectMember));
}
+
this.rights.canCreateProject =
session.hasSiteRight(this.sessionService.domain.PROJECTS, this.sessionService.operation.CREATE);
this.siteName = session.baseSite();
});
+ this.$scope.$on('$locationChangeStart', (event, next, current) => {
+ if (current.includes('/lexicon') && !current.includes('/new-project')) {
+ this.isLexiconProject = true;
+ } else {
+ this.isLexiconProject = false;
+ }
+ });
}
onUpdate = ($event: { interfaceConfig: InterfaceConfig}): void => {
diff --git a/test/app/bellows/project-settings.e2e-spec.ts b/test/app/bellows/project-settings.e2e-spec.ts
index e6509a4bb0..83134f4942 100644
--- a/test/app/bellows/project-settings.e2e-spec.ts
+++ b/test/app/bellows/project-settings.e2e-spec.ts
@@ -15,7 +15,7 @@ describe('Bellows E2E Project Settings app', () => {
await loginPage.loginAsMember();
await projectsPage.get();
await projectsPage.clickOnProject(constants.testProjectName);
- expect(await settingsPage.settingsMenuLink.getAttribute('class')).not.toContain('app-settings-available');
+ expect(await settingsPage.settingsMenuLink.isPresent()).toBe(false);
});
it('System Admin can manage project', async () => {
diff --git a/test/app/languageforge/lexicon/settings/config-fields.e2e-spec.ts b/test/app/languageforge/lexicon/settings/config-fields.e2e-spec.ts
index f1aba344cd..cc011652cc 100644
--- a/test/app/languageforge/lexicon/settings/config-fields.e2e-spec.ts
+++ b/test/app/languageforge/lexicon/settings/config-fields.e2e-spec.ts
@@ -40,7 +40,7 @@ describe('Lexicon E2E Configuration Fields', () => {
});
it('can go to Configuration and select unified Fields tab', async () => {
- expect(await configPage.settingsMenuLink.isDisplayed()).toBe(true);
+ expect(await configPage.settingsMenuLink.isPresent()).toBe(true);
await configPage.get();
expect(await configPage.applyButton.isDisplayed()).toBe(true);
expect(await configPage.applyButton.isEnabled()).toBe(false);
diff --git a/test/app/languageforge/lexicon/settings/config-input-systems.e2e-spec.ts b/test/app/languageforge/lexicon/settings/config-input-systems.e2e-spec.ts
index 2d3d776b6e..ad780a41d1 100644
--- a/test/app/languageforge/lexicon/settings/config-input-systems.e2e-spec.ts
+++ b/test/app/languageforge/lexicon/settings/config-input-systems.e2e-spec.ts
@@ -17,14 +17,14 @@ describe('Lexicon E2E Configuration Input Systems', () => {
await loginPage.loginAsUser();
await projectsPage.get();
await projectsPage.clickOnProject(constants.testProjectName);
- expect(await configPage.settingsMenuLink.getAttribute('class')).not.toContain('app-settings-available');
+ expect(await configPage.settingsMenuLink.isPresent()).toBe(false);
});
it('setup: login as manager, select test project, goto configuration', async () => {
await loginPage.loginAsManager();
await projectsPage.get();
await projectsPage.clickOnProject(constants.testProjectName);
- expect(await configPage.settingsMenuLink.isDisplayed()).toBe(true);
+ expect(await configPage.settingsMenuLink.isPresent()).toBe(true);
await configPage.get();
expect(await configPage.applyButton.isDisplayed()).toBe(true);
expect(await configPage.applyButton.isEnabled()).toBe(false);