From 9ce904558e6b4fd0bb9771c372f476baca3001e0 Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Thu, 7 Nov 2024 12:48:47 +0200 Subject: [PATCH] [angular-18]: Change icon ration in browse-stakeholders to 0.8 for all screens. --- src/app/app.component.ts | 36 +++++++++---------- .../browse-stakeholders.component.html | 2 +- 2 files changed, 17 insertions(+), 21 deletions(-) diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 36f92cb..b31cecb 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -152,7 +152,7 @@ export class AppComponent extends SidebarBaseComponent implements OnInit { this.stakeholder = stakeholder; if (this.isChild) { this.breadcrumbs = [ - {name: this.stakeholder.parent.name, route: this.stakeholder.parent.alias}, + {name: this.stakeholder.parent.name, route: this.stakeholder.parent.alias}, {name: this.stakeholderUtils.entities[this.stakeholder.type + 's'], route: this.stakeholder.parent.alias + '/browse/' + this.stakeholder.type}, {name: this.stakeholder.name} ]; @@ -195,7 +195,7 @@ export class AppComponent extends SidebarBaseComponent implements OnInit { })) })); } - + setActives(params: Params) { if (params && params['topic']) { this.activeTopic = this.stakeholder.topics.find(topic => topic.alias === decodeURIComponent(params['topic']) && this.hasPermission(topic.visibility)); @@ -210,7 +210,7 @@ export class AppComponent extends SidebarBaseComponent implements OnInit { } } } - + public setNotificationConfiguration() { this.notificationConfiguration.entities = this.stakeholderUtils.types.map(option => option.value); this.notificationConfiguration.service = 'monitor'; @@ -281,19 +281,19 @@ export class AppComponent extends SidebarBaseComponent implements OnInit { private navigateToError() { HelperFunctions.navigateToError(this._router, {"page": this.properties.baseLink + this._router.url}); } - + public removeView() { this._router.navigate([], {relativeTo: this._route}); } - + public login() { this.userManagementService.login(); } - + get isHidden() { return this.stakeholder && !this.hasPermission(this.view?this.view:this.stakeholder.visibility); } - + get monitorLink() { return "https://" + (this.properties.environment == 'beta' ? 'beta.' : '') + 'monitor.openaire.eu'; } @@ -307,13 +307,9 @@ export class AppComponent extends SidebarBaseComponent implements OnInit { } get aliasPrefix(): string { - if(this.isChild) { - return this.stakeholder.parent.alias + '/browse/' + this.stakeholder.type + '/'; - } else { - return ''; - } + return this.isChild ? this.stakeholder.parent.alias + '/browse/' + this.stakeholder.type + '/' : ''; } - + private setSideBar() { let items: MenuItem[] = []; if (this.hasPermission(this.view?this.view:this.stakeholder.visibility)) { @@ -353,7 +349,7 @@ export class AppComponent extends SidebarBaseComponent implements OnInit { this.sideBarItems = items; this.hasSidebar = this.hasSidebar && this.sideBarItems.length > 0; } - + buildMenu(stakeholder: Stakeholder = null) { this.menuItems = []; this.userMenuItems = []; @@ -458,24 +454,24 @@ export class AppComponent extends SidebarBaseComponent implements OnInit { } } } - + public isCurator() { return this.user && (Session.isPortalAdministrator(this.user) || Session.isMonitorCurator(this.user)); } - + public isKindOfMonitorManager() { return this.user && (Session.isPortalAdministrator(this.user) || Session.isMonitorCurator(this.user) || Session.isKindOfMonitorManager(this.user)); } - + public isMember(stakeholder: Stakeholder) { return this.user && (Session.isPortalAdministrator(this.user) || Session.isCurator(stakeholder.type, this.user) || Session.isManager(stakeholder.type, stakeholder.alias, this.user) || Session.isMember(stakeholder.type, stakeholder.alias, this.user)); } - + public isManager(stakeholder: Stakeholder) { return this.user && (Session.isPortalAdministrator(this.user) || Session.isCurator(stakeholder.type, this.user) || Session.isManager(stakeholder.type, stakeholder.alias, this.user)); } - + public hasPermission(visibility: Visibility): boolean { if(visibility === 'PUBLIC') { return true; @@ -485,7 +481,7 @@ export class AppComponent extends SidebarBaseComponent implements OnInit { return !this.view && this.isManager(this.stakeholder); } } - + setProperties(id, type = null) { this.properties.adminToolsCommunity = id; if (type) { diff --git a/src/app/browse-stakeholders/browse-stakeholders.component.html b/src/app/browse-stakeholders/browse-stakeholders.component.html index 7858f2f..0a10a8e 100644 --- a/src/app/browse-stakeholders/browse-stakeholders.component.html +++ b/src/app/browse-stakeholders/browse-stakeholders.component.html @@ -61,7 +61,7 @@
- +