|
|
@ -1,5 +1,5 @@
|
|
|
|
import {ChangeDetectorRef, Component, HostListener, OnInit} from '@angular/core';
|
|
|
|
import {ChangeDetectorRef, Component, HostListener, OnInit} from '@angular/core';
|
|
|
|
import {MenuItem, RootMenuItem} from './openaireLibrary/sharedComponents/menu';
|
|
|
|
import {MenuItem} from './openaireLibrary/sharedComponents/menu';
|
|
|
|
import {ActivatedRoute, Data, NavigationEnd, Params, Router} from '@angular/router';
|
|
|
|
import {ActivatedRoute, Data, NavigationEnd, Params, Router} from '@angular/router';
|
|
|
|
import {EnvProperties} from './openaireLibrary/utils/properties/env-properties';
|
|
|
|
import {EnvProperties} from './openaireLibrary/utils/properties/env-properties';
|
|
|
|
import {Session, User} from './openaireLibrary/login/utils/helper.class';
|
|
|
|
import {Session, User} from './openaireLibrary/login/utils/helper.class';
|
|
|
@ -33,7 +33,7 @@ export class AppComponent implements OnInit {
|
|
|
|
isFrontPage: boolean = false;
|
|
|
|
isFrontPage: boolean = false;
|
|
|
|
sideBarItems: MenuItem[] = [];
|
|
|
|
sideBarItems: MenuItem[] = [];
|
|
|
|
specialSideBarMenuItem: MenuItem = null;
|
|
|
|
specialSideBarMenuItem: MenuItem = null;
|
|
|
|
menuItems: RootMenuItem[] = [];
|
|
|
|
menuItems: MenuItem[] = [];
|
|
|
|
menuHeader: Header = {
|
|
|
|
menuHeader: Header = {
|
|
|
|
route: "/",
|
|
|
|
route: "/",
|
|
|
|
url: null,
|
|
|
|
url: null,
|
|
|
@ -221,36 +221,36 @@ export class AppComponent implements OnInit {
|
|
|
|
this.specialSideBarMenuItem = new MenuItem("back", "Manage communities", "", "/", false, [], null, {}, {name: 'search', class: 'uk-text-secondary'});
|
|
|
|
this.specialSideBarMenuItem = new MenuItem("back", "Manage communities", "", "/", false, [], null, {}, {name: 'search', class: 'uk-text-secondary'});
|
|
|
|
|
|
|
|
|
|
|
|
this.menuItems = [];
|
|
|
|
this.menuItems = [];
|
|
|
|
this.menuItems.push({
|
|
|
|
this.menuItems.push(new MenuItem("home", "Home",
|
|
|
|
rootItem: new MenuItem("home", "Home",
|
|
|
|
|
|
|
|
"https://"+(properties.environment == "beta" ? "beta." : "")+this.community.communityId+".openaire.eu/", "", false, [], null, null
|
|
|
|
"https://"+(properties.environment == "beta" ? "beta." : "")+this.community.communityId+".openaire.eu/", "", false, [], null, null
|
|
|
|
, null, null, null, null, "_self"), items: []
|
|
|
|
, null, null, null, null, "_self")
|
|
|
|
});
|
|
|
|
);
|
|
|
|
this.menuItems.push({
|
|
|
|
|
|
|
|
rootItem: new MenuItem("deposit", "Deposit", "https://"+(properties.environment == "beta" ? "beta." : "")+this.community.communityId+".openaire.eu/participate/participate/deposit/learn-how", "", false, [], ['/participate/deposit/learn-how'], null, null, null, null, null, "_self"),
|
|
|
|
|
|
|
|
items: []
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
this.menuItems.push(
|
|
|
|
this.menuItems.push(
|
|
|
|
{
|
|
|
|
new MenuItem("deposit", "Deposit", "https://"+(properties.environment == "beta" ? "beta." : "")+this.community.communityId+".openaire.eu/participate/participate/deposit/learn-how", "", false, [], ['/participate/deposit/learn-how'], null, null, null, null, null, "_self")
|
|
|
|
rootItem: new MenuItem("link", "Link", "https://"+(properties.environment == "beta" ? "beta." : "")+this.community.communityId+".openaire.eu/participate/claim", "", false, [], ['/participate/claim'], null, null, null, null, null, "_self"),
|
|
|
|
);
|
|
|
|
items: [
|
|
|
|
this.menuItems.push(
|
|
|
|
|
|
|
|
new MenuItem("link", "Link", "https://"+(properties.environment == "beta" ? "beta." : "")+this.community.communityId+".openaire.eu/participate/claim", "", false, [], ['/participate/claim'], null, null, null, null, null, "_self",
|
|
|
|
|
|
|
|
"_internal", false,
|
|
|
|
|
|
|
|
[
|
|
|
|
new MenuItem("", "Start linking", "https://"+(properties.environment == "beta" ? "beta." : "")+this.community.communityId+".openaire.eu/participate/claim", "", false, [], ['/participate/claim'], null, null, null, null, null, "_self"),
|
|
|
|
new MenuItem("", "Start linking", "https://"+(properties.environment == "beta" ? "beta." : "")+this.community.communityId+".openaire.eu/participate/claim", "", false, [], ['/participate/claim'], null, null, null, null, null, "_self"),
|
|
|
|
new MenuItem("", "Learn more", this.properties.claimsInformationLink, "", false, [], [], null),
|
|
|
|
new MenuItem("", "Learn more", this.properties.claimsInformationLink, "", false, [], [], null),
|
|
|
|
]
|
|
|
|
]
|
|
|
|
});
|
|
|
|
)
|
|
|
|
|
|
|
|
);
|
|
|
|
this.menuItems.push(
|
|
|
|
this.menuItems.push(
|
|
|
|
{
|
|
|
|
new MenuItem("search", "Search", "https://"+(properties.environment == "beta" ? "beta." : "")+this.community.communityId+".openaire.eu/search/find", "", false, [], ["/search/find"], null, null, null, null, null, "_self",
|
|
|
|
rootItem: new MenuItem("search", "Search", "https://"+(properties.environment == "beta" ? "beta." : "")+this.community.communityId+".openaire.eu/search/find", "", false, [], ["/search/find"], null, null, null, null, null, "_self"),
|
|
|
|
"internal", false,
|
|
|
|
items: [
|
|
|
|
[
|
|
|
|
new MenuItem("", OpenaireEntities.RESULTS, "https://"+(properties.environment == "beta" ? "beta." : "")+this.community.communityId+".openaire.eu/search/find/research-outcomes?resultbestaccessright=\"" + encodeURIComponent("Open Access") + '"', "", false, [], ["/search/find/research-outcomes"], null, null, null, null, null, "_self"),
|
|
|
|
new MenuItem("", OpenaireEntities.RESULTS, "https://"+(properties.environment == "beta" ? "beta." : "")+this.community.communityId+".openaire.eu/search/find/research-outcomes?resultbestaccessright=\"" + encodeURIComponent("Open Access") + '"', "", false, [], ["/search/find/research-outcomes"], null, null, null, null, null, "_self"),
|
|
|
|
new MenuItem("", OpenaireEntities.PROJECTS, "https://"+(properties.environment == "beta" ? "beta." : "")+this.community.communityId+".openaire.eu/search/find/projects", "", false, [], ["/search/find/projects"], null, null, null, null, null, "_self"),
|
|
|
|
new MenuItem("", OpenaireEntities.PROJECTS, "https://"+(properties.environment == "beta" ? "beta." : "")+this.community.communityId+".openaire.eu/search/find/projects", "", false, [], ["/search/find/projects"], null, null, null, null, null, "_self"),
|
|
|
|
new MenuItem("", OpenaireEntities.DATASOURCES, "https://"+(properties.environment == "beta" ? "beta." : "")+this.community.communityId+".openaire.eu/search/find/dataproviders", "", false, [], ["/search/find/dataproviders"], null, null, null, null, null, "_self")
|
|
|
|
new MenuItem("", OpenaireEntities.DATASOURCES, "https://"+(properties.environment == "beta" ? "beta." : "")+this.community.communityId+".openaire.eu/search/find/dataproviders", "", false, [], ["/search/find/dataproviders"], null, null, null, null, null, "_self")
|
|
|
|
]
|
|
|
|
]
|
|
|
|
});
|
|
|
|
)
|
|
|
|
|
|
|
|
);
|
|
|
|
this.menuItems.push(
|
|
|
|
this.menuItems.push(
|
|
|
|
{
|
|
|
|
new MenuItem("about", "About", "", "", false, [], [], {},
|
|
|
|
rootItem: new MenuItem("about", "About", "", "", false, [], [], {}),
|
|
|
|
null, null, null, null, "_blank", "internal", false,
|
|
|
|
items: [
|
|
|
|
[
|
|
|
|
new MenuItem("", "Supporting organizations", "https://"+(properties.environment == "beta" ? "beta." : "")+this.community.communityId+".openaire.eu/organizations", "", false, [], ["/organizations"], null, null, null, null, null, "_self"),
|
|
|
|
new MenuItem("", "Supporting organizations", "https://"+(properties.environment == "beta" ? "beta." : "")+this.community.communityId+".openaire.eu/organizations", "", false, [], ["/organizations"], null, null, null, null, null, "_self"),
|
|
|
|
new MenuItem("", "Curators", "https://"+(properties.environment == "beta" ? "beta." : "")+this.community.communityId+".openaire.eu/curators", "", false, [], ["/organizations"], null, null, null, null, null, "_self"),
|
|
|
|
new MenuItem("", "Curators", "https://"+(properties.environment == "beta" ? "beta." : "")+this.community.communityId+".openaire.eu/curators", "", false, [], ["/organizations"], null, null, null, null, null, "_self"),
|
|
|
|
new MenuItem("", "Sources and methodology", "https://"+(properties.environment == "beta" ? "beta." : "")+this.community.communityId+".openaire.eu/content", "", false, [], ["/content"], null, null, null, null, null, "_self"),
|
|
|
|
new MenuItem("", "Sources and methodology", "https://"+(properties.environment == "beta" ? "beta." : "")+this.community.communityId+".openaire.eu/content", "", false, [], ["/content"], null, null, null, null, null, "_self"),
|
|
|
@ -258,20 +258,17 @@ export class AppComponent implements OnInit {
|
|
|
|
new MenuItem("", "Subjects", "https://"+(properties.environment == "beta" ? "beta." : "")+this.community.communityId+".openaire.eu/subjects", "", false, [], ["/subjects"], null, null, null, null, null, "_self"),
|
|
|
|
new MenuItem("", "Subjects", "https://"+(properties.environment == "beta" ? "beta." : "")+this.community.communityId+".openaire.eu/subjects", "", false, [], ["/subjects"], null, null, null, null, null, "_self"),
|
|
|
|
new MenuItem("", "Projects and funding Opportunities", "https://"+(properties.environment == "beta" ? "beta." : "")+this.community.communityId+".openaire.eu/projects", "", false, [], ["/projects"], null, null, null, null, null, "_self")
|
|
|
|
new MenuItem("", "Projects and funding Opportunities", "https://"+(properties.environment == "beta" ? "beta." : "")+this.community.communityId+".openaire.eu/projects", "", false, [], ["/projects"], null, null, null, null, null, "_self")
|
|
|
|
]
|
|
|
|
]
|
|
|
|
});
|
|
|
|
)
|
|
|
|
this.menuItems.push({
|
|
|
|
);
|
|
|
|
rootItem: new MenuItem("develop", "Develop", "https://"+(properties.environment == "beta" ? "beta." : "")+this.community.communityId+".openaire.eu/develop", "", false, [], ['/develop'], null, null, null, null, null, "_self"),
|
|
|
|
this.menuItems.push(
|
|
|
|
items: []
|
|
|
|
new MenuItem("develop", "Develop", "https://"+(properties.environment == "beta" ? "beta." : "")+this.community.communityId+".openaire.eu/develop", "", false, [], ['/develop'], null, null, null, null, null, "_self"),
|
|
|
|
});
|
|
|
|
);
|
|
|
|
// if (this.isManager) {
|
|
|
|
// if (this.isManager) {
|
|
|
|
this.menuItems.push(
|
|
|
|
this.menuItems.push(
|
|
|
|
{
|
|
|
|
new MenuItem("manage", "Manage",
|
|
|
|
// rootItem: new MenuItem("manage", "Manage", "", "/"+this.community.communityId, false, [], [], {}),
|
|
|
|
"", "/"+this.community.communityId, false, [], null, {},
|
|
|
|
// items: []
|
|
|
|
null, null, null, "/"+this.community.communityId)
|
|
|
|
rootItem: new MenuItem("manage", "Manage",
|
|
|
|
);
|
|
|
|
"", "/"+this.community.communityId, false, [], null, {}
|
|
|
|
|
|
|
|
, null, null, null, "/"+this.community.communityId), items: []
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this.headerLogoUrl = null;
|
|
|
|
this.headerLogoUrl = null;
|
|
|
@ -287,20 +284,20 @@ export class AppComponent implements OnInit {
|
|
|
|
menuPosition: "center"
|
|
|
|
menuPosition: "center"
|
|
|
|
};
|
|
|
|
};
|
|
|
|
this.menuItems = [];
|
|
|
|
this.menuItems = [];
|
|
|
|
this.menuItems.push({
|
|
|
|
this.menuItems.push(
|
|
|
|
rootItem: new MenuItem("about", "About", this.headerUrl + "/about/learn-how", "", false, [], [], {}, null, null, null, null, "_self"),
|
|
|
|
new MenuItem("about", "About", this.headerUrl + "/about/learn-how", "", false, [], [], {}, null, null, null, null, "_self",
|
|
|
|
items: [
|
|
|
|
"internal", false,
|
|
|
|
new MenuItem("", "Learn the process", this.headerUrl + "/about/learn-how", "", false, [], [], {}, null, null, null, null, "_self"),
|
|
|
|
[
|
|
|
|
new MenuItem("", "Publications", this.headerUrl + "/publications", "", false, [], [], {}, null, null, null, null, "_self"),
|
|
|
|
new MenuItem("", "Learn the process", this.headerUrl + "/about/learn-how", "", false, [], [], {}, null, null, null, null, "_self"),
|
|
|
|
new MenuItem("", "Roadmap", "https://trello.com/b/yfzUz0kp/openaire-connect-dashboard", "", false, [], [], {}),
|
|
|
|
new MenuItem("", "Publications", this.headerUrl + "/publications", "", false, [], [], {}, null, null, null, null, "_self"),
|
|
|
|
new MenuItem("", "FAQs", this.headerUrl + "/about/faq", "", false, [], [], {}, null, null, null, null, "_self")
|
|
|
|
new MenuItem("", "Roadmap", "https://trello.com/b/yfzUz0kp/openaire-connect-dashboard", "", false, [], [], {}),
|
|
|
|
]
|
|
|
|
new MenuItem("", "FAQs", this.headerUrl + "/about/faq", "", false, [], [], {}, null, null, null, null, "_self")
|
|
|
|
|
|
|
|
]
|
|
|
|
});
|
|
|
|
)
|
|
|
|
this.menuItems.push({
|
|
|
|
);
|
|
|
|
rootItem: new MenuItem("communities", "Communities", this.headerUrl + "/search/find/communities", "", false, [], [], {}, null, null, null, null, "_self"),
|
|
|
|
this.menuItems.push(
|
|
|
|
items: []
|
|
|
|
new MenuItem("communities", "Communities", this.headerUrl + "/search/find/communities", "", false, [], [], {}, null, null, null, null, "_self")
|
|
|
|
});
|
|
|
|
);
|
|
|
|
if(this.isCurator()) {
|
|
|
|
if(this.isCurator()) {
|
|
|
|
this.sideBarItems.push(new MenuItem("communities", "Manage communities", "", "/", false, [], [], {}, {name: 'settings'}));
|
|
|
|
this.sideBarItems.push(new MenuItem("communities", "Manage communities", "", "/", false, [], [], {}, {name: 'settings'}));
|
|
|
|
}
|
|
|
|
}
|
|
|
|