MERGE uoa-services-portal lazy-routes Branch 45587:45834 into trunk
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-portal/trunk@45855 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
93362b727d
commit
e60899bdcc
|
@ -53,14 +53,17 @@ constructor(element: ElementRef, renderer: Renderer) {
|
|||
}
|
||||
```
|
||||
- The application runs XHR requests on the server & once again on the Client-side (when the application bootstraps)
|
||||
- Use a [UniversalCache](https://github.com/angular/universal-starter/blob/master/src/+app/shared/api.service.ts#L47-L71) instead of regular Http, to save certain requests so they aren't re-ran again on the Client.
|
||||
- Use a [UniversalCache](https://github.com/angular/universal-starter/blob/master/src/%2Bapp/shared/model/model.service.ts#L34-L50) instead of regular Http, to save certain requests so they aren't re-ran again on the Client. ([Example useage here](https://github.com/angular/universal-starter/blob/cc71e2d5b2d783f2bb52eebd1b5c6fa0ba23f08a/src/%2Bapp/%2Bhome/home.component.ts#L22-L24))
|
||||
- Know the difference between attributes and properties in relation to the DOM.
|
||||
- Keep your directives stateless as much as possible. For stateful directives, you may need to provide an attribute that reflects the corresponding property with an initial string value such as url in img tag. For our native `<img src="">` element the src attribute is reflected as the src property of the element type HTMLImageElement.
|
||||
|
||||
### Brotli Compression Support
|
||||
|
||||
To enable Brotli compression for server response with fallback for gzip replace the following code from src/server.aot.ts
|
||||
|
||||
To enable Brotli compression for server response with fallback for gzip. Install the following packages
|
||||
```
|
||||
npm install --save-dev iltorb accepts @types/accepts express-interceptor memory-cache @types/memory-cache
|
||||
```
|
||||
and replace the following code from src/server.aot.ts.
|
||||
```
|
||||
import * as compression from 'compression';
|
||||
|
||||
|
@ -99,8 +102,11 @@ app.use(interceptor((req, res)=>({
|
|||
}
|
||||
} else {
|
||||
const { output, encoding } = mcache.get(key);
|
||||
if(encodings.has(encoding)){
|
||||
res.setHeader('Content-Encoding', encoding);
|
||||
send(output);
|
||||
return;
|
||||
}
|
||||
}
|
||||
send(output);
|
||||
}
|
||||
|
|
|
@ -77,21 +77,16 @@
|
|||
"@types/express": "^4.0.32",
|
||||
"@types/express-serve-static-core": "^4.0.33",
|
||||
"@types/hammerjs": "^2.0.32",
|
||||
"@types/memory-cache": "0.0.29",
|
||||
"@types/mime": "0.0.28",
|
||||
"@types/node": "^6.0.38",
|
||||
"@types/serve-static": "^1.7.27",
|
||||
"@types/webfontloader": "^1.6.27",
|
||||
"@ngtools/webpack": "~1.1.7",
|
||||
"accepts": "^1.3.3",
|
||||
"angular2-template-loader": "^0.4.0",
|
||||
"awesome-typescript-loader": "^2.2.4",
|
||||
"cookie-parser": "^1.4.3",
|
||||
"express-interceptor": "^1.2.0",
|
||||
"iltorb": "^1.0.13",
|
||||
"imports-loader": "^0.6.5",
|
||||
"json-loader": "^0.5.4",
|
||||
"memory-cache": "^0.1.6",
|
||||
"nodemon": "^1.10.0",
|
||||
"raw-loader": "^0.5.1",
|
||||
"reflect-metadata": "0.1.8",
|
||||
|
|
|
@ -1,10 +1,144 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
|
||||
export function getPublicationModule() {
|
||||
return System.import('./landingPages/publication/publication.module' + (process.env.AOT ? '.ngfactory' : ''))
|
||||
.then(mod => mod[(process.env.AOT ? 'PublicationModuleNgFactory' : 'PublicationModule')]);
|
||||
}
|
||||
export function getDatasetModule() {
|
||||
return System.import('./landingPages/dataset/dataset.module' + (process.env.AOT ? '.ngfactory' : ''))
|
||||
.then(mod => mod[(process.env.AOT ? 'DatasetModuleNgFactory' : 'DatasetModule')]);
|
||||
}
|
||||
export function getPersonModule() {
|
||||
return System.import('./landingPages/person/person.module' + (process.env.AOT ? '.ngfactory' : ''))
|
||||
.then(mod => mod[(process.env.AOT ? 'PersonModuleNgFactory' : 'PersonModule')]);
|
||||
}
|
||||
export function getProjectModule() {
|
||||
return System.import('./landingPages/project/project.module' + (process.env.AOT ? '.ngfactory' : ''))
|
||||
.then(mod => mod[(process.env.AOT ? 'ProjectModuleNgFactory' : 'ProjectModule')]);
|
||||
}
|
||||
export function getOrganizationModule() {
|
||||
return System.import('./landingPages/organization/organization.module' + (process.env.AOT ? '.ngfactory' : ''))
|
||||
.then(mod => mod[(process.env.AOT ? 'OrganizationModuleNgFactory' : 'OrganizationModule')]);
|
||||
}
|
||||
export function getDepositDatasetsModule() {
|
||||
return System.import('./deposit/datasets/depositDatasets.module' + (process.env.AOT ? '.ngfactory' : ''))
|
||||
.then(mod => mod[(process.env.AOT ? 'DepositDatasetsModuleNgFactory' : 'DepositDatasetsModule')]);
|
||||
}
|
||||
export function getDepositDatasetsResultsModule() {
|
||||
return System.import('./deposit/datasets/depositDatasetsResults.module' + (process.env.AOT ? '.ngfactory' : ''))
|
||||
.then(mod => mod[(process.env.AOT ? 'DepositDatasetsResultsModuleNgFactory' : 'DepositDatasetsResultsModule')]);
|
||||
}
|
||||
|
||||
export function getDepositPublicationsModule() {
|
||||
return System.import('./deposit/publications/depositPublications.module' + (process.env.AOT ? '.ngfactory' : ''))
|
||||
.then(mod => mod[(process.env.AOT ? 'DepositPublicationsModuleNgFactory' : 'DepositPublicationsModule')]);
|
||||
}
|
||||
export function getDepositPublicationsResultsModule() {
|
||||
return System.import('./deposit/publications/depositPublicationsResults.module' + (process.env.AOT ? '.ngfactory' : ''))
|
||||
.then(mod => mod[(process.env.AOT ? 'DepositPublicationsResultsModuleNgFactory' : 'DepositPublicationsResultsModule')]);
|
||||
}
|
||||
export function getDataProviderModule() {
|
||||
return System.import('./landingPages/dataProvider/dataProvider.module' + (process.env.AOT ? '.ngfactory' : ''))
|
||||
.then(mod => mod[(process.env.AOT ? 'DataProviderModuleNgFactory' : 'DataProviderModule')]);
|
||||
}
|
||||
export function getMainSearchModule() {
|
||||
return System.import('./searchPages/find/mainSearch.module' + (process.env.AOT ? '.ngfactory' : ''))
|
||||
.then(mod => mod[(process.env.AOT ? 'MainSearchModuleNgFactory' : 'MainSearchModule')]);
|
||||
}
|
||||
export function getSearchPublicationsModule() {
|
||||
return System.import('./searchPages/simple/searchPublications.module' + (process.env.AOT ? '.ngfactory' : ''))
|
||||
.then(mod => mod[(process.env.AOT ? 'SearchPublicationsModuleNgFactory' : 'SearchPublicationsModule')]);
|
||||
}
|
||||
export function getSearchDatasetsModule() {
|
||||
return System.import('./searchPages/simple/searchDatasets.module' + (process.env.AOT ? '.ngfactory' : ''))
|
||||
.then(mod => mod[(process.env.AOT ? 'SearchDatasetsModuleNgFactory' : 'SearchDatasetsModule')]);
|
||||
}
|
||||
export function getSearchProjectsModule() {
|
||||
return System.import('./searchPages/simple/searchProjects.module' + (process.env.AOT ? '.ngfactory' : ''))
|
||||
.then(mod => mod[(process.env.AOT ? 'SearchProjectsModuleNgFactory' : 'SearchProjectsModule')]);
|
||||
}
|
||||
export function getSearchOrganizationsModule() {
|
||||
return System.import('./searchPages/simple/searchOrganizations.module' + (process.env.AOT ? '.ngfactory' : ''))
|
||||
.then(mod => mod[(process.env.AOT ? 'SearchOrganizationsModuleNgFactory' : 'SearchOrganizationsModule')]);
|
||||
}
|
||||
export function getSearchDataProvidersModule() {
|
||||
return System.import('./searchPages/simple/searchDataProviders.module' + (process.env.AOT ? '.ngfactory' : ''))
|
||||
.then(mod => mod[(process.env.AOT ? 'SearchDataProvidersModuleNgFactory' : 'SearchDataProvidersModule')]);
|
||||
}
|
||||
export function getSearchPeopleModule() {
|
||||
return System.import('./searchPages/simple/searchPeople.module' + (process.env.AOT ? '.ngfactory' : ''))
|
||||
.then(mod => mod[(process.env.AOT ? 'SearchPeopleModuleNgFactory' : 'SearchPeopleModule')]);
|
||||
}
|
||||
export function getCompatibleDataProvidersModule() {
|
||||
return System.import('./searchPages/dataProviders/compatibleDataProviders.module' + (process.env.AOT ? '.ngfactory' : ''))
|
||||
.then(mod => mod[(process.env.AOT ? 'CompatibleDataProvidersModuleNgFactory' : 'CompatibleDataProvidersModule')]);
|
||||
}
|
||||
export function getEntityRegistriesModule() {
|
||||
return System.import('./searchPages/dataProviders/entityRegistries.module' + (process.env.AOT ? '.ngfactory' : ''))
|
||||
.then(mod => mod[(process.env.AOT ? 'EntityRegistriesModuleNgFactory' : 'EntityRegistriesModule')]);
|
||||
}
|
||||
export function getAdvancedSearchPublicationsModule() {
|
||||
return System.import('./searchPages/advanced/advancedSearchPublications.module' + (process.env.AOT ? '.ngfactory' : ''))
|
||||
.then(mod => mod[(process.env.AOT ? 'AdvancedSearchPublicationsModuleNgFactory' : 'AdvancedSearchPublicationsModule')]);
|
||||
}
|
||||
export function getAdvancedSearchDatasetsModule() {
|
||||
return System.import('./searchPages/advanced/advancedSearchDatasets.module' + (process.env.AOT ? '.ngfactory' : ''))
|
||||
.then(mod => mod[(process.env.AOT ? 'AdvancedSearchDatasetsModuleNgFactory' : 'AdvancedSearchDatasetsModule')]);
|
||||
}
|
||||
export function getAdvancedSearchOrganizationsModule() {
|
||||
return System.import('./searchPages/advanced/advancedSearchOrganizations.module' + (process.env.AOT ? '.ngfactory' : ''))
|
||||
.then(mod => mod[(process.env.AOT ? 'AdvancedSearchOrganizationsModuleNgFactory' : 'AdvancedSearchOrganizationsModule')]);
|
||||
}
|
||||
export function getAdvancedSearchDataProvidersModule() {
|
||||
return System.import('./searchPages/advanced/advancedSearchDataProviders.module' + (process.env.AOT ? '.ngfactory' : ''))
|
||||
.then(mod => mod[(process.env.AOT ? 'AdvancedSearchDataProvidersModuleNgFactory' : 'AdvancedSearchDataProvidersModule')]);
|
||||
}
|
||||
export function getAdvancedSearchProjectsModule() {
|
||||
return System.import('./searchPages/advanced/advancedSearchProjects.module' + (process.env.AOT ? '.ngfactory' : ''))
|
||||
.then(mod => mod[(process.env.AOT ? 'AdvancedSearchProjectsModuleNgFactory' : 'AdvancedSearchProjectsModule')]);
|
||||
}
|
||||
export function getAdvancedSearchPeopleModule() {
|
||||
return System.import('./searchPages/advanced/advancedSearchPeople.module' + (process.env.AOT ? '.ngfactory' : ''))
|
||||
.then(mod => mod[(process.env.AOT ? 'AdvancedSearchPeopleModuleNgFactory' : 'AdvancedSearchPeopleModule')]);
|
||||
}
|
||||
export function gethtmlProjectReportModule() {
|
||||
return System.import('./landingPages/htmlProjectReport/htmlProjectReport.module' + (process.env.AOT ? '.ngfactory' : ''))
|
||||
.then(mod => mod[(process.env.AOT ? 'HtmlProjectReportModuleNgFactory' : 'HtmlProjectReportModule')]);
|
||||
}
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{ path: '', redirectTo: '/search/find', pathMatch: 'full' }
|
||||
{ path: '', redirectTo: '/search/find', pathMatch: 'full' },
|
||||
{ path: 'search/publication', loadChildren: getPublicationModule },
|
||||
{ path: 'search/dataset', loadChildren: getDatasetModule },
|
||||
{ path: 'search/person', loadChildren: getPersonModule },
|
||||
{ path: 'search/organization', loadChildren: getOrganizationModule },
|
||||
{ path: 'search/project', loadChildren: getProjectModule },
|
||||
{ path: 'search/dataprovider', loadChildren: getDataProviderModule },
|
||||
{ path: 'deposit-datasets', loadChildren: getDepositDatasetsModule },
|
||||
{ path: 'deposit-datasets-result', loadChildren: getDepositDatasetsResultsModule },
|
||||
{ path: 'deposit-publications', loadChildren: getDepositPublicationsModule },
|
||||
{ path: 'deposit-publications-result', loadChildren: getDepositPublicationsResultsModule },
|
||||
{ path: 'search/find', loadChildren: getMainSearchModule },
|
||||
{ path: 'search/find/publications', loadChildren: getSearchPublicationsModule },
|
||||
{ path: 'search/find/datasets', loadChildren: getSearchDatasetsModule },
|
||||
{ path: 'search/find/projects', loadChildren: getSearchProjectsModule },
|
||||
{ path: 'search/find/dataproviders', loadChildren: getSearchDataProvidersModule },
|
||||
{ path: 'search/find/organizations', loadChildren: getSearchOrganizationsModule },
|
||||
{ path: 'search/find/people', loadChildren: getSearchPeopleModule },
|
||||
{ path: 'search/data-providers', loadChildren: getCompatibleDataProvidersModule },
|
||||
{ path: 'search/entity-registries', loadChildren: getEntityRegistriesModule },
|
||||
{ path: 'search/advanced/publications', loadChildren: getAdvancedSearchPublicationsModule },
|
||||
{ path: 'search/advanced/datasets', loadChildren: getAdvancedSearchDatasetsModule },
|
||||
{ path: 'search/advanced/organizations', loadChildren: getAdvancedSearchOrganizationsModule },
|
||||
{ path: 'search/advanced/dataproviders', loadChildren: getAdvancedSearchDataProvidersModule },
|
||||
{ path: 'search/advanced/projects', loadChildren: getAdvancedSearchProjectsModule },
|
||||
{ path: 'search/advanced/people', loadChildren: getAdvancedSearchPeopleModule },
|
||||
{ path: 'project-report', loadChildren: gethtmlProjectReportModule }
|
||||
|
||||
|
||||
])
|
||||
],
|
||||
})
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
//import {MaterialModule} from '@angular/material';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
|
@ -8,35 +7,20 @@ import { SharedModule } from './shared/shared.module';
|
|||
import { AppRoutingModule } from './app-routing.module';
|
||||
import { AppComponent, XLargeDirective } from './app.component';
|
||||
|
||||
// custom modules::
|
||||
import {SearchModule} from './searchPages/search.module';
|
||||
import {DepoditModule} from './deposit/deposit.module';
|
||||
import {LandingModule} from './landingPages/landing.module';
|
||||
import {SharedComponentsModule} from './sharedComponents/sharedComponents.module'; //navbar
|
||||
import {UtilsModule} from './utils/utils.module';
|
||||
import {TestModule} from './test/test.module';
|
||||
import { HomeModule } from './home/home.module';
|
||||
import { ErrorModule } from './error/error.module';
|
||||
import { CacheService } from './shared/cache.service';
|
||||
|
||||
import {ServicesModule} from './services/services.module';
|
||||
|
||||
@NgModule({
|
||||
declarations: [ AppComponent, XLargeDirective ],
|
||||
imports: [
|
||||
//MaterialModule.forRoot(),
|
||||
SharedModule,
|
||||
HomeModule,
|
||||
SearchModule,
|
||||
DepoditModule,
|
||||
LandingModule,
|
||||
|
||||
SharedComponentsModule,
|
||||
UtilsModule,
|
||||
ServicesModule,
|
||||
TestModule,
|
||||
HomeModule,
|
||||
AppRoutingModule,
|
||||
ErrorModule
|
||||
], exports:[]
|
||||
], exports:[], providers:[CacheService]
|
||||
})
|
||||
export class AppModule {
|
||||
}
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
|
||||
import { DepositDatasetsComponent } from './depositDatasets.component';
|
||||
import { DepositDatasetsResultComponent } from './depositDatasetsResult.component';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{ path: '', component: DepositDatasetsComponent }
|
||||
|
||||
])
|
||||
]
|
||||
})
|
||||
export class DepositDatasetsRoutingModule { }
|
|
@ -0,0 +1,28 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import { DepositDatasetsComponent } from './depositDatasets.component';
|
||||
import { DepositDatasetsResultComponent } from './depositDatasetsResult.component';
|
||||
|
||||
import {DepositDatasetsRoutingModule} from './depositDatasets-routing.module';
|
||||
import {DepoditModule} from '../deposit.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule,
|
||||
DepoditModule,
|
||||
DepositDatasetsRoutingModule
|
||||
],
|
||||
declarations: [
|
||||
|
||||
DepositDatasetsComponent,
|
||||
|
||||
],
|
||||
exports: [
|
||||
DepositDatasetsComponent,
|
||||
],
|
||||
providers: [
|
||||
]
|
||||
})
|
||||
export class DepositDatasetsModule { }
|
|
@ -0,0 +1,14 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
|
||||
import { DepositDatasetsResultComponent } from './depositDatasetsResult.component';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{ path: '', component: DepositDatasetsResultComponent }
|
||||
|
||||
])
|
||||
]
|
||||
})
|
||||
export class DepositDatasetsResultsRoutingModule { }
|
|
@ -0,0 +1,27 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import { DepositDatasetsResultComponent } from './depositDatasetsResult.component';
|
||||
|
||||
import {DepositDatasetsResultsRoutingModule} from './depositDatasetsResults-routing.module';
|
||||
import {DepoditModule} from '../deposit.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule,
|
||||
DepoditModule,
|
||||
DepositDatasetsResultsRoutingModule
|
||||
],
|
||||
declarations: [
|
||||
|
||||
DepositDatasetsResultComponent,
|
||||
|
||||
],
|
||||
exports: [
|
||||
DepositDatasetsResultComponent,
|
||||
],
|
||||
providers: [
|
||||
]
|
||||
})
|
||||
export class DepositDatasetsResultsModule { }
|
|
@ -1,20 +0,0 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
|
||||
import { DepositPublicationsComponent } from './depositPublications.component';
|
||||
import { DepositDatasetsComponent } from './depositDatasets.component';
|
||||
import { DepositPublicationsResultComponent } from './depositPublicationsResult.component';
|
||||
import { DepositDatasetsResultComponent } from './depositDatasetsResult.component';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{ path: 'deposit-publications', component: DepositPublicationsComponent },
|
||||
{ path: 'deposit-datasets', component: DepositDatasetsComponent },
|
||||
{ path: 'deposit-publications-result', component: DepositPublicationsResultComponent} ,
|
||||
{ path: 'deposit-datasets-result', component: DepositDatasetsResultComponent },
|
||||
|
||||
])
|
||||
]
|
||||
})
|
||||
export class DepositRoutingModule { }
|
|
@ -3,7 +3,6 @@ import {Observable} from 'rxjs/Observable';
|
|||
import { Router } from '@angular/router';
|
||||
import {OpenaireProperties, ErrorCodes} from '../utils/properties/openaireProperties';
|
||||
|
||||
import {SearchOrganizationsService} from '../services/searchOrganizations.service';
|
||||
|
||||
@Component({
|
||||
selector: 'deposit',
|
||||
|
@ -64,7 +63,7 @@ export class DepositComponent {
|
|||
public selectedId: string = "";
|
||||
public warningMessage: string = "";
|
||||
|
||||
constructor (private _router: Router, private _searchOrganizationsService: SearchOrganizationsService) {
|
||||
constructor (private _router: Router) {
|
||||
|
||||
this.openAccess = OpenaireProperties.getOpenAccess();
|
||||
this.openAccessRepo = OpenaireProperties.getOpenAccessRepo();
|
||||
|
|
|
@ -1,41 +1,30 @@
|
|||
/* Common Component of deposit for both datasets & ppublications*/
|
||||
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import { UtilsModule} from '../utils/utils.module'
|
||||
|
||||
import { DepositComponent } from './deposit.component';
|
||||
import { DepositResultComponent } from './depositResult.component';
|
||||
import { DepositPublicationsComponent } from './depositPublications.component';
|
||||
import { DepositPublicationsResultComponent } from './depositPublicationsResult.component';
|
||||
import { DepositDatasetsComponent } from './depositDatasets.component';
|
||||
import { DepositDatasetsResultComponent } from './depositDatasetsResult.component';
|
||||
import {EntitiesAutocompleteModule} from '../utils/entitiesAutoComplete/entitiesAutoComplete.module';
|
||||
import {DataProvidersServiceModule} from '../services/dataProvidersService.module';
|
||||
import {OrganizationServiceModule} from '../services/organizationService.module';
|
||||
|
||||
import {ServicesModule} from '../services/services.module';
|
||||
import {SearchModule} from '../searchPages/search.module';
|
||||
import {DepositRoutingModule} from './deposit-routing.module';
|
||||
|
||||
//helpers
|
||||
|
||||
@NgModule({
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule,
|
||||
UtilsModule,
|
||||
ServicesModule,
|
||||
SearchModule,
|
||||
DepositRoutingModule
|
||||
EntitiesAutocompleteModule,
|
||||
DataProvidersServiceModule,
|
||||
OrganizationServiceModule
|
||||
],
|
||||
declarations: [
|
||||
DepositComponent,
|
||||
DepositResultComponent,
|
||||
DepositPublicationsComponent,
|
||||
DepositPublicationsResultComponent,
|
||||
DepositDatasetsComponent,
|
||||
DepositDatasetsResultComponent
|
||||
DepositResultComponent
|
||||
|
||||
],
|
||||
exports: [
|
||||
//DepositComponent
|
||||
DepositComponent,
|
||||
DepositResultComponent
|
||||
],
|
||||
providers: [
|
||||
]
|
||||
|
|
|
@ -3,9 +3,8 @@ import {Observable} from 'rxjs/Observable';
|
|||
import {OpenaireProperties, ErrorCodes} from '../utils/properties/openaireProperties';
|
||||
import { Router } from '@angular/router';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { SearchDataprovidersComponent } from '../searchPages/simple/searchDataproviders.component';
|
||||
import { FetchDataproviders } from '../utils/fetchEntitiesClasses/fetchDataproviders.class';
|
||||
import { SearchDataprovidersService } from '../services/searchDataproviders.service';
|
||||
import { SearchResultComponent } from '../searchPages/searchUtils/searchResult.component';
|
||||
|
||||
import {OrganizationService} from '../services/organization.service';
|
||||
|
||||
|
@ -17,13 +16,15 @@ import {OrganizationService} from '../services/organization.service';
|
|||
<h2>Deposit {{requestFor}}</h2>
|
||||
</div>
|
||||
|
||||
<div *ngIf="status == errorCodes.LOADING"
|
||||
|
||||
<div *ngIf="status == errorCodes.LOADING || (status == errorCodes.LOADING && fetchDataproviders.searchUtils.status == errorCodes.LOADING)"
|
||||
class="uk-alert uk-alert-primary" role="alert">
|
||||
Loading...
|
||||
</div>
|
||||
|
||||
<div *ngIf="searchDataprovidersComponent.searchUtils.status == errorCodes.DONE">
|
||||
<h2>
|
||||
|
||||
<div *ngIf="fetchDataproviders.searchUtils.totalResults > 0">
|
||||
<h2 *ngIf="organization != undefined">
|
||||
<span>Data providers for institution: </span>
|
||||
<a *ngIf="organization['url']!=''" href="{{organization.url}}" target="_blank">
|
||||
<span>{{organization['name']}} (<i class="uk-icon-external-link"></i>)</span>
|
||||
|
@ -31,19 +32,21 @@ import {OrganizationService} from '../services/organization.service';
|
|||
<span *ngIf="organization['url']==''">{{organization['name']}}</span>
|
||||
</h2>
|
||||
|
||||
<p>Please use the information/contacts shown below to deposit your {{requestFor}}.</p>
|
||||
<!--showDataProviders [dataProviders]=dataProviders></showDataProviders-->
|
||||
<div class = "uk-text-right" *ngIf = "searchDataprovidersComponent.searchUtils.totalResults > 10" ><a [href] = "linkToSearchDataproviders" >View all {{searchDataprovidersComponent.searchUtils.totalResults}} results</a></div>
|
||||
<search-result [(results)]="searchDataprovidersComponent.results" [(status)]= "searchDataprovidersComponent.searchUtils.status"></search-result>
|
||||
|
||||
</div>
|
||||
|
||||
<div *ngIf="searchDataprovidersComponent.searchUtils.status == errorCodes.NONE
|
||||
|| status == errorCodes.NONE
|
||||
|| searchDataprovidersComponent.searchUtils.status == errorCodes.ERROR
|
||||
|| status == errorCodes.ERROR"
|
||||
class = "uk-alert uk-alert-warning" role="alert">
|
||||
<div *ngIf="fetchDataproviders.searchUtils.totalResults > 0">
|
||||
<p>Please use the information/contacts shown below to deposit your {{requestFor}}.</p>
|
||||
<!--showDataProviders [dataProviders]=dataProviders></showDataProviders-->
|
||||
<div class = "uk-text-right" *ngIf = "fetchDataproviders.searchUtils.totalResults > 10" ><a [href] = "linkToSearchDataproviders" >View all {{fetchDataproviders.searchUtils.totalResults}} results</a></div>
|
||||
<!--search-result [(results)]="fetchDataproviders.results" [(status)]= "fetchDataproviders.searchUtils.status"></search-result-->
|
||||
</div>
|
||||
|
||||
|
||||
<div *ngIf="(fetchDataproviders.searchUtils.totalResults == 0 && status == errorCodes.DONE)
|
||||
|| status == errorCodes.NONE || status == errorCodes.ERROR" class = "alert alert-warning">
|
||||
<div *ngIf="organization != undefined">
|
||||
<span *ngIf="searchDataprovidersComponent.searchUtils.status == errorCodes.ERROR">
|
||||
<span *ngIf="fetchDataproviders.searchUtils.status == errorCodes.ERROR">
|
||||
An error occured.
|
||||
</span>
|
||||
No data providers found for institution:
|
||||
|
@ -85,7 +88,7 @@ export class DepositResultComponent {
|
|||
sub: any;
|
||||
subDataproviders: any;
|
||||
|
||||
public searchDataprovidersComponent : SearchDataprovidersComponent;
|
||||
public fetchDataproviders : FetchDataproviders;
|
||||
public linkToSearchDataproviders = "";
|
||||
public zenodo: string;
|
||||
@Input() compatibility: string = '';
|
||||
|
@ -98,7 +101,7 @@ export class DepositResultComponent {
|
|||
console.info("depositResult constructor");
|
||||
|
||||
this.zenodo = OpenaireProperties.getZenodoURL();
|
||||
this.searchDataprovidersComponent = new SearchDataprovidersComponent(this.route, this._searchDataprovidersService);
|
||||
this.fetchDataproviders = new FetchDataproviders(this._searchDataprovidersService);
|
||||
|
||||
this.status = this.errorCodes.LOADING;
|
||||
console.info("loading");
|
||||
|
@ -132,9 +135,9 @@ export class DepositResultComponent {
|
|||
|
||||
private searchDataproviders() {
|
||||
// if(this.organization != undefined) {
|
||||
// this.searchDataprovidersComponent.getResults(this.organization.name, false, 1, 10);
|
||||
// this.fetchDataproviders.getResults(this.organization.name, false, 1, 10);
|
||||
// } else if(this.organizationId != undefined) {
|
||||
this.searchDataprovidersComponent.getResultsForDeposit( this.organizationId,this.requestFor, 1, 10);
|
||||
this.fetchDataproviders.getResultsForDeposit( this.organizationId,this.requestFor, 1, 10);
|
||||
//}
|
||||
this.linkToSearchDataproviders = OpenaireProperties.getLinkToSearchDataProviders();
|
||||
}
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
|
||||
import { DepositPublicationsComponent } from './depositPublications.component';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{ path: '', component: DepositPublicationsComponent }
|
||||
|
||||
])
|
||||
]
|
||||
})
|
||||
export class DepositPublicationsRoutingModule { }
|
|
@ -0,0 +1,28 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import { DepositPublicationsComponent } from './depositPublications.component';
|
||||
|
||||
import {DepositPublicationsRoutingModule} from './depositPublications-routing.module';
|
||||
import {DepoditModule} from '../deposit.module';
|
||||
import {IFrameModule} from '../../utils/iframe.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule,
|
||||
DepoditModule,
|
||||
DepositPublicationsRoutingModule,IFrameModule
|
||||
],
|
||||
declarations: [
|
||||
|
||||
DepositPublicationsComponent,
|
||||
|
||||
],
|
||||
exports: [
|
||||
DepositPublicationsComponent,
|
||||
],
|
||||
providers: [
|
||||
]
|
||||
})
|
||||
export class DepositPublicationsModule { }
|
|
@ -0,0 +1,14 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
|
||||
import { DepositPublicationsResultComponent } from './depositPublicationsResult.component';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{ path: '', component: DepositPublicationsResultComponent }
|
||||
|
||||
])
|
||||
]
|
||||
})
|
||||
export class DepositPublicationsResultRoutingModule { }
|
|
@ -0,0 +1,27 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import { DepositPublicationsResultComponent } from './depositPublicationsResult.component';
|
||||
|
||||
import {DepositPublicationsResultRoutingModule} from './depositPublicationsResult-routing.module';
|
||||
import {DepoditModule} from '../deposit.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule,
|
||||
DepoditModule,
|
||||
DepositPublicationsResultRoutingModule
|
||||
],
|
||||
declarations: [
|
||||
|
||||
DepositPublicationsResultComponent,
|
||||
|
||||
],
|
||||
exports: [
|
||||
DepositPublicationsResultComponent,
|
||||
],
|
||||
providers: [
|
||||
]
|
||||
})
|
||||
export class DepositPublicationsResultsModule { }
|
|
@ -0,0 +1,13 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
|
||||
import { DataProviderComponent } from './dataProvider.component';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{ path: '', component: DataProviderComponent }
|
||||
])
|
||||
]
|
||||
})
|
||||
export class DataProviderRoutingModule { }
|
|
@ -1,6 +1,6 @@
|
|||
import {Component, ViewChild} from '@angular/core';
|
||||
import {Observable} from 'rxjs/Observable';
|
||||
import {DataProviderService} from '../../services/dataProvider.service';
|
||||
import {DataProviderService} from './dataProvider.service';
|
||||
import {DataProviderInfo} from '../../utils/entities/dataProviderInfo';
|
||||
import {ActivatedRoute} from '@angular/router';
|
||||
|
||||
|
@ -9,7 +9,8 @@ import{TabsComponent} from './tabs.component';
|
|||
@Component({
|
||||
selector: 'dataprovider',
|
||||
templateUrl: 'dataProvider.component.html',
|
||||
providers:[ DataProviderService],
|
||||
//template: `Heeereee`,
|
||||
// providers:[ DataProviderService],
|
||||
})
|
||||
|
||||
export class DataProviderComponent {
|
||||
|
|
|
@ -0,0 +1,51 @@
|
|||
import { NgModule} from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import {IFrameModule} from '../../utils/iframe.module';
|
||||
// import { ResultLandingModule } from '../resultLanding.module';
|
||||
import {SearchResultsModule } from '../../searchPages/searchUtils/searchResults.module';
|
||||
import {MetricsModule} from '../metrics.module';
|
||||
import { LandingModule } from '../landing.module';
|
||||
|
||||
import {PublicationsTabComponent} from './publicationsTab.component';
|
||||
import {DatasetsTabComponent} from './datasetsTab.component';
|
||||
import {StatisticsTabComponent} from './statisticsTab.component';
|
||||
import {ProjectsTabComponent} from './projectsTab.component';
|
||||
import {DatasourcesTabComponent} from './datasourcesTab.component';
|
||||
import {OrganizationsTabComponent} from './organizationsTab.component';
|
||||
import {RelatedDatasourcesTabComponent} from './relatedDatasourcesTab.component';
|
||||
import {TabsComponent} from './tabs.component';
|
||||
|
||||
import {DataProviderComponent} from './dataProvider.component';
|
||||
import { DataProviderService} from './dataProvider.service';
|
||||
import {DataProvidersServiceModule} from '../../services/dataProvidersService.module';
|
||||
import {DatasetsServiceModule} from '../../services/datasetsService.module';
|
||||
import {ProjectsServiceModule} from '../../services/projectsService.module';
|
||||
import {PublicationsServiceModule} from '../../services/publicationsService.module';
|
||||
|
||||
import { DataProviderRoutingModule } from './dataProvider-routing.module';
|
||||
|
||||
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule,
|
||||
DataProviderRoutingModule,
|
||||
SearchResultsModule, IFrameModule, MetricsModule, LandingModule, DataProvidersServiceModule, DatasetsServiceModule, ProjectsServiceModule, PublicationsServiceModule
|
||||
|
||||
],
|
||||
declarations: [
|
||||
|
||||
PublicationsTabComponent, DatasetsTabComponent, StatisticsTabComponent, ProjectsTabComponent, DatasourcesTabComponent, OrganizationsTabComponent, RelatedDatasourcesTabComponent, TabsComponent,
|
||||
DataProviderComponent
|
||||
],
|
||||
providers:[
|
||||
DataProviderService
|
||||
],
|
||||
exports: [
|
||||
DataProviderComponent
|
||||
]
|
||||
|
||||
})
|
||||
export class DataProviderModule { }
|
|
@ -1,12 +1,12 @@
|
|||
import {Injectable} from '@angular/core';
|
||||
import {Http, Response} from '@angular/http';
|
||||
import {Observable} from 'rxjs/Observable';
|
||||
import {DataProviderInfo} from '../utils/entities/dataProviderInfo';
|
||||
import {OpenaireProperties} from '../utils/properties/openaireProperties';
|
||||
import {DataProviderInfo} from '../../utils/entities/dataProviderInfo';
|
||||
import {OpenaireProperties} from '../../utils/properties/openaireProperties';
|
||||
import 'rxjs/add/observable/of';
|
||||
import 'rxjs/add/operator/do';
|
||||
import 'rxjs/add/operator/share';
|
||||
import { CacheService } from '../shared/cache.service';
|
||||
import { CacheService } from '../../shared/cache.service';
|
||||
|
||||
@Injectable()
|
||||
export class DataProviderService {
|
|
@ -1,32 +1,30 @@
|
|||
import {Component, Input} from '@angular/core';
|
||||
|
||||
import { SearchDatasetsComponent } from '../../searchPages/simple/searchDatasets.component';
|
||||
import {SearchResultComponent} from '../../searchPages/searchUtils/searchResult.component';
|
||||
import { FetchDatasets } from '../../utils/fetchEntitiesClasses/fetchDatasets.class';
|
||||
|
||||
import {OpenaireProperties} from '../../utils/properties/openaireProperties';
|
||||
|
||||
@Component({
|
||||
selector: 'datasetsTab',
|
||||
template: `
|
||||
<div *ngIf="searchDatasetsComponent.searchUtils.totalResults == 0" class = "uk-alert">
|
||||
<div *ngIf="fetchDatasets.searchUtils.totalResults == 0" class = "uk-alert">
|
||||
There are no datasets
|
||||
</div>
|
||||
|
||||
<div *ngIf="searchDatasetsComponent.searchUtils.totalResults > 0">
|
||||
<div *ngIf="fetchDatasets.searchUtils.totalResults > 0">
|
||||
<p>
|
||||
The results below are discovered through our pilot algorithms.
|
||||
<a href="mailto:">Let us know how we are doing!</a>
|
||||
</p>
|
||||
|
||||
<div class = "uk-text-right" *ngIf = "searchDatasetsComponent.searchUtils.totalResults > 10" ><a [href] = "linkToSearchDatasets" >View all {{searchDatasetsComponent.searchUtils.totalResults}} results</a></div>
|
||||
<search-result [(results)]="searchDatasetsComponent.results" [(status)]= "searchDatasetsComponent.status"></search-result>
|
||||
<div class = "uk-text-right" *ngIf = "fetchDatasets.searchUtils.totalResults > 10" ><a [href] = "linkToSearchDatasets" >View all {{fetchDatasets.searchUtils.totalResults}} results</a></div>
|
||||
<search-result [(results)]="fetchDatasets.results" [(status)]= "fetchDatasets.searchUtils.status"></search-result>
|
||||
</div>
|
||||
`
|
||||
})
|
||||
|
||||
export class DatasetsTabComponent {
|
||||
@Input() paramsForSearchLink: string = "";
|
||||
@Input() searchDatasetsComponent : SearchDatasetsComponent;
|
||||
@Input() fetchDatasets : FetchDatasets;
|
||||
public linkToSearchDatasets = "";
|
||||
|
||||
constructor () {}
|
||||
|
|
|
@ -1,24 +1,23 @@
|
|||
import {Component, Input} from '@angular/core';
|
||||
import { SearchDataprovidersComponent } from '../../searchPages/simple/searchDataproviders.component';
|
||||
import {SearchResultComponent} from '../../searchPages/searchUtils/searchResult.component';
|
||||
import { FetchDataproviders } from '../../utils/fetchEntitiesClasses/fetchDataproviders.class';
|
||||
|
||||
import {OpenaireProperties} from '../../utils/properties/openaireProperties';
|
||||
|
||||
@Component({
|
||||
selector: 'datasourcesTab',
|
||||
template: `
|
||||
<div *ngIf="searchDataprovidersComponent.searchUtils.totalResults == 0" class = "uk-alert">
|
||||
<div *ngIf="fetchDataproviders.searchUtils.totalResults == 0" class = "uk-alert">
|
||||
There are no datasources
|
||||
</div>
|
||||
|
||||
<div *ngIf="searchDataprovidersComponent.searchUtils.totalResults > 0">
|
||||
<div *ngIf="fetchDataproviders.searchUtils.totalResults > 0">
|
||||
<p>
|
||||
The results below are discovered through our pilot algorithms.
|
||||
<a href="mailto:">Let us know how we are doing!</a>
|
||||
</p>
|
||||
|
||||
<div class = "uk-text-right" *ngIf = "searchDataprovidersComponent.searchUtils.totalResults > 10" ><a [href] = "linkToSearchDataproviders" >View all {{searchDataprovidersComponent.searchUtils.totalResults}} results</a></div>
|
||||
<search-result [(results)]="searchDataprovidersComponent.results" [(status)]= "searchDataprovidersComponent.status"></search-result>
|
||||
<div class = "uk-text-right" *ngIf = "fetchDataproviders.searchUtils.totalResults > 10" ><a [href] = "linkToSearchDataproviders" >View all {{fetchDataproviders.searchUtils.totalResults}} results</a></div>
|
||||
<search-result [(results)]="fetchDataproviders.results" [(status)]= "fetchDataproviders.status"></search-result>
|
||||
</div>
|
||||
`
|
||||
})
|
||||
|
@ -26,7 +25,7 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties';
|
|||
export class DatasourcesTabComponent {
|
||||
|
||||
@Input() paramsForSearchLink: string = "";
|
||||
@Input() searchDataprovidersComponent : SearchDataprovidersComponent;
|
||||
@Input() fetchDataproviders : FetchDataproviders;
|
||||
public linkToSearchDataproviders = "";
|
||||
|
||||
constructor () {}
|
||||
|
|
|
@ -1,25 +1,24 @@
|
|||
import {Component, Input} from '@angular/core';
|
||||
|
||||
import { SearchProjectsComponent } from '../../searchPages/simple/searchProjects.component';
|
||||
import {SearchResultComponent} from '../../searchPages/searchUtils/searchResult.component';
|
||||
import { FetchProjects } from '../../utils/fetchEntitiesClasses/fetchProjects.class';
|
||||
|
||||
import {OpenaireProperties} from '../../utils/properties/openaireProperties';
|
||||
|
||||
@Component({
|
||||
selector: 'projectsTab',
|
||||
template: `
|
||||
<div *ngIf="searchProjectsComponent.searchUtils.totalResults == 0" class = "uk-alert">
|
||||
<div *ngIf="fetchProjects.searchUtils.totalResults == 0" class = "uk-alert">
|
||||
There are no projects
|
||||
</div>
|
||||
|
||||
<div *ngIf="searchProjectsComponent.searchUtils.totalResults > 0">
|
||||
<div *ngIf="fetchProjects.searchUtils.totalResults > 0">
|
||||
<p>
|
||||
The results below are discovered through our pilot algorithms.
|
||||
<a href="mailto:">Let us know how we are doing!</a>
|
||||
</p>
|
||||
|
||||
<div class = "uk-text-right" *ngIf = "searchProjectsComponent.searchUtils.totalResults > 10" ><a [href] = "linkToSearchProjects" >View all {{searchProjectsComponent.searchUtils.totalResults}} results</a></div>
|
||||
<search-result [(results)]="searchProjectsComponent.results" [(status)]= "searchProjectsComponent.status"></search-result>
|
||||
<div class = "uk-text-right" *ngIf = "fetchProjects.searchUtils.totalResults > 10" ><a [href] = "linkToSearchProjects" >View all {{fetchProjects.searchUtils.totalResults}} results</a></div>
|
||||
<search-result [(results)]="fetchProjects.results" [(status)]= "fetchProjects.status"></search-result>
|
||||
</div>
|
||||
`
|
||||
})
|
||||
|
@ -27,7 +26,7 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties';
|
|||
export class ProjectsTabComponent {
|
||||
|
||||
@Input() paramsForSearchLink: string = "";
|
||||
@Input() searchProjectsComponent : SearchProjectsComponent;
|
||||
@Input() fetchProjects : FetchProjects;
|
||||
public linkToSearchProjects = "";
|
||||
|
||||
constructor () {}
|
||||
|
|
|
@ -1,32 +1,30 @@
|
|||
import {Component, Input} from '@angular/core';
|
||||
|
||||
import { SearchPublicationsComponent } from '../../searchPages/simple/searchPublications.component';
|
||||
import {SearchResultComponent} from '../../searchPages/searchUtils/searchResult.component';
|
||||
import { FetchPublications } from '../../utils/fetchEntitiesClasses/fetchPublications.class';
|
||||
|
||||
import {OpenaireProperties} from '../../utils/properties/openaireProperties';
|
||||
|
||||
@Component({
|
||||
selector: 'publicationsTab',
|
||||
template: `
|
||||
<div *ngIf="searchPublicationsComponent.searchUtils.totalResults == 0" class = "uk-alert">
|
||||
<div *ngIf="fetchPublications.searchUtils.totalResults == 0" class = "uk-alert">
|
||||
There are no publications
|
||||
</div>
|
||||
|
||||
<div *ngIf="searchPublicationsComponent.searchUtils.totalResults > 0">
|
||||
<div *ngIf="fetchPublications.searchUtils.totalResults > 0">
|
||||
<p>
|
||||
The results below are discovered through our pilot algorithms.
|
||||
<a href="mailto:">Let us know how we are doing!</a>
|
||||
</p>
|
||||
|
||||
<div class = "uk-text-right" *ngIf = "searchPublicationsComponent.searchUtils.totalResults > 10" ><a [href] = "linkToSearchPublications" >View all {{searchPublicationsComponent.searchUtils.totalResults}} results</a></div>
|
||||
<search-result [(results)]="searchPublicationsComponent.results" [(status)]= "searchPublicationsComponent.status"></search-result>
|
||||
<div class = "uk-text-right" *ngIf = "fetchPublications.searchUtils.totalResults > 10" ><a [href] = "linkToSearchPublications" >View all {{fetchPublications.searchUtils.totalResults}} results</a></div>
|
||||
<search-result [(results)]="fetchPublications.results" [(status)]= "fetchPublications.status"></search-result>
|
||||
</div>
|
||||
`
|
||||
})
|
||||
|
||||
export class PublicationsTabComponent {
|
||||
@Input() paramsForSearchLink: string = "";
|
||||
@Input() searchPublicationsComponent : SearchPublicationsComponent;
|
||||
@Input() fetchPublications : FetchPublications;
|
||||
public linkToSearchPublications = "";
|
||||
|
||||
constructor () {}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import {Component, Input} from '@angular/core';
|
||||
|
||||
import { SearchPublicationsComponent } from '../../searchPages/simple/searchPublications.component';
|
||||
import {SearchResultComponent} from '../../searchPages/searchUtils/searchResult.component';
|
||||
import { FetchPublications } from '../../utils/fetchEntitiesClasses/fetchPublications.class';
|
||||
|
||||
import {OpenaireProperties} from '../../utils/properties/openaireProperties';
|
||||
|
||||
|
@ -9,11 +8,11 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties';
|
|||
selector: 'relatedDatasourcesTab',
|
||||
template: `
|
||||
|
||||
<div *ngIf="searchPublicationsComponent.results.length == 0" class = "uk-alert">
|
||||
<div *ngIf="fetchPublications.results.length == 0" class = "uk-alert">
|
||||
There are no related dataproviders
|
||||
</div>
|
||||
|
||||
<div *ngIf="searchPublicationsComponent.results.length > 0">
|
||||
<div *ngIf="fetchPublications.results.length > 0">
|
||||
<p>
|
||||
The results below are discovered through our pilot algorithms.
|
||||
<a href="mailto:">Let us know how we are doing!</a>
|
||||
|
@ -27,7 +26,7 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties';
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr *ngFor="let item of searchPublicationsComponent.results">
|
||||
<tr *ngFor="let item of fetchPublications.results">
|
||||
<td class="uk-text-center">
|
||||
<a href="{{item.url}}" target="_blank" class="uk-icon-external-link">
|
||||
{{item.name}}
|
||||
|
@ -48,7 +47,7 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties';
|
|||
|
||||
export class RelatedDatasourcesTabComponent {
|
||||
@Input() dataproviderId: string;
|
||||
@Input() searchPublicationsComponent : SearchPublicationsComponent;
|
||||
@Input() fetchPublications : FetchPublications;
|
||||
private linkToSearchPublications = "";
|
||||
|
||||
constructor () {}
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
import {Component, Input} from '@angular/core';
|
||||
import {ActivatedRoute, Params} from '@angular/router';
|
||||
|
||||
import { SearchPublicationsComponent } from '../../searchPages/simple/searchPublications.component';
|
||||
import { FetchPublications } from '../../utils/fetchEntitiesClasses/fetchPublications.class';
|
||||
import { SearchPublicationsService } from '../../services/searchPublications.service';
|
||||
import { SearchDatasetsComponent } from '../../searchPages/simple/searchDatasets.component';
|
||||
import { FetchDatasets } from '../../utils/fetchEntitiesClasses/fetchDatasets.class';
|
||||
import { SearchDatasetsService } from '../../services/searchDatasets.service';
|
||||
import { SearchProjectsComponent } from '../../searchPages/simple/searchProjects.component';
|
||||
import { FetchProjects } from '../../utils/fetchEntitiesClasses/fetchProjects.class';
|
||||
import { SearchProjectsService } from '../../services/searchProjects.service';
|
||||
import { SearchDataprovidersComponent } from '../../searchPages/simple/searchDataproviders.component';
|
||||
import { FetchDataproviders } from '../../utils/fetchEntitiesClasses/fetchDataproviders.class';
|
||||
import { SearchDataprovidersService } from '../../services/searchDataproviders.service';
|
||||
|
||||
import {OpenaireProperties} from '../../utils/properties/openaireProperties';
|
||||
|
@ -23,16 +23,16 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties';
|
|||
<i *ngIf="tabs[0].content == 'statisticsTab'" class="uk-icon-pie-chart"></i>
|
||||
|
||||
<span class="uk-badge uk-badge-notification" *ngIf="tabs[0].content=='publicationsTab'">
|
||||
{{searchPublicationsComponent.searchUtils.totalResults}}
|
||||
{{fetchPublications.searchUtils.totalResults}}
|
||||
</span>
|
||||
<span class="uk-badge uk-badge-notification" *ngIf="tabs[0].content=='datasetsTab'">
|
||||
{{searchDatasetsComponent.searchUtils.totalResults}}
|
||||
{{fetchDatasets.searchUtils.totalResults}}
|
||||
</span>
|
||||
<span class="uk-badge uk-badge-notification" *ngIf="tabs[0].content=='projectsTab'">
|
||||
{{searchProjectsComponent.searchUtils.totalResults}}
|
||||
{{fetchProjects.searchUtils.totalResults}}
|
||||
</span>
|
||||
<span class="uk-badge uk-badge-notification" *ngIf="tabs[0].content=='datasourcesTab'">
|
||||
{{searchDataprovidersComponent.searchUtils.totalResults}}
|
||||
{{fetchDataproviders.searchUtils.totalResults}}
|
||||
</span>
|
||||
<span class="uk-badge uk-badge-notification" *ngIf="tabs[0].content=='organizationsTab'">
|
||||
{{organizations.length}}
|
||||
|
@ -48,16 +48,16 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties';
|
|||
<i *ngIf="tab.content == 'statisticsTab'" class="uk-icon-pie-chart"></i>
|
||||
|
||||
<span class="uk-badge uk-badge-notification" *ngIf="tab.content=='publicationsTab'">
|
||||
{{searchPublicationsComponent.searchUtils.totalResults}}
|
||||
{{fetchPublications.searchUtils.totalResults}}
|
||||
</span>
|
||||
<span class="uk-badge uk-badge-notification" *ngIf="tab.content=='datasetsTab'">
|
||||
{{searchDatasetsComponent.searchUtils.totalResults}}
|
||||
{{fetchDatasets.searchUtils.totalResults}}
|
||||
</span>
|
||||
<span class="uk-badge uk-badge-notification" *ngIf="tab.content=='projectsTab'">
|
||||
{{searchProjectsComponent.searchUtils.totalResults}}
|
||||
{{fetchProjects.searchUtils.totalResults}}
|
||||
</span>
|
||||
<span class="uk-badge uk-badge-notification" *ngIf="tab.content=='datasourcesTab'">
|
||||
{{searchDataprovidersComponent.searchUtils.totalResults}}
|
||||
{{fetchDataproviders.searchUtils.totalResults}}
|
||||
</span>
|
||||
<span class="uk-badge uk-badge-notification" *ngIf="tab.content=='organizationsTab'">
|
||||
{{organizations.length}}
|
||||
|
@ -70,46 +70,37 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties';
|
|||
<li *ngIf="tabs.length>0" id="{{tabs[0].content}}">
|
||||
<publicationsTab *ngIf="tabs[0].content=='publicationsTab'"
|
||||
[paramsForSearchLink]="paramsForSearchLink"
|
||||
[searchPublicationsComponent]="searchPublicationsComponent">
|
||||
[fetchPublications]="fetchPublications">
|
||||
</publicationsTab>
|
||||
<datasetsTab *ngIf="tabs[0].content=='datasetsTab'"
|
||||
[paramsForSearchLink]="paramsForSearchLink"
|
||||
[searchDatasetsComponent]="searchDatasetsComponent">
|
||||
[fetchDatasets]="fetchDatasets">
|
||||
</datasetsTab>
|
||||
|
||||
|
||||
<projectsTab *ngIf="tabs[0].content=='projectsTab'"
|
||||
[paramsForSearchLink]="paramsForSearchLink"
|
||||
[searchProjectsComponent]="searchProjectsComponent">
|
||||
[fetchProjects]="fetchProjects">
|
||||
</projectsTab>
|
||||
|
||||
<datasourcesTab *ngIf="tabs[0].content=='datasourcesTab'"
|
||||
|
||||
[paramsForSearchLink]="paramsForSearchLink"
|
||||
[searchDataprovidersComponent]="searchDataprovidersComponent">
|
||||
[fetchDataproviders]="fetchDataproviders">
|
||||
|
||||
</datasourcesTab>
|
||||
<organizationsTab *ngIf="tabs[0].content=='organizationsTab'"
|
||||
[organizations]="organizations">
|
||||
</organizationsTab>
|
||||
<relatedDatasourcesTab *ngIf="tabs[0].content=='relatedDatasourcesTab'"
|
||||
[searchPublicationsComponent]="searchPublicationsComponentAggregators">
|
||||
[fetchPublications]="fetchPublicationsAggregators">
|
||||
</relatedDatasourcesTab>
|
||||
<!--div *ngIf="tabs[0].content=='metricsTab' && metrics == undefined" class = "uk-alert uk-alert-warning">
|
||||
Metrics are currently unavailable
|
||||
</div>
|
||||
<div *ngIf="tabs[0].content=='metricsTab' && metrics != undefined" class="uk-panel uk-panel-box">
|
||||
<b>Views: </b>{{metrics}}
|
||||
</div-->
|
||||
|
||||
<!--statisticsTab *ngIf="tabs[0].content=='statisticsTab'"
|
||||
[statistics]="statistics" [show]=statsClicked>
|
||||
</statisticsTab-->
|
||||
<div *ngIf="tabs[0].content=='statisticsTab' && statsClicked">
|
||||
<div *ngIf="searchPublicationsComponent.searchUtils.totalResults == 0 && searchDatasetsComponent.searchUtils.totalResults == 0" class = "uk-alert">
|
||||
<div *ngIf="fetchPublications.searchUtils.totalResults == 0 && fetchDatasets.searchUtils.totalResults == 0" class = "uk-alert">
|
||||
There are no statistics
|
||||
</div>
|
||||
<div *ngIf="(searchPublicationsComponent.searchUtils.totalResults != 0 || searchDatasetsComponent.searchUtils.totalResults != 0)">
|
||||
<div *ngIf="(fetchPublications.searchUtils.totalResults != 0 || fetchDatasets.searchUtils.totalResults != 0)">
|
||||
<p>
|
||||
The results below are discovered through our pilot algorithms.
|
||||
<a href="mailto:">Let us know how we are doing!</a>
|
||||
|
@ -120,15 +111,16 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties';
|
|||
<i-frame [url]=docsTypesUrl width="800" height="350"></i-frame>
|
||||
</div>
|
||||
|
||||
<div *ngIf="(searchPublicationsComponent.searchUtils.totalResults > 0)">
|
||||
<div *ngIf="(fetchPublications.searchUtils.totalResults > 0)">
|
||||
<div>
|
||||
<p class="uk-text-bold">Funders in Data Providers Publications</p>
|
||||
<i-frame [url]=pubsFunderUrl width="800" height="350"></i-frame>
|
||||
<p class="uk-text-bold">Projects with most Publications</p>
|
||||
<i-frame [url]=pubsProjectsUrl width="800" height="350"></i-frame>
|
||||
|
||||
|
||||
</div>
|
||||
<div *ngIf="(searchDatasetsComponent.searchUtils.totalResults > 0)">
|
||||
<div *ngIf="(fetchDatasets.searchUtils.totalResults > 0)">
|
||||
<div>
|
||||
<p class="uk-text-bold">Projects with most Research Data</p>
|
||||
<i-frame [url]=dataProjectsUrl width="800" height="350"></i-frame>
|
||||
|
@ -139,17 +131,17 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties';
|
|||
</div>
|
||||
<projectsTab *ngIf="tabs[0].content=='projectsTab'"
|
||||
[paramsForSearchLink]="paramsForSearchLink"
|
||||
[searchProjectsComponent]="searchProjectsComponent">
|
||||
[fetchProjects]="fetchProjects">
|
||||
</projectsTab>
|
||||
<datasourcesTab *ngIf="tabs[0].content=='datasourcesTab'"
|
||||
[paramsForSearchLink]="paramsForSearchLink"
|
||||
[searchDataprovidersComponent]="searchDataprovidersComponent">
|
||||
[fetchDataproviders]="fetchDataproviders">
|
||||
</datasourcesTab>
|
||||
<organizationsTab *ngIf="tabs[0].content=='organizationsTab'"
|
||||
[organizations]="organizations">
|
||||
</organizationsTab>
|
||||
<relatedDatasourcesTab *ngIf="tabs[0].content=='relatedDatasourcesTab'"
|
||||
[searchPublicationsComponent]="searchPublicationsComponentAggregators">
|
||||
[fetchPublications]="fetchPublicationsAggregators">
|
||||
</relatedDatasourcesTab>
|
||||
<!--div *ngIf="tabs[0].content=='metricsTab' && metrics == undefined" class = "uk-alert uk-alert-warning">
|
||||
Metrics are currently unavailable
|
||||
|
@ -171,38 +163,38 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties';
|
|||
<li *ngFor="let tab of tabs; let i=index" id="{{tab.content}}">
|
||||
<publicationsTab *ngIf="i>0 && tab.content=='publicationsTab'"
|
||||
[paramsForSearchLink]="paramsForSearchLink"
|
||||
[searchPublicationsComponent] = "searchPublicationsComponent">
|
||||
[fetchPublications] = "fetchPublications">
|
||||
</publicationsTab>
|
||||
<datasetsTab *ngIf="i>0 && tab.content=='datasetsTab'"
|
||||
[paramsForSearchLink]="paramsForSearchLink"
|
||||
[searchDatasetsComponent]="searchDatasetsComponent">
|
||||
[fetchDatasets]="fetchDatasets">
|
||||
</datasetsTab>
|
||||
|
||||
<projectsTab *ngIf="i>0 && tab.content=='projectsTab'"
|
||||
[paramsForSearchLink]="paramsForSearchLink"
|
||||
[searchProjectsComponent]="searchProjectsComponent">
|
||||
[fetchProjects]="fetchProjects">
|
||||
</projectsTab>
|
||||
<datasourcesTab *ngIf="i>0 && tab.content=='datasourcesTab'"
|
||||
[paramsForSearchLink]="paramsForSearchLink"
|
||||
[searchDataprovidersComponent]="searchDataprovidersComponent">
|
||||
[fetchDataproviders]="fetchDataproviders">
|
||||
</datasourcesTab>
|
||||
<organizationsTab *ngIf="i>0 && tab.content=='organizationsTab'"
|
||||
[organizations]="organizations">
|
||||
</organizationsTab>
|
||||
<relatedDatasourcesTab *ngIf="i>0 && tab.content=='relatedDatasourcesTab'"
|
||||
[dataproviderId]="id"
|
||||
[searchPublicationsComponent]="searchPublicationsComponentAggregators">
|
||||
[fetchPublications]="fetchPublicationsAggregators">
|
||||
</relatedDatasourcesTab>
|
||||
|
||||
<!--statisticsTab *ngIf="i>0 && tab.content=='statisticsTab'"
|
||||
[searchPublicationsComponent] = "searchPublicationsComponent"
|
||||
[searchDatasetsComponent]="searchDatasetsComponent" [id]="id">
|
||||
[fetchPublications] = "fetchPublications"
|
||||
[fetchDatasets]="fetchDatasets" [id]="id">
|
||||
</statisticsTab-->
|
||||
<div *ngIf="i>0 && tab.content=='statisticsTab' && statsClicked">
|
||||
<div *ngIf="searchPublicationsComponent.searchUtils.totalResults == 0 && searchDatasetsComponent.searchUtils.totalResults == 0" class = "uk-alert">
|
||||
<div *ngIf="fetchPublications.searchUtils.totalResults == 0 && fetchDatasets.searchUtils.totalResults == 0" class = "uk-alert">
|
||||
There are no statistics
|
||||
</div>
|
||||
<div *ngIf="(searchPublicationsComponent.searchUtils.totalResults != 0 || searchDatasetsComponent.searchUtils.totalResults != 0)">
|
||||
<div *ngIf="(fetchPublications.searchUtils.totalResults != 0 || fetchDatasets.searchUtils.totalResults != 0)">
|
||||
<p>
|
||||
The results below are discovered through our pilot algorithms.
|
||||
<a href="mailto:">Let us know how we are doing!</a>
|
||||
|
@ -214,15 +206,18 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties';
|
|||
</div>
|
||||
|
||||
|
||||
<div *ngIf="(searchPublicationsComponent.searchUtils.totalResults > 0)">
|
||||
<div *ngIf="(fetchPublications.searchUtils.totalResults > 0)">
|
||||
<div>
|
||||
<p class="uk-text-bold">Funders in Data Providers Publications</p>
|
||||
<i-frame [url]=pubsFunderUrl width="800" height="350"></i-frame>
|
||||
<p class="uk-text-bold">Projects with most Publications</p>
|
||||
<i-frame [url]=pubsProjectsUrl width="800" height="350"></i-frame>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div *ngIf="(searchDatasetsComponent.searchUtils.totalResults > 0)">
|
||||
<div *ngIf="(fetchDatasets.searchUtils.totalResults > 0)">
|
||||
<div>
|
||||
<p class="uk-text-bold">Projects with most Research Data</p>
|
||||
<i-frame [url]=dataProjectsUrl width="800" height="350"></i-frame>
|
||||
|
@ -231,6 +226,7 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties';
|
|||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<metrics *ngIf="i>0 && tab.content=='metricsTab' && metricsClicked"
|
||||
[id]="id" [type]="'datasources'" [name]="name" (metricsResults)="metricsResults($event)">
|
||||
</metrics>
|
||||
|
@ -280,22 +276,22 @@ export class TabsComponent {
|
|||
private dataProjectsUrl:string ;
|
||||
private pubsProjectsUrl:string;
|
||||
|
||||
public searchPublicationsComponent : SearchPublicationsComponent;
|
||||
public searchDatasetsComponent: SearchDatasetsComponent;
|
||||
public searchProjectsComponent: SearchProjectsComponent;
|
||||
public searchDataprovidersComponent: SearchDataprovidersComponent;
|
||||
public searchPublicationsComponentAggregators: SearchPublicationsComponent;
|
||||
public fetchPublications : FetchPublications;
|
||||
public fetchDatasets: FetchDatasets;
|
||||
public fetchProjects: FetchProjects;
|
||||
public fetchDataproviders: FetchDataproviders;
|
||||
public fetchPublicationsAggregators: FetchPublications;
|
||||
|
||||
constructor (private route: ActivatedRoute,
|
||||
private _searchPublicationsService: SearchPublicationsService,
|
||||
private _searchDatasetsService: SearchDatasetsService,
|
||||
private _searchProjectsService: SearchProjectsService,
|
||||
private _searchDataprovidersService: SearchDataprovidersService) {
|
||||
this.searchPublicationsComponent = new SearchPublicationsComponent(this.route, this._searchPublicationsService);
|
||||
this.searchDatasetsComponent = new SearchDatasetsComponent(this.route, this._searchDatasetsService);
|
||||
this.searchProjectsComponent = new SearchProjectsComponent(this.route, this._searchProjectsService);
|
||||
this.searchDataprovidersComponent = new SearchDataprovidersComponent(this.route, this._searchDataprovidersService);
|
||||
this.searchPublicationsComponentAggregators = new SearchPublicationsComponent(this.route, this._searchPublicationsService);
|
||||
this.fetchPublications = new FetchPublications(this._searchPublicationsService);
|
||||
this.fetchDatasets = new FetchDatasets(this._searchDatasetsService);
|
||||
this.fetchProjects = new FetchProjects(this._searchProjectsService);
|
||||
this.fetchDataproviders = new FetchDataproviders(this._searchDataprovidersService);
|
||||
this.fetchPublicationsAggregators = new FetchPublications(this._searchPublicationsService);
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
@ -362,60 +358,61 @@ export class TabsComponent {
|
|||
|
||||
private searchPublications(page: number, size: number) {
|
||||
if(this.reloadPublications) {
|
||||
this.searchPublicationsComponent.getResultsForDataproviders(this.id, this.resultsBy, page, size);
|
||||
this.fetchPublications.getResultsForDataproviders(this.id, this.resultsBy, page, size);
|
||||
}
|
||||
this.reloadPublications = false;
|
||||
}
|
||||
|
||||
private countPublications(page: number, size: number) {
|
||||
this.searchPublicationsComponent.getResultsForDataproviders(this.id, this.resultsBy, page, size);
|
||||
this.fetchPublications.getResultsForDataproviders(this.id, this.resultsBy, page, size);
|
||||
}
|
||||
|
||||
private searchDatasets(page: number, size: number) {
|
||||
if(this.reloadDatasets) {
|
||||
this.searchDatasetsComponent.getResultsForDataproviders(this.id, this.resultsBy, page, size);
|
||||
this.fetchDatasets.getResultsForDataproviders(this.id, this.resultsBy, page, size);
|
||||
}
|
||||
this.reloadDatasets = false;
|
||||
}
|
||||
|
||||
private countDatasets(page: number, size: number) {
|
||||
this.searchDatasetsComponent.getResultsForDataproviders(this.id, this.resultsBy, page, size);
|
||||
this.fetchDatasets.getResultsForDataproviders(this.id, this.resultsBy, page, size);
|
||||
}
|
||||
|
||||
private searchProjects(page: number, size: number) {
|
||||
if(this.reloadProjects) {
|
||||
this.searchProjectsComponent.getResultsForDataproviders(this.id, page, size);
|
||||
this.fetchProjects.getResultsForDataproviders(this.id, page, size);
|
||||
}
|
||||
this.reloadProjects = false;
|
||||
}
|
||||
|
||||
private countProjects(page: number, size: number) {
|
||||
this.searchProjectsComponent.getResultsForDataproviders(this.id, page, size);
|
||||
this.fetchProjects.getResultsForDataproviders(this.id, page, size);
|
||||
}
|
||||
|
||||
private searchDatasources(page: number, size: number) {
|
||||
console.info("search intro");
|
||||
if(this.reloadDataproviders) {
|
||||
console.info("request");
|
||||
this.searchDataprovidersComponent.getResultsForDataproviders(this.id, page, size);
|
||||
|
||||
this.fetchDataproviders.getResultsForDataproviders(this.id, page, size);
|
||||
|
||||
}
|
||||
this.reloadDataproviders = false;
|
||||
}
|
||||
|
||||
private countDatasources(page: number, size: number) {
|
||||
this.searchDataprovidersComponent.getResultsForDataproviders(this.id, page, size);
|
||||
this.fetchDataproviders.getResultsForDataproviders(this.id, page, size);
|
||||
}
|
||||
|
||||
private searchRelatedDatasources(page: number, size: number) {
|
||||
if(this.reloadRelatedDatasources) {
|
||||
this.searchPublicationsComponentAggregators.getAggregatorResults(this.id, page, size);
|
||||
this.fetchPublicationsAggregators.getAggregatorResults(this.id, page, size);
|
||||
}
|
||||
this.reloadRelatedDatasources = false;
|
||||
}
|
||||
|
||||
private countRelatedDatasources(page: number, size: number) {
|
||||
//searchPublicationsComponentAggregator
|
||||
this.searchPublicationsComponentAggregators.getAggregatorResults(this.id, page, size);
|
||||
//fetchPublicationsAggregator
|
||||
this.fetchPublicationsAggregators.getAggregatorResults(this.id, page, size);
|
||||
}
|
||||
|
||||
public metricsResults($event) {
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
|
||||
import { DatasetComponent } from './dataset.component';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{ path: '', component: DatasetComponent }
|
||||
])
|
||||
]
|
||||
})
|
||||
export class DatasetRoutingModule { }
|
|
@ -1,6 +1,6 @@
|
|||
import {Component, ViewChild} from '@angular/core';
|
||||
import {Observable} from 'rxjs/Observable';
|
||||
import {DatasetService} from '../../services/dataset.service';
|
||||
import {DatasetService} from './dataset.service';
|
||||
import {DatasetInfo} from '../../utils/entities/datasetInfo';
|
||||
import {ActivatedRoute} from '@angular/router';
|
||||
import {OpenaireProperties} from '../../utils/properties/openaireProperties'
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
//import {MaterialModule} from '@angular/material';
|
||||
import { NgModule} from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { SharedModule } from '../../shared/shared.module';
|
||||
|
||||
import { DatasetService} from './dataset.service';
|
||||
import { DatasetComponent } from './dataset.component';
|
||||
import { DatasetRoutingModule } from './dataset-routing.module';
|
||||
import {MetricsModule} from '../metrics.module';
|
||||
import {IFrameModule} from '../../utils/iframe.module';
|
||||
import {AltMetricsModule} from '../../utils/altmetrics.module';
|
||||
|
||||
import { ResultLandingModule } from '../resultLanding.module';
|
||||
import { LandingModule } from '../landing.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
//MaterialModule.forRoot(),
|
||||
CommonModule, FormsModule,SharedModule, LandingModule,
|
||||
ResultLandingModule, DatasetRoutingModule, MetricsModule, IFrameModule, AltMetricsModule
|
||||
],
|
||||
declarations: [
|
||||
DatasetComponent
|
||||
],
|
||||
providers:[
|
||||
DatasetService
|
||||
],
|
||||
exports: [
|
||||
DatasetComponent
|
||||
]
|
||||
})
|
||||
export class DatasetModule { }
|
|
@ -1,12 +1,12 @@
|
|||
import {Injectable} from '@angular/core';
|
||||
import {Http, Response} from '@angular/http';
|
||||
import {Observable} from 'rxjs/Observable';
|
||||
import {DatasetInfo} from '../utils/entities/datasetInfo';
|
||||
import {OpenaireProperties} from '../utils/properties/openaireProperties';
|
||||
import {DatasetInfo} from '../../utils/entities/datasetInfo';
|
||||
import {OpenaireProperties} from '../../utils/properties/openaireProperties';
|
||||
import 'rxjs/add/observable/of';
|
||||
import 'rxjs/add/operator/do';
|
||||
import 'rxjs/add/operator/share';
|
||||
import { CacheService } from '../shared/cache.service';
|
||||
import { CacheService } from '../../shared/cache.service';
|
||||
|
||||
@Injectable()
|
||||
export class DatasetService {
|
|
@ -0,0 +1,13 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
|
||||
import { HtmlProjectReportComponent } from './htmlProjectReport.component';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{ path: '', component: HtmlProjectReportComponent }
|
||||
])
|
||||
]
|
||||
})
|
||||
export class HtmlProjectReportRoutingModule { }
|
|
@ -2,11 +2,11 @@ import {Component} from '@angular/core';
|
|||
import {Observable} from 'rxjs/Observable';
|
||||
import {ActivatedRoute, Params} from '@angular/router';
|
||||
import {isBrowser, isNode} from 'angular2-universal';
|
||||
import {HtmlProgressReportService} from '../../services/htmlProgressReport.service';
|
||||
import {ProjectService} from '../../services/project.service';
|
||||
import {HtmlProjectReportService} from './htmlProjectReport.service';
|
||||
import {ProjectService} from '../project/project.service';
|
||||
|
||||
@Component({
|
||||
selector: 'htmlProgressReport',
|
||||
selector: 'htmlProjectReport',
|
||||
template: `
|
||||
<div class="uk-container uk-margin-top">
|
||||
<button class="uk-button uk-button-primary btn" (click)="copied = true;">
|
||||
|
@ -23,7 +23,7 @@ import {ProjectService} from '../../services/project.service';
|
|||
</div>
|
||||
`
|
||||
})
|
||||
export class HtmlProgressReportComponent{
|
||||
export class HtmlProjectReportComponent{
|
||||
public projectId: string;
|
||||
public totalResults: number;
|
||||
|
||||
|
@ -38,7 +38,7 @@ export class HtmlProgressReportComponent{
|
|||
public copied: boolean = false;
|
||||
|
||||
constructor ( private route: ActivatedRoute,
|
||||
private htmlService: HtmlProgressReportService,
|
||||
private htmlService: HtmlProjectReportService,
|
||||
private _projectService: ProjectService) {
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
//import {MaterialModule} from '@angular/material';
|
||||
import { NgModule} from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { ProjectServiceModule} from '../project/projectService.module';
|
||||
import { CacheService } from '../../shared/cache.service';
|
||||
|
||||
import {HtmlProjectReportService} from './htmlProjectReport.service';
|
||||
import {HtmlProjectReportComponent} from './htmlProjectReport.component';
|
||||
import { HtmlProjectReportRoutingModule } from './htmlProjectReport-routing.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule, HtmlProjectReportRoutingModule, ProjectServiceModule
|
||||
],
|
||||
declarations: [
|
||||
HtmlProjectReportComponent
|
||||
],
|
||||
providers:[
|
||||
HtmlProjectReportService,CacheService
|
||||
],
|
||||
exports: [
|
||||
HtmlProjectReportComponent
|
||||
]
|
||||
})
|
||||
export class HtmlProjectReportModule { }
|
|
@ -1,11 +1,11 @@
|
|||
import {Injectable} from '@angular/core';
|
||||
import {Http, Response} from '@angular/http';
|
||||
import {Observable} from 'rxjs/Observable';
|
||||
import {OpenaireProperties} from '../utils/properties/openaireProperties';
|
||||
import {OpenaireProperties} from '../../utils/properties/openaireProperties';
|
||||
import 'rxjs/add/operator/do';
|
||||
import { CacheService } from '../shared/cache.service';
|
||||
import { CacheService } from '../../shared/cache.service';
|
||||
@Injectable()
|
||||
export class HtmlProgressReportService {
|
||||
export class HtmlProjectReportService {
|
||||
|
||||
constructor(private http: Http, public _cache: CacheService) {}
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
|
||||
import { PersonComponent } from './person/person.component';
|
||||
import { ProjectComponent } from './project/project.component';
|
||||
import { OrganizationComponent } from './organization/organization.component';
|
||||
import { DatasetComponent } from './dataset/dataset.component';
|
||||
import { PublicationComponent } from './publication/publication.component';
|
||||
import { DataProviderComponent } from './dataProvider/dataProvider.component'
|
||||
|
||||
import { HtmlProgressReportComponent } from './project/htmlProgressReport.component';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{ path: 'search/person', component: PersonComponent },
|
||||
{ path: 'search/project', component: ProjectComponent },
|
||||
{ path: 'search/organization', component: OrganizationComponent },
|
||||
{ path: 'search/dataset', component: DatasetComponent },
|
||||
{ path: 'search/publication', component: PublicationComponent },
|
||||
{ path: 'search/dataprovider', component: DataProviderComponent},
|
||||
{ path: 'openaire', component: HtmlProgressReportComponent}
|
||||
])
|
||||
]
|
||||
})
|
||||
export class LandingRoutingModule { }
|
|
@ -1,61 +1,25 @@
|
|||
//import {MaterialModule} from '@angular/material';
|
||||
/* This module contains all common components for all landing pages */
|
||||
|
||||
import { NgModule} from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import {UtilsModule} from '../utils/utils.module';
|
||||
import {ServicesModule} from '../services/services.module';
|
||||
|
||||
import {SearchModule} from '../searchPages/search.module';
|
||||
|
||||
import {TabPagingComponent} from './tabPaging.component';
|
||||
import {TabTableComponent} from './tabTable.component';
|
||||
import {ShowTitleComponent} from './showTitle.component';
|
||||
import {ShowAuthorsComponent} from './showAuthors.component';
|
||||
import {ShowIdentifiersComponent} from './showIdentifiers.component';
|
||||
import {ShowSubjectsComponent} from './showSubjects.component';
|
||||
import {MetricsComponent} from './metrics.component';
|
||||
|
||||
import {PublicationsTabComponent} from './dataProvider/publicationsTab.component';
|
||||
import {DatasetsTabComponent} from './dataProvider/datasetsTab.component';
|
||||
import {StatisticsTabComponent} from './dataProvider/statisticsTab.component';
|
||||
import {ProjectsTabComponent} from './dataProvider/projectsTab.component';
|
||||
import {DatasourcesTabComponent} from './dataProvider/datasourcesTab.component';
|
||||
import {OrganizationsTabComponent} from './dataProvider/organizationsTab.component';
|
||||
import {RelatedDatasourcesTabComponent} from './dataProvider/relatedDatasourcesTab.component';
|
||||
import {TabsComponent} from './dataProvider/tabs.component';
|
||||
|
||||
import {DataProviderComponent} from './dataProvider/dataProvider.component';
|
||||
import { PersonComponent } from './person/person.component';
|
||||
import { ProjectComponent } from './project/project.component';
|
||||
import { OrganizationComponent } from './organization/organization.component';
|
||||
import { DatasetComponent } from './dataset/dataset.component';
|
||||
import { PublicationComponent } from './publication/publication.component';
|
||||
|
||||
import { LandingRoutingModule } from './landing-routing.module';
|
||||
|
||||
import { HtmlProgressReportComponent } from './project/htmlProgressReport.component';
|
||||
@NgModule({
|
||||
imports: [
|
||||
//MaterialModule.forRoot(),
|
||||
CommonModule, FormsModule,
|
||||
UtilsModule,
|
||||
ServicesModule,
|
||||
SearchModule,
|
||||
LandingRoutingModule
|
||||
|
||||
CommonModule, FormsModule,
|
||||
],
|
||||
declarations: [
|
||||
TabPagingComponent, TabTableComponent, ShowTitleComponent, ShowAuthorsComponent,ShowIdentifiersComponent,ShowSubjectsComponent, MetricsComponent,
|
||||
PublicationsTabComponent, DatasetsTabComponent, StatisticsTabComponent, ProjectsTabComponent, DatasourcesTabComponent, OrganizationsTabComponent, RelatedDatasourcesTabComponent, TabsComponent,
|
||||
DataProviderComponent, PersonComponent, ProjectComponent, PublicationComponent, OrganizationComponent, DatasetComponent,
|
||||
HtmlProgressReportComponent
|
||||
TabPagingComponent, TabTableComponent, ShowTitleComponent,
|
||||
],
|
||||
providers:[
|
||||
],
|
||||
exports: [
|
||||
DataProviderComponent, PersonComponent, ProjectComponent, PublicationComponent, OrganizationComponent, DatasetComponent,
|
||||
HtmlProgressReportComponent
|
||||
TabPagingComponent, TabTableComponent, ShowTitleComponent,
|
||||
]
|
||||
})
|
||||
export class LandingModule { }
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
/* This module contains all common components for all landing pages */
|
||||
|
||||
import { NgModule} from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import {MetricsComponent} from './metrics.component';
|
||||
import { MetricsService } from '../services/metrics.service';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
|
||||
CommonModule, FormsModule
|
||||
],
|
||||
declarations: [
|
||||
MetricsComponent
|
||||
],
|
||||
providers:[
|
||||
MetricsService
|
||||
],
|
||||
exports: [
|
||||
|
||||
MetricsComponent
|
||||
]
|
||||
})
|
||||
export class MetricsModule { }
|
|
@ -0,0 +1,13 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
|
||||
import { OrganizationComponent } from './organization.component';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{ path: '', component: OrganizationComponent }
|
||||
])
|
||||
]
|
||||
})
|
||||
export class OrganizationRoutingModule { }
|
|
@ -45,7 +45,7 @@
|
|||
{{organizationInfo.dataProviders.length}}
|
||||
</span-->
|
||||
<span class="uk-badge uk-badge-notification">
|
||||
{{searchDataprovidersComponent.searchUtils.totalResults}}
|
||||
{{fetchDataproviders.searchUtils.totalResults}}
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
|
@ -115,18 +115,18 @@
|
|||
|
||||
<li id="dataProvidersTab">
|
||||
<!--showDataProviders [dataProviders]="organizationInfo.dataProviders"></showDataProviders-->
|
||||
<div *ngIf="searchDataprovidersComponent.searchUtils.totalResults == 0" class = "uk-alert">
|
||||
<div *ngIf="fetchDataproviders.searchUtils.totalResults == 0" class = "uk-alert">
|
||||
There are no dataproviders
|
||||
</div>
|
||||
|
||||
<div *ngIf="searchDataprovidersComponent.searchUtils.totalResults > 0">
|
||||
<div *ngIf="fetchDataproviders.searchUtils.totalResults > 0">
|
||||
<p>
|
||||
The results below are discovered through our pilot algorithms.
|
||||
<a href="mailto:">Let us know how we are doing!</a>
|
||||
</p>
|
||||
|
||||
<div class = "uk-text-right" *ngIf = "searchDataprovidersComponent.searchUtils.totalResults > 10" ><a [href] = "linkToSearchDataproviders" >View all {{searchDataprovidersComponent.searchUtils.totalResults}} results</a></div>
|
||||
<search-result [(results)]="searchDataprovidersComponent.results" [(status)]= "searchDataprovidersComponent.status"></search-result>
|
||||
<div class = "uk-text-right" *ngIf = "fetchDataproviders.searchUtils.totalResults > 10" ><a [href] = "linkToSearchDataproviders" >View all {{fetchDataproviders.searchUtils.totalResults}} results</a></div>
|
||||
<search-result [(results)]="fetchDataproviders.results" [(status)]= "fetchDataproviders.status"></search-result>
|
||||
</div>
|
||||
</li>
|
||||
<!--li id="metricsTab">
|
||||
|
|
|
@ -4,14 +4,11 @@ import {ActivatedRoute} from '@angular/router';
|
|||
import {OrganizationService} from '../../services/organization.service';
|
||||
import {OrganizationInfo} from '../../utils/entities/organizationInfo';
|
||||
import {ReportsService} from '../../services/reports.service';
|
||||
import { SearchDataprovidersComponent } from '../../searchPages/simple/searchDataproviders.component';
|
||||
import { FetchDataproviders } from '../../utils/fetchEntitiesClasses/fetchDataproviders.class';
|
||||
|
||||
import { SearchDataprovidersService } from '../../services/searchDataproviders.service';
|
||||
import {SearchResultComponent} from '../../searchPages/searchUtils/searchResult.component';
|
||||
import { SearchPublicationsComponent } from '../../searchPages/simple/searchPublications.component';
|
||||
import { SearchPublicationsService } from '../../services/searchPublications.service';
|
||||
|
||||
import {OpenaireProperties} from '../../utils/properties/openaireProperties';
|
||||
import {ExportCSVComponent} from '../../utils/exportCSV.component';
|
||||
|
||||
@Component({
|
||||
selector: 'organization',
|
||||
|
@ -38,19 +35,16 @@ export class OrganizationComponent {
|
|||
subDataproviders: any;
|
||||
subDataprovidersCount: any;
|
||||
|
||||
private searchDataprovidersComponent : SearchDataprovidersComponent;
|
||||
private fetchDataproviders : FetchDataproviders;
|
||||
private linkToSearchDataproviders = "";
|
||||
private searchPublicationsComponent : SearchPublicationsComponent;
|
||||
|
||||
constructor (private _organizationService: OrganizationService,
|
||||
private route: ActivatedRoute,
|
||||
private _searchDataprovidersService: SearchDataprovidersService,
|
||||
private _searchPublicationsService: SearchPublicationsService,
|
||||
private _reportsService: ReportsService) {
|
||||
|
||||
console.info('organization constructor');
|
||||
this.searchDataprovidersComponent = new SearchDataprovidersComponent(this.route, this._searchDataprovidersService);
|
||||
this.searchPublicationsComponent = new SearchPublicationsComponent(this.route, this._searchPublicationsService);
|
||||
this.fetchDataproviders = new FetchDataproviders(this._searchDataprovidersService);
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
@ -73,8 +67,8 @@ export class OrganizationComponent {
|
|||
this.subDataprovidersCount = this.route.queryParams.subscribe(params => {
|
||||
this._searchDataprovidersService.numOfDataproviders("organizations/"+this.organizationId+"/datasources/count").subscribe(
|
||||
data => {
|
||||
this.searchDataprovidersComponent.searchUtils.totalResults = data;
|
||||
console.info("this.searchDataprovidersComponent.searchUtils.totalResults = "+this.searchDataprovidersComponent.searchUtils.totalResults);
|
||||
this.fetchDataproviders.searchUtils.totalResults = data;
|
||||
console.info("this.fetchDataproviders.searchUtils.totalResults = "+this.fetchDataproviders.searchUtils.totalResults);
|
||||
},
|
||||
err => {
|
||||
console.log(err);
|
||||
|
@ -82,7 +76,7 @@ export class OrganizationComponent {
|
|||
);
|
||||
})
|
||||
*/
|
||||
this.searchDataprovidersComponent.getNumForEntity("organization", this.organizationId);
|
||||
this.fetchDataproviders.getNumForEntity("organization", this.organizationId);
|
||||
}
|
||||
|
||||
|
||||
|
@ -160,12 +154,12 @@ export class OrganizationComponent {
|
|||
//}
|
||||
|
||||
private searchDataproviders() {
|
||||
this.searchDataprovidersComponent.getResultsForEntity("organization", this.organizationId, 1, 10);
|
||||
this.fetchDataproviders.getResultsForEntity("organization", this.organizationId, 1, 10);
|
||||
this.linkToSearchDataproviders = OpenaireProperties.getLinkToAdvancedSearchDataProviders() + "?organization=" + this.organizationId + "&or=and";;
|
||||
}
|
||||
|
||||
private searchDataprovidersInit() {
|
||||
if(this.subDataproviders == undefined && this.searchDataprovidersComponent.searchUtils.totalResults > 0) {
|
||||
if(this.subDataproviders == undefined && this.fetchDataproviders.searchUtils.totalResults > 0) {
|
||||
this.subDataproviders = this.route.queryParams.subscribe(params => {
|
||||
this.searchDataproviders();
|
||||
});
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
import { NgModule} from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import { OrganizationServiceModule} from '../../services/organizationService.module';
|
||||
import { OrganizationComponent } from './organization.component';
|
||||
import { OrganizationRoutingModule } from './organization-routing.module';
|
||||
|
||||
import { LandingModule } from '../landing.module';
|
||||
import {SearchResultsModule } from '../../searchPages/searchUtils/searchResults.module';
|
||||
import {DataProvidersServiceModule} from '../../services/dataProvidersService.module';
|
||||
import {ReportsServiceModule} from '../../services/reportsService.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule,
|
||||
LandingModule,
|
||||
OrganizationRoutingModule,
|
||||
SearchResultsModule,
|
||||
DataProvidersServiceModule,
|
||||
ReportsServiceModule,
|
||||
OrganizationServiceModule
|
||||
],
|
||||
declarations: [
|
||||
OrganizationComponent
|
||||
],
|
||||
providers:[
|
||||
],
|
||||
exports: [
|
||||
OrganizationComponent
|
||||
]
|
||||
})
|
||||
export class OrganizationModule { }
|
|
@ -0,0 +1,13 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
|
||||
import { PersonComponent } from './person.component';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{ path: '', component: PersonComponent }
|
||||
])
|
||||
]
|
||||
})
|
||||
export class PersonRoutingModule { }
|
|
@ -20,7 +20,7 @@
|
|||
<a href="#publicationsTab">
|
||||
Publications
|
||||
<span class="uk-badge uk-badge-notification">
|
||||
{{searchPublicationsComponent.searchUtils.totalResults}}
|
||||
{{fetchPublications.searchUtils.totalResults}}
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
|
@ -28,7 +28,7 @@
|
|||
<a href="#researchDataTab">
|
||||
Research Data
|
||||
<span class="uk-badge uk-badge-notification">
|
||||
{{searchDatasetsComponent.searchUtils.totalResults}}
|
||||
{{fetchDatasets.searchUtils.totalResults}}
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
|
@ -37,34 +37,34 @@
|
|||
<ul id="tab-content" class="uk-switcher uk-margin">
|
||||
<li id="publicationsTab">
|
||||
|
||||
<div *ngIf="searchPublicationsComponent.searchUtils.totalResults == 0" class = "uk-alert">
|
||||
<div *ngIf="fetchPublications.searchUtils.totalResults == 0" class = "uk-alert">
|
||||
There are no publications
|
||||
</div>
|
||||
|
||||
<div *ngIf="searchPublicationsComponent.searchUtils.totalResults > 0">
|
||||
<div *ngIf="fetchPublications.searchUtils.totalResults > 0">
|
||||
<p>
|
||||
The results below are discovered through our pilot algorithms.
|
||||
<a href="mailto:">Let us know how we are doing!</a>
|
||||
</p>
|
||||
|
||||
<div class = "uk-text-right" *ngIf = "searchPublicationsComponent.searchUtils.totalResults > 10" ><a [href] = "linkToSearchPublications" >View all {{searchPublicationsComponent.searchUtils.totalResults}} results</a></div>
|
||||
<search-result [(results)]="searchPublicationsComponent.results" [(status)]= "searchPublicationsComponent.status"></search-result>
|
||||
<div class = "uk-text-right" *ngIf = "fetchPublications.searchUtils.totalResults > 10" ><a [href] = "linkToSearchPublications" >View all {{fetchPublications.searchUtils.totalResults}} results</a></div>
|
||||
<search-result [(results)]="fetchPublications.results" [(status)]= "fetchPublications.searchUtils.status"></search-result>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li id="researchDataTab">
|
||||
<div *ngIf="searchDatasetsComponent.searchUtils.totalResults == 0" class = "uk-alert">
|
||||
<div *ngIf="fetchDatasets.searchUtils.totalResults == 0" class = "uk-alert">
|
||||
There are no research data
|
||||
</div>
|
||||
|
||||
<div *ngIf="searchDatasetsComponent.searchUtils.totalResults > 0">
|
||||
<div *ngIf="fetchDatasets.searchUtils.totalResults > 0">
|
||||
<p>
|
||||
The results below are discovered through our pilot algorithms.
|
||||
<a href="mailto:">Let us know how we are doing!</a>
|
||||
</p>
|
||||
|
||||
<div class = "uk-text-right" *ngIf = "searchDatasetsComponent.searchUtils.totalResults > 10" ><a [href] = "linkToSearchDatasets" >View all {{searchDatasetsComponent.searchUtils.totalResults}} results</a></div>
|
||||
<search-result [(results)]="searchDatasetsComponent.results" [(status)]= "searchDatasetsComponent.status"></search-result>
|
||||
<div class = "uk-text-right" *ngIf = "fetchDatasets.searchUtils.totalResults > 10" ><a [href] = "linkToSearchDatasets" >View all {{fetchDatasets.searchUtils.totalResults}} results</a></div>
|
||||
<search-result [(results)]="fetchDatasets.results" [(status)]= "fetchDatasets.status"></search-result>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
import {Component} from '@angular/core';
|
||||
import {Observable} from 'rxjs/Observable';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import {PersonService} from '../../services/person.service';
|
||||
import {PersonService} from './person.service';
|
||||
import { PersonInfo } from '../../utils/entities/personInfo';
|
||||
|
||||
import { SearchPublicationsComponent } from '../../searchPages/simple/searchPublications.component';
|
||||
import { FetchPublications } from '../../utils/fetchEntitiesClasses/fetchPublications.class';
|
||||
import { SearchPublicationsService } from '../../services/searchPublications.service';
|
||||
import { SearchDatasetsComponent } from '../../searchPages/simple/searchDatasets.component';
|
||||
import { FetchDatasets } from '../../utils/fetchEntitiesClasses/fetchDatasets.class';
|
||||
import { SearchDatasetsService } from '../../services/searchDatasets.service';
|
||||
import { SearchResultComponent } from '../../searchPages/searchUtils/searchResult.component';
|
||||
|
||||
import {OpenaireProperties} from '../../utils/properties/openaireProperties';
|
||||
|
||||
|
@ -18,15 +17,14 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties';
|
|||
})
|
||||
|
||||
export class PersonComponent {
|
||||
|
||||
sub: any;
|
||||
subPublications: any;
|
||||
subDatasets: any;
|
||||
subDatasetsCount: any;
|
||||
|
||||
private searchPublicationsComponent : SearchPublicationsComponent;
|
||||
public fetchPublications : FetchPublications;
|
||||
private linkToSearchPublications = "";
|
||||
private searchDatasetsComponent : SearchDatasetsComponent;
|
||||
public fetchDatasets : FetchDatasets;
|
||||
private linkToSearchDatasets = "";
|
||||
|
||||
personInfo: PersonInfo;
|
||||
|
@ -39,8 +37,8 @@ export class PersonComponent {
|
|||
private _searchPublicationsService: SearchPublicationsService,
|
||||
private _searchDatasetsService: SearchDatasetsService) {
|
||||
console.info('person constructor');
|
||||
this.searchPublicationsComponent = new SearchPublicationsComponent(this.route, this._searchPublicationsService);
|
||||
this.searchDatasetsComponent = new SearchDatasetsComponent(this.route, this._searchDatasetsService);
|
||||
this.fetchPublications = new FetchPublications( this._searchPublicationsService);
|
||||
this.fetchDatasets = new FetchDatasets( this._searchDatasetsService);
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
@ -49,21 +47,20 @@ export class PersonComponent {
|
|||
this.personId = params['personId'];
|
||||
console.info("Id is :"+this.personId);
|
||||
if(this.personId){
|
||||
this.getPersonInfo();
|
||||
this.fetchPersonInfo();
|
||||
this.searchPublications();
|
||||
|
||||
}else{
|
||||
this.warningMessage="No valid person id";
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
this.subPublications = this.route.queryParams.subscribe(params => {
|
||||
this.searchPublications();
|
||||
});
|
||||
|
||||
this.subDatasetsCount = this.route.queryParams.subscribe(params => {
|
||||
this._searchDatasetsService.numOfEntityDatasets(this.personId, "people/").subscribe(
|
||||
data => {
|
||||
this.searchDatasetsComponent.searchUtils.totalResults = data;
|
||||
this.fetchDatasets.searchUtils.totalResults = data;
|
||||
},
|
||||
err => {
|
||||
console.log(err);
|
||||
|
@ -73,7 +70,7 @@ export class PersonComponent {
|
|||
}
|
||||
|
||||
private searchDatasetsInit() {
|
||||
if(this.subDatasets == undefined && this.searchDatasetsComponent.searchUtils.totalResults > 0) {
|
||||
if(this.subDatasets == undefined && this.fetchDatasets.searchUtils.totalResults > 0) {
|
||||
this.subDatasets = this.route.queryParams.subscribe(params => {
|
||||
this.searchDatasets();
|
||||
});
|
||||
|
@ -82,16 +79,16 @@ export class PersonComponent {
|
|||
|
||||
ngOnDestroy() {
|
||||
this.sub.unsubscribe();
|
||||
this.subPublications.unsubscribe();
|
||||
if(this.subDatasets != undefined) {
|
||||
this.subDatasets.unsubscribe();
|
||||
}
|
||||
this.subDatasetsCount.unsubscribe();
|
||||
// this.subPublications.unsubscribe();
|
||||
// if(this.subDatasets != undefined) {
|
||||
// this.subDatasets.unsubscribe();
|
||||
// }
|
||||
// this.subDatasetsCount.unsubscribe();
|
||||
}
|
||||
|
||||
|
||||
private getPersonInfo () {
|
||||
console.info("inside getPersonInfo of component");
|
||||
private fetchPersonInfo () {
|
||||
console.info("inside fetchPersonInfo of component");
|
||||
|
||||
this.warningMessage = '';
|
||||
this.errorMessage=""
|
||||
|
@ -112,12 +109,12 @@ export class PersonComponent {
|
|||
}
|
||||
|
||||
private searchPublications() {
|
||||
this.searchPublicationsComponent.getResultsForEntity("person", this.personId, 1, 10);
|
||||
this.fetchPublications.getResultsForEntity("person", this.personId, 1, 10);
|
||||
this.linkToSearchPublications = OpenaireProperties.getLinkToAdvancedSearchPublications() + "?person=" + this.personId + "&pe=and";
|
||||
}
|
||||
|
||||
private searchDatasets() {
|
||||
this.searchDatasetsComponent.getResultsForEntity("person", this.personId, 1, 10);
|
||||
this.fetchDatasets.getResultsForEntity("person", this.personId, 1, 10);
|
||||
this.linkToSearchDatasets = OpenaireProperties.getLinkToAdvancedSearchDatasets() + "?person=" + this.personId + "&pe=and";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
import { NgModule} from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import { PersonService} from './person.service';
|
||||
import { PersonComponent } from './person.component';
|
||||
import { PersonRoutingModule } from './person-routing.module';
|
||||
|
||||
import { LandingModule } from '../landing.module';
|
||||
import {SearchResultsModule } from '../../searchPages/searchUtils/searchResults.module';
|
||||
import {DatasetsServiceModule} from '../../services/datasetsService.module';
|
||||
import {PublicationsServiceModule} from '../../services/publicationsService.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule,
|
||||
LandingModule,
|
||||
PersonRoutingModule,
|
||||
SearchResultsModule,
|
||||
DatasetsServiceModule, PublicationsServiceModule
|
||||
],
|
||||
declarations: [
|
||||
PersonComponent
|
||||
],
|
||||
providers:[
|
||||
PersonService
|
||||
],
|
||||
exports: [
|
||||
PersonComponent
|
||||
]
|
||||
})
|
||||
export class PersonModule { }
|
|
@ -5,9 +5,9 @@ import 'rxjs/add/observable/of';
|
|||
import 'rxjs/add/operator/do';
|
||||
import 'rxjs/add/operator/share';
|
||||
|
||||
import { CacheService } from '../shared/cache.service';
|
||||
import {PersonInfo} from '../utils/entities/personInfo';
|
||||
import {OpenaireProperties} from '../utils/properties/openaireProperties'
|
||||
import { CacheService } from '../../shared/cache.service';
|
||||
import {PersonInfo} from '../../utils/entities/personInfo';
|
||||
import {OpenaireProperties} from '../../utils/properties/openaireProperties'
|
||||
|
||||
export function hashCodeString(str: string): string {
|
||||
let hash = 0;
|
|
@ -0,0 +1,13 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
|
||||
import { ProjectComponent } from './project.component';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{ path: '', component: ProjectComponent }
|
||||
])
|
||||
]
|
||||
})
|
||||
export class ProjectRoutingModule { }
|
|
@ -56,7 +56,7 @@
|
|||
<a href="#publicationsTab">
|
||||
Publications
|
||||
<span class="uk-badge uk-badge-notification">
|
||||
{{searchPublicationsComponent.searchUtils.totalResults}}
|
||||
{{fetchPublications.searchUtils.totalResults}}
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
|
@ -64,7 +64,7 @@
|
|||
<a href="#researchDataTab">
|
||||
Research Data
|
||||
<span class="uk-badge uk-badge-notification">
|
||||
{{searchDatasetsComponent.searchUtils.totalResults}}
|
||||
{{fetchDatasets.searchUtils.totalResults}}
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
|
@ -85,43 +85,43 @@
|
|||
<ul id="tab-content" class="uk-switcher uk-margin">
|
||||
<li id="publicationsTab">
|
||||
|
||||
<div *ngIf="searchPublicationsComponent.searchUtils.totalResults == 0" class = "uk-alert" >
|
||||
<div *ngIf="fetchPublications.searchUtils.totalResults == 0" class = "uk-alert" >
|
||||
There are no publications
|
||||
</div>
|
||||
|
||||
<div *ngIf="searchPublicationsComponent.searchUtils.totalResults > 0">
|
||||
<div *ngIf="fetchPublications.searchUtils.totalResults > 0">
|
||||
<p>
|
||||
The results below are discovered through our pilot algorithms.
|
||||
<a href="mailto:">Let us know how we are doing!</a>
|
||||
</p>
|
||||
|
||||
<div class = "uk-text-right" *ngIf = "searchPublicationsComponent.searchUtils.totalResults > 10" ><a [href] = "linkToSearchPublications" >View all {{searchPublicationsComponent.searchUtils.totalResults}} results</a></div>
|
||||
<search-result [(results)]="searchPublicationsComponent.results" [(status)]= "searchPublicationsComponent.status"></search-result>
|
||||
<div class = "uk-text-right" *ngIf = "fetchPublications.searchUtils.totalResults > 10" ><a [href] = "linkToSearchPublications" >View all {{fetchPublications.searchUtils.totalResults}} results</a></div>
|
||||
<search-result [(results)]="fetchPublications.results" [(status)]= "fetchPublications.searchUtils.status"></search-result>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li id="researchDataTab">
|
||||
<div *ngIf="searchDatasetsComponent.searchUtils.totalResults == 0" class = "uk-alert">
|
||||
<div *ngIf="fetchDatasets.searchUtils.totalResults == 0" class = "uk-alert">
|
||||
There are no research data
|
||||
</div>
|
||||
|
||||
<div *ngIf="searchDatasetsComponent.searchUtils.totalResults > 0">
|
||||
<div *ngIf="fetchDatasets.searchUtils.totalResults > 0">
|
||||
<p>
|
||||
The results below are discovered through our pilot algorithms.
|
||||
<a href="mailto:">Let us know how we are doing!</a>
|
||||
</p>
|
||||
|
||||
<div class = "uk-text-right" *ngIf = "searchDatasetsComponent.searchUtils.totalResults > 10" ><a [href] = "linkToSearchDatasets" >View all {{searchDatasetsComponent.searchUtils.totalResults}} results</a></div>
|
||||
<search-result [(results)]="searchDatasetsComponent.results" [(status)]= "searchDatasetsComponent.status"></search-result>
|
||||
<div class = "uk-text-right" *ngIf = "fetchDatasets.searchUtils.totalResults > 10" ><a [href] = "linkToSearchDatasets" >View all {{fetchDatasets.searchUtils.totalResults}} results</a></div>
|
||||
<search-result [(results)]="fetchDatasets.results" [(status)]= "fetchDatasets.searchUtils.status"></search-result>
|
||||
</div>
|
||||
</li>
|
||||
<li id="statisticsTab">
|
||||
<div *ngIf="searchPublicationsComponent.searchUtils.totalResults == 0 && searchDatasetsComponent.searchUtils.totalResults == 0" class = "uk-alert">
|
||||
<div *ngIf="fetchPublications.searchUtils.totalResults == 0 && fetchDatasets.searchUtils.totalResults == 0" class = "uk-alert">
|
||||
There are no statistics
|
||||
</div>
|
||||
|
||||
|
||||
<div *ngIf="statsClicked && (searchPublicationsComponent.searchUtils.totalResults != 0 || searchDatasetsComponent.searchUtils.totalResults != 0)">
|
||||
<div *ngIf="statsClicked && (fetchPublications.searchUtils.totalResults != 0 || fetchDatasets.searchUtils.totalResults != 0)">
|
||||
<p class="uk-text-bold">
|
||||
The results below are discovered through our pilot algorithms.
|
||||
<a href="mailto:">Let us know how we are doing!</a>
|
||||
|
@ -171,7 +171,7 @@
|
|||
<!--li (click)="showHTML()"-->
|
||||
<li>
|
||||
<a target="_blank"
|
||||
href="/openaire?projectId={{projectId}}&size={{searchPublicationsComponent.searchUtils.totalResults}}">
|
||||
href="/project-report?projectId={{projectId}}&size={{fetchPublications.searchUtils.totalResults}}">
|
||||
View {{projectInfo.funder}} progress report (HTML)
|
||||
</a>
|
||||
</li>
|
||||
|
|
|
@ -1,13 +1,15 @@
|
|||
import {Component, ViewChild} from '@angular/core';
|
||||
import {Observable} from 'rxjs/Observable';
|
||||
import {ActivatedRoute, Params} from '@angular/router';
|
||||
import {ProjectService} from '../../services/project.service';
|
||||
import {ProjectService} from './project.service';
|
||||
import {ProjectInfo} from '../../utils/entities/projectInfo';
|
||||
import { SearchPublicationsComponent } from '../../searchPages/simple/searchPublications.component';
|
||||
import {SearchPublicationsService} from '../../services/searchPublications.service';
|
||||
import { SearchDatasetsComponent } from '../../searchPages/simple/searchDatasets.component';
|
||||
|
||||
|
||||
import { FetchPublications } from '../../utils/fetchEntitiesClasses/fetchPublications.class';
|
||||
import { SearchPublicationsService } from '../../services/searchPublications.service';
|
||||
import { FetchDatasets } from '../../utils/fetchEntitiesClasses/fetchDatasets.class';
|
||||
import { SearchDatasetsService } from '../../services/searchDatasets.service';
|
||||
import {SearchResultComponent} from '../../searchPages/searchUtils/searchResult.component';
|
||||
|
||||
import {ReportsService} from '../../services/reports.service';
|
||||
import {OpenaireProperties} from '../../utils/properties/openaireProperties';
|
||||
|
||||
|
@ -43,9 +45,9 @@ export class ProjectComponent{
|
|||
subDatasets: any;
|
||||
subDatasetsCount: any;
|
||||
|
||||
public searchPublicationsComponent : SearchPublicationsComponent;
|
||||
public fetchPublications : FetchPublications;
|
||||
public linkToSearchPublications = "";
|
||||
public searchDatasetsComponent : SearchDatasetsComponent;
|
||||
public fetchDatasets : FetchDatasets;
|
||||
public linkToSearchDatasets = "";
|
||||
|
||||
constructor (private _projectService: ProjectService,
|
||||
|
@ -55,8 +57,8 @@ export class ProjectComponent{
|
|||
private _reportsService: ReportsService) {
|
||||
console.info('project constructor.');
|
||||
|
||||
this.searchPublicationsComponent = new SearchPublicationsComponent(this.route, this._searchPublicationsService);
|
||||
this.searchDatasetsComponent = new SearchDatasetsComponent(this.route, this._searchDatasetsService);
|
||||
this.fetchPublications = new FetchPublications( this._searchPublicationsService);
|
||||
this.fetchDatasets = new FetchDatasets(this._searchDatasetsService);
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
@ -74,7 +76,7 @@ export class ProjectComponent{
|
|||
|
||||
this.subDatasetsCount = this._searchDatasetsService.numOfEntityDatasets(this.projectId, "projects/").subscribe(
|
||||
data => {
|
||||
this.searchDatasetsComponent.searchUtils.totalResults = data;
|
||||
this.fetchDatasets.searchUtils.totalResults = data;
|
||||
},
|
||||
err => {
|
||||
console.log(err);
|
||||
|
@ -84,7 +86,7 @@ export class ProjectComponent{
|
|||
}
|
||||
|
||||
this.downloadURLAPI = OpenaireProperties.getCsvAPIURL();
|
||||
this.csvParams = "format=csv-special&page=0&size="+this.searchPublicationsComponent.searchUtils.totalResults+"&type=publications&query=(((oaftype exact result) and (resulttypeid exact publication)) and (relprojectid exact "+this.projectId+"))";
|
||||
this.csvParams = "format=csv-special&page=0&size="+this.fetchPublications.searchUtils.totalResults+"&type=publications&query=(((oaftype exact result) and (resulttypeid exact publication)) and (relprojectid exact "+this.projectId+"))";
|
||||
|
||||
});
|
||||
}
|
||||
|
@ -96,17 +98,17 @@ export class ProjectComponent{
|
|||
}
|
||||
|
||||
private searchPublications() {
|
||||
this.searchPublicationsComponent.getResultsForEntity("project", this.projectId, 1, 10);
|
||||
this.fetchPublications.getResultsForEntity("project", this.projectId, 1, 10);
|
||||
this.linkToSearchPublications = OpenaireProperties.getLinkToAdvancedSearchPublications() + "?project=" + this.projectId+"&pr=and";
|
||||
}
|
||||
|
||||
private searchDatasets() {
|
||||
this.searchDatasetsComponent.getResultsForEntity("project", this.projectId, 1, 10);
|
||||
this.fetchDatasets.getResultsForEntity("project", this.projectId, 1, 10);
|
||||
this.linkToSearchDatasets = OpenaireProperties.getLinkToAdvancedSearchDatasets() + "?project=" + this.projectId+"&pr=and";
|
||||
}
|
||||
|
||||
private searchDatasetsInit() {
|
||||
if(this.subDatasets == undefined && this.searchDatasetsComponent.searchUtils.totalResults > 0) {
|
||||
if(this.subDatasets == undefined && this.fetchDatasets.searchUtils.totalResults > 0) {
|
||||
this.searchDatasets();
|
||||
}
|
||||
}
|
||||
|
@ -168,9 +170,9 @@ export class ProjectComponent{
|
|||
info += ")";
|
||||
}
|
||||
info +="</h1>";
|
||||
info += "<h3>"+this.searchPublicationsComponent.searchUtils.totalResults+" publications</h3>";
|
||||
info += "<h3>"+this.fetchPublications.searchUtils.totalResults+" publications</h3>";
|
||||
|
||||
let htmlParams = 'resources?format=html&page=0&size='+this.searchPublicationsComponent.searchUtils.totalResults+'&type=publications&query=(((oaftype exact result) and (resulttypeid exact publication)) and (relprojectid exact "'+this.projectId+'"))';
|
||||
let htmlParams = 'resources?format=html&page=0&size='+this.fetchPublications.searchUtils.totalResults+'&type=publications&query=(((oaftype exact result) and (resulttypeid exact publication)) and (relprojectid exact "'+this.projectId+'"))';
|
||||
this._reportsService.downloadHTMLFile(this.downloadURLAPI+htmlParams, info)
|
||||
.subscribe(data => this.funct(data),
|
||||
error => console.log("Error downloading the file."),
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
//import {MaterialModule} from '@angular/material';
|
||||
import { NgModule} from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import { ProjectServiceModule} from './projectService.module';
|
||||
// import {HtmlProgressReportService} from './htmlProgressReport.service';
|
||||
|
||||
import { ProjectComponent } from './project.component';
|
||||
import { ProjectRoutingModule } from './project-routing.module';
|
||||
import {IFrameModule} from '../../utils/iframe.module';
|
||||
import {MetricsModule} from '../metrics.module';
|
||||
import {ReportsServiceModule} from '../../services/reportsService.module';
|
||||
import {PublicationsServiceModule} from '../../services/publicationsService.module';
|
||||
import {DatasetsServiceModule} from '../../services/datasetsService.module';
|
||||
import {SearchResultsModule } from '../../searchPages/searchUtils/searchResults.module';
|
||||
import { LandingModule } from '../landing.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule, LandingModule,
|
||||
ProjectRoutingModule,
|
||||
SearchResultsModule, IFrameModule, MetricsModule, ReportsServiceModule, PublicationsServiceModule, DatasetsServiceModule, ProjectServiceModule
|
||||
],
|
||||
declarations: [
|
||||
ProjectComponent
|
||||
],
|
||||
providers:[
|
||||
// ProjectService,
|
||||
// HtmlProgressReportService
|
||||
],
|
||||
exports: [
|
||||
ProjectComponent
|
||||
]
|
||||
})
|
||||
export class ProjectModule { }
|
|
@ -0,0 +1,200 @@
|
|||
import {Injectable} from '@angular/core';
|
||||
import {Http, Response} from '@angular/http';
|
||||
import {Observable} from 'rxjs/Observable';
|
||||
import {ProjectInfo} from '../../utils/entities/projectInfo';
|
||||
import {OpenaireProperties} from '../../utils/properties/openaireProperties';
|
||||
import 'rxjs/add/observable/of';
|
||||
import 'rxjs/add/operator/do';
|
||||
import 'rxjs/add/operator/share';
|
||||
import { CacheService } from '../../shared/cache.service';
|
||||
@Injectable()
|
||||
export class ProjectService {
|
||||
|
||||
constructor(private http: Http, public _cache: CacheService) {}
|
||||
|
||||
projectInfo: ProjectInfo;
|
||||
|
||||
getProjectInfo (id: string):any {
|
||||
console.info("getProjectInfo in service");
|
||||
|
||||
let url = OpenaireProperties. getSearchAPIURLLast() + 'projects/'+id+"?format=json";
|
||||
let key = url;
|
||||
if (this._cache.has(key)) {
|
||||
return Observable.of(this._cache.get(key))
|
||||
.map(res => this.parseProjectInfo(res));
|
||||
}
|
||||
return this.http.get(url)
|
||||
.map(res => <any> res.json())
|
||||
.map(res => res['result']['metadata']['oaf:entity']['oaf:project'])
|
||||
.map(res => [res,
|
||||
res['fundingtree'],
|
||||
res['rels']['rel']])
|
||||
.do(res => {
|
||||
this._cache.set(key, res);
|
||||
})
|
||||
.map(res => this.parseProjectInfo(res));
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
get project strtDate and endDate
|
||||
*/
|
||||
getProjectDates (id: string):any {
|
||||
|
||||
let url = OpenaireProperties. getSearchAPIURLLast()+'projects/'+id+"?format=json";
|
||||
let key = url+'_projectDates';
|
||||
if (this._cache.has(key)) {
|
||||
return Observable.of(this._cache.get(key))
|
||||
.map(res => [res,
|
||||
res['fundingtree'],
|
||||
res['rels']['rel']])
|
||||
.map(res => this.parseProjectDates(id,res))
|
||||
}
|
||||
return this.http.get(url)
|
||||
.map(res => <any> res.json())
|
||||
.map(res => res['result']['metadata']['oaf:entity']['oaf:project'])
|
||||
.do(res => {
|
||||
this._cache.set(key, res);
|
||||
})
|
||||
.map(res => [res,
|
||||
res['fundingtree'],
|
||||
res['rels']['rel']])
|
||||
.map(res => this.parseProjectDates(id,res))
|
||||
|
||||
}
|
||||
|
||||
getHTMLInfo(id: string): any {
|
||||
console.info("getHTMLInfo in service");
|
||||
|
||||
let url = OpenaireProperties. getSearchAPIURLLast() + 'projects/'+id+"?format=json";
|
||||
let key = url;
|
||||
if (this._cache.has(key)) {
|
||||
return Observable.of(this._cache.get(key))
|
||||
.map(res => this.parseHTMLInfo(res));
|
||||
}
|
||||
return this.http.get(url)
|
||||
.map(res => <any> res.json())
|
||||
.map(res => res['result']['metadata']['oaf:entity']['oaf:project'])
|
||||
.do(res => {
|
||||
this._cache.set(key, res);
|
||||
})
|
||||
.map(res => this.parseHTMLInfo(res));
|
||||
}
|
||||
|
||||
private handleError (error: Response) {
|
||||
// in a real world app, we may send the error to some remote logging infrastructure
|
||||
// instead of just logging it to the console
|
||||
console.log(error);
|
||||
return Observable.throw(error || 'Server error');
|
||||
}
|
||||
|
||||
parseHTMLInfo (data: any):any {
|
||||
let htmlInfo: {"title": string, "acronym": string, "callIdentifier": string};
|
||||
|
||||
if(data != null) {
|
||||
htmlInfo = {"title": data.title, "acronym": data.acronym, "callIdentifier": data.callidentifier};
|
||||
}
|
||||
console.info(htmlInfo);
|
||||
return htmlInfo;
|
||||
}
|
||||
|
||||
parseProjectInfo (data: any):any {
|
||||
this.projectInfo = new ProjectInfo();
|
||||
|
||||
if(data[0] != null) {
|
||||
this.projectInfo.acronym = data[0].acronym;
|
||||
this.projectInfo.title = data[0].title;
|
||||
this.projectInfo.callIdentifier = data[0].callidentifier;
|
||||
this.projectInfo.contractNum = data[0].code;
|
||||
this.projectInfo.startDate = data[0].startdate;
|
||||
this.projectInfo.endDate = data[0].enddate;
|
||||
this.projectInfo.openAccessMandate = data[0].oamandatepublications;
|
||||
this.projectInfo.specialClause39 = data[0].ecsc39;
|
||||
}
|
||||
if(data[1] != null) {
|
||||
if(data[1]['funder'] != null) {
|
||||
this.projectInfo.funder = data[1]['funder'].shortname;
|
||||
}
|
||||
|
||||
let funding;
|
||||
this.projectInfo.funding = "";
|
||||
|
||||
if(data[1]['funding_level_2'] != null) {
|
||||
funding = data[1]['funding_level_2'].id;
|
||||
} else if(data[1]['funding_level_1'] != null) {
|
||||
funding = data[1]['funding_level_1'].id;
|
||||
} else if(data[1]['funding_level_0'] != null) {
|
||||
funding = data[1]['funding_level_0'].id;
|
||||
}
|
||||
|
||||
if(funding != undefined) {
|
||||
funding = funding.split("::");
|
||||
for(let i=1; i<funding.length; i++) {
|
||||
if(this.projectInfo.funding != "") {
|
||||
this.projectInfo.funding += " | ";
|
||||
}
|
||||
this.projectInfo.funding += funding[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(data[2] != null) {
|
||||
this.projectInfo.organizations = new Map<string, string>();
|
||||
|
||||
let name = "";
|
||||
let url = "";
|
||||
|
||||
if(!Array.isArray(data[2])) {
|
||||
if(data[2].hasOwnProperty("legalshortname")) {
|
||||
name = data[2].legalshortname;
|
||||
} else if(data[2].hasOwnProperty("legalname")) {
|
||||
name = data[2].legalname;
|
||||
}
|
||||
|
||||
if(data[2].hasOwnProperty("to") && name != "") {
|
||||
url = OpenaireProperties.getsearchLinkToOrganization()+data[2]['to'].content;
|
||||
}
|
||||
if(name != "") {
|
||||
this.projectInfo.organizations.set(name, url);
|
||||
}
|
||||
} else {
|
||||
for(let i=0; i<data[2].length; i++) {
|
||||
if(data[2][i].hasOwnProperty("to") && data[2][i]['to'].class == "hasParticipant") {
|
||||
if(data[2][i].hasOwnProperty("legalshortname")) {
|
||||
name = data[2][i].legalshortname;
|
||||
} else if(data[2][i].hasOwnProperty("legalname")) {
|
||||
name = data[2][i].legalname;
|
||||
}
|
||||
|
||||
if(data[2][i].hasOwnProperty("to") && name!="") {
|
||||
url = OpenaireProperties.getsearchLinkToOrganization()+data[2][i]['to'].content;
|
||||
}
|
||||
|
||||
if(name != "") {
|
||||
this.projectInfo.organizations.set(name, url);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(this.projectInfo.funder == "EC") {
|
||||
this.projectInfo.url = OpenaireProperties.getCordisURL()+this.projectInfo.contractNum;
|
||||
this.projectInfo.urlInfo = "Detailed project information (CORDIS)";
|
||||
}
|
||||
|
||||
return this.projectInfo;
|
||||
|
||||
}
|
||||
|
||||
parseProjectDates (id: string, data: any):any {
|
||||
var project = { id: id, startDate: "", endDate: ""};
|
||||
if(data[0] != null) {
|
||||
project.startDate = data[0].startdate;
|
||||
project.endDate = data[0].enddate;
|
||||
}
|
||||
return project;
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
import { NgModule} from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import {ProjectService} from './project.service';
|
||||
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule
|
||||
],
|
||||
declarations: [
|
||||
],
|
||||
providers:[
|
||||
ProjectService
|
||||
],
|
||||
exports: [
|
||||
]
|
||||
})
|
||||
export class ProjectServiceModule { }
|
|
@ -0,0 +1,13 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
|
||||
import { PublicationComponent } from './publication.component';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{ path: '', component: PublicationComponent }
|
||||
])
|
||||
]
|
||||
})
|
||||
export class PublicationRoutingModule { }
|
|
@ -1,6 +1,6 @@
|
|||
import {Component, ViewChild} from '@angular/core';
|
||||
import {Observable} from 'rxjs/Observable';
|
||||
import {PublicationService} from '../../services/publication.service';
|
||||
import {PublicationService} from './publication.service';
|
||||
import {PublicationInfo} from '../../utils/entities/publicationInfo';
|
||||
import {ActivatedRoute} from '@angular/router';
|
||||
import {OpenaireProperties} from '../../utils/properties/openaireProperties';
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
//import {MaterialModule} from '@angular/material';
|
||||
import { NgModule} from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { SharedModule } from '../../shared/shared.module';
|
||||
|
||||
import { PublicationService} from './publication.service';
|
||||
import { PublicationComponent } from './publication.component';
|
||||
import { PublicationRoutingModule } from './publication-routing.module';
|
||||
import {MetricsModule} from '../metrics.module';
|
||||
import {IFrameModule} from '../../utils/iframe.module';
|
||||
import {AltMetricsModule} from '../../utils/altmetrics.module';
|
||||
|
||||
|
||||
import { ResultLandingModule } from '../resultLanding.module';
|
||||
import { LandingModule } from '../landing.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule, LandingModule,SharedModule,
|
||||
ResultLandingModule, PublicationRoutingModule, IFrameModule, MetricsModule, AltMetricsModule
|
||||
],
|
||||
declarations: [
|
||||
PublicationComponent
|
||||
],
|
||||
providers:[
|
||||
PublicationService
|
||||
],
|
||||
exports: [
|
||||
PublicationComponent
|
||||
]
|
||||
})
|
||||
export class PublicationModule { }
|
|
@ -1,12 +1,12 @@
|
|||
import {Injectable} from '@angular/core';
|
||||
import {Http, Response} from '@angular/http';
|
||||
import {Observable} from 'rxjs/Observable';
|
||||
import {PublicationInfo} from '../utils/entities/publicationInfo';
|
||||
import {OpenaireProperties} from '../utils/properties/openaireProperties';
|
||||
import {PublicationInfo} from '../../utils/entities/publicationInfo';
|
||||
import {OpenaireProperties} from '../../utils/properties/openaireProperties';
|
||||
import 'rxjs/add/observable/of';
|
||||
import 'rxjs/add/operator/do';
|
||||
import 'rxjs/add/operator/share';
|
||||
import { CacheService } from '../shared/cache.service';
|
||||
import { CacheService } from '../../shared/cache.service';
|
||||
@Injectable()
|
||||
export class PublicationService {
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
/* This module contains all common components for Publication & Daasets Landing Pages */
|
||||
import { NgModule} from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { RouterModule } from '@angular/router';
|
||||
|
||||
import {ShowAuthorsComponent} from './showAuthors.component';
|
||||
import {ShowIdentifiersComponent} from './showIdentifiers.component';
|
||||
import {ShowSubjectsComponent} from './showSubjects.component';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule, RouterModule
|
||||
],
|
||||
declarations: [
|
||||
ShowAuthorsComponent,ShowIdentifiersComponent,ShowSubjectsComponent
|
||||
],
|
||||
providers:[
|
||||
],
|
||||
exports: [
|
||||
ShowAuthorsComponent,ShowIdentifiersComponent,ShowSubjectsComponent
|
||||
]
|
||||
})
|
||||
export class ResultLandingModule { }
|
|
@ -9,6 +9,7 @@ import {Component, Input} from '@angular/core';
|
|||
</div>
|
||||
<span *ngFor="let item of authors.slice(0,30)">
|
||||
<a href="{{item['url']}}">
|
||||
<!--a routerLinkActive="router-link-active" routerLink="/search/person" [queryParams]="{personId: 'datacite____::9da3a037961b36a634fcd40ab0bf6535'}" -->
|
||||
{{item['name']}};
|
||||
</a>
|
||||
</span>
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
|
||||
import{AdvancedSearchDataProvidersComponent} from './advancedSearchDataProviders.component';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{ path: '', component: AdvancedSearchDataProvidersComponent }
|
||||
|
||||
])
|
||||
]
|
||||
})
|
||||
export class AdvancedSearchDataProvidersRoutingModule { }
|
|
@ -0,0 +1,28 @@
|
|||
import { NgModule} from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import{ AdvancedSearchDataProvidersRoutingModule} from './advancedSearchDataProviders-routing.module';
|
||||
import{AdvancedSearchDataProvidersComponent} from './advancedSearchDataProviders.component';
|
||||
|
||||
|
||||
import {DataProvidersServiceModule} from '../../services/dataProvidersService.module';
|
||||
import {AdvancedSearchPageModule} from '../searchUtils/advancedSearchPage.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule,
|
||||
DataProvidersServiceModule,
|
||||
AdvancedSearchDataProvidersRoutingModule, AdvancedSearchPageModule
|
||||
|
||||
],
|
||||
declarations: [
|
||||
AdvancedSearchDataProvidersComponent
|
||||
],
|
||||
providers:[
|
||||
],
|
||||
exports: [
|
||||
AdvancedSearchDataProvidersComponent
|
||||
]
|
||||
})
|
||||
export class AdvancedSearchDataProvidersModule { }
|
|
@ -0,0 +1,14 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
|
||||
import{AdvancedSearchDatasetsComponent} from './advancedSearchDatasets.component';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{ path: '', component: AdvancedSearchDatasetsComponent }
|
||||
|
||||
])
|
||||
]
|
||||
})
|
||||
export class AdvancedSearchDatasetsRoutingModule { }
|
|
@ -0,0 +1,28 @@
|
|||
import { NgModule} from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import{ AdvancedSearchDatasetsRoutingModule} from './advancedSearchDatasets-routing.module';
|
||||
import{AdvancedSearchDatasetsComponent} from './advancedSearchDatasets.component';
|
||||
|
||||
|
||||
import {DatasetsServiceModule} from '../../services/datasetsService.module';
|
||||
import {AdvancedSearchPageModule} from '../searchUtils/advancedSearchPage.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule,
|
||||
DatasetsServiceModule,
|
||||
AdvancedSearchDatasetsRoutingModule, AdvancedSearchPageModule
|
||||
|
||||
],
|
||||
declarations: [
|
||||
AdvancedSearchDatasetsComponent
|
||||
],
|
||||
providers:[
|
||||
],
|
||||
exports: [
|
||||
AdvancedSearchDatasetsComponent
|
||||
]
|
||||
})
|
||||
export class AdvancedSearchDatasetsModule { }
|
|
@ -0,0 +1,14 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
|
||||
import{AdvancedSearchOrganizationsComponent} from './advancedSearchOrganizations.component';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{ path: '', component: AdvancedSearchOrganizationsComponent }
|
||||
|
||||
])
|
||||
]
|
||||
})
|
||||
export class AdvancedSearchOrganizationsRoutingModule { }
|
|
@ -0,0 +1,28 @@
|
|||
import { NgModule} from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import{ AdvancedSearchOrganizationsRoutingModule} from './advancedSearchOrganizations-routing.module';
|
||||
import{AdvancedSearchOrganizationsComponent} from './advancedSearchOrganizations.component';
|
||||
|
||||
|
||||
import {OrganizationsServiceModule} from '../../services/organizationsService.module';
|
||||
import {AdvancedSearchPageModule} from '../searchUtils/advancedSearchPage.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule,
|
||||
OrganizationsServiceModule,
|
||||
AdvancedSearchOrganizationsRoutingModule, AdvancedSearchPageModule
|
||||
|
||||
],
|
||||
declarations: [
|
||||
AdvancedSearchOrganizationsComponent
|
||||
],
|
||||
providers:[
|
||||
],
|
||||
exports: [
|
||||
AdvancedSearchOrganizationsComponent
|
||||
]
|
||||
})
|
||||
export class AdvancedSearchOrganizationsModule { }
|
|
@ -0,0 +1,14 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
|
||||
import{AdvancedSearchPeopleComponent} from './advancedSearchPeople.component';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{ path: '', component: AdvancedSearchPeopleComponent }
|
||||
|
||||
])
|
||||
]
|
||||
})
|
||||
export class AdvancedSearchPeopleRoutingModule { }
|
|
@ -0,0 +1,28 @@
|
|||
import { NgModule} from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import{ AdvancedSearchPeopleRoutingModule} from './advancedSearchPeople-routing.module';
|
||||
import{AdvancedSearchPeopleComponent} from './advancedSearchPeople.component';
|
||||
|
||||
|
||||
import {PeopleServiceModule} from '../../services/peopleService.module';
|
||||
import {AdvancedSearchPageModule} from '../searchUtils/advancedSearchPage.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule,
|
||||
PeopleServiceModule,
|
||||
AdvancedSearchPeopleRoutingModule, AdvancedSearchPageModule
|
||||
|
||||
],
|
||||
declarations: [
|
||||
AdvancedSearchPeopleComponent
|
||||
],
|
||||
providers:[
|
||||
],
|
||||
exports: [
|
||||
AdvancedSearchPeopleComponent
|
||||
]
|
||||
})
|
||||
export class AdvancedSearchPeopleModule { }
|
|
@ -0,0 +1,14 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
|
||||
import{AdvancedSearchProjectsComponent} from './advancedSearchProjects.component';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{ path: '', component: AdvancedSearchProjectsComponent }
|
||||
|
||||
])
|
||||
]
|
||||
})
|
||||
export class AdvancedSearchProjectsRoutingModule { }
|
|
@ -0,0 +1,28 @@
|
|||
import { NgModule} from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import{ AdvancedSearchProjectsRoutingModule} from './advancedSearchProjects-routing.module';
|
||||
import{AdvancedSearchProjectsComponent} from './advancedSearchProjects.component';
|
||||
|
||||
|
||||
import {ProjectsServiceModule} from '../../services/projectsService.module';
|
||||
import {AdvancedSearchPageModule} from '../searchUtils/advancedSearchPage.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule,
|
||||
ProjectsServiceModule,
|
||||
AdvancedSearchProjectsRoutingModule, AdvancedSearchPageModule
|
||||
|
||||
],
|
||||
declarations: [
|
||||
AdvancedSearchProjectsComponent
|
||||
],
|
||||
providers:[
|
||||
],
|
||||
exports: [
|
||||
AdvancedSearchProjectsComponent
|
||||
]
|
||||
})
|
||||
export class AdvancedSearchProjectsModule { }
|
|
@ -0,0 +1,14 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
|
||||
import{AdvancedSearchPublicationsComponent} from './advancedSearchPublications.component';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{ path: '', component: AdvancedSearchPublicationsComponent }
|
||||
|
||||
])
|
||||
]
|
||||
})
|
||||
export class AdvancedSearchPublicationsRoutingModule { }
|
|
@ -0,0 +1,28 @@
|
|||
import { NgModule} from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import{ AdvancedSearchPublicationsRoutingModule} from './advancedSearchPublications-routing.module';
|
||||
import{AdvancedSearchPublicationsComponent} from './advancedSearchPublications.component';
|
||||
|
||||
|
||||
import {PublicationsServiceModule} from '../../services/publicationsService.module';
|
||||
import {AdvancedSearchPageModule} from '../searchUtils/advancedSearchPage.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule,
|
||||
PublicationsServiceModule,
|
||||
AdvancedSearchPublicationsRoutingModule, AdvancedSearchPageModule
|
||||
|
||||
],
|
||||
declarations: [
|
||||
AdvancedSearchPublicationsComponent
|
||||
],
|
||||
providers:[
|
||||
],
|
||||
exports: [
|
||||
AdvancedSearchPublicationsComponent
|
||||
]
|
||||
})
|
||||
export class AdvancedSearchPublicationsModule { }
|
|
@ -0,0 +1,14 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
|
||||
import{SearchCompatibleDataprovidersComponent} from './compatibleDataProviders.component';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{ path: '', component: SearchCompatibleDataprovidersComponent }
|
||||
|
||||
])
|
||||
]
|
||||
})
|
||||
export class CompatibleDataProvidersRoutingModule { }
|
|
@ -9,7 +9,7 @@ import {OpenaireProperties, ErrorCodes} from '../../utils/properties/openairePro
|
|||
import {SearchFields} from '../../utils/properties/searchFields';
|
||||
import {SearchPageComponent } from '../searchUtils/searchPage.component';
|
||||
import {SearchUtilsClass } from '../searchUtils/searchUtils.class';
|
||||
import {ExportCSVComponent} from '../../utils/exportCSV.component';
|
||||
import {ExportCSVComponent} from '../../utils/exportCSV.class';
|
||||
|
||||
@Component({
|
||||
selector: 'search-dataproviders',
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
import { NgModule} from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import{ CompatibleDataProvidersRoutingModule} from './compatibleDataProviders-routing.module';
|
||||
import{SearchCompatibleDataprovidersComponent} from './compatibleDataProviders.component';
|
||||
|
||||
import {SearchResultsModule } from '../searchUtils/searchResults.module';
|
||||
|
||||
import {DataProvidersServiceModule} from '../../services/dataProvidersService.module';
|
||||
import {SearchFormModule} from '../searchUtils/searchForm.module';
|
||||
import {SearchPageModule} from '../searchUtils/searchPage.module';
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule,
|
||||
DataProvidersServiceModule,
|
||||
SearchFormModule, SearchResultsModule, CompatibleDataProvidersRoutingModule, SearchPageModule
|
||||
|
||||
],
|
||||
declarations: [
|
||||
SearchCompatibleDataprovidersComponent
|
||||
],
|
||||
providers:[
|
||||
],
|
||||
exports: [
|
||||
SearchCompatibleDataprovidersComponent
|
||||
]
|
||||
})
|
||||
export class CompatibleDataProvidersModule { }
|
|
@ -0,0 +1,14 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
|
||||
import{SearchEntityRegistriesComponent} from './entityRegistries.component';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{ path: '', component: SearchEntityRegistriesComponent }
|
||||
|
||||
])
|
||||
]
|
||||
})
|
||||
export class EntityRegistriesRoutingModule { }
|
|
@ -9,7 +9,7 @@ import {OpenaireProperties, ErrorCodes} from '../../utils/properties/openairePro
|
|||
import {SearchFields} from '../../utils/properties/searchFields';
|
||||
import {SearchPageComponent } from '../searchUtils/searchPage.component';
|
||||
import {SearchUtilsClass } from '../searchUtils/searchUtils.class';
|
||||
import {ExportCSVComponent} from '../../utils/exportCSV.component';
|
||||
import {ExportCSVComponent} from '../../utils/exportCSV.class';
|
||||
|
||||
@Component({
|
||||
selector: 'search-entity-registries',
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
import { NgModule} from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import{ EntityRegistriesRoutingModule} from './entityRegistries-routing.module';
|
||||
import{SearchEntityRegistriesComponent} from './entityRegistries.component';
|
||||
|
||||
import {SearchResultsModule } from '../searchUtils/searchResults.module';
|
||||
|
||||
import {DataProvidersServiceModule} from '../../services/dataProvidersService.module';
|
||||
import {SearchFormModule} from '../searchUtils/searchForm.module';
|
||||
import {SearchPageModule} from '../searchUtils/searchPage.module';
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule,
|
||||
DataProvidersServiceModule,
|
||||
SearchFormModule, SearchResultsModule, EntityRegistriesRoutingModule, SearchPageModule
|
||||
|
||||
],
|
||||
declarations: [
|
||||
SearchEntityRegistriesComponent
|
||||
],
|
||||
providers:[
|
||||
],
|
||||
exports: [
|
||||
SearchEntityRegistriesComponent
|
||||
]
|
||||
})
|
||||
export class EntityRegistriesModule { }
|
|
@ -0,0 +1,14 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
|
||||
import{SearchComponent} from './search.component';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{ path: '', component: SearchComponent }
|
||||
|
||||
])
|
||||
]
|
||||
})
|
||||
export class MainSearchRoutingModule { }
|
|
@ -0,0 +1,36 @@
|
|||
import { NgModule} from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import{MainSearchRoutingModule} from './mainSearch-routing.module';
|
||||
import{SearchComponent} from './search.component';
|
||||
|
||||
import {SearchResultsModule } from '../searchUtils/searchResults.module';
|
||||
|
||||
import {DataProvidersServiceModule} from '../../services/dataProvidersService.module';
|
||||
import {DatasetsServiceModule} from '../../services/datasetsService.module';
|
||||
import {ProjectsServiceModule} from '../../services/projectsService.module';
|
||||
import {PublicationsServiceModule} from '../../services/publicationsService.module';
|
||||
import {OrganizationsServiceModule} from '../../services/organizationsService.module';
|
||||
import {PeopleServiceModule} from '../../services/peopleService.module';
|
||||
import {BrowseEntitiesModule} from '../searchUtils/browseEntities.module';
|
||||
import {SearchFormModule} from '../searchUtils/searchForm.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule,
|
||||
DataProvidersServiceModule, DatasetsServiceModule, ProjectsServiceModule,
|
||||
PublicationsServiceModule, OrganizationsServiceModule, PeopleServiceModule,
|
||||
BrowseEntitiesModule, SearchFormModule, SearchResultsModule, MainSearchRoutingModule
|
||||
|
||||
],
|
||||
declarations: [
|
||||
SearchComponent
|
||||
],
|
||||
providers:[
|
||||
],
|
||||
exports: [
|
||||
SearchComponent
|
||||
]
|
||||
})
|
||||
export class MainSearchModule { }
|
|
@ -1,14 +1,15 @@
|
|||
import {Component, Input, Output, EventEmitter, ViewChild} from '@angular/core';
|
||||
import {Component, Input, Output, EventEmitter, ViewChild, ChangeDetectionStrategy, ViewEncapsulation} from '@angular/core';
|
||||
import {Observable} from 'rxjs/Observable';
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
import {Location} from '@angular/common';
|
||||
|
||||
import { SearchPublicationsComponent } from '../simple/searchPublications.component';
|
||||
import { SearchDataprovidersComponent } from '../simple/searchDataproviders.component';
|
||||
import { SearchProjectsComponent } from '../simple/searchProjects.component';
|
||||
import { SearchDatasetsComponent } from '../simple/searchDatasets.component';
|
||||
import { SearchOrganizationsComponent } from '../simple/searchOrganizations.component';
|
||||
import { SearchPeopleComponent } from '../simple/searchPeople.component';
|
||||
|
||||
import { FetchPublications } from '../../utils/fetchEntitiesClasses/fetchPublications.class';
|
||||
import { FetchDataproviders } from '../../utils/fetchEntitiesClasses/fetchDataproviders.class';
|
||||
import { FetchProjects } from '../../utils/fetchEntitiesClasses/fetchProjects.class';
|
||||
import { FetchDatasets } from '../../utils/fetchEntitiesClasses/fetchDatasets.class';
|
||||
import { FetchOrganizations } from '../../utils/fetchEntitiesClasses/fetchOrganizations.class';
|
||||
import { FetchPeople } from '../../utils/fetchEntitiesClasses/fetchPeople.class';
|
||||
|
||||
import {SearchPublicationsService} from '../../services/searchPublications.service';
|
||||
import {SearchDataprovidersService} from '../../services/searchDataproviders.service';
|
||||
|
@ -21,9 +22,10 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties';
|
|||
import {SearchFields} from '../../utils/properties/searchFields';
|
||||
|
||||
@Component({
|
||||
changeDetection: ChangeDetectionStrategy.Default,
|
||||
encapsulation: ViewEncapsulation.Emulated,
|
||||
selector: 'search-find',
|
||||
template: `
|
||||
|
||||
<div class="uk-margin-top">
|
||||
<div class="page-header">
|
||||
<h1>{{pageTitle}}</h1>
|
||||
|
@ -38,32 +40,32 @@ import {SearchFields} from '../../utils/properties/searchFields';
|
|||
<ul class="uk-tab uk-tab-left uk-width-large-1-5 uk-width-small-1-1 " data-uk-switcher="{connect:'#searchtabs'}">
|
||||
<li (click)="searchPublications()" >
|
||||
<a href="#pubsTab">
|
||||
Publications {{((keyword.length > 0)?'('+searchPublicationsComponent.searchUtils.totalResults+')':'')}}
|
||||
Publications {{((keyword.length > 0)?'('+fetchPublications.searchUtils.totalResults+')':'')}}
|
||||
</a>
|
||||
</li>
|
||||
<li (click)="searchDatasets()">
|
||||
<a href="#dataTab" (click)="searchDatasets()">
|
||||
Datasets {{((keyword.length > 0)?'('+searchDatasetsComponent.searchUtils.totalResults+')':'')}}
|
||||
Datasets {{((keyword.length > 0)?'('+fetchDatasets.searchUtils.totalResults+')':'')}}
|
||||
</a>
|
||||
</li>
|
||||
<li (click)="searchProjects()" >
|
||||
<a href="#projectsTab">
|
||||
Projects {{((keyword.length > 0)?'('+searchProjectsComponent.searchUtils.totalResults+')':'')}}
|
||||
Projects {{((keyword.length > 0)?'('+fetchProjects.searchUtils.totalResults+')':'')}}
|
||||
</a>
|
||||
</li>
|
||||
<li (click)="searchDataProviders()" >
|
||||
<a href="#dataProviderTab">
|
||||
Data Providers {{((keyword.length > 0)?'('+searchDataProvidersComponent.searchUtils.totalResults+')':'')}}
|
||||
Data Providers {{((keyword.length > 0)?'('+fetchDataproviders.searchUtils.totalResults+')':'')}}
|
||||
</a>
|
||||
</li>
|
||||
<li (click)="searchOrganizations()" >
|
||||
<a href="#organizationsTab" >
|
||||
Organizations {{((keyword.length > 0)?'('+searchOrganizationsComponent.searchUtils.totalResults+')':'')}}
|
||||
Organizations {{((keyword.length > 0)?'('+fetchOrganizations.searchUtils.totalResults+')':'')}}
|
||||
</a>
|
||||
</li>
|
||||
<li (click)="searchPeople()" >
|
||||
<a href="#peopleTab" >
|
||||
People {{((keyword.length > 0)?'('+searchPeopleComponent.searchUtils.totalResults+')':'')}}
|
||||
People {{((keyword.length > 0)?'('+fetchPeople.searchUtils.totalResults+')':'')}}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
@ -74,8 +76,8 @@ import {SearchFields} from '../../utils/properties/searchFields';
|
|||
<ul id="searchtabs" class="uk-switcher uk-margin-left uk-width-large-3-4 uk-width-small-1-1">
|
||||
<li id="pubsTab" class="uk-active">
|
||||
<div *ngIf = "keyword.length > 0" class ="uk-animation-fade">
|
||||
<div class = "uk-text-right" *ngIf = "searchPublicationsComponent.searchUtils.totalResults> 10" ><a [href] = "linkToSearchPublications" >View all {{searchPublicationsComponent.searchUtils.totalResults}} results</a></div>
|
||||
<search-result [(results)]="searchPublicationsComponent.results" [(status)]= "searchPublicationsComponent.status"></search-result>
|
||||
<div class = "uk-text-right" *ngIf = "fetchPublications.searchUtils.totalResults> 10" ><a [href] = "linkToSearchPublications" >View all {{fetchPublications.searchUtils.totalResults}} results</a></div>
|
||||
<search-result [(results)]="fetchPublications.results" [(status)]= "fetchPublications.status"></search-result>
|
||||
</div>
|
||||
<div *ngIf = "keyword.length == 0 && activeTab=='publications'" class ="uk-animation-fade" >
|
||||
<browse-entities entityName="publication" baseUrl="/search/find/publications" [refineFields]=searchFields.RESULT_REFINE_FIELDS></browse-entities>
|
||||
|
@ -83,8 +85,8 @@ import {SearchFields} from '../../utils/properties/searchFields';
|
|||
</li>
|
||||
<li id="dataTab">
|
||||
<div *ngIf = "keyword.length > 0" class ="uk-animation-fade">
|
||||
<div class = "uk-text-right" *ngIf = "searchDatasetsComponent.searchUtils.totalResults> 10" ><a [href] = "linkToSearchDatasets" >View all {{searchDatasetsComponent.searchUtils.totalResults}} results</a></div>
|
||||
<search-result [(results)]="searchDatasetsComponent.results" [(status)]= "searchDatasetsComponent.status"></search-result>
|
||||
<div class = "uk-text-right" *ngIf = "fetchDatasets.searchUtils.totalResults> 10" ><a [href] = "linkToSearchDatasets" >View all {{fetchDatasets.searchUtils.totalResults}} results</a></div>
|
||||
<search-result [(results)]="fetchDatasets.results" [(status)]= "fetchDatasets.status"></search-result>
|
||||
</div>
|
||||
<div *ngIf = "keyword.length == 0 && activeTab=='datasets'" class ="uk-animation-fade">
|
||||
<browse-entities entityName="dataset" baseUrl="/search/find/datasets" [refineFields]=searchFields.RESULT_REFINE_FIELDS></browse-entities>
|
||||
|
@ -92,8 +94,8 @@ import {SearchFields} from '../../utils/properties/searchFields';
|
|||
</li>
|
||||
<li id="projectsTab" >
|
||||
<div *ngIf = "keyword.length > 0" class ="uk-animation-fade">
|
||||
<div class = "uk-text-right" *ngIf = "searchProjectsComponent.searchUtils.totalResults> 10" ><a [href] = "linkToSearchProjects" >View all {{searchProjectsComponent.searchUtils.totalResults}} results</a></div>
|
||||
<search-result [(results)]="searchProjectsComponent.results" [(status)]= "searchProjectsComponent.status"></search-result>
|
||||
<div class = "uk-text-right" *ngIf = "fetchProjects.searchUtils.totalResults> 10" ><a [href] = "linkToSearchProjects" >View all {{fetchProjects.searchUtils.totalResults}} results</a></div>
|
||||
<search-result [(results)]="fetchProjects.results" [(status)]= "fetchProjects.status"></search-result>
|
||||
</div>
|
||||
<div *ngIf = "keyword.length == 0 && activeTab=='projects'" class ="uk-animation-fade">
|
||||
<browse-entities entityName="project" baseUrl="/search/find/projects" [refineFields]=searchFields.PROJECT_REFINE_FIELDS></browse-entities>
|
||||
|
@ -101,8 +103,8 @@ import {SearchFields} from '../../utils/properties/searchFields';
|
|||
</li>
|
||||
<li id="dataProviderTab">
|
||||
<div *ngIf = "keyword.length > 0" class ="uk-animation-fade">
|
||||
<div class = "uk-text-right" *ngIf = "searchDataProvidersComponent.searchUtils.totalResults> 10" ><a [href] = "linkToSearchDataproviders" >View all {{searchDataProvidersComponent.searchUtils.totalResults}} results</a></div>
|
||||
<search-result [(results)]="searchDataProvidersComponent.results" [(status)]= "searchDataProvidersComponent.status"></search-result>
|
||||
<div class = "uk-text-right" *ngIf = "fetchDataproviders.searchUtils.totalResults> 10" ><a [href] = "linkToSearchDataproviders" >View all {{fetchDataproviders.searchUtils.totalResults}} results</a></div>
|
||||
<search-result [(results)]="fetchDataproviders.results" [(status)]= "fetchDataproviders.status"></search-result>
|
||||
</div>
|
||||
<div *ngIf = "keyword.length == 0 && activeTab=='dataproviders'" class ="uk-animation-fade" >
|
||||
<browse-entities entityName="dataprovider" baseUrl="/search/find/dataproviders" [refineFields]=searchFields.DATASOURCE_REFINE_FIELDS></browse-entities>
|
||||
|
@ -110,8 +112,8 @@ import {SearchFields} from '../../utils/properties/searchFields';
|
|||
</li>
|
||||
<li id="organizationsTab" >
|
||||
<div *ngIf = "keyword.length > 0" class ="uk-animation-fade">
|
||||
<div class = "uk-text-right" *ngIf = "searchOrganizationsComponent.searchUtils.totalResults> 10" ><a [href] = "linkToSearchOrganizations" >View all {{searchOrganizationsComponent.searchUtils.totalResults}} results</a></div>
|
||||
<search-result [(results)]="searchOrganizationsComponent.results" [(status)]= "searchOrganizationsComponent.status"></search-result>
|
||||
<div class = "uk-text-right" *ngIf = "fetchOrganizations.searchUtils.totalResults> 10" ><a [href] = "linkToSearchOrganizations" >View all {{fetchOrganizations.searchUtils.totalResults}} results</a></div>
|
||||
<search-result [(results)]="fetchOrganizations.results" [(status)]= "fetchOrganizations.status"></search-result>
|
||||
</div>
|
||||
<div *ngIf = "keyword.length == 0 && activeTab=='organizations'" class ="uk-animation-fade">
|
||||
<browse-entities entityName="organization" baseUrl="/search/find/organizations" [refineFields]=searchFields.ORGANIZATION_REFINE_FIELDS></browse-entities>
|
||||
|
@ -119,8 +121,8 @@ import {SearchFields} from '../../utils/properties/searchFields';
|
|||
</li>
|
||||
<li id="peopleTab">
|
||||
<div *ngIf = "keyword.length > 0" class ="uk-animation-fade">
|
||||
<div class = "uk-text-right" *ngIf = "searchPeopleComponent.searchUtils.totalResults> 10" ><a [href] = "linkToSearchPeople" >View all {{searchPeopleComponent.searchUtils.totalResults}} results</a></div>
|
||||
<search-result [(results)]="searchPeopleComponent.results" [(status)]= "searchPeopleComponent.status"></search-result>
|
||||
<div class = "uk-text-right" *ngIf = "fetchPeople.searchUtils.totalResults> 10" ><a [href] = "linkToSearchPeople" >View all {{fetchPeople.searchUtils.totalResults}} results</a></div>
|
||||
<search-result [(results)]="fetchPeople.results" [(status)]= "fetchPeople.status"></search-result>
|
||||
</div>
|
||||
<div *ngIf = "keyword.length == 0 && activeTab=='people'" class ="uk-animation-fade">
|
||||
<div class="uk-alert uk-alert-info " role="alert">No person statistics found</div>
|
||||
|
@ -168,12 +170,12 @@ export class SearchComponent {
|
|||
public linkToSearchOrganizations = "";
|
||||
public linkToSearchPeople = "";
|
||||
|
||||
public searchPublicationsComponent : SearchPublicationsComponent;
|
||||
public searchDataProvidersComponent : SearchDataprovidersComponent;
|
||||
public searchProjectsComponent : SearchProjectsComponent;
|
||||
public searchDatasetsComponent: SearchDatasetsComponent;
|
||||
public searchOrganizationsComponent: SearchOrganizationsComponent;
|
||||
public searchPeopleComponent: SearchPeopleComponent;
|
||||
public fetchPublications : FetchPublications;
|
||||
public fetchDataproviders : FetchDataproviders;
|
||||
public fetchProjects : FetchProjects;
|
||||
public fetchDatasets: FetchDatasets;
|
||||
public fetchOrganizations: FetchOrganizations;
|
||||
public fetchPeople: FetchPeople;
|
||||
public searchFields:SearchFields = new SearchFields();
|
||||
|
||||
public subPub;public subData;public subProjects;public subOrg;public subPeople; public subDataPr;
|
||||
|
@ -185,12 +187,12 @@ public subPub;public subData;public subProjects;public subOrg;public subPeople;
|
|||
private _searchOrganizationsService: SearchOrganizationsService,
|
||||
private _searchPeopleService: SearchPeopleService,
|
||||
private location: Location ) {
|
||||
this.searchPublicationsComponent = new SearchPublicationsComponent(this.route, this._searchPublicationsService);
|
||||
this.searchDataProvidersComponent = new SearchDataprovidersComponent(this.route,this._searchDataprovidersService);
|
||||
this.searchProjectsComponent = new SearchProjectsComponent(this.route, this._searchProjectsService);
|
||||
this.searchDatasetsComponent = new SearchDatasetsComponent(this.route, this._searchDatasetsService);
|
||||
this.searchOrganizationsComponent = new SearchOrganizationsComponent(this.route, this._searchOrganizationsService);
|
||||
this.searchPeopleComponent = new SearchPeopleComponent(this.route, this._searchPeopleService);
|
||||
this.fetchPublications = new FetchPublications(this._searchPublicationsService);
|
||||
this.fetchDataproviders = new FetchDataproviders(this._searchDataprovidersService);
|
||||
this.fetchProjects = new FetchProjects(this._searchProjectsService);
|
||||
this.fetchDatasets = new FetchDatasets( this._searchDatasetsService);
|
||||
this.fetchOrganizations = new FetchOrganizations( this._searchOrganizationsService);
|
||||
this.fetchPeople = new FetchPeople(this._searchPeopleService);
|
||||
}
|
||||
|
||||
public ngOnInit() {
|
||||
|
@ -236,7 +238,7 @@ public subPub;public subData;public subProjects;public subOrg;public subPeople;
|
|||
this.activeTab = "publications";
|
||||
if(this.reloadPublications) {
|
||||
this.reloadPublications = false;
|
||||
this.searchPublicationsComponent.getResults(this.keyword, false, 1, 10);
|
||||
this.fetchPublications.getResultsByKeyword(this.keyword, 1, 10);
|
||||
this.linkToSearchPublications = OpenaireProperties.getLinkToSearchPublications() + "?keyword=" + this.keyword;
|
||||
}
|
||||
}
|
||||
|
@ -244,7 +246,7 @@ public subPub;public subData;public subProjects;public subOrg;public subPeople;
|
|||
this.activeTab = "datasets";
|
||||
if(this.reloadDatasets) {
|
||||
this.reloadDatasets = false;
|
||||
this.searchDatasetsComponent.getResults(this.keyword, false, 1, 10);
|
||||
this.fetchDatasets.getResultsByKeyword(this.keyword, 1, 10);
|
||||
this.linkToSearchDatasets = OpenaireProperties.getLinkToSearchDatasets() + "?keyword=" + this.keyword;
|
||||
}
|
||||
}
|
||||
|
@ -252,7 +254,7 @@ public subPub;public subData;public subProjects;public subOrg;public subPeople;
|
|||
this.activeTab = "projects";
|
||||
if(this.reloadProjects) {
|
||||
this.reloadProjects = false;
|
||||
this.searchProjectsComponent.getResults(this.keyword, false, 1, 10);
|
||||
this.fetchProjects.getResultsByKeyword(this.keyword, 1, 10);
|
||||
this.linkToSearchProjects = OpenaireProperties.getLinkToSearchProjects() + "?keyword=" + this.keyword;
|
||||
}
|
||||
}
|
||||
|
@ -260,7 +262,7 @@ public subPub;public subData;public subProjects;public subOrg;public subPeople;
|
|||
this.activeTab = "dataproviders";
|
||||
if(this.reloadDataproviders) {
|
||||
this.reloadDataproviders = false;
|
||||
this.searchDataProvidersComponent.getResults(this.keyword, false, 1, 10);
|
||||
this.fetchDataproviders.getResultsByKeyword(this.keyword, 1, 10);
|
||||
this.linkToSearchDataproviders = OpenaireProperties.getLinkToSearchDataProviders() + "?keyword=" + this.keyword;
|
||||
}
|
||||
}
|
||||
|
@ -268,7 +270,7 @@ public subPub;public subData;public subProjects;public subOrg;public subPeople;
|
|||
this.activeTab = "organizations";
|
||||
if(this.reloadOrganizations) {
|
||||
this.reloadOrganizations = false;
|
||||
this.searchOrganizationsComponent.getResults(this.keyword, false, 1, 10);
|
||||
this.fetchOrganizations.getResultsByKeyword(this.keyword, 1, 10);
|
||||
this.linkToSearchOrganizations = OpenaireProperties.getLinkToSearchOrganizations() + "?keyword=" + this.keyword;
|
||||
}
|
||||
}
|
||||
|
@ -276,7 +278,7 @@ public subPub;public subData;public subProjects;public subOrg;public subPeople;
|
|||
this.activeTab = "people";
|
||||
if(this.reloadPeople) {
|
||||
this.reloadPeople = false;
|
||||
this.searchPeopleComponent.getResults(this.keyword, false, 1, 10);
|
||||
this.fetchPeople.getResultsByKeyword(this.keyword, 1, 10);
|
||||
this.linkToSearchPeople = OpenaireProperties.getLinkToSearchPeople() + "?keyword=" + this.keyword;
|
||||
}
|
||||
}
|
||||
|
@ -311,7 +313,7 @@ public subPub;public subData;public subProjects;public subOrg;public subPeople;
|
|||
this.subPublicationsCount = this.route.queryParams.subscribe(params => {
|
||||
this.subPub = this._searchPublicationsService.numOfSearchPublications(this.keyword).subscribe(
|
||||
data => {
|
||||
this.searchPublicationsComponent.searchUtils.totalResults = data;
|
||||
this.fetchPublications.searchUtils.totalResults = data;
|
||||
},
|
||||
err => {
|
||||
console.log(err);
|
||||
|
@ -322,7 +324,7 @@ public subPub;public subData;public subProjects;public subOrg;public subPeople;
|
|||
this.subDatasetsCount = this.route.queryParams.subscribe(params => {
|
||||
this.subData = this._searchDatasetsService.numOfSearchDatasets(this.keyword).subscribe(
|
||||
data => {
|
||||
this.searchDatasetsComponent.searchUtils.totalResults = data;
|
||||
this.fetchDatasets.searchUtils.totalResults = data;
|
||||
},
|
||||
err => {
|
||||
console.log(err);
|
||||
|
@ -333,7 +335,7 @@ public subPub;public subData;public subProjects;public subOrg;public subPeople;
|
|||
this.subProjectsCount = this.route.queryParams.subscribe(params => {
|
||||
this.subProjects = this._searchProjectsService.numOfSearchProjects(this.keyword).subscribe(
|
||||
data => {
|
||||
this.searchProjectsComponent.searchUtils.totalResults = data;
|
||||
this.fetchProjects.searchUtils.totalResults = data;
|
||||
},
|
||||
err => {
|
||||
console.log(err);
|
||||
|
@ -341,12 +343,12 @@ public subPub;public subData;public subProjects;public subOrg;public subPeople;
|
|||
);
|
||||
})
|
||||
|
||||
this.searchDataProvidersComponent.getNumForSearch(this.keyword);
|
||||
this.fetchDataproviders.getNumForSearch(this.keyword);
|
||||
|
||||
this.subOrganizationsCount = this.route.queryParams.subscribe(params => {
|
||||
this.subOrg = this._searchOrganizationsService.numOfSearchOrganizations(this.keyword).subscribe(
|
||||
data => {
|
||||
this.searchOrganizationsComponent.searchUtils.totalResults = data;
|
||||
this.fetchOrganizations.searchUtils.totalResults = data;
|
||||
},
|
||||
err => {
|
||||
console.log(err);
|
||||
|
@ -357,7 +359,7 @@ public subPub;public subData;public subProjects;public subOrg;public subPeople;
|
|||
this.subPeopleCount = this.route.queryParams.subscribe(params => {
|
||||
this.subPeople = this._searchPeopleService.numOfSearchPeople(this.keyword).subscribe(
|
||||
data => {
|
||||
this.searchPeopleComponent.searchUtils.totalResults = data;
|
||||
this.fetchPeople.searchUtils.totalResults = data;
|
||||
},
|
||||
err => {
|
||||
console.log(err);
|
||||
|
|
|
@ -1,42 +0,0 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import { SearchComponent } from './find/search.component';
|
||||
import { SearchPublicationsComponent } from './simple/searchPublications.component';
|
||||
import { SearchDataprovidersComponent } from './simple/searchDataproviders.component';
|
||||
import { SearchProjectsComponent } from './simple/searchProjects.component';
|
||||
import { SearchDatasetsComponent } from './simple/searchDatasets.component';
|
||||
import { SearchOrganizationsComponent } from './simple/searchOrganizations.component';
|
||||
import { SearchPeopleComponent } from './simple/searchPeople.component';
|
||||
import { AdvancedSearchPublicationsComponent } from './advanced/advancedSearchPublications.component';
|
||||
import { AdvancedSearchDataProvidersComponent } from './advanced/advancedSearchDataProviders.component';
|
||||
import { AdvancedSearchProjectsComponent } from './advanced/advancedSearchProjects.component';
|
||||
import { AdvancedSearchDatasetsComponent } from './advanced/advancedSearchDatasets.component';
|
||||
import { AdvancedSearchPeopleComponent } from './advanced/advancedSearchPeople.component';
|
||||
import { AdvancedSearchOrganizationsComponent } from './advanced/advancedSearchOrganizations.component';
|
||||
import { SearchCompatibleDataprovidersComponent } from './dataProviders/compatibleDataProviders.component';
|
||||
import { SearchEntityRegistriesComponent } from './dataProviders/entityRegistries.component';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{ path: 'search/data-providers', component: SearchCompatibleDataprovidersComponent},
|
||||
{ path: 'search/entity-registries', component: SearchEntityRegistriesComponent},
|
||||
{ path: 'search/find', component: SearchComponent },
|
||||
// { path: 'search', component: SearchComponent },
|
||||
{ path: 'search/find/publications', component: SearchPublicationsComponent },
|
||||
{ path: 'search/find/dataproviders', component: SearchDataprovidersComponent },
|
||||
{ path: 'search/find/projects', component: SearchProjectsComponent },
|
||||
{ path: 'search/find/datasets', component: SearchDatasetsComponent },
|
||||
{ path: 'search/find/organizations', component: SearchOrganizationsComponent },
|
||||
{ path: 'search/find/people', component: SearchPeopleComponent },
|
||||
{ path: 'search/advanced/publications', component: AdvancedSearchPublicationsComponent },
|
||||
{ path: 'search/advanced/dataproviders', component: AdvancedSearchDataProvidersComponent },
|
||||
{ path: 'search/advanced/projects', component: AdvancedSearchProjectsComponent },
|
||||
{ path: 'search/advanced/datasets', component: AdvancedSearchDatasetsComponent },
|
||||
{ path: 'search/advanced/people', component: AdvancedSearchPeopleComponent },
|
||||
{ path: 'search/advanced/organizations', component: AdvancedSearchOrganizationsComponent },
|
||||
|
||||
])
|
||||
]
|
||||
})
|
||||
export class SearchRoutingModule { }
|
|
@ -1,104 +0,0 @@
|
|||
import { NgModule} from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import {UtilsModule} from '../utils/utils.module';
|
||||
import {ServicesModule} from '../services/services.module';
|
||||
|
||||
|
||||
import {Filter, Value} from './searchUtils/searchHelperClasses.class';
|
||||
import {SearchResult} from '../utils/entities/searchResult';
|
||||
|
||||
|
||||
import {AdvancedSearchPageComponent} from './searchUtils/advancedSearchPage.component';
|
||||
// import {SearchAllComponent} from '../searchAll/searchAll.component';//helpers
|
||||
import {SearchPageComponent} from './searchUtils/searchPage.component';
|
||||
import {SearchFormComponent} from './searchUtils/searchForm.component';
|
||||
import {SearchPagingComponent} from './searchUtils/searchPaging.component';
|
||||
import {SearchDownloadComponent} from './searchUtils/searchDownload.component';
|
||||
|
||||
import {BrowseEntitiesComponent} from './searchUtils/browseEntities.component';
|
||||
import {BrowseStatisticComponent} from './searchUtils/browseStatistic.component';
|
||||
|
||||
import {SearchResultComponent} from './searchUtils/searchResult.component';
|
||||
import {SearchFilterComponent} from './searchUtils/searchFilter.component';
|
||||
import {AdvancedSearchFormComponent} from './searchUtils/advancedSearchForm.component';
|
||||
import { SearchPublicationsComponent } from './simple/searchPublications.component';
|
||||
import { SearchDataprovidersComponent } from './simple/searchDataproviders.component';
|
||||
import { SearchProjectsComponent } from './simple/searchProjects.component';
|
||||
import {SearchDatasetsComponent} from './simple/searchDatasets.component';
|
||||
import {SearchOrganizationsComponent} from './simple/searchOrganizations.component';
|
||||
import {SearchPeopleComponent} from './simple/searchPeople.component';
|
||||
|
||||
import {SearchComponent} from './find/search.component';
|
||||
import {SearchCompatibleDataprovidersComponent} from './dataProviders/compatibleDataProviders.component';
|
||||
import {SearchEntityRegistriesComponent} from './dataProviders/entityRegistries.component';
|
||||
import {DatasourceTableViewComponent} from './dataProviders/datasourceTableView.component';
|
||||
//Advanced
|
||||
import { AdvancedSearchPublicationsComponent } from './advanced/advancedSearchPublications.component';
|
||||
import { AdvancedSearchDataProvidersComponent } from './advanced/advancedSearchDataProviders.component';
|
||||
import { AdvancedSearchProjectsComponent } from './advanced/advancedSearchProjects.component';
|
||||
import { AdvancedSearchDatasetsComponent } from './advanced/advancedSearchDatasets.component';
|
||||
import { AdvancedSearchPeopleComponent } from './advanced/advancedSearchPeople.component';
|
||||
import { AdvancedSearchOrganizationsComponent } from './advanced/advancedSearchOrganizations.component';
|
||||
|
||||
import { SearchRoutingModule } from './search-routing.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule,
|
||||
UtilsModule,
|
||||
ServicesModule,
|
||||
SearchRoutingModule
|
||||
|
||||
],
|
||||
declarations: [
|
||||
|
||||
AdvancedSearchPageComponent,
|
||||
// SearchAllComponent,
|
||||
SearchPageComponent,
|
||||
SearchFormComponent,
|
||||
SearchResultComponent,
|
||||
SearchFilterComponent,
|
||||
SearchPagingComponent,
|
||||
SearchDownloadComponent,
|
||||
AdvancedSearchFormComponent,
|
||||
SearchPublicationsComponent,
|
||||
AdvancedSearchPublicationsComponent, AdvancedSearchDataProvidersComponent, AdvancedSearchProjectsComponent,
|
||||
AdvancedSearchDatasetsComponent, AdvancedSearchPeopleComponent, AdvancedSearchOrganizationsComponent,
|
||||
SearchDataprovidersComponent,
|
||||
SearchComponent,
|
||||
SearchProjectsComponent,
|
||||
SearchCompatibleDataprovidersComponent,
|
||||
SearchEntityRegistriesComponent,
|
||||
DatasourceTableViewComponent,
|
||||
SearchDatasetsComponent,
|
||||
SearchOrganizationsComponent,
|
||||
SearchPeopleComponent,
|
||||
BrowseEntitiesComponent,
|
||||
BrowseStatisticComponent
|
||||
],
|
||||
|
||||
providers:[
|
||||
// SearchPublicationsService
|
||||
],
|
||||
exports: [
|
||||
// SearchAllComponent,
|
||||
AdvancedSearchPublicationsComponent,
|
||||
AdvancedSearchDataProvidersComponent,
|
||||
AdvancedSearchProjectsComponent,
|
||||
SearchPublicationsComponent,
|
||||
SearchProjectsComponent,
|
||||
SearchDataprovidersComponent,
|
||||
SearchDatasetsComponent,
|
||||
SearchOrganizationsComponent,
|
||||
SearchPeopleComponent,
|
||||
SearchComponent,
|
||||
SearchCompatibleDataprovidersComponent,
|
||||
SearchEntityRegistriesComponent,
|
||||
SearchResultComponent,
|
||||
BrowseEntitiesComponent,
|
||||
BrowseStatisticComponent
|
||||
]
|
||||
})
|
||||
export class SearchModule { }
|
|
@ -0,0 +1,25 @@
|
|||
import { NgModule} from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import{AdvancedSearchFormComponent} from './advancedSearchForm.component';
|
||||
import {EntitiesAutocompleteModule} from '../../utils/entitiesAutoComplete/entitiesAutoComplete.module';
|
||||
import {StaticAutocompleteModule} from '../../utils/staticAutoComplete/staticAutoComplete.module';
|
||||
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule, EntitiesAutocompleteModule, StaticAutocompleteModule
|
||||
],
|
||||
declarations: [
|
||||
AdvancedSearchFormComponent,
|
||||
],
|
||||
|
||||
providers:[
|
||||
],
|
||||
exports: [
|
||||
AdvancedSearchFormComponent
|
||||
|
||||
]
|
||||
})
|
||||
export class AdvancedSearchFormModule { }
|
|
@ -0,0 +1,28 @@
|
|||
import { NgModule} from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import{AdvancedSearchPageComponent} from './advancedSearchPage.component';
|
||||
import{SearchResultsModule} from './searchResults.module';
|
||||
import{LoadingModalModule} from '../../utils/modal/loadingModal.module';
|
||||
import {ReportsServiceModule} from '../../services/reportsService.module';
|
||||
import {SearchDownloadModule} from './searchDownload.module';
|
||||
import{SearchPagingModule} from './searchPaging.module';
|
||||
|
||||
import {AdvancedSearchFormModule} from '../searchUtils/advancedSearchForm.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule, SearchResultsModule, LoadingModalModule, ReportsServiceModule, SearchPagingModule, AdvancedSearchFormModule, SearchDownloadModule
|
||||
],
|
||||
declarations: [
|
||||
AdvancedSearchPageComponent,
|
||||
],
|
||||
|
||||
providers:[
|
||||
],
|
||||
exports: [
|
||||
AdvancedSearchPageComponent,
|
||||
]
|
||||
})
|
||||
export class AdvancedSearchPageModule { }
|
|
@ -0,0 +1,30 @@
|
|||
import { NgModule} from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { RouterModule } from '@angular/router';
|
||||
|
||||
import {RefineFieldResultsServiceModule} from '../../services/refineFieldResultsService.module';
|
||||
|
||||
import {BrowseEntitiesComponent} from './browseEntities.component';
|
||||
import {BrowseStatisticComponent} from './browseStatistic.component';
|
||||
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule,
|
||||
RefineFieldResultsServiceModule, RouterModule
|
||||
],
|
||||
declarations: [
|
||||
BrowseEntitiesComponent,
|
||||
BrowseStatisticComponent
|
||||
|
||||
],
|
||||
|
||||
providers:[
|
||||
],
|
||||
exports: [
|
||||
BrowseEntitiesComponent,
|
||||
BrowseStatisticComponent
|
||||
]
|
||||
})
|
||||
export class BrowseEntitiesModule { }
|
|
@ -9,7 +9,7 @@ import {OpenaireProperties, ErrorCodes} from '../../utils/properties/openairePro
|
|||
import {SearchFields} from '../../utils/properties/searchFields';
|
||||
import {SearchPageComponent } from '../searchUtils/searchPage.component';
|
||||
import {SearchUtilsClass} from '../searchUtils/searchUtils.class';
|
||||
|
||||
import {RouterHelper} from '../../utils/routerHelper.class';
|
||||
@Component({
|
||||
selector: 'browse-statistic',
|
||||
template: `
|
||||
|
@ -18,20 +18,22 @@ import {SearchUtilsClass} from '../searchUtils/searchUtils.class';
|
|||
<h4 class="tm-article-subtitle">{{filter.title}}</h4>
|
||||
<div *ngIf="filter.values.length == 0" class="uk-alert uk-alert-info" role="alert">No {{filter.title}} statistics found</div>
|
||||
<ul *ngIf="filter.values.length > 0 && !viewAll" class="uk-list uk-list-line ">
|
||||
<li *ngFor= "let value of filter.values.slice(0,5)"><a [href]="baseUrl+'?'+filter.filterId+'='+value.id">{{_formatName(value)}} ({{value.number}})</a></li>
|
||||
<li *ngFor= "let value of filter.values.slice(0,5)"><!--a [href]="baseUrl+'?'+filter.filterId+'='+value.id">{{_formatName(value)}} ({{value.number}})</a-->
|
||||
<a [queryParams]="routerHelper.createQueryParam(filter.filterId,value.id)" routerLinkActive="router-link-active" [routerLink]=baseUrl>{{_formatName(value)}} ({{value.number}})</a>
|
||||
</li>
|
||||
<li *ngIf= " filter.values.length > 5 && !viewAll " (click)="viewAll=true;">
|
||||
<span ><span class="uk-text-muted clickable">View more </span><a><i class="uk-icon-toggle-right"></i></a></span>
|
||||
</li>
|
||||
</ul>
|
||||
<ul *ngIf="filter.values.length > 0 && viewAll" class="uk-list uk-list-line searchFilterBoxValues">
|
||||
<li *ngFor= "let value of filter.values"><a [href]="baseUrl+'?'+filter.filterId+'='+value.id">{{_formatName(value)}} ({{value.number}})</a></li>
|
||||
<li *ngFor= "let value of filter.values"><!--a [href]="baseUrl+'?'+filter.filterId+'='+value.id">{{_formatName(value)}} ({{value.number}})</a-->
|
||||
<a [queryParams]="routerHelper.createQueryParam(filter.filterId,value.id)" routerLinkActive="router-link-active" [routerLink]=baseUrl>{{_formatName(value)}} ({{value.number}})</a>
|
||||
</li>
|
||||
<li *ngIf= " filter.values.length > 5 && viewAll " (click)="viewAll=false;">
|
||||
<span ><span class="uk-text-muted clickable">View less </span><a><i class="uk-icon-toggle-up"></i></a></span>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
`
|
||||
|
||||
})
|
||||
|
@ -41,7 +43,7 @@ export class BrowseStatisticComponent {
|
|||
@Input() public filter:any = "";
|
||||
private _maxCharacters = 30;
|
||||
public viewAll = false;
|
||||
|
||||
public routerHelper:RouterHelper = new RouterHelper();
|
||||
constructor () {
|
||||
|
||||
}
|
||||
|
@ -51,6 +53,7 @@ export class BrowseStatisticComponent {
|
|||
|
||||
}
|
||||
|
||||
|
||||
private _formatName(value){
|
||||
return (((value.name+" ("+value.number+")").length >this._maxCharacters)?(value.name.substring(0,(this._maxCharacters - (" ("+value.number+")").length - ('...').length))+"..."):value.name)
|
||||
}
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
import { NgModule} from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import {SearchDownloadComponent} from './searchDownload.component';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule
|
||||
],
|
||||
declarations: [
|
||||
SearchDownloadComponent
|
||||
],
|
||||
|
||||
providers:[
|
||||
],
|
||||
exports: [
|
||||
SearchDownloadComponent
|
||||
|
||||
]
|
||||
})
|
||||
export class SearchDownloadModule { }
|
|
@ -0,0 +1,22 @@
|
|||
import { NgModule} from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import{SearchFormComponent} from './searchForm.component';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule
|
||||
],
|
||||
declarations: [
|
||||
SearchFormComponent
|
||||
],
|
||||
|
||||
providers:[
|
||||
],
|
||||
exports: [
|
||||
SearchFormComponent
|
||||
|
||||
]
|
||||
})
|
||||
export class SearchFormModule { }
|
|
@ -0,0 +1,31 @@
|
|||
import { NgModule} from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import{SearchPageComponent} from './searchPage.component';
|
||||
import{SearchFormModule} from './searchForm.module';
|
||||
import{SearchResultsModule} from './searchResults.module';
|
||||
import{SearchFilterComponent} from './searchFilter.component';
|
||||
import{LoadingModalModule} from '../../utils/modal/loadingModal.module';
|
||||
import {ReportsServiceModule} from '../../services/reportsService.module';
|
||||
import{SearchPagingModule} from './searchPaging.module';
|
||||
import {SearchDownloadModule} from './searchDownload.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule, SearchFormModule, SearchResultsModule, LoadingModalModule, ReportsServiceModule, SearchPagingModule, SearchDownloadModule
|
||||
],
|
||||
declarations: [
|
||||
SearchPageComponent,
|
||||
SearchFilterComponent
|
||||
,
|
||||
],
|
||||
|
||||
providers:[
|
||||
],
|
||||
exports: [
|
||||
SearchPageComponent,
|
||||
SearchFilterComponent
|
||||
]
|
||||
})
|
||||
export class SearchPageModule { }
|
|
@ -0,0 +1,23 @@
|
|||
import { NgModule} from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import{SearchPagingComponent} from './searchPaging.component';
|
||||
import{PagingModule} from '../../utils/paging.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule, PagingModule
|
||||
],
|
||||
declarations: [
|
||||
SearchPagingComponent
|
||||
],
|
||||
|
||||
providers:[
|
||||
],
|
||||
exports: [
|
||||
SearchPagingComponent
|
||||
|
||||
]
|
||||
})
|
||||
export class SearchPagingModule { }
|
|
@ -5,8 +5,8 @@ import { ErrorCodes} from '../../utils/properties/openaireProperties';
|
|||
@Component({
|
||||
selector: 'search-result',
|
||||
template: `
|
||||
|
||||
<ul class="uk-list uk-list-line uk-margin">
|
||||
<!--div *ngIf="status == errorCodes.LOADING" class="uk-alert uk-alert-primary uk-animation-fade" role="alert">Loading...</div-->
|
||||
<div *ngIf="status == errorCodes.NONE" class="uk-alert uk-alert-primary uk-animation-fade" role="alert">No Results found</div>
|
||||
<div *ngIf="status == errorCodes.ERROR" class="uk-alert uk-alert-warning uk-animation-fade" role="alert">An Error Occured</div>
|
||||
<div *ngIf="status == errorCodes.NOT_AVAILABLE" class="uk-alert uk-alert-danger uk-animation-fade" role="alert">Service not available</div>
|
||||
|
@ -116,7 +116,6 @@ import { ErrorCodes} from '../../utils/properties/openaireProperties';
|
|||
Countries: {{result.countries}}
|
||||
</div>
|
||||
|
||||
<!--hr-->
|
||||
</li>
|
||||
</ul>
|
||||
`
|
||||
|
@ -136,5 +135,7 @@ export class SearchResultComponent {
|
|||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
console.info("Heeey!!");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
import { NgModule} from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import {SearchResult} from '../../utils/entities/searchResult';
|
||||
// import {SearchPagingComponent} from './searchPaging.component';
|
||||
// import {SearchDownloadComponent} from './searchDownload.component';
|
||||
import {SearchResultComponent} from './searchResult.component';
|
||||
// import{PagingModule} from '../../utils/paging.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule
|
||||
// ,PagingModule
|
||||
],
|
||||
declarations: [
|
||||
SearchResultComponent,
|
||||
// SearchPagingComponent,
|
||||
// SearchDownloadComponent,
|
||||
],
|
||||
|
||||
providers:[
|
||||
],
|
||||
exports: [
|
||||
// SearchPagingComponent,
|
||||
// SearchDownloadComponent,
|
||||
SearchResultComponent
|
||||
|
||||
]
|
||||
})
|
||||
export class SearchResultsModule { }
|
|
@ -0,0 +1,14 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
|
||||
import{SearchDataprovidersComponent} from './searchDataproviders.component';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{ path: '', component: SearchDataprovidersComponent }
|
||||
|
||||
])
|
||||
]
|
||||
})
|
||||
export class SearchDataProvidersRoutingModule { }
|
|
@ -0,0 +1,30 @@
|
|||
import { NgModule} from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import{ SearchDataProvidersRoutingModule} from './searchDataProviders-routing.module';
|
||||
import{SearchDataprovidersComponent} from './searchDataproviders.component';
|
||||
|
||||
import {SearchResultsModule } from '../searchUtils/searchResults.module';
|
||||
|
||||
import {DataProvidersServiceModule} from '../../services/dataProvidersService.module';
|
||||
import {SearchFormModule} from '../searchUtils/searchForm.module';
|
||||
import {SearchPageModule} from '../searchUtils/searchPage.module';
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule,
|
||||
|
||||
DataProvidersServiceModule,
|
||||
SearchFormModule, SearchResultsModule, SearchDataProvidersRoutingModule, SearchPageModule
|
||||
|
||||
],
|
||||
declarations: [
|
||||
SearchDataprovidersComponent
|
||||
],
|
||||
providers:[
|
||||
],
|
||||
exports: [
|
||||
SearchDataprovidersComponent
|
||||
]
|
||||
})
|
||||
export class SearchDataProvidersModule { }
|
|
@ -7,7 +7,7 @@ import {SearchResult} from '../../utils/entities/searchResult';
|
|||
import {OpenaireProperties, ErrorCodes} from '../../utils/properties/openaireProperties';
|
||||
import {SearchFields} from '../../utils/properties/searchFields';
|
||||
import {SearchPageComponent } from '../searchUtils/searchPage.component';
|
||||
import {ExportCSVComponent} from '../../utils/exportCSV.component';
|
||||
import {ExportCSVComponent} from '../../utils/exportCSV.class';
|
||||
import {SearchUtilsClass } from '../searchUtils/searchUtils.class';
|
||||
|
||||
@Component({
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
|
||||
import{SearchDatasetsComponent} from './searchDatasets.component';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{ path: '', component: SearchDatasetsComponent }
|
||||
|
||||
])
|
||||
]
|
||||
})
|
||||
export class SearchDatasetsRoutingModule { }
|
|
@ -0,0 +1,30 @@
|
|||
import { NgModule} from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import{ SearchDatasetsRoutingModule} from './searchDatasets-routing.module';
|
||||
import{SearchDatasetsComponent} from './searchDatasets.component';
|
||||
|
||||
import {SearchResultsModule } from '../searchUtils/searchResults.module';
|
||||
|
||||
import {DatasetsServiceModule} from '../../services/datasetsService.module';
|
||||
import {SearchFormModule} from '../searchUtils/searchForm.module';
|
||||
import {SearchPageModule} from '../searchUtils/searchPage.module';
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule,
|
||||
|
||||
DatasetsServiceModule,
|
||||
SearchFormModule, SearchResultsModule, SearchDatasetsRoutingModule, SearchPageModule
|
||||
|
||||
],
|
||||
declarations: [
|
||||
SearchDatasetsComponent
|
||||
],
|
||||
providers:[
|
||||
],
|
||||
exports: [
|
||||
SearchDatasetsComponent
|
||||
]
|
||||
})
|
||||
export class SearchDatasetsModule { }
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue