Add Other Research Products: landing page, advanced search,simple search and community page

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@52831 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
sofia.baltzi 2018-07-27 14:45:08 +00:00
parent 96b77e8205
commit 73997be323
19 changed files with 301 additions and 7 deletions

View File

@ -66,12 +66,14 @@
"searchLinkToDataProvider" : "/search/dataprovider?datasourceId=",
"searchLinkToDataset" : "/search/dataset?datasetId=",
"searchLinkToOrganization" : "/search/organization?organizationId=",
"searchLinkToOrp" : "/search/other?orpId=",
"searchLinkToPublications" : "/search/find/publications",
"searchLinkToDataProviders" : "/search/find/dataproviders",
"searchLinkToProjects" : "/search/find/projects",
"searchLinkToDatasets" : "/search/find/datasets",
"searchLinkToSoftware" : "/search/find/software",
"searchLinkToOrps" : "/search/find/other",
"searchLinkToOrganizations" : "/search/find/organizations",
"searchLinkToCompatibleDataProviders" : "/search/content-providers",
"searchLinkToCompatibleDataProvidersTable" : "/search/content-providers-table",
@ -85,6 +87,7 @@
"searchLinkToAdvancedDatasets" : "/search/advanced/datasets",
"searchLinkToAdvancedSoftware" : "/search/advanced/software",
"searchLinkToAdvancedDataProviders" : "/search/advanced/dataproviders",
"searchLinkToAdvancedOrps" : "/search/advanced/other",
"searchLinkToAdvancedOrganizations" : "/search/advanced/organizations",
"searchLinkToAdvancedPeople" : "/search/advanced/people"
}

View File

@ -16,6 +16,7 @@ const routes: Routes = [
{ path: 'search/publication', loadChildren: './landingPages/publication/libPublication.module#LibPublicationModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'search/dataset', loadChildren: './landingPages/dataset/libDataset.module#LibDatasetModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'search/software', loadChildren: './landingPages/software/libSoftware.module#LibSoftwareModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'search/other', loadChildren: './landingPages/orp/libOrp.module#LibOrpModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'search/project', loadChildren: './landingPages/project/libProject.module#LibProjectModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'search/dataprovider', loadChildren: '././landingPages/dataProvider/libDataProvider.module#LibDataProviderModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'search/organization', loadChildren: './landingPages/organization/libOrganization.module#LibOrganizationModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
@ -31,9 +32,11 @@ const routes: Routes = [
{ path: 'search/find/projects', loadChildren: './searchPages/simple/searchProjects.module#LibSearchProjectsModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'search/find/dataproviders', loadChildren: './searchPages/simple/searchDataProviders.module#LibSearchDataProvidersModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'search/find/organizations', loadChildren: './searchPages/simple/searchOrganizations.module#LibSearchOrganizationsModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'search/find/other', loadChildren: './searchPages/simple/searchOrps.module#LibSearchOrpsModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'search/advanced/publications', loadChildren: './searchPages/advanced/advancedSearchPublications.module#LibAdvancedSearchPublicationsModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'search/advanced/datasets', loadChildren: './searchPages/advanced/advancedSearchDatasets.module#LibAdvancedSearchDatasetsModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'search/advanced/software', loadChildren: './searchPages/advanced/advancedSearchSoftware.module#LibAdvancedSearchSoftwareModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'search/advanced/other', loadChildren: './searchPages/advanced/advancedSearchOrps.module#LibAdvancedSearchOrpsModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'project-report', loadChildren: './landingPages/htmlProjectReport/libHtmlProjectReport.module#LibHtmlProjectReportModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'myclaims', loadChildren: './claims/myClaims/myClaims.module#LibMyClaimsModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'participate/claim', loadChildren: './claims/linking/linkingGeneric.module#LibLinkingGenericModule', resolve: { envSpecific: EnvironmentSpecificResolver }},

View File

@ -87,6 +87,7 @@ export class AppComponent {
items: [new MenuItem("","Publications","","/search/find/publications",false,["publication"],["/search/find/publications"],(typeof document !== 'undefined' && ConnectHelper.isProduction(document.location.hostname))?{}:{communityId:community.communityId}),
new MenuItem("","Research Data","","/search/find/datasets",false,["dataset"],["/search/find/datasets"],(typeof document !== 'undefined' && ConnectHelper.isProduction(document.location.hostname))?{}:{communityId:community.communityId}),
new MenuItem("","Software","","/search/find/software",false,["software"],["/search/find/software"],(typeof document !== 'undefined' && ConnectHelper.isProduction(document.location.hostname))?{}:{communityId:community.communityId}),
new MenuItem("","Other Research Products","","/search/find/other",false,["orp"],["/search/find/other"],(typeof document !== 'undefined' && ConnectHelper.isProduction(document.location.hostname))?{}:{communityId:community.communityId}),
new MenuItem("","Projects","","/search/find/projects/",false,["project"],["/search/find/projects"],(typeof document !== 'undefined' && ConnectHelper.isProduction(document.location.hostname))?{}:{communityId:community.communityId}),
new MenuItem("","Content Providers","","/search/find/dataproviders",false,["datasource"],["/search/find/dataproviders"],(typeof document !== 'undefined' && ConnectHelper.isProduction(document.location.hostname))?{}:{communityId:community.communityId}),
]},

View File

@ -79,6 +79,14 @@
</div>
</div>
</div>
<div *ngIf="orpTotal != null && IsEntityEnabled('orp')">
<div class="uk-card uk-card-default uk-card-small uk-card-body">
<div>
<a [queryParams]=params routerLinkActive="router-link-active" routerLink="/search/find/other"><h3 class="uk-card-title">{{orpTotal|number}}</h3>
<p>other research products</p></a>
</div>
</div>
</div>
<div *ngIf="projectTotal != null && IsEntityEnabled('project')">
<div class="uk-card uk-card-default uk-card-small uk-card-body">
<div>
@ -125,6 +133,12 @@
</h2>
<results-comp [(results)]=softwareResults [(total)]=softwareTotal resultType="software" [community]=community [params]=params></results-comp>
</div>
<div *ngIf="IsEntityEnabled('orp')" class="uk-width-expand@m">
<h2 class="uk-h3 uk-heading-line uk-text-primary">
<span>Recent other research products</span>
</h2>
<results-comp [(results)]=orpResults [(total)]=orpTotal resultType="other" [community]=community [params]=params></results-comp>
</div>
</div>

View File

@ -34,6 +34,7 @@ export class CommunityComponent {
public publicationTotal = null;
public researchDataTotal = null;
public softwareTotal = null;
public orpTotal = null;
public projectTotal = null;
public contentProviderTotal = null;
public organizationTotal = null;
@ -44,6 +45,7 @@ export class CommunityComponent {
public publicationResults = null;
public researchDataResults = null;
public softwareResults = null;
public orpResults = null;
@Input() communityId = null;
public community = null;
@ -89,8 +91,8 @@ export class CommunityComponent {
if (this.communityId != null && this.communityId != '') {
this._communityService.getCommunity(this.properties, this.properties.communityAPI+this.communityId).subscribe (
community => {
this.community = community;
this.params = {communityId: community.communityId};
this.community = community;
this.params = {communityId: community.communityId};
this._meta.updateTag({content:community.description},"name='description'");
this._meta.updateTag({content:community.description},"property='og:description'");
this._meta.updateTag({content:community.title},"property='og:title'");
@ -143,6 +145,17 @@ export class CommunityComponent {
}
});
this._searchEntriesService.getTotal(this.properties.searchAPIURLLAst+'other/count?format=json&fq=communityid='+this.communityId).subscribe(
orpTotal => {
this.orpTotal = orpTotal;
if (this.orpTotal > 0) {
this._searchEntriesService.getResults(this.properties.searchAPIURLLAst+'other?fq=communityid%20exact%20%22'+this.communityId+'%22&sortBy=resultdateofacceptance,descending&format=json&size=5').subscribe(
orpResults => {
this.orpResults = orpResults;
});
}
});
this._searchEntriesService.countTotal(this.properties.communityAPI+this.communityId+'/projects').subscribe(
projectTotal => {
this.projectTotal = projectTotal;

View File

@ -0,0 +1,29 @@
//import {MaterialModule} from '@angular/material';
import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {FormsModule} from '@angular/forms';
import {RouterModule} from '@angular/router';
import {SharedModule} from '../../shared/shared.module';
import {OrpModule} from '../../openaireLibrary/landingPages/orp/orp.module';
import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard';
import {OpenaireOrpComponent} from './orp.component';
import {OrpRoutingModule} from './orp-routing.module';
@NgModule({
imports: [
OrpModule, OrpRoutingModule
],
declarations: [
OpenaireOrpComponent
],
providers: [
FreeGuard, PreviousRouteRecorder, IsRouteEnabled
],
exports: [
OpenaireOrpComponent
]
})
export class LibOrpModule { }

View File

@ -0,0 +1,20 @@
import {NgModule} from '@angular/core';
import {RouterModule} from '@angular/router';
import {OpenaireOrpComponent } from './orp.component';
import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard';
@NgModule({
imports: [
RouterModule.forChild([{
path: '', component: OpenaireOrpComponent, canActivate: [FreeGuard, IsRouteEnabled], data: {
redirect: '/error'
},
canDeactivate: [PreviousRouteRecorder]
}])
]
})
export class OrpRoutingModule { }

View File

@ -0,0 +1,20 @@
import {Component, ViewChild, ElementRef} from '@angular/core';
import {PiwikHelper} from '../../utils/piwikHelper';
import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
@Component({
selector: 'openaire-orp',
template: `<orp [piwikSiteId]=piwikSiteId></orp>`,
})
export class OpenaireOrpComponent {
piwikSiteId = null;
constructor ( ) {
var communityId = ConnectHelper.getCommunityFromDomain(document.location.hostname);
this.piwikSiteId = PiwikHelper.siteIDs[communityId];
}
ngOnInit() {
}
}

View File

@ -23,9 +23,13 @@ import { CommunityInfo } from '../../openaireLibrary/connect/community/community
<a [queryParams]="{softwareId: item.id}" routerLinkActive="router-link-active" routerLink="/search/software" >
{{item.title}} </a>
</div>
<div *ngIf="item.type == 'other' && community != null && community.communityId != null">
<a [queryParams]="{orpId: item.id}" routerLinkActive="router-link-active" routerLink="/search/other" >
{{item.title}} </a>
</div>
</h6>
<div *ngIf="item.accessRights" class="el-content"><span class=" uk-label label-{{item.accessRights}}">{{item.accessRights}}</span><br></div>
<div >
<div>
<span *ngIf="item.authors != null">
<span class="el-meta uk-margin uk-text-meta" *ngFor='let author of item.authors; let i = index'>
<span *ngIf="i < 10">
@ -63,6 +67,11 @@ import { CommunityInfo } from '../../openaireLibrary/connect/community/community
View all
</a>
</div>
<div *ngIf="resultType == 'other'">
<a class="el-content uk-button uk-button-text" [queryParams]=params routerLinkActive="router-link-active" routerLink="/search/find/other">
View all
</a>
</div>
</div>
</div>`

View File

@ -0,0 +1,20 @@
import {NgModule} from '@angular/core';
import {RouterModule} from '@angular/router';
import {OpenaireAdvancedSearchOrpsComponent} from './advancedSearchOrps.component';
import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: OpenaireAdvancedSearchOrpsComponent, canActivate: [FreeGuard, IsRouteEnabled], data: {
redirect: '/error'
}, canDeactivate: [PreviousRouteRecorder] }
])
]
})
export class AdvancedSearchOrpsRoutingModule { }

View File

@ -0,0 +1,34 @@
import {Component, Input} from '@angular/core';
import {ActivatedRoute} from '@angular/router';
import {PiwikHelper} from '../../utils/piwikHelper';
import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
@Component({
selector: 'openaire-advanced-search-orps',
template: `
<advanced-search-orps [(connectCommunityId)]=connectCommunityId>
</advanced-search-orps>
`
})
export class OpenaireAdvancedSearchOrpsComponent {
connectCommunityId:string;
piwikSiteId = null;
constructor ( private route: ActivatedRoute) {
}
ngOnInit() {
var communityId = ConnectHelper.getCommunityFromDomain(document.location.hostname);
this.piwikSiteId = PiwikHelper.siteIDs[communityId];
if(communityId){
this.connectCommunityId = communityId
}else{
this.route.queryParams.subscribe(data => {
if(data['communityId'] && data['communityId']!=""){
this.connectCommunityId = data['communityId'];
}
});
}
}
}

View File

@ -0,0 +1,29 @@
import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {FormsModule} from '@angular/forms';
import {AdvancedSearchOrpsRoutingModule} from './advancedSearchOrps-routing.module';
import {OpenaireAdvancedSearchOrpsComponent} from './advancedSearchOrps.component';
import {AdvancedSearchOrpsModule} from '../../openaireLibrary/searchPages/advanced/advancedSearchOrps.module';
import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'
@NgModule({
imports: [
CommonModule, FormsModule,
AdvancedSearchOrpsModule,
AdvancedSearchOrpsRoutingModule
],
declarations: [
OpenaireAdvancedSearchOrpsComponent
],
providers: [
FreeGuard, IsRouteEnabled
],
exports: [
OpenaireAdvancedSearchOrpsComponent
]
})
export class LibAdvancedSearchOrpsModule { }

View File

@ -0,0 +1,20 @@
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import {OpenaireSearchOrpsComponent} from './searchOrps.component';
import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: OpenaireSearchOrpsComponent, canActivate: [FreeGuard, IsRouteEnabled], data: {
redirect: '/error'
}, canDeactivate: [PreviousRouteRecorder] }
])
]
})
export class SearchOrpsRoutingModule { }

View File

@ -0,0 +1,38 @@
import {Component, Input} from '@angular/core';
import {ActivatedRoute} from '@angular/router';
import {PiwikHelper} from '../../utils/piwikHelper';
import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
@Component({
selector: 'openaire-search-other',
template: `
<search-orps openaireLink="https://beta.explore.openaire.eu/search/find/other"
[(connectCommunityId)]=connectCommunityId>
</search-orps>
`
})
export class OpenaireSearchOrpsComponent {
advancedSearchParameters:any;
connectCommunityId:string;
piwikSiteId = null;
constructor ( private route: ActivatedRoute) {
}
ngOnInit() {
var communityId = ConnectHelper.getCommunityFromDomain(document.location.hostname);
this.piwikSiteId = PiwikHelper.siteIDs[communityId];
if(communityId){
this.connectCommunityId = communityId
}else{
this.route.queryParams.subscribe(data => {
if(data['communityId'] && data['communityId']!=""){
this.connectCommunityId = data['communityId'];
}
});
}
}
}

View File

@ -0,0 +1,28 @@
import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {FormsModule} from '@angular/forms';
import {SearchOrpsRoutingModule} from './searchOrps-routing.module';
import {OpenaireSearchOrpsComponent} from './searchOrps.component';
import {SearchOrpsModule} from '../../openaireLibrary/searchPages/simple/searchOrps.module';
import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'
@NgModule({
imports: [
CommonModule, FormsModule, SearchOrpsModule,
SearchOrpsRoutingModule
],
declarations: [
OpenaireSearchOrpsComponent
],
providers: [
FreeGuard, PreviousRouteRecorder, IsRouteEnabled
],
exports: [
OpenaireSearchOrpsComponent
]
})
export class LibSearchOrpsModule { }

View File

@ -11,7 +11,7 @@ import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'
imports: [
RouterModule.forChild([
{ path: '', component: OpenaireSearchPublicationsComponent, canActivate: [FreeGuard, IsRouteEnabled], data: {
redirect: '/error'
redirect: '/error'
}, canDeactivate: [PreviousRouteRecorder] }
])

View File

@ -76,12 +76,14 @@
"searchLinkToDataProvider" : "/search/dataprovider?datasourceId=",
"searchLinkToDataset" : "/search/dataset?datasetId=",
"searchLinkToOrganization" : "/search/organization?organizationId=",
"searchLinkToOrp" : "/search/other?orpId=",
"searchLinkToPublications" : "/search/find/publications",
"searchLinkToDataProviders" : "/search/find/dataproviders",
"searchLinkToProjects" : "/search/find/projects",
"searchLinkToDatasets" : "/search/find/datasets",
"searchLinkToSoftware" : "/search/find/software",
"searchLinkToOrps" : "/search/find/other",
"searchLinkToOrganizations" : "/search/find/organizations",
"searchLinkToCompatibleDataProviders" : "/search/content-providers",
"searchLinkToCompatibleDataProvidersTable" : "/search/content-providers-table",
@ -94,6 +96,7 @@
"searchLinkToAdvancedProjects" : "/search/advanced/projects",
"searchLinkToAdvancedDatasets" : "/search/advanced/datasets",
"searchLinkToAdvancedSoftware" : "/search/advanced/software",
"searchLinkToAdvancedOrps" : "/search/advanced/other",
"searchLinkToAdvancedDataProviders" : "/search/advanced/dataproviders",
"searchLinkToAdvancedOrganizations" : "/search/advanced/organizations",
"searchLinkToAdvancedPeople" : "/search/advanced/people"

View File

@ -25,6 +25,11 @@
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc><![CDATA[https://demo.openaire.eu/search/find/other]]></loc>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc><![CDATA[https://demo.openaire.eu/search/find/datasets]]></loc>
<changefreq>weekly</changefreq>
@ -55,6 +60,11 @@
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc><![CDATA[https://demo.openaire.eu/search/advanced/other]]></loc>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc><![CDATA[https://demo.openaire.eu/search/advanced/datasets]]></loc>
<changefreq>weekly</changefreq>

View File

@ -2,11 +2,11 @@ export const ROUTES = [
'/',
'/lazy',
'/home',
'/search/publication','/search/project','/search/dataset','/search/dataprovider','/search/organization',
'/search/publication','/search/other','/search/project','/search/dataset','/search/dataprovider','/search/organization',
'/search/find',
'/search/person','/search/publication','/search/project','/search/dataset','/search/dataprovider','/search/organization',
'/search/find/people','/search/find/publications','/search/find/projects','/search/find/datasets','/search/find/dataproviders','/search/find/organizations',
'/search/advanced/people','/search/advanced/publications','/search/advanced/projects','/search/advanced/datasets','/search/advanced/dataproviders','/search/advanced/organizations',
'/search/find/people','/search/find/publications','/search/find/other','/search/find/projects','/search/find/datasets','/search/find/dataproviders','/search/find/organizations',
'/search/advanced/people','/search/advanced/publications','/search/advanced/other','/search/advanced/projects','/search/advanced/datasets','/search/advanced/dataproviders','/search/advanced/organizations',
'/participate/deposit-publications','/participate/deposit-datasets','/participate/deposit-publications-result','/participate/deposit-datasets-result','/participate/deposit-subject-result',
'/search/content-providers','/search/content-providers-table','/search/entity-registries','/search/entity-registries-table','/search/journals','/search/journals-table',
'/project-report','/claims','/myclaims','/participate/claim','/participate/direct-claim','/claims-project-manager',