[Explore | Library | new-theme]: resources.service.ts & menu.ts & navigationBar.component.ts & navigationBar.component.html & app.component.ts: Removed deprecated RootMenuItem and used MenuItem instead.
This commit is contained in:
parent
a194132dfe
commit
89b51d9838
|
@ -2,7 +2,7 @@ import {Component} from '@angular/core';
|
||||||
import {ActivatedRoute, Router} from '@angular/router';
|
import {ActivatedRoute, Router} from '@angular/router';
|
||||||
|
|
||||||
import {EnvProperties} from './openaireLibrary/utils/properties/env-properties';
|
import {EnvProperties} from './openaireLibrary/utils/properties/env-properties';
|
||||||
import {MenuItem, RootMenuItem} from './openaireLibrary/sharedComponents/menu';
|
import {MenuItem} from './openaireLibrary/sharedComponents/menu';
|
||||||
import {EnvironmentSpecificService} from './openaireLibrary/utils/properties/environment-specific.service';
|
import {EnvironmentSpecificService} from './openaireLibrary/utils/properties/environment-specific.service';
|
||||||
|
|
||||||
import {Session, User} from './openaireLibrary/login/utils/helper.class';
|
import {Session, User} from './openaireLibrary/login/utils/helper.class';
|
||||||
|
@ -51,7 +51,7 @@ import {OpenaireEntities} from "./openaireLibrary/utils/properties/searchFields"
|
||||||
export class AppComponent {
|
export class AppComponent {
|
||||||
isClient: boolean = false;
|
isClient: boolean = false;
|
||||||
userMenuItems: MenuItem[] = [];
|
userMenuItems: MenuItem[] = [];
|
||||||
menuItems: RootMenuItem [] = [];
|
menuItems: MenuItem [] = [];
|
||||||
feedbackmail: string;
|
feedbackmail: string;
|
||||||
properties: EnvProperties = properties;
|
properties: EnvProperties = properties;
|
||||||
user: User;
|
user: User;
|
||||||
|
@ -115,36 +115,29 @@ export class AppComponent {
|
||||||
new MenuItem("", OpenaireEntities.OTHER, "", "/search/find/research-outcomes", false, [], ["/search/find/research-outcomes"], {type: '"' + encodeURIComponent("other") + '"'})];
|
new MenuItem("", OpenaireEntities.OTHER, "", "/search/find/research-outcomes", false, [], ["/search/find/research-outcomes"], {type: '"' + encodeURIComponent("other") + '"'})];
|
||||||
//TODO add check for research results route
|
//TODO add check for research results route
|
||||||
this.menuItems = [
|
this.menuItems = [
|
||||||
{
|
new MenuItem("search", "Search", "", "/search/find", false, [], ["/search/find"], {qf: true},
|
||||||
rootItem: new MenuItem("search", "Search", "", "/search/find", false, [], ["/search/find"], {qf: true}),
|
null, null, null, null, "_blank", "internal", false,
|
||||||
items: [
|
[
|
||||||
researchOutcomesMenu,
|
researchOutcomesMenu,
|
||||||
new MenuItem("", OpenaireEntities.PROJECTS, "", "/search/find/projects/", false, ["project"], ["/search/find/projects"], {}),
|
new MenuItem("", OpenaireEntities.PROJECTS, "", "/search/find/projects/", false, ["project"], ["/search/find/projects"], {}),
|
||||||
new MenuItem("", OpenaireEntities.DATASOURCES, "", "/search/find/dataproviders", false, ["datasource"], ["/search/find/dataproviders"], {}),
|
new MenuItem("", OpenaireEntities.DATASOURCES, "", "/search/find/dataproviders", false, ["datasource"], ["/search/find/dataproviders"], {}),
|
||||||
new MenuItem("", OpenaireEntities.ORGANIZATIONS, "", "/search/find/organizations/", false, ["organization"], ["/search/find/organizations"], {})
|
new MenuItem("", OpenaireEntities.ORGANIZATIONS, "", "/search/find/organizations/", false, ["organization"], ["/search/find/organizations"], {})
|
||||||
]
|
]
|
||||||
},
|
),
|
||||||
{
|
new MenuItem("deposit", "Deposit", "", "/participate/deposit/learn-how", false, [], ["/participate/deposit/learn-how"], {}),
|
||||||
rootItem: new MenuItem("deposit", "Deposit", "", "/participate/deposit/learn-how", false, [], ["/participate/deposit/learn-how"], {}),
|
new MenuItem("link", "Link", "", "/participate/claim", false, [], ["/participate/claim"], {},
|
||||||
//rootItem: new MenuItem("deposit", "Deposit", "", "/participate/deposit/learn-how", false, [], ["/participate/deposit/learn-how"], {}),
|
null, null, null, null, "_blank", "internal", false,
|
||||||
items: []
|
[new MenuItem("", "Start linking", "", "/participate/claim", false, [], ["/participate/claim"], {}),
|
||||||
//rootItem: new MenuItem("share", "Share", "", "", false, [], ["/participate/deposit-publications", "/participate/deposit-datasets"], {}),
|
|
||||||
//items: [new MenuItem("", "Publications", "", "/participate/deposit-publications", false, ["publication"], ["/participate/deposit-publications"], {}),
|
|
||||||
// new MenuItem("", "Research Data", "", "/participate/deposit-datasets", false, ["dataset"], ["/participate/deposit-datasets"], {})]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
rootItem: new MenuItem("link", "Link", "", "/participate/claim", false, [], ["/participate/claim"], {}),
|
|
||||||
items: [new MenuItem("", "Start linking", "", "/participate/claim", false, [], ["/participate/claim"], {}),
|
|
||||||
new MenuItem("", "Learn more", this.properties.claimsInformationLink, "", false, [], [], {})]
|
new MenuItem("", "Learn more", this.properties.claimsInformationLink, "", false, [], [], {})]
|
||||||
},
|
),
|
||||||
{
|
new MenuItem("datasources", OpenaireEntities.DATASOURCES, "", "", false, ["datasource"], [], {},
|
||||||
rootItem: new MenuItem("datasources", OpenaireEntities.DATASOURCES, "", "", false, ["datasource"], [], {}),
|
null, null, null, null, "_blank", "internal", false,
|
||||||
items: [new MenuItem("", "Data Policies", "https://beta.openaire.eu/oa-policies-mandates", "", false, ["datasource"], [""], {}),
|
[new MenuItem("", "Data Policies", "https://beta.openaire.eu/oa-policies-mandates", "", false, ["datasource"], [""], {}),
|
||||||
new MenuItem("", "Repositories", "", "/search/content-providers", false, ["datasource"], ["/search/content-providers"], {}),
|
new MenuItem("", "Repositories", "", "/search/content-providers", false, ["datasource"], ["/search/content-providers"], {}),
|
||||||
new MenuItem("", "Journals", "", "/search/journals", false, ["datasource"], ["/search/journals"], {}),
|
new MenuItem("", "Journals", "", "/search/journals", false, ["datasource"], ["/search/journals"], {}),
|
||||||
new MenuItem("", "Registries", "", "/search/entity-registries", false, ["datasource"], ["/search/entity-registries"], {}),
|
new MenuItem("", "Registries", "", "/search/entity-registries", false, ["datasource"], ["/search/entity-registries"], {}),
|
||||||
new MenuItem("", "Browse all", "", "/search/find/dataproviders", false, ["datasource"], ["/search/find/dataproviders"], {})]
|
new MenuItem("", "Browse all", "", "/search/find/dataproviders", false, ["datasource"], ["/search/find/dataproviders"], {})]
|
||||||
}
|
)
|
||||||
];
|
];
|
||||||
if (Session.isPortalAdministrator(this.user)) {
|
if (Session.isPortalAdministrator(this.user)) {
|
||||||
this.userMenuItems.push(new MenuItem("", "Manage all links", "", "/claims", false, [], ["/claims"], {}));
|
this.userMenuItems.push(new MenuItem("", "Manage all links", "", "/claims", false, [], ["/claims"], {}));
|
||||||
|
|
Loading…
Reference in New Issue