Merge remote-tracking branch 'origin/new-theme' into privacy-settings
This commit is contained in:
commit
7fc44422cf
|
@ -6,7 +6,7 @@ import {UserManagementService} from "./openaireLibrary/services/user-management.
|
||||||
import {StakeholderService} from "./openaireLibrary/monitor/services/stakeholder.service";
|
import {StakeholderService} from "./openaireLibrary/monitor/services/stakeholder.service";
|
||||||
import {BehaviorSubject, Subscriber} from "rxjs";
|
import {BehaviorSubject, Subscriber} from "rxjs";
|
||||||
import {LayoutService} from "./openaireLibrary/dashboard/sharedComponents/sidebar/layout.service";
|
import {LayoutService} from "./openaireLibrary/dashboard/sharedComponents/sidebar/layout.service";
|
||||||
import {MenuItem, RootMenuItem} from "./openaireLibrary/sharedComponents/menu";
|
import {MenuItem} from "./openaireLibrary/sharedComponents/menu";
|
||||||
import {Stakeholder, StakeholderEntities, Topic, Visibility} from "./openaireLibrary/monitor/entities/stakeholder";
|
import {Stakeholder, StakeholderEntities, Topic, Visibility} from "./openaireLibrary/monitor/entities/stakeholder";
|
||||||
import {LinksResolver} from "./search/links-resolver";
|
import {LinksResolver} from "./search/links-resolver";
|
||||||
import {Header} from "./openaireLibrary/sharedComponents/navigationBar.component";
|
import {Header} from "./openaireLibrary/sharedComponents/navigationBar.component";
|
||||||
|
@ -36,7 +36,7 @@ export class AppComponent implements OnInit, OnDestroy {
|
||||||
isViewPublic: boolean = false;
|
isViewPublic: boolean = false;
|
||||||
sideBarItems: MenuItem[] = [];
|
sideBarItems: MenuItem[] = [];
|
||||||
specialSideBarMenuItem: MenuItem = null;
|
specialSideBarMenuItem: MenuItem = null;
|
||||||
menuItems: RootMenuItem[] = [];
|
menuItems: MenuItem[] = [];
|
||||||
notificationGroups: Option[] = [];
|
notificationGroups: Option[] = [];
|
||||||
entities: string[];
|
entities: string[];
|
||||||
notificationGroupsInitialized: boolean = false;
|
notificationGroupsInitialized: boolean = false;
|
||||||
|
@ -281,44 +281,46 @@ export class AppComponent implements OnInit, OnDestroy {
|
||||||
}
|
}
|
||||||
if (this.stakeholder) {
|
if (this.stakeholder) {
|
||||||
this.userMenuItems.push(new MenuItem("", "User information", "", "/" + this.stakeholder.alias + "/user-info", false, [], [], {}));
|
this.userMenuItems.push(new MenuItem("", "User information", "", "/" + this.stakeholder.alias + "/user-info", false, [], [], {}));
|
||||||
this.menuItems.push({
|
this.menuItems.push(
|
||||||
rootItem: new MenuItem("dashboard", "Dashboard",
|
new MenuItem("dashboard", "Dashboard",
|
||||||
"", "/" + this.stakeholder.alias, false, [], null, {}
|
"", "/" + this.stakeholder.alias, false, [], null, {}
|
||||||
, null, null, null, null), items: []
|
, null, null, null, null)
|
||||||
});
|
);
|
||||||
if (this.isPublicOrIsMember(this.stakeholder.visibility)) {
|
if (this.isPublicOrIsMember(this.stakeholder.visibility)) {
|
||||||
this.menuItems.push({
|
this.menuItems.push(
|
||||||
rootItem: new MenuItem("search", "Browse Data", "", this.properties.searchLinkToResults,
|
new MenuItem("search", "Browse Data", "", this.properties.searchLinkToResults,
|
||||||
false, [], null, {resultbestaccessright: '"' + encodeURIComponent("Open Access") + '"'},
|
false, [], null, {resultbestaccessright: '"' + encodeURIComponent("Open Access") + '"'},
|
||||||
null, null, null, null),
|
null, null, null, null)
|
||||||
items: []
|
);
|
||||||
});
|
|
||||||
if (this.properties.environment !== 'production') {
|
if (this.properties.environment !== 'production') {
|
||||||
this.resourcesService.setResourcesDeprecated(this.menuItems, "/" + this.stakeholder.alias);
|
this.resourcesService.setResourcesDeprecated(this.menuItems, "/" + this.stakeholder.alias);
|
||||||
} else {
|
} else {
|
||||||
this.menuItems.push({
|
this.menuItems.push(
|
||||||
rootItem: new MenuItem("methodology", "Methodology",
|
new MenuItem("methodology", "Methodology",
|
||||||
"", "/" + this.stakeholder.alias + "/methodology", false, [], null, {}), items: [
|
"", "/" + this.stakeholder.alias + "/methodology", false, [], null, {},
|
||||||
new MenuItem("methodology", "Terminology and construction",
|
null, null, null, null, "_blank", "internal", false,
|
||||||
|
[
|
||||||
|
new MenuItem("methodology", "Terminology and construction",
|
||||||
"", "/" + this.stakeholder.alias + "/methodology", false, [], null, {}),
|
"", "/" + this.stakeholder.alias + "/methodology", false, [], null, {}),
|
||||||
new MenuItem("methodology", "See how it works",
|
new MenuItem("methodology", "See how it works",
|
||||||
"", "/" + this.stakeholder.alias + "/methodology", false, [], null, {}, null, "how"),
|
"", "/" + this.stakeholder.alias + "/methodology", false, [], null, {}, null, "how"),
|
||||||
]
|
]
|
||||||
});
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
if (this.stakeholder.type === "funder") {
|
if (this.stakeholder.type === "funder") {
|
||||||
this.menuItems.push({
|
this.menuItems.push(
|
||||||
rootItem: new MenuItem("develop", "Develop",
|
new MenuItem("develop", "Develop",
|
||||||
"", "/" + this.stakeholder.alias + "/develop", false, [], null, {}), items: []
|
"", "/" + this.stakeholder.alias + "/develop", false, [], null, {})
|
||||||
});
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (this.isManager(this.stakeholder)) {
|
if (this.isManager(this.stakeholder)) {
|
||||||
this.menuItems.push({
|
this.menuItems.push(
|
||||||
rootItem: new MenuItem("manage", "Manage",
|
new MenuItem("manage", "Manage",
|
||||||
"", "/admin/" + this.stakeholder.alias, false, [], null, {}
|
"", "/admin/" + this.stakeholder.alias, false, [], null, {}
|
||||||
, null, null, null, null), items: []
|
, null, null, null, null)
|
||||||
});
|
);
|
||||||
}
|
}
|
||||||
if (!this.hasAdminMenu && this.isFrontPage) {
|
if (!this.hasAdminMenu && this.isFrontPage) {
|
||||||
this.menuHeader = {
|
this.menuHeader = {
|
||||||
|
@ -378,20 +380,18 @@ export class AppComponent implements OnInit, OnDestroy {
|
||||||
badge: true,
|
badge: true,
|
||||||
menuPosition: "center"
|
menuPosition: "center"
|
||||||
};
|
};
|
||||||
this.menuItems.push({
|
this.menuItems.push(
|
||||||
rootItem: new MenuItem("stakeholders", "Browse " + this.stakeholderEntities.STAKEHOLDERS,
|
new MenuItem("stakeholders", "Browse " + this.stakeholderEntities.STAKEHOLDERS,
|
||||||
"https://" + (this.properties.environment == 'beta' ? 'beta.' : '') + 'monitor.openaire.eu/browse', "", false, [], null, {}, null, null, null, null, "_self"),
|
"https://" + (this.properties.environment == 'beta' ? 'beta.' : '') + 'monitor.openaire.eu/browse', "", false, [], null, {}, null, null, null, null, "_self")
|
||||||
items: []
|
);
|
||||||
});
|
|
||||||
if (this.properties.environment === 'development') {
|
if (this.properties.environment === 'development') {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
this.resourcesService.setResourcesDeprecated(this.menuItems, '', "https://" + (this.properties.environment === 'beta' ? 'beta.' : '') + 'monitor.openaire.eu');
|
this.resourcesService.setResourcesDeprecated(this.menuItems, '', "https://" + (this.properties.environment === 'beta' ? 'beta.' : '') + 'monitor.openaire.eu');
|
||||||
}
|
}
|
||||||
this.menuItems.push({
|
this.menuItems.push(
|
||||||
rootItem: new MenuItem("about", "About",
|
new MenuItem("about", "About",
|
||||||
"https://" + (this.properties.environment == 'beta' ? 'beta.' : '') + 'monitor.openaire.eu/about/learn-how', "", false, [], null, {}, null, null, null, null, "_self"),
|
"https://" + (this.properties.environment == 'beta' ? 'beta.' : '') + 'monitor.openaire.eu/about/learn-how', "", false, [], null, {}, null, null, null, null, "_self")
|
||||||
items: []
|
);
|
||||||
});
|
|
||||||
if (this.hasAdminMenu) {
|
if (this.hasAdminMenu) {
|
||||||
this.adminMenuItems = [];
|
this.adminMenuItems = [];
|
||||||
this.specialSideBarMenuItem = null;
|
this.specialSideBarMenuItem = null;
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 5ba1d27aaae2719f79f782f907089d52a2550aae
|
Subproject commit d9afcfcb06f200d91bd93dca94628ae334d74968
|
Loading…
Reference in New Issue