diff --git a/src/Site/views/languageforge/container/languageforge.html.twig b/src/Site/views/languageforge/container/languageforge.html.twig
index 9b48bf6ad1..ff46e97ce3 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 e72d50839b..075384aae1 100644
--- a/src/angular-app/bellows/core/navbar.controller.ts
+++ b/src/angular-app/bellows/core/navbar.controller.ts
@@ -21,7 +21,8 @@ export class NavbarController implements angular.IController {
project: Project;
interfaceConfig: InterfaceConfig;
currentUserIsProjectManager: boolean;
- displayHeaderButtons: boolean;
+ displayShareButton: boolean;
+ displaySettingsButton: boolean;
projectTypeNames: ProjectTypeNames;
siteName: string;
isLexiconProject: boolean = false;
@@ -29,7 +30,7 @@ export class NavbarController implements angular.IController {
static $inject = [
'$scope',
'$uibModal',
- 'projectService',
+ 'projectService',
'sessionService',
'offlineCacheUtils',
'applicationHeaderService'];
@@ -75,21 +76,15 @@ export class NavbarController implements angular.IController {
this.currentUserIsProjectManager =
(session.data.userProjectRole === ProjectRoles.MANAGER.key) ||
(session.data.userProjectRole === ProjectRoles.TECH_SUPPORT.key);
- this.displayHeaderButtons =
+ this.displayShareButton =
(this.currentUserIsProjectManager || (this.project.allowSharing && this.session.data.userIsProjectMember));
+ this.displaySettingsButton = (this.currentUserIsProjectManager && this.header.settings.length > 0);
}
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.displayHeaderButtons) {
- 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..a30ecc8307 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.isDisplayed()).toBe(false);
});
it('System Admin can manage project', async () => {
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..2827bd4b11 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,7 +17,7 @@ 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.isDisplayed()).toBe(false);
});
it('setup: login as manager, select test project, goto configuration', async () => {