[Connect | new-theme]: app.component.ts: Removed deprecated RootMenuItem and used MenuItem instead.
This commit is contained in:
parent
a74f5f5081
commit
3825b04734
|
@ -2,7 +2,7 @@ import {Component, Inject, OnDestroy, OnInit, RendererFactory2, ViewChild, ViewE
|
|||
import {ActivatedRoute, NavigationEnd, Router} from '@angular/router';
|
||||
|
||||
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 {CommunitiesService} from "./openaireLibrary/connect/communities/communities.service";
|
||||
import {Session, User} from './openaireLibrary/login/utils/helper.class';
|
||||
|
@ -107,7 +107,7 @@ import {DOCUMENT} from "@angular/common";
|
|||
export class AppComponent implements OnInit, OnDestroy {
|
||||
isClient: boolean = false;
|
||||
userMenuItems: MenuItem[] = [];
|
||||
menuItems: RootMenuItem [] = [];
|
||||
menuItems: MenuItem [] = [];
|
||||
bottomMenuItems: MenuItem[] = [];
|
||||
public community:CommunityInfo = null;
|
||||
properties: EnvProperties = properties;
|
||||
|
@ -319,36 +319,36 @@ export class AppComponent implements OnInit, OnDestroy {
|
|||
badge: true
|
||||
};
|
||||
this.menuItems = [];
|
||||
this.menuItems.push({
|
||||
rootItem: new MenuItem("dashboard", "Home",
|
||||
"", "/", false, [], null, {}
|
||||
, null, null, null, null), items: []
|
||||
});
|
||||
this.menuItems.push({
|
||||
rootItem: new MenuItem("deposit", "Deposit", "", "/participate/deposit/learn-how", false, [], ["/participate/deposit/learn-how"], {}),
|
||||
items: []
|
||||
});
|
||||
this.menuItems.push(
|
||||
{
|
||||
rootItem: new MenuItem("link", "Link", "", "/participate/claim", false, [], ["/participate/claim"], {}),
|
||||
items: [
|
||||
new MenuItem("dashboard", "Home",
|
||||
"", "/", false, [], null, {}
|
||||
, null, null, null, null)
|
||||
);
|
||||
this.menuItems.push(
|
||||
new MenuItem("deposit", "Deposit", "", "/participate/deposit/learn-how", false, [], ["/participate/deposit/learn-how"], {}),
|
||||
);
|
||||
this.menuItems.push(
|
||||
new MenuItem("link", "Link", "", "/participate/claim", false, [], ["/participate/claim"], {},
|
||||
null, null, null, null, "_blank", "internal", false,
|
||||
[
|
||||
new MenuItem("", "Start linking", "", "/participate/claim", false, [], ["/participate/claim"], {}),
|
||||
new MenuItem("", "Learn more", this.properties.claimsInformationLink, "", false, [], [], {})
|
||||
]
|
||||
});
|
||||
)
|
||||
);
|
||||
this.menuItems.push(
|
||||
{
|
||||
rootItem: new MenuItem("search", "Search", "", "/search/find", false, [], ["/search/find"], {}),
|
||||
items: [
|
||||
new MenuItem("search", "Search", "", "/search/find", false, [], ["/search/find"], {},
|
||||
null, null, null, null, "_blank", "internal", false,
|
||||
[
|
||||
new MenuItem("", OpenaireEntities.RESULTS, "", "/search/find/research-outcomes", false, [], ["/search/find/research-outcomes"], {resultbestaccessright: '"' + encodeURIComponent("Open Access") + '"'}),
|
||||
new MenuItem("", OpenaireEntities.PROJECTS, "", "/search/find/projects/", false, ["project"], ["/search/find/projects"], {}),
|
||||
new MenuItem("", OpenaireEntities.DATASOURCES, "", "/search/find/dataproviders", false, ["datasource"], ["/search/find/dataproviders"], {}),
|
||||
]
|
||||
});
|
||||
));
|
||||
this.menuItems.push(
|
||||
{
|
||||
rootItem: new MenuItem("about", "About", "", "", false, [], [], {}),
|
||||
items: [
|
||||
new MenuItem("about", "About", "", "", false, [], [], {},
|
||||
null, null, null, null, "_blank", "internal", false,
|
||||
[
|
||||
new MenuItem("", "Supporting organizations", "", "/organizations", false, [], ["/organizations"], {}),
|
||||
new MenuItem("", "Curators", "", "/curators", false, [], ["/curators"], {}),
|
||||
new MenuItem("", "Sources and methodology", "", "/content", false, [], ["/content"], {}),
|
||||
|
@ -356,17 +356,14 @@ export class AppComponent implements OnInit, OnDestroy {
|
|||
new MenuItem("", "Subjects", "", "/subjects", false, [], ["/subjects"], {}),
|
||||
new MenuItem("", "Projects and funding Opportunities", "", "/projects", false, [], ["/projects"], {}),
|
||||
]
|
||||
});
|
||||
this.menuItems.push({
|
||||
rootItem: new MenuItem("develop", "Develop", "", "/develop", false, [], ["/develop"], {}),
|
||||
items: []
|
||||
});
|
||||
));
|
||||
this.menuItems.push(
|
||||
new MenuItem("develop", "Develop", "", "/develop", false, [], ["/develop"], {}),
|
||||
);
|
||||
if (this.isManager) {
|
||||
this.menuItems.push(
|
||||
{
|
||||
rootItem: new MenuItem("manage", "Manage", this.properties.adminPortalURL + '/' + this.community.communityId, "", false, [], [], {}, null, null, null, null, "_self"),
|
||||
items: []
|
||||
});
|
||||
new MenuItem("manage", "Manage", this.properties.adminPortalURL + '/' + this.community.communityId, "", false, [], [], {}, null, null, null, null, "_self"),
|
||||
);
|
||||
}
|
||||
this.bottomMenuItems = [
|
||||
new MenuItem("", "Supporting organizations", "", "/organizations", false, [], ["/organizations"], {})
|
||||
|
@ -425,20 +422,20 @@ export class AppComponent implements OnInit, OnDestroy {
|
|||
badge: true
|
||||
};
|
||||
this.menuItems = [];
|
||||
this.menuItems.push({
|
||||
rootItem: new MenuItem("about", "About", restrictedData ? url + "/about/learn-how" : "", restrictedData ? "" : "/about/learn-how", false, [], ["/about/learn-how"], {}),
|
||||
items: [
|
||||
new MenuItem("", "Learn the process", restrictedData ? url + "/about/learn-how" : "", restrictedData ? "" : "/about/learn-how", false, [], ["/about/learn-in-depth"], {}),
|
||||
new MenuItem("", "Publications", restrictedData ? url + "/publications" : "", restrictedData ? "" : "/publications", false, [], ["/publications"], {}),
|
||||
new MenuItem("", "Roadmap", "https://trello.com/b/yfzUz0kp/openaire-connect-dashboard", "", false, [], [], {}),
|
||||
new MenuItem("", "FAQs", restrictedData ? url + "/about/faq" : "", restrictedData ? "" : "/about/faq", false, [], ["/about/faq"], {})
|
||||
]
|
||||
|
||||
});
|
||||
this.menuItems.push({
|
||||
rootItem: new MenuItem("communities", "Communities", restrictedData ? url + "/search/find/communities" : "", restrictedData ? "" : "/search/find/communities", false, [], ['/search/find/communities'], {}),
|
||||
items: []
|
||||
});
|
||||
this.menuItems.push(
|
||||
new MenuItem("about", "About", restrictedData ? url + "/about/learn-how" : "", restrictedData ? "" : "/about/learn-how", false, [], ["/about/learn-how"], {},
|
||||
null, null, null, null, "_blank", "internal", false,
|
||||
[
|
||||
new MenuItem("", "Learn the process", restrictedData ? url + "/about/learn-how" : "", restrictedData ? "" : "/about/learn-how", false, [], ["/about/learn-in-depth"], {}),
|
||||
new MenuItem("", "Publications", restrictedData ? url + "/publications" : "", restrictedData ? "" : "/publications", false, [], ["/publications"], {}),
|
||||
new MenuItem("", "Roadmap", "https://trello.com/b/yfzUz0kp/openaire-connect-dashboard", "", false, [], [], {}),
|
||||
new MenuItem("", "FAQs", restrictedData ? url + "/about/faq" : "", restrictedData ? "" : "/about/faq", false, [], ["/about/faq"], {})
|
||||
]
|
||||
)
|
||||
);
|
||||
this.menuItems.push(
|
||||
new MenuItem("communities", "Communities", restrictedData ? url + "/search/find/communities" : "", restrictedData ? "" : "/search/find/communities", false, [], ['/search/find/communities'], {}),
|
||||
);
|
||||
this.bottomMenuItems = [
|
||||
new MenuItem("", "About", "https://openaire.eu/project-factsheets", "", false, [], [], {}),
|
||||
new MenuItem("", "News - Events", "https://openaire.eu/news-events", "", false, [], [], {}),
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit b1842543e7590fd899a2893baa145f4023271787
|
||||
Subproject commit 4cec2907da5e1bf55cf59930c23dd9a45c569b89
|
Loading…
Reference in New Issue