[Connect|Trunk]

App Component:
	update menu items
	update navbar and footer according to the new mocks

Search projects/datasources: enable refilter when the url parameters change
Search results: add options about breadcrumb and include only results




git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@58531 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
argiro.kokogiannaki 2020-04-23 13:35:54 +00:00
parent 984e2a19fd
commit c11b513652
8 changed files with 44 additions and 25 deletions

View File

@ -115,7 +115,7 @@
"reCaptchaSiteKey": "6LezhVIUAAAAAOb4nHDd87sckLhMXFDcHuKyS76P",
"admins" : ["rcd-helpdesk@openaire.eu"],
"lastIndexUpdate": "2019-11-01",
"lastIndexUpdate": "2020-03-26",
"indexInfoAPI": "http://beta.services.openaire.eu/openaire/info/",
"altMetricsAPIURL": "https://api.altmetric.com/v1/doi/",
"b2noteAPIURL": "http://b2note-dev.bsc.es/api/"

View File

@ -18,15 +18,16 @@ import {UserManagementService} from "./openaireLibrary/services/user-management.
styles: [`
`],
template: `
<div [class]="(community)?(community.id +'App'):'connectApp'">
<div [class]="(community)?(community.id +'App communityApp'):'connectApp'">
<navbar *ngIf="properties && showMenu && !community" [portal]="properties.dashboard" [onlyTop]=false
[userMenuItems]=userMenuItems [menuItems]=menuItems [user]="user"
[showMenu]=showMenu [properties]="properties" [showHomeMenuItem]="true" communityId="connect"></navbar>
[showMenu]=showMenu [properties]="properties" [showHomeMenuItem]="false" communityId="connect"></navbar>
<navbar *ngIf="properties && showMenu && community" [portal]="properties.dashboard" [onlyTop]=false
[communityId]="community.id"
[userMenuItems]=userMenuItems [menuItems]=menuItems [user]="user"
[community]=community [showMenu]=showMenu [properties]="properties" [enableSearch]="true"
[showHomeMenuItem]="true"></navbar>
searchRoute="/search/find/research-outcomes"
[showHomeMenuItem]="false"></navbar>
<customization *ngIf="properties && community" [properties]="properties"
[communityId]="community.id"></customization>
<div class="custom-main-content">
@ -48,9 +49,10 @@ import {UserManagementService} from "./openaireLibrary/services/user-management.
</cookie-law>
<bottom *ngIf="properties && isClient && showMenu && !community" [grantAdvance]="false"
[properties]="properties"></bottom>
<bottom *ngIf="properties && isClient && showMenu && community" class="communityPanelBackground"
<bottom *ngIf="properties && isClient && showMenu && community" class=""
[showSocialButtons]="true" [showMenuItems]="true" [grantAdvance]="false" [showOpenaire]="true"
[communityId]="community.id" [menuItems]=bottomMenuItems [properties]="properties"></bottom>
[communityId]="community.id" [menuItems]=bottomMenuItems [properties]="properties"
[darkBackground]="false" [centered]="true"></bottom>
</div>
`
@ -160,19 +162,15 @@ export class AppComponent {
};
this.menuItems = [];
this.menuItems.push(
/* this.menuItems.push(
{
rootItem: new MenuItem("search", "Search", "", "/search/find", false, [], ["/search/find", "/search/find/publications", "/search/find/datasets", "/search/find/software", "/search/find/other", "/search/find/projects", "/search/find/dataproviders"], this.properties.environment != "development" ? {} : {communityId: community.communityId}),
items: [
new MenuItem("", "Research outcomes", "", "/search/find/research-outcomes", false, [], ["/search/find/research-outcomes"], this.properties.environment != "development" ? {} : {communityId: community.communityId}),
// new MenuItem("", "Publications", "", "/search/find/publications", false, ["publication"], ["/search/find/publications"], this.properties.environment != "development" ? {} : {communityId: community.communityId}),
// new MenuItem("", "Research Data", "", "/search/find/datasets", false, ["dataset"], ["/search/find/datasets"], this.properties.environment != "development" ? {} : {communityId: community.communityId}),
// new MenuItem("", "Software", "", "/search/find/software", false, ["software"], ["/search/find/software"], this.properties.environment != "development" ? {} : {communityId: community.communityId}),
// new MenuItem("", "Other Research Products", "", "/search/find/other", false, ["orp"], ["/search/find/other"], this.properties.environment != "development" ? {} : {communityId: community.communityId}),
new MenuItem("", "Projects", "", "/search/find/projects/", false, ["project"], ["/search/find/projects"], this.properties.environment != "development" ? {} : {communityId: community.communityId}),
new MenuItem("", "Content Providers", "", "/search/find/dataproviders", false, ["datasource"], ["/search/find/dataproviders"], this.properties.environment != "development" ? {} : {communityId: community.communityId}),
]
});
});*/
this.menuItems.push({
rootItem: new MenuItem("deposit", "Deposit", "", "/participate/deposit/learn-how", false, [], ["/participate/deposit/learn-how"], this.properties.environment != "development" ? {} : {communityId: community.communityId}),
@ -217,6 +215,7 @@ export class AppComponent {
new MenuItem("", "Learn the process", "", "/about/learn-how", false, [], [], {}),
new MenuItem("", "Publications", "", "/publications", false, [], ["/publications"], {}),
new MenuItem("", "Roadmap", "https://trello.com/b/yfzUz0kp/openaire-connect-dashboard", "", false, [], [], {}),
new MenuItem("", "FAQs", "", "/about/faq", false, [], ["/about/faq"], {})
]
});
@ -225,7 +224,7 @@ export class AppComponent {
items: []
});
this.menuItems.push({
rootItem: new MenuItem("join", "Join", "", "/contact-us", false, [], null, {}),
rootItem: new MenuItem("contact-us", "Contact us", "", "/contact-us", false, [], null, {}),
items: []
});
this.bottomMenuItems = [
@ -246,10 +245,10 @@ export class AppComponent {
}
} else {
this.bottomMenuItems = [
new MenuItem("", "Organizations", "", "/organizations", false, [], ["/organizations"], this.properties.environment != "development" ? {} : {communityId: community.communityId})
new MenuItem("", "Supporting organizations", "", "/organizations", false, [], ["/organizations"], this.properties.environment != "development" ? {} : {communityId: community.communityId})
];
if (this.properties.showContent) {
this.bottomMenuItems.push(new MenuItem("", "Content Policy", "", "/content", false, [], [], {}));
this.bottomMenuItems.push(new MenuItem("", "Sources and methology", "", "/content", false, [], [], {}));
}
if(this.user) {
this.userMenuItems = [ /*new MenuItem("","My profile","","",false,[],[],{}),*/

View File

@ -7,7 +7,7 @@ import {PiwikHelper} from "../../utils/piwikHelper";
@Component({
selector: 'openaire-search-results',
template: `
<search-research-results resultType="result" [simpleView]="false" [customFilter]=customFilter [piwikSiteId]="piwikSiteId" [hasPrefix]="false"></search-research-results>
<search-research-results resultType="result" [simpleView]="false" [customFilter]=customFilter [piwikSiteId]="piwikSiteId" [hasPrefix]="false" [showBreadcrumb]="true"></search-research-results>
`
})

View File

@ -51,7 +51,7 @@ export class OpenaireSearchDataprovidersComponent {
@ViewChild (SearchPageTableViewComponent) searchPage : SearchPageTableViewComponent ;
piwikSiteId = null;
customFilter: SearchCustomFilter = null;
initialLoad = true;
constructor (private route: ActivatedRoute, private _searchDataprovidersService: SearchCommunityDataprovidersService) {
this.errorCodes = new ErrorCodes();
this.errorMessages = new ErrorMessagesComponent();
@ -72,11 +72,18 @@ export class OpenaireSearchDataprovidersComponent {
}
this.customFilter = new SearchCustomFilter("Community", "communityId", this.communityId, "");
this.piwikSiteId = PiwikHelper.getSiteId(this.communityId,this.properties.environment);
this.searchUtils.keyword = (params['keyword']?params['keyword']:'');
this.searchUtils.keyword = (params['fv0']?params['fv0']:(params['keyword']?params['keyword']:''));
//this.filters = this.createFilters();
//this.searchPage.getParametersFromUrl(params);
this._getResults(params);
if(this.initialLoad) {
this.initialLoad = false;
console.log("Init get results")
this._getResults(params);
}else{
// this.searchPage.transform(this.results);
this.searchPage.goTo(1);
console.log("Init transfrm " + this.searchUtils.keyword)
}
});
});
}

View File

@ -53,6 +53,7 @@ export class OpenaireSearchProjectsComponent {
@ViewChild (SearchPageTableViewComponent) searchPage : SearchPageTableViewComponent ;
piwikSiteId = null;
customFilter: SearchCustomFilter = null;
initialLoad = true;
constructor (private route: ActivatedRoute, private _searchProjectsService: SearchCommunityProjectsService) {
this.errorCodes = new ErrorCodes();
this.errorMessages = new ErrorMessagesComponent();
@ -73,11 +74,16 @@ export class OpenaireSearchProjectsComponent {
}
this.customFilter = new SearchCustomFilter("Community", "communityId", this.communityId, "");
this.piwikSiteId = PiwikHelper.getSiteId(this.communityId,this.properties.environment);
this.searchUtils.keyword = (params['keyword']?params['keyword']:'');
this.searchUtils.keyword = (params['fv0']?params['fv0']:(params['keyword']?params['keyword']:''));
//this.filters = this.createFilters();
//this.searchPage.getParametersFromUrl(params);
this._getResults(params);
if(this.initialLoad) {
this.initialLoad = false;
this._getResults(params);
}else{
this.searchPage.goTo(1);
}
});
});
}

View File

@ -1,4 +1,4 @@
import {Component, Input} from '@angular/core';
import {Component} from '@angular/core';
import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class";
import {EnvProperties} from "../../openaireLibrary/utils/properties/env-properties";
import {ActivatedRoute} from "@angular/router";
@ -9,7 +9,8 @@ import {PiwikHelper} from "../../utils/piwikHelper";
selector: 'openaire-search-results',
template: `
<search-research-results resultType="result" openaireLink="https://beta.explore.openaire.eu/search/find/publications"
[customFilter]=customFilter [piwikSiteId]="piwikSiteId" [hasPrefix]="false"></search-research-results>
[customFilter]=customFilter [piwikSiteId]="piwikSiteId" [hasPrefix]="false"
[includeOnlyResultsAndFilter]="true" [showBreadcrumb]="true"></search-research-results>
`
})

View File

@ -224,3 +224,8 @@ Impact Factor - ATHENA CODE */
}
/* ATHENA CODE */
.communityApp .uk-logo{
padding-left: 20px;
}

View File

@ -116,7 +116,7 @@ a:not(.uk-button):hover,
border-radius: 4px;
}
.uk-button:not(.uk-button-text):not(.uk-button-default):not(.uk-button-primary),
/*.uk-button:not(.uk-button-text):not(.uk-button-default):not(.uk-button-primary),
.portal-button {
background-color: #003052;
color: #ffffff;
@ -131,6 +131,7 @@ a:not(.uk-button):hover,
color: #ffffff;
border-color: #ffffff;
}
*/
.communityPanelBackground .uk-button:not(.ignoreCommunityPanelBackground) {
background-color: #ffffff !important;