Software entity added (landing page, search pages, services) | software tab added in project landing page | Software added in navigation bar and in search/find page
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-portal/trunk@49483 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
076d095e10
commit
ac9857eb32
|
@ -13,7 +13,10 @@ export function getDatasetModule() {
|
||||||
return System.import('./landingPages/dataset/dataset.module' + (process.env.AOT ? '.ngfactory' : ''))
|
return System.import('./landingPages/dataset/dataset.module' + (process.env.AOT ? '.ngfactory' : ''))
|
||||||
.then(mod => mod[(process.env.AOT ? 'DatasetModuleNgFactory' : 'DatasetModule')]);
|
.then(mod => mod[(process.env.AOT ? 'DatasetModuleNgFactory' : 'DatasetModule')]);
|
||||||
}
|
}
|
||||||
|
export function getSoftwareModule() {
|
||||||
|
return System.import('./landingPages/software/software.module' + (process.env.AOT ? '.ngfactory' : ''))
|
||||||
|
.then(mod => mod[(process.env.AOT ? 'SoftwareModuleNgFactory' : 'SoftwareModule')]);
|
||||||
|
}
|
||||||
export function getProjectModule() {
|
export function getProjectModule() {
|
||||||
return System.import('./landingPages/project/project.module' + (process.env.AOT ? '.ngfactory' : ''))
|
return System.import('./landingPages/project/project.module' + (process.env.AOT ? '.ngfactory' : ''))
|
||||||
.then(mod => mod[(process.env.AOT ? 'ProjectModuleNgFactory' : 'ProjectModule')]);
|
.then(mod => mod[(process.env.AOT ? 'ProjectModuleNgFactory' : 'ProjectModule')]);
|
||||||
|
@ -58,6 +61,10 @@ export function getSearchDatasetsModule() {
|
||||||
return System.import('./searchPages/simple/searchDatasets.module' + (process.env.AOT ? '.ngfactory' : ''))
|
return System.import('./searchPages/simple/searchDatasets.module' + (process.env.AOT ? '.ngfactory' : ''))
|
||||||
.then(mod => mod[(process.env.AOT ? 'SearchDatasetsModuleNgFactory' : 'SearchDatasetsModule')]);
|
.then(mod => mod[(process.env.AOT ? 'SearchDatasetsModuleNgFactory' : 'SearchDatasetsModule')]);
|
||||||
}
|
}
|
||||||
|
export function getSearchSoftwareModule() {
|
||||||
|
return System.import('./searchPages/simple/searchSoftware.module' + (process.env.AOT ? '.ngfactory' : ''))
|
||||||
|
.then(mod => mod[(process.env.AOT ? 'SearchSoftwareModuleNgFactory' : 'SearchSoftwareModule')]);
|
||||||
|
}
|
||||||
export function getSearchProjectsModule() {
|
export function getSearchProjectsModule() {
|
||||||
return System.import('./searchPages/simple/searchProjects.module' + (process.env.AOT ? '.ngfactory' : ''))
|
return System.import('./searchPages/simple/searchProjects.module' + (process.env.AOT ? '.ngfactory' : ''))
|
||||||
.then(mod => mod[(process.env.AOT ? 'SearchProjectsModuleNgFactory' : 'SearchProjectsModule')]);
|
.then(mod => mod[(process.env.AOT ? 'SearchProjectsModuleNgFactory' : 'SearchProjectsModule')]);
|
||||||
|
@ -103,6 +110,10 @@ export function getAdvancedSearchDatasetsModule() {
|
||||||
return System.import('./searchPages/advanced/advancedSearchDatasets.module' + (process.env.AOT ? '.ngfactory' : ''))
|
return System.import('./searchPages/advanced/advancedSearchDatasets.module' + (process.env.AOT ? '.ngfactory' : ''))
|
||||||
.then(mod => mod[(process.env.AOT ? 'AdvancedSearchDatasetsModuleNgFactory' : 'AdvancedSearchDatasetsModule')]);
|
.then(mod => mod[(process.env.AOT ? 'AdvancedSearchDatasetsModuleNgFactory' : 'AdvancedSearchDatasetsModule')]);
|
||||||
}
|
}
|
||||||
|
export function getAdvancedSearchSoftwareModule() {
|
||||||
|
return System.import('./searchPages/advanced/advancedSearchSoftware.module' + (process.env.AOT ? '.ngfactory' : ''))
|
||||||
|
.then(mod => mod[(process.env.AOT ? 'AdvancedSearchSoftwareModuleNgFactory' : 'AdvancedSearchSoftwareModule')]);
|
||||||
|
}
|
||||||
export function getAdvancedSearchOrganizationsModule() {
|
export function getAdvancedSearchOrganizationsModule() {
|
||||||
return System.import('./searchPages/advanced/advancedSearchOrganizations.module' + (process.env.AOT ? '.ngfactory' : ''))
|
return System.import('./searchPages/advanced/advancedSearchOrganizations.module' + (process.env.AOT ? '.ngfactory' : ''))
|
||||||
.then(mod => mod[(process.env.AOT ? 'AdvancedSearchOrganizationsModuleNgFactory' : 'AdvancedSearchOrganizationsModule')]);
|
.then(mod => mod[(process.env.AOT ? 'AdvancedSearchOrganizationsModuleNgFactory' : 'AdvancedSearchOrganizationsModule')]);
|
||||||
|
@ -159,6 +170,7 @@ export function getReloadModule() {
|
||||||
{ path: 'home', loadChildren: getHomeModule},
|
{ path: 'home', loadChildren: getHomeModule},
|
||||||
{ path: 'search/publication', loadChildren: getPublicationModule },
|
{ path: 'search/publication', loadChildren: getPublicationModule },
|
||||||
{ path: 'search/dataset', loadChildren: getDatasetModule },
|
{ path: 'search/dataset', loadChildren: getDatasetModule },
|
||||||
|
{ path: 'search/software', loadChildren: getSoftwareModule },
|
||||||
{ path: 'search/organization', loadChildren: getOrganizationModule },
|
{ path: 'search/organization', loadChildren: getOrganizationModule },
|
||||||
{ path: 'search/project', loadChildren: getProjectModule },
|
{ path: 'search/project', loadChildren: getProjectModule },
|
||||||
{ path: 'search/dataprovider', loadChildren: getDataProviderModule },
|
{ path: 'search/dataprovider', loadChildren: getDataProviderModule },
|
||||||
|
@ -170,6 +182,7 @@ export function getReloadModule() {
|
||||||
{ path: 'search/find', loadChildren: getMainSearchModule },
|
{ path: 'search/find', loadChildren: getMainSearchModule },
|
||||||
{ path: 'search/find/publications', loadChildren: getSearchPublicationsModule },
|
{ path: 'search/find/publications', loadChildren: getSearchPublicationsModule },
|
||||||
{ path: 'search/find/datasets', loadChildren: getSearchDatasetsModule },
|
{ path: 'search/find/datasets', loadChildren: getSearchDatasetsModule },
|
||||||
|
{ path: 'search/find/software', loadChildren: getSearchSoftwareModule },
|
||||||
{ path: 'search/find/projects', loadChildren: getSearchProjectsModule },
|
{ path: 'search/find/projects', loadChildren: getSearchProjectsModule },
|
||||||
{ path: 'search/find/dataproviders', loadChildren: getSearchDataProvidersModule },
|
{ path: 'search/find/dataproviders', loadChildren: getSearchDataProvidersModule },
|
||||||
{ path: 'search/find/organizations', loadChildren: getSearchOrganizationsModule },
|
{ path: 'search/find/organizations', loadChildren: getSearchOrganizationsModule },
|
||||||
|
@ -181,6 +194,7 @@ export function getReloadModule() {
|
||||||
{ path: 'search/journals-table', loadChildren: getJournalsTableModule },
|
{ path: 'search/journals-table', loadChildren: getJournalsTableModule },
|
||||||
{ path: 'search/advanced/publications', loadChildren: getAdvancedSearchPublicationsModule },
|
{ path: 'search/advanced/publications', loadChildren: getAdvancedSearchPublicationsModule },
|
||||||
{ path: 'search/advanced/datasets', loadChildren: getAdvancedSearchDatasetsModule },
|
{ path: 'search/advanced/datasets', loadChildren: getAdvancedSearchDatasetsModule },
|
||||||
|
{ path: 'search/advanced/software', loadChildren: getAdvancedSearchSoftwareModule },
|
||||||
{ path: 'search/advanced/organizations', loadChildren: getAdvancedSearchOrganizationsModule },
|
{ path: 'search/advanced/organizations', loadChildren: getAdvancedSearchOrganizationsModule },
|
||||||
{ path: 'search/advanced/dataproviders', loadChildren: getAdvancedSearchDataProvidersModule },
|
{ path: 'search/advanced/dataproviders', loadChildren: getAdvancedSearchDataProvidersModule },
|
||||||
{ path: 'search/advanced/projects', loadChildren: getAdvancedSearchProjectsModule },
|
{ path: 'search/advanced/projects', loadChildren: getAdvancedSearchProjectsModule },
|
||||||
|
|
|
@ -94,6 +94,15 @@
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li (click)="activeTab='Software'; searchSoftwareInit()"
|
||||||
|
[class]="activeTab == 'Software'?'uk-active':''">
|
||||||
|
<a>
|
||||||
|
Software
|
||||||
|
<span class="uk-badge uk-badge-notification">
|
||||||
|
{{fetchSoftware.searchUtils.totalResults}}
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
<li (click)="activeTab='Statistics'; statsClicked=true"
|
<li (click)="activeTab='Statistics'; statsClicked=true"
|
||||||
[class]="activeTab == 'Statistics'?'uk-active':''">
|
[class]="activeTab == 'Statistics'?'uk-active':''">
|
||||||
<a>
|
<a>
|
||||||
|
@ -134,6 +143,15 @@
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li (click)="searchSoftwareInit(); activeTab='Software'"
|
||||||
|
[class]="activeTab == 'Software'?'uk-active':''">
|
||||||
|
<a>
|
||||||
|
Software
|
||||||
|
<span class="uk-badge uk-badge-notification">
|
||||||
|
{{fetchSoftware.searchUtils.totalResults}}
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
<li (click)="statsClicked=true; activeTab='Statistics'"
|
<li (click)="statsClicked=true; activeTab='Statistics'"
|
||||||
[class]="activeTab == 'Statistics'?'uk-active':''">
|
[class]="activeTab == 'Statistics'?'uk-active':''">
|
||||||
<a>
|
<a>
|
||||||
|
@ -202,6 +220,23 @@
|
||||||
</tab-result>
|
</tab-result>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div *ngIf="activeTab == 'Software'" class="uk-animation-fade">
|
||||||
|
<errorMessages [status]="[fetchSoftware.searchUtils.status]" [type]="'software'"></errorMessages>
|
||||||
|
|
||||||
|
<div *ngIf="fetchSoftware.searchUtils.totalResults > 0">
|
||||||
|
|
||||||
|
<div class = "uk-text-right" *ngIf = "fetchSoftware.searchUtils.totalResults > 10">
|
||||||
|
<a [queryParams]="routerHelper.createQueryParams(['project', 'pr'], [projectId, 'and'])"
|
||||||
|
routerLinkActive="router-link-active" [routerLink]="linkToSearchSoftware" class="uk-button uk-button-text">
|
||||||
|
View all {{fetchSoftware.searchUtils.totalResults}} results
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<tab-result [(results)]="fetchSoftware.results"
|
||||||
|
[(status)]= "fetchSoftware.searchUtils.status"
|
||||||
|
type="software" urlParam="softwareId">
|
||||||
|
</tab-result>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div *ngIf="activeTab == 'Statistics'" class="uk-animation-fade">
|
<div *ngIf="activeTab == 'Statistics'" class="uk-animation-fade">
|
||||||
<!--div *ngIf="fetchPublications.searchUtils.totalResults == 0 && fetchDatasets.searchUtils.totalResults == 0" class = "uk-alert uk-alert-primary">
|
<!--div *ngIf="fetchPublications.searchUtils.totalResults == 0 && fetchDatasets.searchUtils.totalResults == 0" class = "uk-alert uk-alert-primary">
|
||||||
No statistics available
|
No statistics available
|
||||||
|
|
|
@ -9,6 +9,8 @@ import { FetchPublications } from '../../utils/fetchEntitiesClasses/fetchPublica
|
||||||
import { SearchPublicationsService } from '../../services/searchPublications.service';
|
import { SearchPublicationsService } from '../../services/searchPublications.service';
|
||||||
import { FetchDatasets } from '../../utils/fetchEntitiesClasses/fetchDatasets.class';
|
import { FetchDatasets } from '../../utils/fetchEntitiesClasses/fetchDatasets.class';
|
||||||
import { SearchDatasetsService } from '../../services/searchDatasets.service';
|
import { SearchDatasetsService } from '../../services/searchDatasets.service';
|
||||||
|
import { FetchSoftware } from '../../utils/fetchEntitiesClasses/fetchSoftware.class';
|
||||||
|
import { SearchSoftwareService } from '../../services/searchSoftware.service';
|
||||||
|
|
||||||
import {ModalLoading} from '../../utils/modal/loading.component';
|
import {ModalLoading} from '../../utils/modal/loading.component';
|
||||||
|
|
||||||
|
@ -60,14 +62,17 @@ export class ProjectComponent{
|
||||||
// Active tab variable for responsiveness
|
// Active tab variable for responsiveness
|
||||||
public activeTab: string = "Publications";
|
public activeTab: string = "Publications";
|
||||||
|
|
||||||
// Request results for research data only the one time (first time tab is clicked)
|
// Request results for research data and software only the one time (first time tab is clicked)
|
||||||
private reloadDatasets: boolean = true;
|
private reloadDatasets: boolean = true;
|
||||||
|
private reloadSoftware: boolean = true;
|
||||||
|
|
||||||
// Variables for publications, research data tabs
|
// Variables for publications, research data, software tabs
|
||||||
public fetchPublications : FetchPublications;
|
public fetchPublications : FetchPublications;
|
||||||
public linkToSearchPublications = "";
|
public linkToSearchPublications = "";
|
||||||
public fetchDatasets : FetchDatasets;
|
public fetchDatasets : FetchDatasets;
|
||||||
public linkToSearchDatasets = "";
|
public linkToSearchDatasets = "";
|
||||||
|
public fetchSoftware: FetchSoftware;
|
||||||
|
public linkToSearchSoftware = "";
|
||||||
|
|
||||||
public routerHelper:RouterHelper = new RouterHelper();
|
public routerHelper:RouterHelper = new RouterHelper();
|
||||||
public errorCodes:ErrorCodes = new ErrorCodes();
|
public errorCodes:ErrorCodes = new ErrorCodes();
|
||||||
|
@ -82,6 +87,7 @@ export class ProjectComponent{
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private _searchPublicationsService: SearchPublicationsService,
|
private _searchPublicationsService: SearchPublicationsService,
|
||||||
private _searchDatasetsService: SearchDatasetsService,
|
private _searchDatasetsService: SearchDatasetsService,
|
||||||
|
private _searchSoftwareService: SearchSoftwareService,
|
||||||
private _reportsService: ReportsService, private _meta: Meta,
|
private _reportsService: ReportsService, private _meta: Meta,
|
||||||
private _router: Router) {
|
private _router: Router) {
|
||||||
this.updateUrl(OpenaireProperties.getBaseLink()+this._router.url);
|
this.updateUrl(OpenaireProperties.getBaseLink()+this._router.url);
|
||||||
|
@ -93,9 +99,10 @@ export class ProjectComponent{
|
||||||
this.statsClicked = false;
|
this.statsClicked = false;
|
||||||
this.fetchPublications = new FetchPublications( this._searchPublicationsService);
|
this.fetchPublications = new FetchPublications( this._searchPublicationsService);
|
||||||
this.fetchDatasets = new FetchDatasets(this._searchDatasetsService);
|
this.fetchDatasets = new FetchDatasets(this._searchDatasetsService);
|
||||||
|
this.fetchSoftware = new FetchSoftware(this._searchSoftwareService);
|
||||||
|
|
||||||
this.updateTitle("Project");
|
this.updateTitle("Project");
|
||||||
this.updateDescription("project, funding, open access, publications, research data");
|
this.updateDescription("project, funding, open access, publications, research data, software");
|
||||||
|
|
||||||
this.projectId = params['projectId'];
|
this.projectId = params['projectId'];
|
||||||
if(this.projectId){
|
if(this.projectId){
|
||||||
|
@ -122,6 +129,7 @@ export class ProjectComponent{
|
||||||
this.getProjectInfo(this.projectId);
|
this.getProjectInfo(this.projectId);
|
||||||
this.searchPublications();
|
this.searchPublications();
|
||||||
this.fetchDatasets.getNumForEntity("project", this.projectId);
|
this.fetchDatasets.getNumForEntity("project", this.projectId);
|
||||||
|
this.fetchSoftware.getNumForEntity("project", this.projectId);
|
||||||
}else{
|
}else{
|
||||||
this.showLoading = false;
|
this.showLoading = false;
|
||||||
this.warningMessage="No valid project id";
|
this.warningMessage="No valid project id";
|
||||||
|
@ -182,6 +190,12 @@ export class ProjectComponent{
|
||||||
//this.activeTab = "Research Data";
|
//this.activeTab = "Research Data";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private searchSoftware() {
|
||||||
|
this.fetchSoftware.getResultsForEntity("project", this.projectId, 1, 10);
|
||||||
|
this.linkToSearchSoftware = OpenaireProperties.getLinkToAdvancedSearchSoftware();
|
||||||
|
this.reloadSoftware = false;
|
||||||
|
}
|
||||||
|
|
||||||
public searchDatasetsInit() {
|
public searchDatasetsInit() {
|
||||||
console.info("searchDatasetsInit");
|
console.info("searchDatasetsInit");
|
||||||
if(this.reloadDatasets && this.fetchDatasets.searchUtils.totalResults > 0) {
|
if(this.reloadDatasets && this.fetchDatasets.searchUtils.totalResults > 0) {
|
||||||
|
@ -192,6 +206,13 @@ export class ProjectComponent{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public searchSoftwareInit() {
|
||||||
|
console.info("searchSoftwareInit");
|
||||||
|
if(this.reloadSoftware && this.fetchSoftware.searchUtils.totalResults > 0) {
|
||||||
|
this.searchSoftware();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private getProjectInfo (id:string) {
|
private getProjectInfo (id:string) {
|
||||||
this.warningMessage = '';
|
this.warningMessage = '';
|
||||||
this.errorMessage=""
|
this.errorMessage=""
|
||||||
|
|
|
@ -16,6 +16,7 @@ import {MetricsModule} from '../landing-utils/metrics.module';
|
||||||
import {ReportsServiceModule} from '../../services/reportsService.module';
|
import {ReportsServiceModule} from '../../services/reportsService.module';
|
||||||
import {PublicationsServiceModule} from '../../services/publicationsService.module';
|
import {PublicationsServiceModule} from '../../services/publicationsService.module';
|
||||||
import {DatasetsServiceModule} from '../../services/datasetsService.module';
|
import {DatasetsServiceModule} from '../../services/datasetsService.module';
|
||||||
|
import {SoftwareServiceModule} from '../../services/softwareService.module';
|
||||||
import {TabResultModule } from '../../searchPages/searchUtils/tabResult.module';
|
import {TabResultModule } from '../../searchPages/searchUtils/tabResult.module';
|
||||||
import { LandingModule } from '../landing-utils/landing.module';
|
import { LandingModule } from '../landing-utils/landing.module';
|
||||||
import {FreeGuard} from'../../login/freeGuard.guard';
|
import {FreeGuard} from'../../login/freeGuard.guard';
|
||||||
|
@ -26,7 +27,7 @@ import {IsRouteEnabled} from '../../error/isRouteEnabled.guard';
|
||||||
CommonModule, FormsModule, RouterModule, LandingModule,
|
CommonModule, FormsModule, RouterModule, LandingModule,
|
||||||
ProjectRoutingModule, LoadingModalModule, ErrorMessagesModule,
|
ProjectRoutingModule, LoadingModalModule, ErrorMessagesModule,
|
||||||
TabResultModule, IFrameModule, MetricsModule, ReportsServiceModule,
|
TabResultModule, IFrameModule, MetricsModule, ReportsServiceModule,
|
||||||
PublicationsServiceModule, DatasetsServiceModule, ProjectServiceModule
|
PublicationsServiceModule, DatasetsServiceModule, SoftwareServiceModule, ProjectServiceModule
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
ProjectComponent
|
ProjectComponent
|
||||||
|
|
|
@ -10,6 +10,7 @@ import {SearchResultsModule } from '../searchUtils/searchResults.module';
|
||||||
|
|
||||||
import {DataProvidersServiceModule} from '../../services/dataProvidersService.module';
|
import {DataProvidersServiceModule} from '../../services/dataProvidersService.module';
|
||||||
import {DatasetsServiceModule} from '../../services/datasetsService.module';
|
import {DatasetsServiceModule} from '../../services/datasetsService.module';
|
||||||
|
import {SoftwareServiceModule} from '../../services/softwareService.module';
|
||||||
import {ProjectsServiceModule} from '../../services/projectsService.module';
|
import {ProjectsServiceModule} from '../../services/projectsService.module';
|
||||||
import {PublicationsServiceModule} from '../../services/publicationsService.module';
|
import {PublicationsServiceModule} from '../../services/publicationsService.module';
|
||||||
import {OrganizationsServiceModule} from '../../services/organizationsService.module';
|
import {OrganizationsServiceModule} from '../../services/organizationsService.module';
|
||||||
|
@ -23,7 +24,7 @@ import {PreviousRouteRecorder} from '../../utils/piwik/previousRouteRecorder.gua
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule, FormsModule, RouterModule,
|
CommonModule, FormsModule, RouterModule,
|
||||||
DataProvidersServiceModule, DatasetsServiceModule, ProjectsServiceModule,
|
DataProvidersServiceModule, DatasetsServiceModule, SoftwareServiceModule, ProjectsServiceModule,
|
||||||
PublicationsServiceModule, OrganizationsServiceModule,
|
PublicationsServiceModule, OrganizationsServiceModule,
|
||||||
BrowseEntitiesModule, SearchFormModule, SearchResultsModule, MainSearchRoutingModule, PiwikServiceModule
|
BrowseEntitiesModule, SearchFormModule, SearchResultsModule, MainSearchRoutingModule, PiwikServiceModule
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<div class="uk-width-1-1 ">
|
<div class="uk-width-1-1 ">
|
||||||
<div class="uk-background-norepeat uk-background-cover uk-section uk-flex uk-flex-middle generalSearchForm">
|
<div class="uk-background-norepeat uk-background-cover uk-section uk-flex uk-flex-middle generalSearchForm">
|
||||||
<div class="uk-width-1-1">
|
<div class="uk-width-1-1">
|
||||||
<search-form [(keyword)]=keyword (keywordChange)="keywordChanged($event)" placeholderText="Search for research results, projects, content providers, organizations in OpenAIRE information space"></search-form>
|
<search-form [(keyword)]=keyword (keywordChange)="keywordChanged($event)" placeholderText="Search for research results, software, projects, content providers, organizations in OpenAIRE information space"></search-form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -29,6 +29,13 @@
|
||||||
|
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li *ngIf="showSoftware" (click)="searchSoftware()" [class]="activeTab == 'software'?'uk-active':''">
|
||||||
|
<a>
|
||||||
|
Software
|
||||||
|
<span [class]="(fetchSoftware.searchUtils.status != errorCodes.LOADING && keyword.length > 0)?'uk-badge uk-badge-notification':''"> {{((fetchSoftware.searchUtils.status != errorCodes.LOADING && keyword.length > 0)? fetchSoftware.searchUtils.totalResults :'')}}</span>
|
||||||
|
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
<li *ngIf="showProjects" (click)="searchProjects()" [class]="activeTab == 'projects'?'uk-active':''">
|
<li *ngIf="showProjects" (click)="searchProjects()" [class]="activeTab == 'projects'?'uk-active':''">
|
||||||
<a>
|
<a>
|
||||||
Projects
|
Projects
|
||||||
|
@ -70,6 +77,13 @@
|
||||||
<span *ngIf = "fetchDatasets.searchUtils.status != errorCodes.LOADING && keyword.length > 0" class="uk-badge uk-badge-notification"> {{((keyword.length > 0)? fetchDatasets.searchUtils.totalResults :'')}}</span>
|
<span *ngIf = "fetchDatasets.searchUtils.status != errorCodes.LOADING && keyword.length > 0" class="uk-badge uk-badge-notification"> {{((keyword.length > 0)? fetchDatasets.searchUtils.totalResults :'')}}</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li *ngIf="showSoftware" (click)="searchSoftware()" [class]="activeTab == 'software'?'uk-active':''">
|
||||||
|
<a>
|
||||||
|
Software
|
||||||
|
<span *ngIf = "fetchSoftware.searchUtils.status == errorCodes.LOADING && keyword.length > 0" class="uk-icon-spinner uk-icon-spin"></span>
|
||||||
|
<span *ngIf = "fetchSoftware.searchUtils.status != errorCodes.LOADING && keyword.length > 0" class="uk-badge uk-badge-notification"> {{((keyword.length > 0)? fetchSoftware.searchUtils.totalResults :'')}}</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
<li *ngIf="showProjects" (click)="searchProjects()" [class]="activeTab == 'projects'?'uk-active':''">
|
<li *ngIf="showProjects" (click)="searchProjects()" [class]="activeTab == 'projects'?'uk-active':''">
|
||||||
<a>
|
<a>
|
||||||
Projects
|
Projects
|
||||||
|
@ -138,6 +152,25 @@
|
||||||
<!--/li>
|
<!--/li>
|
||||||
<li-->
|
<li-->
|
||||||
</div>
|
</div>
|
||||||
|
<div *ngIf = "activeTab=='software' && showSoftware" >
|
||||||
|
<div *ngIf = "keyword.length > 0 && activeTab=='software'" class ="uk-animation-fade">
|
||||||
|
<div class = "uk-text-right" *ngIf = "fetchSoftware.searchUtils.totalResults> 10">
|
||||||
|
<a [queryParams]="routerHelper.createQueryParam('keyword', keyword)"
|
||||||
|
routerLinkActive="router-link-active" [routerLink]="linkToSearchSoftware" class="uk-button uk-button-text">
|
||||||
|
View all {{fetchSoftware.searchUtils.totalResults}} results
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<search-result [(results)]="fetchSoftware.results"
|
||||||
|
[(status)]= "fetchSoftware.searchUtils.status" showLoading = true
|
||||||
|
type="software" urlParam="softwareId">
|
||||||
|
</search-result>
|
||||||
|
</div>
|
||||||
|
<div *ngIf = "keyword.length == 0 && activeTab=='software'" class ="uk-animation-fade">
|
||||||
|
<browse-entities entityName="software" baseUrl="/search/find/software" [refineFields]=searchFields.RESULT_REFINE_FIELDS></browse-entities>
|
||||||
|
</div>
|
||||||
|
<!--/li>
|
||||||
|
<li-->
|
||||||
|
</div>
|
||||||
<div *ngIf = "activeTab=='projects' && showProjects">
|
<div *ngIf = "activeTab=='projects' && showProjects">
|
||||||
<div *ngIf = "keyword.length > 0 && activeTab=='projects'" class ="uk-animation-fade">
|
<div *ngIf = "keyword.length > 0 && activeTab=='projects'" class ="uk-animation-fade">
|
||||||
<div class = "uk-text-right" *ngIf = "fetchProjects.searchUtils.totalResults> 10">
|
<div class = "uk-text-right" *ngIf = "fetchProjects.searchUtils.totalResults> 10">
|
||||||
|
|
|
@ -9,12 +9,14 @@ import { FetchPublications } from '../../utils/fetchEntitiesClasses/fetchPublica
|
||||||
import { FetchDataproviders } from '../../utils/fetchEntitiesClasses/fetchDataproviders.class';
|
import { FetchDataproviders } from '../../utils/fetchEntitiesClasses/fetchDataproviders.class';
|
||||||
import { FetchProjects } from '../../utils/fetchEntitiesClasses/fetchProjects.class';
|
import { FetchProjects } from '../../utils/fetchEntitiesClasses/fetchProjects.class';
|
||||||
import { FetchDatasets } from '../../utils/fetchEntitiesClasses/fetchDatasets.class';
|
import { FetchDatasets } from '../../utils/fetchEntitiesClasses/fetchDatasets.class';
|
||||||
|
import { FetchSoftware } from '../../utils/fetchEntitiesClasses/fetchSoftware.class';
|
||||||
import { FetchOrganizations } from '../../utils/fetchEntitiesClasses/fetchOrganizations.class';
|
import { FetchOrganizations } from '../../utils/fetchEntitiesClasses/fetchOrganizations.class';
|
||||||
|
|
||||||
import {SearchPublicationsService} from '../../services/searchPublications.service';
|
import {SearchPublicationsService} from '../../services/searchPublications.service';
|
||||||
import {SearchDataprovidersService} from '../../services/searchDataproviders.service';
|
import {SearchDataprovidersService} from '../../services/searchDataproviders.service';
|
||||||
import {SearchProjectsService} from '../../services/searchProjects.service';
|
import {SearchProjectsService} from '../../services/searchProjects.service';
|
||||||
import {SearchDatasetsService} from '../../services/searchDatasets.service';
|
import {SearchDatasetsService} from '../../services/searchDatasets.service';
|
||||||
|
import {SearchSoftwareService} from '../../services/searchSoftware.service';
|
||||||
import {SearchOrganizationsService} from '../../services/searchOrganizations.service';
|
import {SearchOrganizationsService} from '../../services/searchOrganizations.service';
|
||||||
|
|
||||||
import {OpenaireProperties} from '../../utils/properties/openaireProperties';
|
import {OpenaireProperties} from '../../utils/properties/openaireProperties';
|
||||||
|
@ -35,6 +37,7 @@ export class SearchComponent {
|
||||||
public sub: any; piwiksub: any;
|
public sub: any; piwiksub: any;
|
||||||
public reloadPublications: boolean;
|
public reloadPublications: boolean;
|
||||||
public reloadDatasets: boolean;
|
public reloadDatasets: boolean;
|
||||||
|
public reloadSoftware: boolean;
|
||||||
public reloadProjects: boolean;
|
public reloadProjects: boolean;
|
||||||
public reloadDataproviders: boolean;
|
public reloadDataproviders: boolean;
|
||||||
public reloadOrganizations: boolean;
|
public reloadOrganizations: boolean;
|
||||||
|
@ -44,6 +47,7 @@ export class SearchComponent {
|
||||||
public keyword:string = "";
|
public keyword:string = "";
|
||||||
public publications:string[];
|
public publications:string[];
|
||||||
public datasets:string[];
|
public datasets:string[];
|
||||||
|
public software:string[];
|
||||||
public projectsTab:string[];
|
public projectsTab:string[];
|
||||||
public dataproviders:string[];
|
public dataproviders:string[];
|
||||||
public organizations:string[];
|
public organizations:string[];
|
||||||
|
@ -53,12 +57,14 @@ export class SearchComponent {
|
||||||
public linkToSearchProjects = "";
|
public linkToSearchProjects = "";
|
||||||
public linkToSearchDataproviders = "";
|
public linkToSearchDataproviders = "";
|
||||||
public linkToSearchDatasets = "";
|
public linkToSearchDatasets = "";
|
||||||
|
public linkToSearchSoftware = "";
|
||||||
public linkToSearchOrganizations = "";
|
public linkToSearchOrganizations = "";
|
||||||
|
|
||||||
public fetchPublications : FetchPublications;
|
public fetchPublications : FetchPublications;
|
||||||
public fetchDataproviders : FetchDataproviders;
|
public fetchDataproviders : FetchDataproviders;
|
||||||
public fetchProjects : FetchProjects;
|
public fetchProjects : FetchProjects;
|
||||||
public fetchDatasets: FetchDatasets;
|
public fetchDatasets: FetchDatasets;
|
||||||
|
public fetchSoftware: FetchSoftware;
|
||||||
public fetchOrganizations: FetchOrganizations;
|
public fetchOrganizations: FetchOrganizations;
|
||||||
|
|
||||||
public searchFields:SearchFields = new SearchFields();
|
public searchFields:SearchFields = new SearchFields();
|
||||||
|
@ -67,11 +73,13 @@ export class SearchComponent {
|
||||||
|
|
||||||
public publicationsSize:any = null;
|
public publicationsSize:any = null;
|
||||||
public datasetsSize:any = null;
|
public datasetsSize:any = null;
|
||||||
|
public softwareSize:any = null;
|
||||||
public fundersSize:any = null;
|
public fundersSize:any = null;
|
||||||
public projectsSize:any = null;
|
public projectsSize:any = null;
|
||||||
public datasourcesSize:any = null;
|
public datasourcesSize:any = null;
|
||||||
showPublications:boolean= false;
|
showPublications:boolean= false;
|
||||||
showDatasets:boolean= false;
|
showDatasets:boolean= false;
|
||||||
|
showSoftware:boolean=false;
|
||||||
showProjects:boolean= false;
|
showProjects:boolean= false;
|
||||||
showDataProviders:boolean= false;
|
showDataProviders:boolean= false;
|
||||||
showOrganizations:boolean= false;
|
showOrganizations:boolean= false;
|
||||||
|
@ -82,6 +90,7 @@ public subPub;public subData;public subProjects;public subOrg; public subDataPr;
|
||||||
private _searchDataprovidersService: SearchDataprovidersService,
|
private _searchDataprovidersService: SearchDataprovidersService,
|
||||||
private _searchProjectsService: SearchProjectsService,
|
private _searchProjectsService: SearchProjectsService,
|
||||||
private _searchDatasetsService: SearchDatasetsService,
|
private _searchDatasetsService: SearchDatasetsService,
|
||||||
|
private _searchSoftwareService: SearchSoftwareService,
|
||||||
private _searchOrganizationsService: SearchOrganizationsService,
|
private _searchOrganizationsService: SearchOrganizationsService,
|
||||||
private _refineFieldResultsService:RefineFieldResultsService,
|
private _refineFieldResultsService:RefineFieldResultsService,
|
||||||
private location: Location, private _meta: Meta,private _piwikService:PiwikService,
|
private location: Location, private _meta: Meta,private _piwikService:PiwikService,
|
||||||
|
@ -90,6 +99,7 @@ public subPub;public subData;public subProjects;public subOrg; public subDataPr;
|
||||||
this.fetchDataproviders = new FetchDataproviders(this._searchDataprovidersService);
|
this.fetchDataproviders = new FetchDataproviders(this._searchDataprovidersService);
|
||||||
this.fetchProjects = new FetchProjects(this._searchProjectsService);
|
this.fetchProjects = new FetchProjects(this._searchProjectsService);
|
||||||
this.fetchDatasets = new FetchDatasets( this._searchDatasetsService);
|
this.fetchDatasets = new FetchDatasets( this._searchDatasetsService);
|
||||||
|
this.fetchSoftware = new FetchSoftware(this._searchSoftwareService);
|
||||||
this.fetchOrganizations = new FetchOrganizations( this._searchOrganizationsService);
|
this.fetchOrganizations = new FetchOrganizations( this._searchOrganizationsService);
|
||||||
|
|
||||||
var description = "open access, research, scientific publication, European Commission, EC, FP7, ERC, Horizon 2020, H2020, search, projects ";
|
var description = "open access, research, scientific publication, European Commission, EC, FP7, ERC, Horizon 2020, H2020, search, projects ";
|
||||||
|
@ -117,7 +127,8 @@ public subPub;public subData;public subProjects;public subOrg; public subDataPr;
|
||||||
const entityThree = this.config.isEntityEnabled("project");
|
const entityThree = this.config.isEntityEnabled("project");
|
||||||
const entityFour = this.config.isEntityEnabled("organization");
|
const entityFour = this.config.isEntityEnabled("organization");
|
||||||
const entityFive = this.config.isEntityEnabled("datasource");
|
const entityFive = this.config.isEntityEnabled("datasource");
|
||||||
const example = Observable.zip(entityOne,entityTwo,entityThree,entityFour,entityFive);
|
const entitySix = this.config.isEntityEnabled("software");
|
||||||
|
const example = Observable.zip(entityOne,entityTwo,entityThree,entityFour,entityFive,entitySix);
|
||||||
|
|
||||||
//wait until all observables have emitted a value then emit all as an array
|
//wait until all observables have emitted a value then emit all as an array
|
||||||
this.sub = this.route.queryParams.subscribe(params => {
|
this.sub = this.route.queryParams.subscribe(params => {
|
||||||
|
@ -127,6 +138,7 @@ public subPub;public subData;public subProjects;public subOrg; public subDataPr;
|
||||||
this.showProjects = data[2];
|
this.showProjects = data[2];
|
||||||
this.showOrganizations = data[3];
|
this.showOrganizations = data[3];
|
||||||
this.showDataProviders = data[4];
|
this.showDataProviders = data[4];
|
||||||
|
this.showSoftware = data[5];
|
||||||
console.log(data)
|
console.log(data)
|
||||||
this.keyword = (params['keyword'])?params['keyword']:"";
|
this.keyword = (params['keyword'])?params['keyword']:"";
|
||||||
if(this.keyword !=null && this.keyword.length > 0){
|
if(this.keyword !=null && this.keyword.length > 0){
|
||||||
|
@ -138,6 +150,9 @@ public subPub;public subData;public subProjects;public subOrg; public subDataPr;
|
||||||
}else if(this.showDatasets){
|
}else if(this.showDatasets){
|
||||||
this.activeTab = "research data";
|
this.activeTab = "research data";
|
||||||
this.searchDatasets();
|
this.searchDatasets();
|
||||||
|
}else if(this.showSoftware){
|
||||||
|
this.activeTab = "software";
|
||||||
|
this.searchSoftware();
|
||||||
}else if(this.showProjects){
|
}else if(this.showProjects){
|
||||||
this.activeTab = "projects";
|
this.activeTab = "projects";
|
||||||
this.searchProjects();
|
this.searchProjects();
|
||||||
|
@ -198,15 +213,22 @@ public subPub;public subData;public subProjects;public subOrg; public subDataPr;
|
||||||
this.linkToSearchDatasets = OpenaireProperties.getLinkToSearchDatasets();// + "?keyword=" + this.keyword;
|
this.linkToSearchDatasets = OpenaireProperties.getLinkToSearchDatasets();// + "?keyword=" + this.keyword;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public searchSoftware() {
|
||||||
|
this.activeTab = "software";
|
||||||
|
if(this.reloadSoftware &&
|
||||||
|
( this.fetchSoftware.searchUtils.status == this.errorCodes.LOADING ||
|
||||||
|
this.fetchSoftware.searchUtils.status == this.errorCodes.DONE )) {
|
||||||
|
this.reloadSoftware = false;
|
||||||
|
this.fetchSoftware.getResultsByKeyword(this.keyword, 1, 10);
|
||||||
|
this.linkToSearchSoftware = OpenaireProperties.getLinkToSearchSoftware();// + "?keyword=" + this.keyword;
|
||||||
|
}
|
||||||
|
}
|
||||||
public searchProjects() {
|
public searchProjects() {
|
||||||
this.activeTab = "projects";
|
this.activeTab = "projects";
|
||||||
console.log("searchProjects");
|
|
||||||
if(this.reloadProjects &&
|
if(this.reloadProjects &&
|
||||||
this.fetchProjects.searchUtils.status != this.errorCodes.NONE &&
|
this.fetchProjects.searchUtils.status != this.errorCodes.NONE &&
|
||||||
this.fetchProjects.searchUtils.status != this.errorCodes.ERROR) {
|
this.fetchProjects.searchUtils.status != this.errorCodes.ERROR) {
|
||||||
this.reloadProjects = false;
|
this.reloadProjects = false;
|
||||||
console.log("do the search searchProjects");
|
|
||||||
|
|
||||||
this.fetchProjects.getResultsByKeyword(this.keyword, 1, 10);
|
this.fetchProjects.getResultsByKeyword(this.keyword, 1, 10);
|
||||||
this.linkToSearchProjects = OpenaireProperties.getLinkToSearchProjects();// + "?keyword=" + this.keyword;
|
this.linkToSearchProjects = OpenaireProperties.getLinkToSearchProjects();// + "?keyword=" + this.keyword;
|
||||||
}
|
}
|
||||||
|
@ -240,19 +262,22 @@ public subPub;public subData;public subProjects;public subOrg; public subDataPr;
|
||||||
this.location.go(location.pathname,"?keyword=" + this.keyword);
|
this.location.go(location.pathname,"?keyword=" + this.keyword);
|
||||||
this.reloadTabs();
|
this.reloadTabs();
|
||||||
if(this.activeTab == "publications") {
|
if(this.activeTab == "publications") {
|
||||||
this.searchPublications();
|
this.searchPublications();
|
||||||
}
|
}
|
||||||
if(this.activeTab == "projects") {
|
if(this.activeTab == "projects") {
|
||||||
this.searchProjects();
|
this.searchProjects();
|
||||||
}
|
}
|
||||||
if(this.activeTab == "content providers") {
|
if(this.activeTab == "content providers") {
|
||||||
this.searchDataProviders();
|
this.searchDataProviders();
|
||||||
}
|
}
|
||||||
if(this.activeTab == "research data") {
|
if(this.activeTab == "research data") {
|
||||||
this.searchDatasets();
|
this.searchDatasets();
|
||||||
|
}
|
||||||
|
if(this.activeTab == "software") {
|
||||||
|
this.searchSoftware();
|
||||||
}
|
}
|
||||||
if(this.activeTab == "organizations") {
|
if(this.activeTab == "organizations") {
|
||||||
this.searchOrganizations();
|
this.searchOrganizations();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.count();
|
this.count();
|
||||||
|
@ -294,6 +319,30 @@ public subPub;public subData;public subProjects;public subOrg; public subDataPr;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
if(this.activeTab != "software" && this.showSoftware){
|
||||||
|
this.fetchSoftware.searchUtils.status = this.errorCodes.LOADING;
|
||||||
|
this.fetchSoftware.results = [];
|
||||||
|
this.subData = this._searchSoftwareService.numOfSearchSoftware(this.keyword).subscribe(
|
||||||
|
data => {
|
||||||
|
this.fetchSoftware.searchUtils.totalResults = data;
|
||||||
|
this.fetchSoftware.searchUtils.status = this.errorCodes.DONE;
|
||||||
|
if(this.fetchSoftware.searchUtils.totalResults == 0) {
|
||||||
|
this.fetchSoftware.searchUtils.status = this.errorCodes.NONE;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
err => {
|
||||||
|
console.log(err);
|
||||||
|
if(err.status == '404') {
|
||||||
|
this.fetchSoftware.searchUtils.status = this.errorCodes.NOT_FOUND;
|
||||||
|
} else if(err.status == '500') {
|
||||||
|
this.fetchSoftware.searchUtils.status = this.errorCodes.ERROR;
|
||||||
|
} else {
|
||||||
|
this.fetchSoftware.searchUtils.status = this.errorCodes.NOT_AVAILABLE;
|
||||||
|
}
|
||||||
|
//this.fetchSoftware.searchUtils.status = this.errorCodes.ERROR;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
if(this.activeTab != "projects" && this.showProjects){
|
if(this.activeTab != "projects" && this.showProjects){
|
||||||
this.fetchProjects.searchUtils.status = this.errorCodes.LOADING;
|
this.fetchProjects.searchUtils.status = this.errorCodes.LOADING;
|
||||||
this.fetchProjects.results = [];
|
this.fetchProjects.results = [];
|
||||||
|
@ -340,6 +389,7 @@ public subPub;public subData;public subProjects;public subOrg; public subDataPr;
|
||||||
private reloadTabs() {
|
private reloadTabs() {
|
||||||
this.reloadPublications = true;
|
this.reloadPublications = true;
|
||||||
this.reloadDatasets = true;
|
this.reloadDatasets = true;
|
||||||
|
this.reloadSoftware = true;
|
||||||
this.reloadProjects = true;
|
this.reloadProjects = true;
|
||||||
this.reloadDataproviders = true;
|
this.reloadDataproviders = true;
|
||||||
this.reloadOrganizations = true;
|
this.reloadOrganizations = true;
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
<div class="uk-margin-top">
|
<div class="uk-margin-top">
|
||||||
<search-result [results]="results"
|
<search-result [results]="results"
|
||||||
[status]=searchUtils.status
|
[status]=searchUtils.status
|
||||||
[type]="entityType" [urlParam]="urlParam"
|
[type]="entityType"
|
||||||
[showLoading]="true">
|
[showLoading]="true">
|
||||||
</search-result>
|
</search-result>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -38,7 +38,6 @@ export class AdvancedSearchPageComponent {
|
||||||
public parameterNames:string[] =[];
|
public parameterNames:string[] =[];
|
||||||
public parameterValues:string[] =[];
|
public parameterValues:string[] =[];
|
||||||
|
|
||||||
public urlParam: string;
|
|
||||||
public baseURLWithParameters:string = '';
|
public baseURLWithParameters:string = '';
|
||||||
|
|
||||||
@Output() queryChange = new EventEmitter();
|
@Output() queryChange = new EventEmitter();
|
||||||
|
@ -54,7 +53,6 @@ export class AdvancedSearchPageComponent {
|
||||||
|
|
||||||
this.searchUtils.baseUrl = "/" + this.searchUtils.baseUrl;
|
this.searchUtils.baseUrl = "/" + this.searchUtils.baseUrl;
|
||||||
this.updateBaseUrlWithParameters();
|
this.updateBaseUrlWithParameters();
|
||||||
this.defineUrlParam();
|
|
||||||
if(OpenaireProperties.isPiwikTrackEnabled() && (typeof document !== 'undefined')){
|
if(OpenaireProperties.isPiwikTrackEnabled() && (typeof document !== 'undefined')){
|
||||||
this.piwiksub = this._piwikService.trackView(this.pageTitle).subscribe();
|
this.piwiksub = this._piwikService.trackView(this.pageTitle).subscribe();
|
||||||
}
|
}
|
||||||
|
@ -78,19 +76,6 @@ export class AdvancedSearchPageComponent {
|
||||||
updateUrl(url:string){
|
updateUrl(url:string){
|
||||||
this._meta.updateProperty("og:url", url);
|
this._meta.updateProperty("og:url", url);
|
||||||
}
|
}
|
||||||
private defineUrlParam() {
|
|
||||||
if(this.entityType == "publication") {
|
|
||||||
this.urlParam = "articleId";
|
|
||||||
} else if(this.entityType == "dataset") {
|
|
||||||
this.urlParam = "datasetId";
|
|
||||||
} else if(this.entityType == "project") {
|
|
||||||
this.urlParam = "projectId";
|
|
||||||
} else if(this.entityType == "organization") {
|
|
||||||
this.urlParam = "organizationId";
|
|
||||||
} else {
|
|
||||||
this.urlParam = "datasourceId";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public getSelectedFiltersFromUrl(params){
|
public getSelectedFiltersFromUrl(params){
|
||||||
for(var i=0; i< this.fieldIds.length ; i++){
|
for(var i=0; i< this.fieldIds.length ; i++){
|
||||||
|
|
|
@ -61,7 +61,6 @@ export class BrowseEntitiesComponent {
|
||||||
if(this.sub){
|
if(this.sub){
|
||||||
this.sub.unsubscribe();
|
this.sub.unsubscribe();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -87,7 +87,7 @@
|
||||||
<search-result *ngIf="!tableView"
|
<search-result *ngIf="!tableView"
|
||||||
[results]="results"
|
[results]="results"
|
||||||
[status]="searchUtils.status"
|
[status]="searchUtils.status"
|
||||||
[type]="entityType" [urlParam]="urlParam"
|
[type]="entityType"
|
||||||
[showLoading]="true">
|
[showLoading]="true">
|
||||||
</search-result>
|
</search-result>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -51,7 +51,6 @@ export class SearchPageComponent {
|
||||||
private baseURLWithParameters:string = '';
|
private baseURLWithParameters:string = '';
|
||||||
private sub: any; piwiksub: any;
|
private sub: any; piwiksub: any;
|
||||||
public countFilters= 0;
|
public countFilters= 0;
|
||||||
public urlParam: string;
|
|
||||||
public parameterNames:string[] =[];
|
public parameterNames:string[] =[];
|
||||||
public parameterValues:string[] =[];
|
public parameterValues:string[] =[];
|
||||||
public showUnknownFilters:boolean = false; // when a filter exists in query but has no results, so no filters returned from the query
|
public showUnknownFilters:boolean = false; // when a filter exists in query but has no results, so no filters returned from the query
|
||||||
|
@ -66,7 +65,6 @@ export class SearchPageComponent {
|
||||||
this.element.nativeElement.scrollIntoView();
|
this.element.nativeElement.scrollIntoView();
|
||||||
}
|
}
|
||||||
this.updateBaseUrlWithParameters(this.filters);
|
this.updateBaseUrlWithParameters(this.filters);
|
||||||
this.defineUrlParam();
|
|
||||||
this.updateTitle(this.pageTitle);
|
this.updateTitle(this.pageTitle);
|
||||||
this.updateDescription("Openaire, search, repositories, open access, type, content provider, funder, project, " + this.type + "," +this.pageTitle);
|
this.updateDescription("Openaire, search, repositories, open access, type, content provider, funder, project, " + this.type + "," +this.pageTitle);
|
||||||
if(typeof window !== 'undefined') {
|
if(typeof window !== 'undefined') {
|
||||||
|
@ -75,7 +73,6 @@ export class SearchPageComponent {
|
||||||
if(typeof document !== 'undefined' && OpenaireProperties.isPiwikTrackEnabled()){
|
if(typeof document !== 'undefined' && OpenaireProperties.isPiwikTrackEnabled()){
|
||||||
this.piwiksub = this._piwikService.trackView(this.pageTitle).subscribe();
|
this.piwiksub = this._piwikService.trackView(this.pageTitle).subscribe();
|
||||||
}
|
}
|
||||||
// console.info(this.entityType + " " + this.urlParam + this.type);
|
|
||||||
}
|
}
|
||||||
ngAfterViewChecked(){
|
ngAfterViewChecked(){
|
||||||
|
|
||||||
|
@ -103,19 +100,6 @@ export class SearchPageComponent {
|
||||||
updateUrl(url:string){
|
updateUrl(url:string){
|
||||||
this._meta.updateProperty("og:url", url);
|
this._meta.updateProperty("og:url", url);
|
||||||
}
|
}
|
||||||
private defineUrlParam() {
|
|
||||||
if(this.entityType == "publication") {
|
|
||||||
this.urlParam = "articleId";
|
|
||||||
} else if(this.entityType == "dataset") {
|
|
||||||
this.urlParam = "datasetId";
|
|
||||||
} else if(this.entityType == "project") {
|
|
||||||
this.urlParam = "projectId";
|
|
||||||
} else if(this.entityType == "organization") {
|
|
||||||
this.urlParam = "organizationId";
|
|
||||||
} else {
|
|
||||||
this.urlParam = "datasourceId";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public getQueryParametersFromUrl(params){
|
public getQueryParametersFromUrl(params){
|
||||||
// var parameters = "";
|
// var parameters = "";
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
<ul [class]="'uk-list uk-list-divider uk-margin '+custom_class">
|
<ul [class]="'uk-list uk-list-divider uk-margin '+custom_class">
|
||||||
<!--div *ngIf="status == errorCodes.NONE" class="uk-alert uk-alert-primary uk-animation-fade" role="alert">No Results found</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.ERROR" class="uk-alert uk-alert-warning uk-animation-fade" role="alert">An Error Occured</div>
|
||||||
|
@ -23,7 +22,7 @@
|
||||||
<span *ngIf="result['authors'] != undefined">
|
<span *ngIf="result['authors'] != undefined">
|
||||||
<span *ngFor="let author of result['authors'].slice(0,15)">
|
<span *ngFor="let author of result['authors'].slice(0,15)">
|
||||||
<!--a href="{{author['url']}}"-->
|
<!--a href="{{author['url']}}"-->
|
||||||
<a [queryParams]="routerHelper.createQueryParams(['author','au'],[quote(author['name']),'and'])" routerLinkActive="router-link-active" [routerLink]="'/search/advanced/'+type+'s'">
|
<a [queryParams]="routerHelper.createQueryParams(['author','au'],[quote(author['name']),'and'])" routerLinkActive="router-link-active" [routerLink]="linkToAdvancedSearchPage">
|
||||||
{{author['name']}};
|
{{author['name']}};
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import {Component, Input} from '@angular/core';
|
import {Component, Input} from '@angular/core';
|
||||||
import {SearchResult} from '../../utils/entities/searchResult';
|
import {SearchResult} from '../../utils/entities/searchResult';
|
||||||
import { ErrorCodes} from '../../utils/properties/openaireProperties';
|
import {OpenaireProperties, ErrorCodes} from '../../utils/properties/openaireProperties';
|
||||||
import {RouterHelper} from '../../utils/routerHelper.class';
|
import {RouterHelper} from '../../utils/routerHelper.class';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
@ -12,22 +12,41 @@ export class SearchResultComponent {
|
||||||
@Input() results: SearchResult[];
|
@Input() results: SearchResult[];
|
||||||
@Input() status: number;
|
@Input() status: number;
|
||||||
@Input() type: string;
|
@Input() type: string;
|
||||||
@Input() urlParam: string;
|
|
||||||
@Input() showLoading: boolean = false;
|
@Input() showLoading: boolean = false;
|
||||||
@Input() showSubjects: boolean = false;
|
@Input() showSubjects: boolean = false;
|
||||||
@Input() custom_class: string = "search-results";
|
@Input() custom_class: string = "search-results";
|
||||||
|
|
||||||
|
public urlParam: string;
|
||||||
|
public linkToAdvancedSearchPage: string;
|
||||||
public errorCodes:ErrorCodes = new ErrorCodes();
|
public errorCodes:ErrorCodes = new ErrorCodes();
|
||||||
public routerHelper:RouterHelper = new RouterHelper();
|
public routerHelper:RouterHelper = new RouterHelper();
|
||||||
public errorMessage: string = "No results found";
|
public errorMessage: string = "No results found";
|
||||||
constructor () {
|
|
||||||
|
|
||||||
|
constructor () {}
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
if(this.type == "publication") {
|
||||||
|
this.linkToAdvancedSearchPage = OpenaireProperties.getLinkToAdvancedSearchPublications();
|
||||||
|
this.urlParam = "articleId";
|
||||||
|
} else if(this.type == "dataset") {
|
||||||
|
this.linkToAdvancedSearchPage = OpenaireProperties.getLinkToAdvancedSearchDatasets();
|
||||||
|
this.urlParam = "datasetId";
|
||||||
|
} else if(this.type == "software") {
|
||||||
|
this.linkToAdvancedSearchPage = OpenaireProperties.getLinkToAdvancedSearchSoftware();
|
||||||
|
this.urlParam = "softwareId";
|
||||||
|
} else if(this.type == "project") {
|
||||||
|
this.linkToAdvancedSearchPage = OpenaireProperties.getLinkToAdvancedSearchProjects();
|
||||||
|
this.urlParam = "projectId";
|
||||||
|
} else if(this.type == "organization") {
|
||||||
|
this.linkToAdvancedSearchPage = OpenaireProperties.getLinkToAdvancedSearchOrganizations();
|
||||||
|
this.urlParam = "organizationId";
|
||||||
|
} else if(this.type == "dataprovider") {
|
||||||
|
this.linkToAdvancedSearchPage = OpenaireProperties.getLinkToAdvancedSearchDataProviders();
|
||||||
|
this.urlParam = "datasourceId";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {}
|
public quote(params: string):string {
|
||||||
|
return '"'+params+'"';
|
||||||
|
}
|
||||||
public quote(params: string):string {
|
|
||||||
return '"'+params+'"';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -331,8 +331,6 @@ export class SearchDatasetsService {
|
||||||
|
|
||||||
if(entity == "project") {
|
if(entity == "project") {
|
||||||
parameters = "projects/"+id+"/datasets/count";
|
parameters = "projects/"+id+"/datasets/count";
|
||||||
} else if(entity == "person") {
|
|
||||||
parameters = "people/"+id+"/datasets/count";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let url = OpenaireProperties.getSearchAPIURLLast()+parameters+"?format=json";
|
let url = OpenaireProperties.getSearchAPIURLLast()+parameters+"?format=json";
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
<ul class="uk-nav-sub">
|
<ul class="uk-nav-sub">
|
||||||
<li *ngIf="showPublications"><a routerLinkActive="uk-link" routerLink="/search/find/publications" class="uk-offcanvas-close custom-offcanvas-close">Publications</a></li>
|
<li *ngIf="showPublications"><a routerLinkActive="uk-link" routerLink="/search/find/publications" class="uk-offcanvas-close custom-offcanvas-close">Publications</a></li>
|
||||||
<li *ngIf="showDatasets"><a routerLinkActive="uk-link" routerLink="/search/find/datasets" class="uk-offcanvas-close custom-offcanvas-close">Research Data</a></li>
|
<li *ngIf="showDatasets"><a routerLinkActive="uk-link" routerLink="/search/find/datasets" class="uk-offcanvas-close custom-offcanvas-close">Research Data</a></li>
|
||||||
|
<li *ngIf="showSoftware"><a routerLinkActive="uk-link" routerLink="/search/find/software" class="uk-offcanvas-close custom-offcanvas-close">Software</a></li>
|
||||||
<li *ngIf="showProjects"><a routerLinkActive="uk-link" routerLink="/search/find/projects" class="uk-offcanvas-close custom-offcanvas-close">Projects</a></li>
|
<li *ngIf="showProjects"><a routerLinkActive="uk-link" routerLink="/search/find/projects" class="uk-offcanvas-close custom-offcanvas-close">Projects</a></li>
|
||||||
<li *ngIf="showDataProviders"><a routerLinkActive="uk-link" routerLink="/search/find/dataproviders" class="uk-offcanvas-close custom-offcanvas-close">Content Providers</a></li>
|
<li *ngIf="showDataProviders"><a routerLinkActive="uk-link" routerLink="/search/find/dataproviders" class="uk-offcanvas-close custom-offcanvas-close">Content Providers</a></li>
|
||||||
<li *ngIf="showOrganizations"><a routerLinkActive="uk-link" routerLink="/search/find/organizations" class="uk-offcanvas-close custom-offcanvas-close">Organizations</a></li>
|
<li *ngIf="showOrganizations"><a routerLinkActive="uk-link" routerLink="/search/find/organizations" class="uk-offcanvas-close custom-offcanvas-close">Organizations</a></li>
|
||||||
|
@ -115,6 +116,7 @@
|
||||||
<ul class="uk-nav uk-navbar-dropdown-nav">
|
<ul class="uk-nav uk-navbar-dropdown-nav">
|
||||||
<li *ngIf="showPublications"><a routerLinkActive="uk-link" routerLink="/search/find/publications">Publications</a></li>
|
<li *ngIf="showPublications"><a routerLinkActive="uk-link" routerLink="/search/find/publications">Publications</a></li>
|
||||||
<li *ngIf="showDatasets"><a routerLinkActive="uk-link" routerLink="/search/find/datasets">Research Data</a></li>
|
<li *ngIf="showDatasets"><a routerLinkActive="uk-link" routerLink="/search/find/datasets">Research Data</a></li>
|
||||||
|
<li *ngIf="showSoftware"><a routerLinkActive="uk-link" routerLink="/search/find/software">Software</a></li>
|
||||||
<li *ngIf="showProjects"><a routerLinkActive="uk-link" routerLink="/search/find/projects">Projects</a></li>
|
<li *ngIf="showProjects"><a routerLinkActive="uk-link" routerLink="/search/find/projects">Projects</a></li>
|
||||||
<li *ngIf="showDataProviders"><a routerLinkActive="uk-link" routerLink="/search/find/dataproviders">Content Providers</a></li>
|
<li *ngIf="showDataProviders"><a routerLinkActive="uk-link" routerLink="/search/find/dataproviders">Content Providers</a></li>
|
||||||
<li *ngIf="showOrganizations"><a routerLinkActive="uk-link" routerLink="/search/find/organizations">Organizations</a></li>
|
<li *ngIf="showOrganizations"><a routerLinkActive="uk-link" routerLink="/search/find/organizations">Organizations</a></li>
|
||||||
|
|
|
@ -16,6 +16,7 @@ export class NavigationBarComponent {
|
||||||
|
|
||||||
showPublications:boolean= false;
|
showPublications:boolean= false;
|
||||||
showDatasets:boolean= false;
|
showDatasets:boolean= false;
|
||||||
|
showSoftware:boolean=false;
|
||||||
showProjects:boolean= false;
|
showProjects:boolean= false;
|
||||||
showDataProviders:boolean= false;
|
showDataProviders:boolean= false;
|
||||||
showOrganizations:boolean= false;
|
showOrganizations:boolean= false;
|
||||||
|
@ -40,6 +41,7 @@ export class NavigationBarComponent {
|
||||||
});
|
});
|
||||||
this.config.isEntityEnabled("publication").subscribe(data => { this.showPublications = data;});
|
this.config.isEntityEnabled("publication").subscribe(data => { this.showPublications = data;});
|
||||||
this.config.isEntityEnabled("dataset").subscribe(data => { this.showDatasets = data;});
|
this.config.isEntityEnabled("dataset").subscribe(data => { this.showDatasets = data;});
|
||||||
|
this.config.isEntityEnabled("software").subscribe(data => { this.showSoftware = data;})
|
||||||
this.config.isEntityEnabled("project").subscribe(data => { this.showProjects = data;});
|
this.config.isEntityEnabled("project").subscribe(data => { this.showProjects = data;});
|
||||||
this.config.isEntityEnabled("organization").subscribe(data => { this.showOrganizations = data;});
|
this.config.isEntityEnabled("organization").subscribe(data => { this.showOrganizations = data;});
|
||||||
this.config.isEntityEnabled("datasource").subscribe(data => { this.showDataProviders = data;});
|
this.config.isEntityEnabled("datasource").subscribe(data => { this.showDataProviders = data;});
|
||||||
|
|
|
@ -16,6 +16,7 @@ export class OpenaireProperties {
|
||||||
private static searchLinkToDataProviders = "search/find/dataproviders";
|
private static searchLinkToDataProviders = "search/find/dataproviders";
|
||||||
private static searchLinkToProjects = "search/find/projects";
|
private static searchLinkToProjects = "search/find/projects";
|
||||||
private static searchLinkToDatasets = "search/find/datasets";
|
private static searchLinkToDatasets = "search/find/datasets";
|
||||||
|
private static searchLinkToSoftware = "search/find/software";
|
||||||
private static searchLinkToOrganizations = "search/find/organizations";
|
private static searchLinkToOrganizations = "search/find/organizations";
|
||||||
private static searchLinkToPeople = "search/find/people";
|
private static searchLinkToPeople = "search/find/people";
|
||||||
public static searchLinkToCompatibleDataProviders = "search/content-providers";
|
public static searchLinkToCompatibleDataProviders = "search/content-providers";
|
||||||
|
@ -29,6 +30,7 @@ export class OpenaireProperties {
|
||||||
public static searchLinkToAdvancedPublications = "search/advanced/publications";
|
public static searchLinkToAdvancedPublications = "search/advanced/publications";
|
||||||
public static searchLinkToAdvancedProjects = "search/advanced/projects";
|
public static searchLinkToAdvancedProjects = "search/advanced/projects";
|
||||||
public static searchLinkToAdvancedDatasets = "search/advanced/datasets";
|
public static searchLinkToAdvancedDatasets = "search/advanced/datasets";
|
||||||
|
public static searchLinkToAdvancedSoftware = "search/advanced/software";
|
||||||
public static searchLinkToAdvancedDataProviders = "search/advanced/dataproviders";
|
public static searchLinkToAdvancedDataProviders = "search/advanced/dataproviders";
|
||||||
public static searchLinkToAdvancedOrganizations = "search/advanced/organizations";
|
public static searchLinkToAdvancedOrganizations = "search/advanced/organizations";
|
||||||
public static searchLinkToAdvancedPeople = "search/advanced/people";
|
public static searchLinkToAdvancedPeople = "search/advanced/people";
|
||||||
|
@ -160,6 +162,9 @@ export class OpenaireProperties {
|
||||||
public static getLinkToSearchDatasets():string{
|
public static getLinkToSearchDatasets():string{
|
||||||
return this.baseSearchLink + this.searchLinkToDatasets;
|
return this.baseSearchLink + this.searchLinkToDatasets;
|
||||||
}
|
}
|
||||||
|
public static getLinkToSearchSoftware():string{
|
||||||
|
return this.baseSearchLink + this.searchLinkToSoftware;
|
||||||
|
}
|
||||||
public static getLinkToSearchOrganizations():string{
|
public static getLinkToSearchOrganizations():string{
|
||||||
return this.baseSearchLink + this.searchLinkToOrganizations;
|
return this.baseSearchLink + this.searchLinkToOrganizations;
|
||||||
}
|
}
|
||||||
|
@ -180,6 +185,9 @@ export class OpenaireProperties {
|
||||||
public static getLinkToAdvancedSearchDatasets():string{
|
public static getLinkToAdvancedSearchDatasets():string{
|
||||||
return this.baseSearchLink + this.searchLinkToAdvancedDatasets;
|
return this.baseSearchLink + this.searchLinkToAdvancedDatasets;
|
||||||
}
|
}
|
||||||
|
public static getLinkToAdvancedSearchSoftware():string{
|
||||||
|
return this.baseSearchLink + this.searchLinkToAdvancedSoftware;
|
||||||
|
}
|
||||||
public static getLinkToAdvancedSearchOrganizations():string{
|
public static getLinkToAdvancedSearchOrganizations():string{
|
||||||
return this.baseSearchLink + this.searchLinkToAdvancedOrganizations;
|
return this.baseSearchLink + this.searchLinkToAdvancedOrganizations;
|
||||||
}
|
}
|
||||||
|
@ -244,6 +252,8 @@ export class OpenaireProperties {
|
||||||
suffix="publications/";
|
suffix="publications/";
|
||||||
}else if(entityType == "dataset"){
|
}else if(entityType == "dataset"){
|
||||||
suffix="datasets/";
|
suffix="datasets/";
|
||||||
|
} else if(entityType == "software"){
|
||||||
|
suffix="software/";
|
||||||
}else if(entityType == "organization"){
|
}else if(entityType == "organization"){
|
||||||
suffix="organizations/";
|
suffix="organizations/";
|
||||||
}else if(entityType == "dataprovider"){
|
}else if(entityType == "dataprovider"){
|
||||||
|
|
|
@ -138,7 +138,7 @@ export class SearchFields {
|
||||||
constructor (){
|
constructor (){
|
||||||
}
|
}
|
||||||
getFieldName(fieldId:string,fieldType:string):string{
|
getFieldName(fieldId:string,fieldType:string):string{
|
||||||
if(fieldType == "publication" || fieldType == "dataset"){
|
if(fieldType == "publication" || fieldType == "dataset" || fieldType == "software"){
|
||||||
return this.RESULT_FIELDS[fieldId].name;
|
return this.RESULT_FIELDS[fieldId].name;
|
||||||
}else if(fieldType == "project"){
|
}else if(fieldType == "project"){
|
||||||
return this.PROJECT_FIELDS[fieldId].name;
|
return this.PROJECT_FIELDS[fieldId].name;
|
||||||
|
|
|
@ -357,6 +357,9 @@ color: #414141}
|
||||||
.datasetsSearchForm{
|
.datasetsSearchForm{
|
||||||
background-image: url('./search_data.jpg'); box-sizing: border-box; height: 250px;
|
background-image: url('./search_data.jpg'); box-sizing: border-box; height: 250px;
|
||||||
}
|
}
|
||||||
|
.softwareSearchForm{
|
||||||
|
background-image: url('./search_data.jpg'); box-sizing: border-box; height: 250px;
|
||||||
|
}
|
||||||
.datasourcesSearchForm, .compatibleDatasourcesSearchForm,
|
.datasourcesSearchForm, .compatibleDatasourcesSearchForm,
|
||||||
.compatibleDatasourcesTableSearchForm {
|
.compatibleDatasourcesTableSearchForm {
|
||||||
background-image: url('./providers_search.jpg'); box-sizing: border-box; height: 250px;
|
background-image: url('./providers_search.jpg'); box-sizing: border-box; height: 250px;
|
||||||
|
|
|
@ -11,9 +11,9 @@
|
||||||
**/
|
**/
|
||||||
export const routes: string[] = [
|
export const routes: string[] = [
|
||||||
'search/find', 'home',
|
'search/find', 'home',
|
||||||
'search/publication','search/project','search/dataset','search/dataprovider','search/organization',
|
'search/publication','search/project','search/dataset','search/software','search/dataprovider','search/organization',
|
||||||
'search/find/publications','search/find/projects','search/find/datasets','search/find/dataproviders','search/find/organizations',
|
'search/find/publications','search/find/projects','search/find/datasets','search/find/software','search/find/dataproviders','search/find/organizations',
|
||||||
'search/advanced/publications','search/advanced/projects','search/advanced/datasets','search/advanced/dataproviders','search/advanced/organizations',
|
'search/advanced/publications','search/advanced/projects','search/advanced/datasets','search/advanced/software','search/advanced/dataproviders','search/advanced/organizations',
|
||||||
'participate/deposit-publications','participate/deposit-datasets','participate/deposit-publications-result','participate/deposit-datasets-result', 'participate/deposit-subject-result',
|
'participate/deposit-publications','participate/deposit-datasets','participate/deposit-publications-result','participate/deposit-datasets-result', 'participate/deposit-subject-result',
|
||||||
'search/content-providers','search/content-providers-table','search/entity-registries','search/entity-registries-table','search/journals','search/journals-table',
|
'search/content-providers','search/content-providers-table','search/entity-registries','search/entity-registries-table','search/journals','search/journals-table',
|
||||||
'project-report', 'claims','myclaims','participate/claim', 'participate/direct-claim', 'claims-project-manager',
|
'project-report', 'claims','myclaims','participate/claim', 'participate/direct-claim', 'claims-project-manager',
|
||||||
|
|
Loading…
Reference in New Issue