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