Production release March 2024 [EXPLORE] #35
|
@ -17,7 +17,6 @@ import {HelperModule} from '../../../utils/helper/helper.module';
|
|||
import {Schema2jsonldModule} from '../../../sharedComponents/schema2jsonld/schema2jsonld.module';
|
||||
import { SEOServiceModule } from '../../../sharedComponents/SEO/SEOService.module';
|
||||
import {IndexInfoServiceModule} from "../../../utils/indexInfoService.module";
|
||||
import {PiwikServiceModule} from "../../../utils/piwik/piwikService.module";
|
||||
import {SearchInputModule} from '../../../sharedComponents/search-input/search-input.module';
|
||||
import {InputModule} from '../../../sharedComponents/input/input.module';
|
||||
import {LoadingModule} from '../../../utils/loading/loading.module';
|
||||
|
@ -30,7 +29,7 @@ import {link} from "../../../utils/icons/icons";
|
|||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule, RouterModule, ClaimServiceModule, LoadingModalModule, AlertModalModule,
|
||||
ClaimEntityFormatterModule, PagingModule, HelperModule, Schema2jsonldModule, SEOServiceModule, PiwikServiceModule,
|
||||
ClaimEntityFormatterModule, PagingModule, HelperModule, Schema2jsonldModule, SEOServiceModule,
|
||||
IndexInfoServiceModule, MatSelectModule, SearchInputModule, MatAutocompleteModule, MatChipsModule, MatFormFieldModule, MatSlideToggleModule, InputModule, LoadingModule, NoLoadPaging, IconsModule, DropdownFilterModule
|
||||
|
||||
],
|
||||
|
|
|
@ -3,9 +3,6 @@ import { NgModule } from '@angular/core';
|
|||
import { SharedModule } from '../../../openaireLibrary/shared/shared.module';
|
||||
import { ClaimsAdminComponent } from './claimsAdmin.component';
|
||||
import {DisplayClaimsModule} from '../claim-utils/displayClaims/displayClaims.module';
|
||||
import { AdminLoginGuard} from'../../login/adminLoginGuard.guard';
|
||||
import {PreviousRouteRecorder} from '../../utils/piwik/previousRouteRecorder.guard';
|
||||
import {IsRouteEnabled} from '../../error/isRouteEnabled.guard';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
|
@ -13,7 +10,7 @@ import {IsRouteEnabled} from '../../error/isRouteEnabled.guard';
|
|||
DisplayClaimsModule
|
||||
|
||||
],
|
||||
providers:[AdminLoginGuard, PreviousRouteRecorder,IsRouteEnabled],
|
||||
providers:[],
|
||||
declarations: [
|
||||
ClaimsAdminComponent
|
||||
],
|
||||
|
|
|
@ -5,9 +5,6 @@ import { DirectLinkingComponent } from './directLinking.component';
|
|||
|
||||
import {EntitySearchServiceModule} from '../../utils/entitiesAutoComplete/entitySearchService.module';
|
||||
import {SearchResearchResultsServiceModule} from '../../services/searchResearchResultsService.module';
|
||||
import {LoginGuard} from'../../login/loginGuard.guard';
|
||||
import {PreviousRouteRecorder} from '../../utils/piwik/previousRouteRecorder.guard';
|
||||
import {IsRouteEnabled} from '../../error/isRouteEnabled.guard';
|
||||
import {Schema2jsonldModule} from '../../sharedComponents/schema2jsonld/schema2jsonld.module';
|
||||
import { SEOServiceModule } from '../../sharedComponents/SEO/SEOService.module';
|
||||
import {LinkingGenericModule} from '../linking/linkingGeneric.module';
|
||||
|
@ -18,7 +15,7 @@ import {LinkingGenericModule} from '../linking/linkingGeneric.module';
|
|||
EntitySearchServiceModule, SearchResearchResultsServiceModule,
|
||||
Schema2jsonldModule, SEOServiceModule, LinkingGenericModule
|
||||
],
|
||||
providers:[LoginGuard, PreviousRouteRecorder, IsRouteEnabled],
|
||||
providers:[],
|
||||
declarations: [
|
||||
DirectLinkingComponent
|
||||
], exports:[DirectLinkingComponent]
|
||||
|
|
|
@ -269,11 +269,16 @@ export class BulkClaimComponent {
|
|||
}
|
||||
},
|
||||
err => {
|
||||
//console.log(err);
|
||||
// console.log(err);
|
||||
BulkClaimComponent.handleError("Error getting crossref by DOIs: " + id, err);
|
||||
this.notFoundIds.push(id);
|
||||
this.notFoundIdsRow.push(row);
|
||||
this.endOfFetching();
|
||||
|
||||
if(err.status == 404) {
|
||||
this.searchInDatacite(id, accessMode, date, row);
|
||||
} else {
|
||||
this.notFoundIds.push(id);
|
||||
this.notFoundIdsRow.push(row);
|
||||
this.endOfFetching();
|
||||
}
|
||||
}
|
||||
));
|
||||
}
|
||||
|
|
|
@ -7,20 +7,16 @@ import {SelectedContextsModule} from './selected/selectedContexts.module';
|
|||
import {SelectedPublicationsModule} from './selected/selectedResults.module';
|
||||
import {LinkingGenericComponent} from './linkingGeneric.component';
|
||||
import {StartOverModule} from '../claim-utils/startOver.module';
|
||||
import {LoginGuard} from '../../login/loginGuard.guard';
|
||||
import {PreviousRouteRecorder} from '../../utils/piwik/previousRouteRecorder.guard';
|
||||
import {ClaimContextSearchFormModule} from '../claim-utils/claimContextSearchForm.module';
|
||||
import {ClaimProjectsSearchFormModule} from '../claim-utils/claimProjectSearchForm.module';
|
||||
import {BulkClaimModule} from './bulkClaim/bulkClaim.module';
|
||||
import {ClaimResultSearchFormModule} from '../claim-utils/claimResultSearchForm.module';
|
||||
import {HelperModule} from '../../utils/helper/helper.module';
|
||||
import {IsRouteEnabled} from '../../error/isRouteEnabled.guard';
|
||||
import {Schema2jsonldModule} from '../../sharedComponents/schema2jsonld/schema2jsonld.module';
|
||||
import {SEOServiceModule} from '../../sharedComponents/SEO/SEOService.module';
|
||||
import {MetadataPreviewModule} from './selected/metadataPreview.module';
|
||||
import {ClaimEntitiesMetadataModule} from "./selected/ClaimEntitiesMetadata.module";
|
||||
import {AlertModalModule} from '../../utils/modal/alertModal.module';
|
||||
import {PiwikServiceModule} from "../../utils/piwik/piwikService.module";
|
||||
import {BreadcrumbsModule} from "../../utils/breadcrumbs/breadcrumbs.module";
|
||||
import {StepperModule} from "../../sharedComponents/stepper/stepper.module";
|
||||
import {IconsModule} from "../../utils/icons/icons.module";
|
||||
|
@ -34,10 +30,9 @@ import {link} from "../../utils/icons/icons";
|
|||
StartOverModule,
|
||||
ClaimContextSearchFormModule, ClaimProjectsSearchFormModule, BulkClaimModule, ClaimResultSearchFormModule,
|
||||
HelperModule, Schema2jsonldModule, SEOServiceModule, MetadataPreviewModule, ClaimEntitiesMetadataModule, AlertModalModule,
|
||||
PiwikServiceModule,
|
||||
MatSelectModule, BreadcrumbsModule, StepperModule, IconsModule
|
||||
],
|
||||
providers: [LoginGuard, PreviousRouteRecorder, IsRouteEnabled],
|
||||
providers: [],
|
||||
declarations: [
|
||||
LinkingGenericComponent
|
||||
], exports: [
|
||||
|
|
|
@ -3,9 +3,6 @@ import { NgModule } from '@angular/core';
|
|||
import { SharedModule } from '../../../openaireLibrary/shared/shared.module';
|
||||
import { MyClaimsComponent } from './myClaims.component';
|
||||
import {DisplayClaimsModule} from '../claim-utils/displayClaims/displayClaims.module';
|
||||
import {LoginGuard} from'../../login/loginGuard.guard';
|
||||
import {PreviousRouteRecorder} from '../../utils/piwik/previousRouteRecorder.guard';
|
||||
import {IsRouteEnabled} from '../../error/isRouteEnabled.guard';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
|
@ -13,7 +10,7 @@ import {IsRouteEnabled} from '../../error/isRouteEnabled.guard';
|
|||
DisplayClaimsModule
|
||||
|
||||
],
|
||||
providers:[LoginGuard, PreviousRouteRecorder, IsRouteEnabled],
|
||||
providers:[],
|
||||
declarations: [
|
||||
MyClaimsComponent
|
||||
], exports: [MyClaimsComponent]
|
||||
|
|
|
@ -15,9 +15,10 @@ import {LoadingModule} from "../../utils/loading/loading.module";
|
|||
|
||||
@NgModule({
|
||||
imports: [
|
||||
ClassesRoutingModule,
|
||||
CommonModule, RouterModule, FormsModule,
|
||||
AlertModalModule, ReactiveFormsModule, AdminToolServiceModule, InputModule,
|
||||
AdminTabsModule, PageContentModule, ClassesRoutingModule, SearchInputModule, IconsModule, LoadingModule
|
||||
AdminTabsModule, PageContentModule, SearchInputModule, IconsModule, LoadingModule
|
||||
],
|
||||
declarations: [DivIdsComponent],
|
||||
exports: [DivIdsComponent]
|
||||
|
|
|
@ -16,9 +16,10 @@ import {PageContentModule} from '../sharedComponents/page-content/page-content.m
|
|||
|
||||
@NgModule({
|
||||
imports: [
|
||||
ClassHelpContentFormRoutingModule,
|
||||
CommonModule, FormsModule, RouterModule,
|
||||
SafeHtmlPipeModule, CKEditorModule,
|
||||
AlertModalModule, ReactiveFormsModule, ClassHelpContentFormRoutingModule, AdminToolServiceModule, InputModule, MatSlideToggleModule, IconsModule, LoadingModule, PageContentModule
|
||||
AlertModalModule, ReactiveFormsModule, AdminToolServiceModule, InputModule, MatSlideToggleModule, IconsModule, LoadingModule, PageContentModule
|
||||
],
|
||||
declarations: [
|
||||
ClassContentFormComponent
|
||||
|
|
|
@ -19,8 +19,9 @@ import {PageContentModule} from '../sharedComponents/page-content/page-content.m
|
|||
|
||||
@NgModule({
|
||||
imports: [
|
||||
ClassHelpContentsRoutingModule,
|
||||
CommonModule, RouterModule, FormsModule, SafeHtmlPipeModule,
|
||||
AlertModalModule, ReactiveFormsModule, MatSlideToggleModule, AdminToolServiceModule, InputModule, ClassHelpContentsRoutingModule,
|
||||
AlertModalModule, ReactiveFormsModule, MatSlideToggleModule, AdminToolServiceModule, InputModule,
|
||||
SearchInputModule, IconsModule, LoadingModule, HTMLToStringPipeModule, PageContentModule
|
||||
],
|
||||
declarations: [
|
||||
|
|
|
@ -17,8 +17,9 @@ import {LogoUrlPipeModule} from "../../utils/pipes/logoUrlPipe.module";
|
|||
|
||||
@NgModule({
|
||||
imports: [
|
||||
EntitiesRoutingModule,
|
||||
CommonModule, RouterModule, FormsModule, AdminToolServiceModule,
|
||||
AlertModalModule, ReactiveFormsModule, MatSlideToggleModule, InputModule, PageContentModule, AdminTabsModule, EntitiesRoutingModule, SearchInputModule, IconsModule, LoadingModule, LogoUrlPipeModule
|
||||
AlertModalModule, ReactiveFormsModule, MatSlideToggleModule, InputModule, PageContentModule, AdminTabsModule, SearchInputModule, IconsModule, LoadingModule, LogoUrlPipeModule
|
||||
],
|
||||
declarations: [EntitiesComponent],
|
||||
exports: [EntitiesComponent]
|
||||
|
|
|
@ -16,9 +16,10 @@ import {MatSlideToggleModule} from "@angular/material/slide-toggle";
|
|||
|
||||
@NgModule({
|
||||
imports: [
|
||||
PageHelpContentFormRoutingModule,
|
||||
CommonModule, FormsModule, RouterModule,
|
||||
SafeHtmlPipeModule, CKEditorModule,
|
||||
AlertModalModule, ReactiveFormsModule, PageHelpContentFormRoutingModule, AdminToolServiceModule, InputModule, IconsModule, PageContentModule, LoadingModule, MatSlideToggleModule
|
||||
AlertModalModule, ReactiveFormsModule, AdminToolServiceModule, InputModule, IconsModule, PageContentModule, LoadingModule, MatSlideToggleModule
|
||||
],
|
||||
declarations: [PageContentFormComponent],
|
||||
exports: [PageContentFormComponent]
|
||||
|
|
|
@ -17,8 +17,9 @@ import {HTMLToStringPipeModule} from '../../utils/pipes/HTMLToStringPipe.module'
|
|||
|
||||
@NgModule({
|
||||
imports: [
|
||||
PageHelpContentsRoutingModule,
|
||||
CommonModule, RouterModule, FormsModule, SafeHtmlPipeModule,
|
||||
AlertModalModule, ReactiveFormsModule, MatSlideToggleModule, AdminToolServiceModule, InputModule, PageHelpContentsRoutingModule, PageContentModule,
|
||||
AlertModalModule, ReactiveFormsModule, MatSlideToggleModule, AdminToolServiceModule, InputModule, PageContentModule,
|
||||
SearchInputModule, IconsModule, LoadingModule, HTMLToStringPipeModule
|
||||
],
|
||||
declarations: [
|
||||
|
|
|
@ -18,8 +18,9 @@ import {LogoUrlPipeModule} from '../../utils/pipes/logoUrlPipe.module';
|
|||
|
||||
@NgModule({
|
||||
imports: [
|
||||
MenuRoutingModule,
|
||||
CommonModule, RouterModule, FormsModule, AdminToolServiceModule,
|
||||
AlertModalModule, ReactiveFormsModule, MatSlideToggleModule, InputModule, PageContentModule, AdminTabsModule, MenuRoutingModule, SearchInputModule, IconsModule, LoadingModule,
|
||||
AlertModalModule, ReactiveFormsModule, MatSlideToggleModule, InputModule, PageContentModule, AdminTabsModule, SearchInputModule, IconsModule, LoadingModule,
|
||||
TransitionGroupModule, LogoUrlPipeModule
|
||||
],
|
||||
declarations: [MenuComponent],
|
||||
|
|
|
@ -20,8 +20,9 @@ import {LogoUrlPipeModule} from "../../utils/pipes/logoUrlPipe.module";
|
|||
|
||||
@NgModule({
|
||||
imports: [
|
||||
PagesRoutingModule,
|
||||
CommonModule, RouterModule, FormsModule, AlertModalModule, ReactiveFormsModule, MatSlideToggleModule, AdminToolServiceModule, InputModule,
|
||||
MatAutocompleteModule, MatFormFieldModule, MatChipsModule, AdminTabsModule, PageContentModule, PagesRoutingModule, SearchInputModule, IconsModule, LoadingModule, LogoUrlPipeModule
|
||||
MatAutocompleteModule, MatFormFieldModule, MatChipsModule, AdminTabsModule, PageContentModule, SearchInputModule, IconsModule, LoadingModule, LogoUrlPipeModule
|
||||
],
|
||||
declarations: [PagesComponent],
|
||||
exports: [PagesComponent]
|
||||
|
|
|
@ -15,9 +15,10 @@ import {LoadingModule} from "../../utils/loading/loading.module";
|
|||
|
||||
@NgModule({
|
||||
imports: [
|
||||
PortalsRoutingModule,
|
||||
CommonModule, FormsModule, AlertModalModule,
|
||||
ReactiveFormsModule,
|
||||
RouterModule, AdminToolServiceModule, InputModule, AdminTabsModule, PageContentModule, PortalsRoutingModule, IconsModule, SearchInputModule, LoadingModule
|
||||
RouterModule, AdminToolServiceModule, InputModule, AdminTabsModule, PageContentModule, IconsModule, SearchInputModule, LoadingModule
|
||||
],
|
||||
declarations: [PortalsComponent],
|
||||
exports: [PortalsComponent]
|
||||
|
|
|
@ -141,8 +141,8 @@ export class SubscribersComponent implements OnInit, OnDestroy, OnChanges {
|
|||
this.createRoleModal.okButtonLeft = false;
|
||||
this.createRoleModal.okButtonText = 'create';
|
||||
this.roleFb = this.fb.group({
|
||||
name: this.fb.control(Role.mapType(this.type) + '.' + this.id, Validators.required),
|
||||
description: this.fb.control(Role.mapType(this.type) + ' ' + this.id, Validators.required)
|
||||
name: this.fb.control(Role.roleName(this.type, this.id), Validators.required),
|
||||
description: this.fb.control(Role.roleName(this.type, this.id), Validators.required)
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.roleFb.get('name').disable();
|
||||
|
|
|
@ -5,7 +5,6 @@ import { CommonModule } from '@angular/common';
|
|||
import { FormsModule } from '@angular/forms';
|
||||
import { RouterModule } from '@angular/router';
|
||||
|
||||
import {PiwikServiceModule} from '../utils/piwik/piwikService.module';
|
||||
import {HelperModule} from '../utils/helper/helper.module';
|
||||
import {Schema2jsonldModule} from '../sharedComponents/schema2jsonld/schema2jsonld.module';
|
||||
import { SEOServiceModule } from '../sharedComponents/SEO/SEOService.module';
|
||||
|
@ -18,7 +17,6 @@ import {FullScreenModalModule} from '../utils/modal/full-screen-modal/full-scree
|
|||
imports: [
|
||||
CommonModule, FormsModule,
|
||||
RouterModule,
|
||||
PiwikServiceModule,
|
||||
HelperModule,
|
||||
Schema2jsonldModule, SEOServiceModule, BreadcrumbsModule, SearchInputModule,
|
||||
FullScreenModalModule
|
||||
|
|
|
@ -9,7 +9,6 @@ import {SearchResultsModule } from '../searchPages/searchUtils/searchResults.mod
|
|||
|
||||
import {DataProvidersServiceModule} from '../services/dataProvidersService.module';
|
||||
import {SearchFormModule} from '../searchPages/searchUtils/searchForm.module';
|
||||
import {IsRouteEnabled} from '../error/isRouteEnabled.guard';
|
||||
import {SearchDataProvidersModule} from "../searchPages/searchDataProviders.module";
|
||||
import {BreadcrumbsModule} from "../utils/breadcrumbs/breadcrumbs.module";
|
||||
import {SearchInputModule} from "../sharedComponents/search-input/search-input.module";
|
||||
|
@ -25,7 +24,7 @@ import {SearchInputModule} from "../sharedComponents/search-input/search-input.m
|
|||
declarations: [
|
||||
SearchDataprovidersToDepositComponent
|
||||
],
|
||||
providers:[ IsRouteEnabled],
|
||||
providers:[],
|
||||
exports: [
|
||||
SearchDataprovidersToDepositComponent
|
||||
]
|
||||
|
|
|
@ -6,7 +6,9 @@ import {ConfigurationService} from '../utils/configuration/configuration.service
|
|||
import {ConnectHelper} from '../connect/connectHelper';
|
||||
import {properties} from "../../../environments/environment";
|
||||
|
||||
@Injectable()
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class IsRouteEnabled {
|
||||
|
||||
constructor(private router: Router,
|
||||
|
|
|
@ -2,13 +2,11 @@ import {CommonModule} from "@angular/common";
|
|||
import {NgModule} from "@angular/core";
|
||||
import {FormsModule} from "@angular/forms";
|
||||
import {RouterModule} from "@angular/router";
|
||||
import {PreviousRouteRecorder} from "../utils/piwik/previousRouteRecorder.guard";
|
||||
import {IconsModule} from "../utils/icons/icons.module";
|
||||
import {BreadcrumbsModule} from "../utils/breadcrumbs/breadcrumbs.module";
|
||||
import {Schema2jsonldModule} from "../sharedComponents/schema2jsonld/schema2jsonld.module";
|
||||
import {SearchInputModule} from "../sharedComponents/search-input/search-input.module";
|
||||
import {SEOServiceModule} from "../sharedComponents/SEO/SEOService.module";
|
||||
import {PiwikService} from "../utils/piwik/piwik.service";
|
||||
|
||||
import {FosRoutingModule} from './fos-routing.module';
|
||||
import {FosComponent} from './fos.component';
|
||||
|
@ -22,9 +20,7 @@ import {FosComponent} from './fos.component';
|
|||
declarations: [
|
||||
FosComponent
|
||||
],
|
||||
providers: [
|
||||
PreviousRouteRecorder, PiwikService
|
||||
],
|
||||
providers: [],
|
||||
exports: [
|
||||
FosComponent
|
||||
]
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import { PreviousRouteRecorder } from "../../utils/piwik/previousRouteRecorder.guard";
|
||||
import { DataProviderComponent } from "./dataProvider.component";
|
||||
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([{ path: '', component: DataProviderComponent, canDeactivate: [PreviousRouteRecorder] }])
|
||||
]
|
||||
})
|
||||
export class DataProviderRoutingModule { }
|
|
@ -36,10 +36,12 @@ import {ResultLandingUtilsModule} from "../landing-utils/resultLandingUtils.modu
|
|||
import {FullScreenModalModule} from '../../utils/modal/full-screen-modal/full-screen-modal.module';
|
||||
import {SafeHtmlPipeModule} from '../../utils/pipes/safeHTMLPipe.module';
|
||||
import {EntityActionsModule} from "../../utils/entity-actions/entity-actions.module";
|
||||
import {DataProviderRoutingModule} from "./dataProvider-routing.module";
|
||||
|
||||
@NgModule({
|
||||
imports:
|
||||
[CommonModule, FormsModule, RouterModule,
|
||||
DataProviderRoutingModule,
|
||||
IFrameModule, ErrorMessagesModule, LandingModule,
|
||||
DataProvidersServiceModule, ProjectsServiceModule, SearchResearchResultsServiceModule,
|
||||
PagingModule, Schema2jsonldModule, SEOServiceModule, ShowPublisherModule, HelperModule,
|
||||
|
|
|
@ -22,7 +22,7 @@ import {RouterHelper} from "../../utils/routerHelper.class";
|
|||
</ng-container>
|
||||
|
||||
<ng-container *ngIf="!inModal">
|
||||
<div *ngIf="properties.environment != 'production' && availableOn[0].fulltext" class="uk-flex uk-flex-middle"
|
||||
<div *ngIf="availableOn[0].fulltext" class="uk-flex uk-flex-middle"
|
||||
[ngClass]="isMobile ? 'uk-width-1-1' : 'uk-text-bolder'">
|
||||
<a [href]="availableOn[0].fulltext" target="_blank"
|
||||
class="uk-flex uk-flex-middle uk-button-link"
|
||||
|
@ -40,7 +40,7 @@ import {RouterHelper} from "../../utils/routerHelper.class";
|
|||
<icon [name]="availableOn[0].accessRightIcon" [flex]="true" [ratio]="(isMobile && usedBy == 'landing') ? 1 : 0.8"></icon>
|
||||
</span>
|
||||
<ng-container *ngIf="!isMobile">
|
||||
<a uk-tooltip="Source" target="_blank"
|
||||
<a target="_blank"
|
||||
class="uk-flex uk-flex-middle uk-flex-center uk-button-link uk-text-bolder">
|
||||
<span>{{sliceString(availableOn[0].downloadNames.join("; "), 20)}}</span>
|
||||
<span>
|
||||
|
@ -108,7 +108,7 @@ import {RouterHelper} from "../../utils/routerHelper.class";
|
|||
</a>
|
||||
<ng-template #elseBlock> {{instance.license}}</ng-template>
|
||||
</div>
|
||||
<div *ngIf="properties.environment != 'production' && instance.fulltext" class="uk-text-meta uk-text-truncate" uk-tooltip [title]="instance.fulltext">
|
||||
<div *ngIf="instance.fulltext" class="uk-text-meta uk-text-truncate" uk-tooltip [title]="instance.fulltext">
|
||||
Full-Text:
|
||||
<a *ngIf="isUrl(instance.fulltext); else elseBlock"
|
||||
[href]="instance.fulltext" target="_blank" class="custom-external uk-link-text">
|
||||
|
|
|
@ -118,8 +118,9 @@ import {RouterHelper} from "../../utils/routerHelper.class";
|
|||
<showPublisher *ngIf="publisher || journal" [publisher]="publisher" [journal]="journal"
|
||||
[properties]="properties"></showPublisher>
|
||||
<!-- data provider labels -->
|
||||
<ng-container *ngIf="compatibility && !(compatibility.info == 'not available' && type == 'service')">
|
||||
<span uk-tooltip title="Compatibility">
|
||||
<span *ngIf="compatibility && !(compatibility.info == 'not available' && type == 'service')">
|
||||
<span class="uk-text-meta uk-margin-xsmall-right">Compatibility:</span>
|
||||
<span>
|
||||
<a *ngIf="compatibility.id"
|
||||
[queryParams]="addEoscPrevInParams({datasourceId: compatibility.id})" routerLinkActive="router-link-active"
|
||||
[routerLink]="properties.searchLinkToDataProvider.split('?')[0]">
|
||||
|
@ -137,10 +138,11 @@ import {RouterHelper} from "../../utils/routerHelper.class";
|
|||
{{compatibility.name}}
|
||||
</span>
|
||||
</span>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="compatibilityString">
|
||||
<span uk-tooltip title="Compatibility">{{compatibilityString}}</span>
|
||||
</ng-container>
|
||||
</span>
|
||||
<span *ngIf="compatibilityString">
|
||||
<span class="uk-text-meta uk-margin-xsmall-right">Compatibility:</span>
|
||||
<span>{{compatibilityString}}</span>
|
||||
</span>
|
||||
<ng-container
|
||||
*ngIf="aggregationStatus && aggregationStatus.fulltexts && aggregationStatus.fulltexts > 0">
|
||||
<span>OpenAIRE Text Mining</span>
|
||||
|
@ -152,9 +154,9 @@ import {RouterHelper} from "../../utils/routerHelper.class";
|
|||
<span>Publicly funded</span>
|
||||
</ng-container>
|
||||
<!-- Projects -->
|
||||
<span *ngIf="projects && projects.length > 0"
|
||||
[attr.uk-tooltip]="projects.length > projectsLimit ? 'cls: uk-invisible' : 'pos: top; cls: uk-active'" title="Funded by">
|
||||
{{showInline ? projectNames.join(', ') : projectNames.slice(0, projectsLimit).join(', ')}}
|
||||
<span *ngIf="projects && projects.length > 0">
|
||||
<span class="uk-text-meta uk-margin-xsmall-right">Funded by:</span>
|
||||
<span>{{showInline ? projectNames.join(', ') : projectNames.slice(0, projectsLimit).join(', ')}}</span>
|
||||
<span *ngIf="projects.length > projectsLimit">
|
||||
<a *ngIf="!showInline" (click)="viewAllProjectsClick();" class="uk-background-muted custom-extra-entities">
|
||||
+{{projects.length - projectsLimit | number}} projects
|
||||
|
@ -166,9 +168,9 @@ import {RouterHelper} from "../../utils/routerHelper.class";
|
|||
</span>
|
||||
</span>
|
||||
<!-- Organizations -->
|
||||
<span *ngIf="organizations && organizations.length > 0"
|
||||
[attr.uk-tooltip]="organizations.length > organizationsLimit ? 'cls: uk-invisible' : 'pos: top; cls: uk-active'" title="Partners">
|
||||
{{showInline ? organizationNames.join(', ') : organizationNames.slice(0, organizationsLimit).join(', ')}}
|
||||
<span *ngIf="organizations && organizations.length > 0">
|
||||
<span class="uk-text-meta uk-margin-xsmall-right">Partners:</span>
|
||||
<span>{{showInline ? organizationNames.join(', ') : organizationNames.slice(0, organizationsLimit).join(', ')}}</span>
|
||||
<span *ngIf="organizations.length > organizationsLimit">
|
||||
<a *ngIf="!showInline" (click)="viewAllPartnersClick();" class="uk-background-muted custom-extra-entities">
|
||||
+{{organizations.length - organizationsLimit | number}} partners
|
||||
|
@ -180,9 +182,10 @@ import {RouterHelper} from "../../utils/routerHelper.class";
|
|||
</span>
|
||||
</span>
|
||||
<!-- Subjects -->
|
||||
<span uk-tooltip="Subjects" *ngIf="subjects && subjects.length > 0" [class.truncated]="subjects.length > 3">
|
||||
<span *ngIf="subjects && subjects.length > 0" [class.truncated]="subjects.length > 3">
|
||||
{{subjects.slice(0, 3).join(', ')}}
|
||||
</span>
|
||||
<!-- For tabs in landing -->
|
||||
<ng-container *ngIf="provenanceAction">
|
||||
<span>{{provenanceAction}}</span>
|
||||
</ng-container>
|
||||
|
|
|
@ -20,14 +20,16 @@ import {RouterHelper} from "../../utils/routerHelper.class";
|
|||
</div>
|
||||
<div *ngIf="!isMobile">
|
||||
<span *ngFor="let item of fundedByProjects.slice(0, viewAll?fundedByProjects.length:threshold) let i=index">
|
||||
<span class="uk-text-emphasis">
|
||||
<span class="uk-text-emphasis" (click)="dropClicked=true">
|
||||
<a class="uk-link uk-link-text">
|
||||
<ng-container *ngTemplateOutlet="funder; context: {item: item}"></ng-container>
|
||||
</a>
|
||||
</span>
|
||||
<div class="default-dropdown uk-margin-remove-top uk-dropdown"
|
||||
uk-dropdown="pos: bottom-left; mode:click">
|
||||
<ng-container *ngTemplateOutlet="dropInfo; context: { item: item}"></ng-container>
|
||||
<ng-container *ngIf="dropClicked">
|
||||
<ng-container *ngTemplateOutlet="dropInfo; context: { item: item, index: i}"></ng-container>
|
||||
</ng-container>
|
||||
</div>
|
||||
<span *ngIf="i < (fundedByProjects.slice(0, viewAll?fundedByProjects.length:threshold).length - 1)">, </span>
|
||||
</span>
|
||||
|
@ -35,13 +37,13 @@ import {RouterHelper} from "../../utils/routerHelper.class";
|
|||
<div *ngIf="isMobile">
|
||||
<div *ngFor="let item of fundedByProjects.slice(0, viewAll?fundedByProjects.length:threshold) let i=index"
|
||||
class="uk-flex uk-flex-middle uk-margin-small-bottom">
|
||||
<span class="uk-text-emphasis uk-width-expand">
|
||||
<span class="uk-text-emphasis uk-width-expand" (click)="dropClicked=true">
|
||||
<ng-container *ngTemplateOutlet="funder; context: {item: item}"></ng-container>
|
||||
</span>
|
||||
<a #toggle><icon name="info" visuallyHidden="info" [type]="'outlined'"></icon></a>
|
||||
<mobile-dropdown [toggle]="toggle">
|
||||
<div class="uk-margin-remove-top">
|
||||
<ng-container *ngTemplateOutlet="dropInfo; context: { item: item}"></ng-container>
|
||||
<div *ngIf="dropClicked" class="uk-margin-remove-top">
|
||||
<ng-container *ngTemplateOutlet="dropInfo; context: { item: item, index: i}"></ng-container>
|
||||
</div>
|
||||
</mobile-dropdown>
|
||||
</div>
|
||||
|
@ -54,7 +56,7 @@ import {RouterHelper} from "../../utils/routerHelper.class";
|
|||
<span *ngIf="item['acronym'] || item['title']">| {{ item['acronym'] ? item['acronym'] : item['title']}}</span>
|
||||
</ng-template>
|
||||
|
||||
<ng-template #dropInfo let-item=item>
|
||||
<ng-template #dropInfo let-item=item let-index=index>
|
||||
<div class="uk-padding-small">
|
||||
<span>Project</span>
|
||||
<div class="uk-margin-bottom">
|
||||
|
@ -84,7 +86,7 @@ import {RouterHelper} from "../../utils/routerHelper.class";
|
|||
<span class="uk-text-meta">Funding stream: </span>{{item.funding}}
|
||||
</li>
|
||||
</ul>
|
||||
<div *ngIf="getVocabularyLabel(item, provenanceActionVocabulary, i) || item.validated" class="uk-text-meta">
|
||||
<div *ngIf="item.provenanceAction || item.validated" class="uk-text-meta">
|
||||
<span *ngIf="item.validated">Validated by funder</span>
|
||||
<span *ngIf="item.provenanceAction && item.validated"> | </span>
|
||||
<span *ngIf="item.provenanceAction">{{item.provenanceAction}}</span>
|
||||
|
@ -105,8 +107,15 @@ export class FundedByComponent {
|
|||
public url = properties.searchLinkToProject.split('?')[0];
|
||||
public title: string = "Funded by";
|
||||
@Input() provenanceActionVocabulary = null;
|
||||
public provenancesCalculated: boolean[] = [];
|
||||
// public provenancesCalculated: boolean[] = [];
|
||||
public routerHelper:RouterHelper = new RouterHelper();
|
||||
public dropClicked: boolean = false;
|
||||
|
||||
public ngOnInit() {
|
||||
this.fundedByProjects.forEach((project, index) => {
|
||||
this.getVocabularyLabel(project, this.provenanceActionVocabulary, index);
|
||||
})
|
||||
}
|
||||
|
||||
public viewAllClick() {
|
||||
if(this.fundedByProjects.length <= this.threshold*2) {
|
||||
|
@ -124,11 +133,11 @@ export class FundedByComponent {
|
|||
}
|
||||
|
||||
public getVocabularyLabel(item: any, vocabulary: any, index: number) {
|
||||
if(!this.provenancesCalculated[index]) {
|
||||
this.provenancesCalculated[index] = true;
|
||||
// if(!this.provenancesCalculated[index]) {
|
||||
// this.provenancesCalculated[index] = true;
|
||||
item.provenanceAction = HelperFunctions.getVocabularyLabel(item.provenanceAction, vocabulary, false);
|
||||
}
|
||||
return item.provenanceAction;
|
||||
// }
|
||||
// return item.provenanceAction;
|
||||
}
|
||||
|
||||
public addEoscPrevInParams(obj) {
|
||||
|
|
|
@ -8,19 +8,15 @@ import { RouterModule } from '@angular/router';
|
|||
import {TabPagingComponent} from './tabPaging.component';
|
||||
import {ShowTitleComponent} from './showTitle.component';
|
||||
import {AddThisComponent} from './addThis.component';
|
||||
import {PiwikServiceModule} from '../../utils/piwik/piwikService.module';
|
||||
import {PreviousRouteRecorder} from'../../utils/piwik/previousRouteRecorder.guard';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule, RouterModule, PiwikServiceModule
|
||||
CommonModule, FormsModule, RouterModule
|
||||
],
|
||||
declarations: [
|
||||
TabPagingComponent, ShowTitleComponent, AddThisComponent
|
||||
],
|
||||
providers:[
|
||||
PreviousRouteRecorder
|
||||
],
|
||||
providers:[],
|
||||
exports: [
|
||||
TabPagingComponent, ShowTitleComponent, AddThisComponent
|
||||
]
|
||||
|
|
|
@ -42,7 +42,7 @@ export class ParsingFunctions {
|
|||
"funderShortname": "", "funderName": "",
|
||||
"funding": "", "code": "", "provenanceAction": "", "validated": false
|
||||
};
|
||||
|
||||
|
||||
if (relation.title != 'unidentified') {
|
||||
fundedByProject['id'] = relation['to'].content;
|
||||
fundedByProject['acronym'] = relation.acronym;
|
||||
|
@ -538,7 +538,8 @@ export class ParsingFunctions {
|
|||
|
||||
if (pid.hasOwnProperty("classid") && pid['classid'] != "") {
|
||||
if (pid.classid == "doi" || pid.classid == "pmc" || pid.classid == "handle" || pid.classid == "pmid" || pid.classid == "re3data"
|
||||
|| pid.classid == "swhid") {
|
||||
|| pid.classid == "swhid"
|
||||
|| pid.classid == "ROR" || pid.classid == "ISNI" || pid.classid == "Wikidata" || pid.classid == "FundRef") {
|
||||
if (!identifiers.has(pid.classid)) {
|
||||
identifiers.set(pid.classid, new Array<string>());
|
||||
}
|
||||
|
@ -547,7 +548,8 @@ export class ParsingFunctions {
|
|||
} else {
|
||||
for (let i = 0; i < pid.length; i++) {
|
||||
if (pid[i].classid == "doi" || pid[i].classid == "pmc" || pid[i].classid == "handle" || pid[i].classid == "pmid" || pid[i].classid == "re3data"
|
||||
|| pid[i].classid == "swhid") {
|
||||
|| pid[i].classid == "swhid"
|
||||
|| pid[i].classid == "ROR" || pid[i].classid == "ISNI" || pid[i].classid == "Wikidata" || pid[i].classid == "FundRef") {
|
||||
if (!identifiers.has(pid[i].classid)) {
|
||||
identifiers.set(pid[i].classid, new Array<string>());
|
||||
}
|
||||
|
|
|
@ -15,34 +15,36 @@ import {StringUtils} from "../../../utils/string-utils.class";
|
|||
template: `
|
||||
<modal-alert #selectionModal [large]="true" (alertOutput)="modalOutput()" (cancelOutput)="modalCancel()"
|
||||
[okDisabled]="!sent && !selectionStep1 && (form.invalid || sending)">
|
||||
<sdg-selection *ngIf="subjects && subjectType == 'sdg'" #selection [class.uk-hidden]="!selectionStep1"
|
||||
[subjects]="subjects" [entityType]="entityType"></sdg-selection>
|
||||
<fos-selection *ngIf="subjects && subjectType == 'fos'" #selection [class.uk-hidden]="!selectionStep1"
|
||||
[subjects]="subjects" [contentHeight]="selectionModal.bodyHeight" [inModal]="true"></fos-selection>
|
||||
<div [class.uk-hidden]="selectionStep1">
|
||||
<div class="uk-flex uk-flex-column uk-flex-middle">
|
||||
<ng-container *ngIf="!sent && !error">
|
||||
<div>Thank you for your feedback.</div>
|
||||
<div>Before sending us your options, would you like to leave us your e-mail to notify you about the reporting status?</div>
|
||||
<div input class="uk-width-1-2 uk-margin-medium-top uk-margin-medium-bottom"
|
||||
[formInput]="form.get('email')" placeholder="E-mail">
|
||||
<span note>(Optional)</span>
|
||||
<ng-container *ngIf="isOpen">
|
||||
<sdg-selection *ngIf="subjects && subjectType == 'sdg'" #selection [class.uk-hidden]="!selectionStep1"
|
||||
[subjects]="subjects" [entityType]="entityType"></sdg-selection>
|
||||
<fos-selection *ngIf="subjects && subjectType == 'fos'" #selection [class.uk-hidden]="!selectionStep1"
|
||||
[subjects]="subjects" [contentHeight]="selectionModal.bodyHeight" [inModal]="true"></fos-selection>
|
||||
<div [class.uk-hidden]="selectionStep1">
|
||||
<div class="uk-flex uk-flex-column uk-flex-middle">
|
||||
<ng-container *ngIf="!sent && !error">
|
||||
<div>Thank you for your feedback.</div>
|
||||
<div>Before sending us your options, would you like to leave us your e-mail to notify you about the reporting status?</div>
|
||||
<div input class="uk-width-1-2 uk-margin-medium-top uk-margin-medium-bottom"
|
||||
[formInput]="form.get('email')" placeholder="E-mail">
|
||||
<span note>(Optional)</span>
|
||||
</div>
|
||||
<div>
|
||||
<re-captcha (resolved)="handleRecaptcha($event)" [siteKey]="properties.reCaptchaSiteKey"
|
||||
[ngClass]="sending ? 'uk-hidden':''"></re-captcha>
|
||||
<loading [ngClass]="sending ? '':'uk-hidden'"></loading>
|
||||
</div>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="sent">
|
||||
<p>Your feedback is successfully received and it will soon be reviewed by our graph experts!</p>
|
||||
<icon customClass="uk-text-background" name="check" [ratio]="4"></icon>
|
||||
</ng-container>
|
||||
<div *ngIf="error" class="uk-alert uk-alert-danger uk-text-center uk-width-large ng-star-inserted"
|
||||
role="alert">Email sent failed! Please try again.
|
||||
</div>
|
||||
<div>
|
||||
<re-captcha (resolved)="handleRecaptcha($event)" [siteKey]="properties.reCaptchaSiteKey"
|
||||
[ngClass]="sending ? 'uk-hidden':''"></re-captcha>
|
||||
<loading [ngClass]="sending ? '':'uk-hidden'"></loading>
|
||||
</div>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="sent">
|
||||
<p>Your feedback is successfully received and it will soon be reviewed by our graph experts!</p>
|
||||
<icon customClass="uk-text-background" name="check" [ratio]="4"></icon>
|
||||
</ng-container>
|
||||
<div *ngIf="error" class="uk-alert uk-alert-danger uk-text-center uk-width-large ng-star-inserted"
|
||||
role="alert">Email sent failed! Please try again.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ng-container>
|
||||
</modal-alert>
|
||||
`
|
||||
})
|
||||
|
@ -62,6 +64,7 @@ export class SdgFosSuggestComponent {
|
|||
public sent: boolean = false;
|
||||
public error: boolean = false;
|
||||
subscriptions: Subscription[] = [];
|
||||
isOpen: boolean = false;
|
||||
|
||||
constructor(private emailService: EmailService, private fb: FormBuilder, private cdr: ChangeDetectorRef) {}
|
||||
|
||||
|
|
|
@ -26,8 +26,9 @@ import {properties} from "../../../../environments/environment";
|
|||
<span class="uk-text-meta uk-text-small" [class.uk-text-uppercase]="key != 're3data'">{{key}}: </span>
|
||||
<span [class.uk-margin-small-left]="modal">
|
||||
<ng-container *ngFor="let item of identifiers.get(key) let j=index">
|
||||
<a *ngIf="key == 'doi' || key == 'pmc' || key == 'pmid' || key == 'handle' || key == 're3data' || key == 'swhid'"
|
||||
[href]="getUrl(key) + item" target="_blank" class="uk-display-inline-block custom-external">
|
||||
<a *ngIf="key == 'doi' || key == 'pmc' || key == 'pmid' || key == 'handle' || key == 're3data' || key == 'swhid'
|
||||
|| key == 'ROR' || key == 'ISNI' || key == 'Wikidata' || key == 'FundRef'"
|
||||
[href]="getUrl(key, item) + item" target="_blank" class="uk-display-inline-block custom-external">
|
||||
{{item}}
|
||||
</a>
|
||||
<ng-container *ngIf="(j !== (identifiers.get(key).length - 1))">, </ng-container>
|
||||
|
@ -113,7 +114,10 @@ export class ShowIdentifiersComponent implements AfterViewInit {
|
|||
});
|
||||
}
|
||||
|
||||
public getUrl(key: string): string {
|
||||
public getUrl(key: string, value: string): string {
|
||||
if(value.includes("http://") || value.includes("https://")) {
|
||||
return "";
|
||||
}
|
||||
if(key == "doi") {
|
||||
return properties.doiURL;
|
||||
} else if(key == "pmc") {
|
||||
|
@ -126,6 +130,14 @@ export class ShowIdentifiersComponent implements AfterViewInit {
|
|||
return properties.r3DataURL;
|
||||
} else if(key == "swhid") {
|
||||
return properties.swhURL;
|
||||
} else if(key == "ROR") {
|
||||
return properties.rorURL;
|
||||
} else if(key == "ISNI") {
|
||||
return properties.isniURL;
|
||||
} else if(key == "Wikidata") {
|
||||
return properties.wikiDataURL;
|
||||
} else if(key == "FundRef") {
|
||||
return properties.fundRefURL;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,8 @@ import {EnvProperties} from "../../utils/properties/env-properties";
|
|||
selector: 'showPublisher, [showPublisher]',
|
||||
template: `
|
||||
<ng-container *ngIf="publisher">
|
||||
<span [attr.uk-tooltip]="'cls: uk-active'" [title]="'Publisher'">{{publisher}}</span>
|
||||
<span class="uk-text-meta uk-margin-xsmall-right">Publisher:</span>
|
||||
<span>{{publisher}}</span>
|
||||
<span *ngIf="journal && (journal['journal'] || journal['issn'] || journal['lissn']
|
||||
|| journal['volume'] || journal['eissn'] || journal['issue'])"
|
||||
class="uk-margin-xsmall-left uk-margin-xsmall-right bullet"></span>
|
||||
|
@ -14,7 +15,8 @@ import {EnvProperties} from "../../utils/properties/env-properties";
|
|||
|| journal['volume'] || journal['eissn'] || journal['issue'])">
|
||||
<ng-container *ngIf="journal && (journal['journal'] || journal['issn'] || journal['lissn']
|
||||
|| journal['volume'] || journal['eissn'] || journal['issue'])">
|
||||
<span [attr.uk-tooltip]="'cls: uk-active'" [title]="'Journal'">
|
||||
<span>
|
||||
<span class="uk-text-meta uk-margin-xsmall-right">Journal:</span>
|
||||
<span *ngIf="journal['journal']">{{journal['journal']}}</span>
|
||||
<span *ngIf="journal['journal'] && (journal['volume'] || journal['issue'])">, </span>
|
||||
<ng-container *ngIf="journal['volume']">
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import { PreviousRouteRecorder } from "../../utils/piwik/previousRouteRecorder.guard";
|
||||
import { OrganizationComponent } from "./organization.component";
|
||||
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([{ path: '', component: OrganizationComponent, canDeactivate: [PreviousRouteRecorder] }])
|
||||
]
|
||||
})
|
||||
export class OrganizationRoutingModule { }
|
|
@ -19,57 +19,28 @@
|
|||
</div>
|
||||
</div>
|
||||
<div *ngIf="!showFeedback" class="uk-grid uk-margin-remove-left" uk-grid>
|
||||
<!-- left column -->
|
||||
<!-- <div id="landing-left-sidebar" *ngIf="organizationInfo" class="uk-visible@s uk-padding-remove-horizontal">
|
||||
<div class="uk-flex uk-flex-column uk-flex-right uk-sticky"
|
||||
uk-sticky="end: true" [attr.offset]="offset">
|
||||
<div class="uk-margin-large-bottom uk-align-center">
|
||||
<div class="uk-text-meta uk-text-uppercase">Actions</div>
|
||||
<ul class="uk-list">
|
||||
<li class="uk-text-center">
|
||||
<a (click)="openAddThisModal()" [title]="'Share this '+openaireEntities.ORGANIZATION+' in your social networks'"
|
||||
[attr.uk-tooltip]="'pos: right; cls: uk-active uk-text-small uk-padding-small'">
|
||||
<span class="uk-icon-button uk-icon landing-action-button landing-action-button-portal">
|
||||
<icon name="share" visuallyHidden="share"></icon>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="uk-text-center"
|
||||
[title]="'Download reports'"
|
||||
[attr.uk-tooltip]="'pos: right; cls: uk-active uk-text-small uk-padding-small'">
|
||||
<a class="uk-link-text uk-text-bold uk-text-uppercase" (click)="buildFunderOptions(); openDownloadReportsModal()">
|
||||
<span class="uk-icon-button uk-icon landing-action-button landing-action-button-portal">
|
||||
<icon name="download" visuallyHidden="download"></icon>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<!-- center/right column -->
|
||||
<div id="landing-center-content" class="uk-width-expand uk-padding-remove uk-background-default">
|
||||
|
||||
<!-- Graph and feedback -->
|
||||
<ng-template #graph_and_feedback_template>
|
||||
<div class="uk-padding-xsmall">
|
||||
<div class="uk-container uk-container-xlarge uk-flex uk-flex-between uk-flex-wrap uk-margin-small-top uk-margin-small-bottom" [class.uk-invisible]="!organizationInfo">
|
||||
<!-- Last Index Info-->
|
||||
<a href="https://graph.openaire.eu" target="_blank" class="uk-width-1-1 uk-width-auto@l">
|
||||
<img src="assets/common-assets/openaire-badge-1.png" alt="Powered by OpenAIRE graph" style="height: 15px;">
|
||||
</a>
|
||||
<span *ngIf="indexUpdateDate" class="uk-text-baseline uk-text-meta uk-width-1-1 uk-width-auto@l">
|
||||
Last update of records in OpenAIRE: {{indexUpdateDate | date: 'MMM dd, yyyy'}}
|
||||
</span>
|
||||
<div class="uk-padding-xsmall">
|
||||
<div class="uk-container uk-container-xlarge uk-flex uk-flex-between uk-flex-wrap uk-margin-small-top uk-margin-small-bottom" [class.uk-invisible]="!organizationInfo">
|
||||
<!-- Last Index Info-->
|
||||
<a href="https://graph.openaire.eu" target="_blank" class="uk-width-1-1 uk-width-auto@l">
|
||||
<img src="assets/common-assets/openaire-badge-1.png" alt="Powered by OpenAIRE graph" style="height: 15px;">
|
||||
</a>
|
||||
<span *ngIf="indexUpdateDate" class="uk-text-baseline uk-text-meta uk-width-1-1 uk-width-auto@l">
|
||||
Last update of records in OpenAIRE: {{indexUpdateDate | date: 'MMM dd, yyyy'}}
|
||||
</span>
|
||||
|
||||
<!--Feedback-->
|
||||
<div *ngIf="properties.reCaptchaSiteKey" class="uk-width-1-1 uk-width-auto@l">
|
||||
<span class="uk-text-meta uk-text-xsmall">Found an issue? </span>
|
||||
<a (click)="showFeedback = true; scroll()" class="uk-text-xsmall">Give us feedback</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--Feedback-->
|
||||
<div *ngIf="properties.reCaptchaSiteKey" class="uk-width-1-1 uk-width-auto@l">
|
||||
<span class="uk-text-meta uk-text-xsmall">Found an issue? </span>
|
||||
<a (click)="showFeedback = true; scroll()" class="uk-text-xsmall">Give us feedback</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
|
||||
<div #graph_and_feedback id="graph_and_feedback" class="uk-blur-background uk-text-xsmall uk-visible@m"
|
||||
|
@ -123,35 +94,10 @@
|
|||
<!-- Main content -->
|
||||
<div [attr.style]="'margin-top: '+(graph_height? 'calc(40px + 20px - '+graph_height+'px)': '40px')">
|
||||
|
||||
<!-- Actions for mobile viewport -->
|
||||
<div class="uk-flex uk-flex-right uk-margin-medium-bottom uk-hidden@s">
|
||||
<div class="uk-margin-small-right">
|
||||
<a (click)="openAddThisModal()" [title]="'Share this '+openaireEntities.ORGANIZATION+' in your social networks'"
|
||||
[attr.uk-tooltip]="'pos: right; cls: uk-active uk-text-small uk-padding-small'">
|
||||
<span class="uk-icon-button uk-icon landing-action-button landing-action-button-portal">
|
||||
<icon name="share" visuallyHidden="share"></icon>
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
<div [title]="'Download reports'"
|
||||
[attr.uk-tooltip]="'pos: right; cls: uk-active uk-text-small uk-padding-small'">
|
||||
<a class="uk-link-text uk-text-bold uk-text-uppercase" (click)="buildFunderOptions(); openDownloadReportsModal()">
|
||||
<span class="uk-icon-button uk-icon landing-action-button landing-action-button-portal">
|
||||
<icon name="download" visuallyHidden="download"></icon>
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Helper -->
|
||||
<helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0"
|
||||
[texts]="pageContents['top']"></helper>
|
||||
<!-- Versions -->
|
||||
<!-- <span *ngIf="organizationInfo.deletedByInferenceIds" class="uk-text-primary uk-flex uk-flex-middle">
|
||||
<icon flex="true" ratio="0.8" name="auto_awesome_motion"></icon>
|
||||
<a (click)="openDeletedByInference()" class="uk-text-primary uk-text-small uk-margin-small-left">
|
||||
View all {{organizationInfo.deletedByInferenceIds.length}} versions
|
||||
</a>
|
||||
</span> -->
|
||||
|
||||
<!-- Landing header -->
|
||||
<landing-header [properties]="properties" [title]="organizationInfo.title.name"
|
||||
[subTitle]="(organizationInfo.name
|
||||
|
@ -171,6 +117,10 @@
|
|||
<div *ngIf="organizationInfo.country && !organizationInfo.country.toLowerCase().includes('unknown')">
|
||||
<span class="uk-text-meta">Country: </span>{{organizationInfo.country}}
|
||||
</div>
|
||||
<!-- Identifiers -->
|
||||
<div *ngIf="organizationInfo.identifiers && organizationInfo.identifiers.size > 0" class="uk-margin-small-top">
|
||||
<showIdentifiers [identifiers]="organizationInfo.identifiers" [showViewAll]="true"></showIdentifiers>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Tabs section -->
|
||||
|
@ -257,9 +207,7 @@
|
|||
</search-tab>
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-text-xsmall uk-hidden@m">
|
||||
<ng-container *ngTemplateOutlet="graph_and_feedback_template"></ng-container>
|
||||
</div>
|
||||
|
||||
<!-- Helper -->
|
||||
<helper *ngIf="pageContents && pageContents['bottom'] && pageContents['bottom'].length > 0"
|
||||
[texts]="pageContents['bottom']">
|
||||
|
@ -270,12 +218,12 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Feedback -->
|
||||
<feedback *ngIf="showFeedback && organizationInfo && properties.reCaptchaSiteKey" [organizationInfo]="organizationInfo"
|
||||
[properties]="properties" [entityType]="'organization'" [fields]="feedbackFields"
|
||||
[(showForm)]="showFeedback">
|
||||
</feedback>
|
||||
</div>
|
||||
<!-- Feedback -->
|
||||
<feedback *ngIf="organizationInfo && properties.reCaptchaSiteKey" [organizationInfo]="organizationInfo"
|
||||
[properties]="properties" [entityType]="'organization'" [fields]="feedbackFields"
|
||||
[(showForm)]="showFeedback">
|
||||
</feedback>
|
||||
</div>
|
||||
|
||||
<!-- Mobile view -->
|
||||
|
@ -287,6 +235,23 @@
|
|||
&& organizationInfo.title.name !== organizationInfo.name)?organizationInfo.name:null"
|
||||
[entityType]="'organization'" [prevPath]="prevPath">
|
||||
</landing-header>
|
||||
<div class="uk-text-small">
|
||||
<!-- Web Page -->
|
||||
<div *ngIf="organizationInfo.title && organizationInfo.title.url" class="uk-margin-small-bottom uk-display-inline-block">
|
||||
<span class="uk-text-meta">Web page: </span>
|
||||
<a [href]="organizationInfo.title.url" target="_blank" class="uk-button uk-button-text uk-text-lowercase uk-text-normal custom-external">
|
||||
{{organizationInfo.title.url}}
|
||||
</a>
|
||||
</div>
|
||||
<!-- Country -->
|
||||
<div *ngIf="organizationInfo.country && !organizationInfo.country.toLowerCase().includes('unknown')">
|
||||
<span class="uk-text-meta">Country: </span>{{organizationInfo.country}}
|
||||
</div>
|
||||
<!-- Identifiers -->
|
||||
<div *ngIf="organizationInfo.identifiers && organizationInfo.identifiers.size > 0" class="uk-margin-small-top">
|
||||
<showIdentifiers [identifiers]="organizationInfo.identifiers" [showViewAll]="true" [isMobile]="true"></showIdentifiers>
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-section uk-margin-top uk-text-large uk-text-empashis uk-text-bold">
|
||||
<hr>
|
||||
<ng-container>
|
||||
|
@ -406,10 +371,7 @@
|
|||
[type]="'organizations'" [prevPath]="prevPath">
|
||||
</organizationsDeletedByInference>
|
||||
</modal-alert>
|
||||
<!-- Share -->
|
||||
<modal-alert *ngIf="organizationInfo" #addThisModal classBody="uk-flex uk-flex-center uk-flex-middle">
|
||||
<addThis></addThis>
|
||||
</modal-alert>
|
||||
|
||||
<!-- Download -->
|
||||
<modal-alert *ngIf="organizationInfo" #downloadReportsModal large="true">
|
||||
<div class="uk-padding-small uk-margin-small-left uk-margin-small-right">
|
||||
|
|
|
@ -77,7 +77,6 @@ export class OrganizationComponent {
|
|||
@ViewChild('downloadReportsFsModal') downloadReportsFsModal: FullScreenModalComponent;
|
||||
// @ViewChild('downloadReportModal') downloadReportModal;
|
||||
// @ViewChild('downloadFunderReportModal') downloadFunderReportModal;
|
||||
@ViewChild('addThisModal') addThisModal;
|
||||
@ViewChild('addThisFsModal') addThisFsModal: FullScreenModalComponent;
|
||||
|
||||
@ViewChild(ModalLoading) loading: ModalLoading;
|
||||
|
@ -717,13 +716,6 @@ export class OrganizationComponent {
|
|||
this.downloadReportsModal.cancel();
|
||||
}
|
||||
|
||||
public openAddThisModal() {
|
||||
this.addThisModal.cancelButton = false;
|
||||
this.addThisModal.okButton = false;
|
||||
this.addThisModal.alertTitle = "Share this "+OpenaireEntities.ORGANIZATION+" in your social networks";
|
||||
this.addThisModal.open();
|
||||
}
|
||||
|
||||
public getParamsForSearchLink(type: string = "") {
|
||||
if(type) {
|
||||
return this.routerHelper.createQueryParams(['f0', 'fv0', 'type', 'qf', 'sortBy'], ['relorganizationid', this.organizationId, type, 'false', 'resultdateofacceptance,descending']);
|
||||
|
|
|
@ -33,11 +33,14 @@ import {graph, versions} from "../../utils/icons/icons";
|
|||
import {FullScreenModalModule} from "../../utils/modal/full-screen-modal/full-screen-modal.module";
|
||||
import {EGIDataTransferModule} from "../../utils/dataTransfer/transferData.module";
|
||||
import {EntityActionsModule} from "../../utils/entity-actions/entity-actions.module";
|
||||
import {OrganizationRoutingModule} from "./organization-routing.module";
|
||||
import {ResultLandingUtilsModule} from "../landing-utils/resultLandingUtils.module";
|
||||
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule, RouterModule,
|
||||
OrganizationRoutingModule,
|
||||
LoadingModalModule, AlertModalModule, ErrorMessagesModule,
|
||||
LandingModule,
|
||||
DataProvidersServiceModule,
|
||||
|
@ -49,7 +52,7 @@ import {EntityActionsModule} from "../../utils/entity-actions/entity-actions.mod
|
|||
ProjectsServiceModule,
|
||||
Schema2jsonldModule, SEOServiceModule, HelperModule,
|
||||
OrganizationsDeletedByInferenceModule, LandingHeaderModule, FeedbackModule,
|
||||
TabsModule, SearchTabModule, LoadingModule, IconsModule, InputModule, FullScreenModalModule, EGIDataTransferModule, EntityActionsModule
|
||||
TabsModule, SearchTabModule, LoadingModule, IconsModule, InputModule, FullScreenModalModule, EntityActionsModule, ResultLandingUtilsModule
|
||||
],
|
||||
declarations: [
|
||||
OrganizationComponent,
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import { PreviousRouteRecorder } from "../../utils/piwik/previousRouteRecorder.guard";
|
||||
import { ProjectComponent } from "./project.component";
|
||||
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([{ path: '', component: ProjectComponent, canDeactivate: [PreviousRouteRecorder] }])
|
||||
]
|
||||
})
|
||||
export class ProjectRoutingModule { }
|
|
@ -32,9 +32,11 @@ import {FullScreenModalModule} from '../../utils/modal/full-screen-modal/full-sc
|
|||
import {SafeHtmlPipeModule} from '../../utils/pipes/safeHTMLPipe.module';
|
||||
import {EGIDataTransferModule} from "../../utils/dataTransfer/transferData.module";
|
||||
import {EntityActionsModule} from "../../utils/entity-actions/entity-actions.module";
|
||||
import {ProjectRoutingModule} from "./project-routing.module";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
ProjectRoutingModule,
|
||||
CommonModule, FormsModule, RouterModule, LandingModule,
|
||||
LoadingModalModule, AlertModalModule, ErrorMessagesModule,
|
||||
IFrameModule, ReportsServiceModule,
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import { PreviousRouteRecorder } from "../../utils/piwik/previousRouteRecorder.guard";
|
||||
import { ResultLandingComponent } from "./resultLanding.component";
|
||||
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([{ path: '', component: ResultLandingComponent, canDeactivate: [PreviousRouteRecorder] }])
|
||||
]
|
||||
})
|
||||
export class ResultLandingRoutingModule { }
|
|
@ -4,8 +4,8 @@
|
|||
[searchActionRoute]="properties.searchLinkToResults"></schema2jsonld>
|
||||
|
||||
<!-- Desktop view -->
|
||||
<div id="tm-main" class="uk-visible@m landing uk-section uk-padding-remove tm-middle">
|
||||
<div *ngIf="!isMobile" class="tm-main">
|
||||
<div *ngIf="!isMobile" id="tm-main" class="landing uk-section uk-padding-remove tm-middle">
|
||||
<div class="tm-main">
|
||||
<div class="publication">
|
||||
<div *ngIf="properties.adminToolsPortalType == 'eosc'" class="eosc-explore-back-search-bar">
|
||||
<div class="uk-light uk-container uk-container-large uk-margin-left uk-height-1-1">
|
||||
|
@ -18,70 +18,6 @@
|
|||
</div>
|
||||
</div>
|
||||
<div *ngIf="!showFeedback" class="uk-grid uk-margin-remove-left" uk-grid>
|
||||
|
||||
<!-- left box/sidebar - actions -->
|
||||
<!-- <div id="landing-left-sidebar" *ngIf="resultLandingInfo" class="uk-visible@s uk-padding-remove-horizontal">
|
||||
<div class="uk-flex uk-flex-column uk-flex-between uk-flex-center uk-sticky"
|
||||
uk-sticky="end: true" [attr.offset]="offset">
|
||||
<div class="uk-align-center uk-text-center uk-margin-medium-top uk-flex uk-flex-column uk-flex-between">
|
||||
<ng-container *ngIf="resultLandingInfo && (hasAltMetrics || hasMetrics)">
|
||||
<metrics *ngIf="hasMetrics" class="uk-margin-bottom"
|
||||
[pageViews]="pageViews"
|
||||
[id]="id" [entityType]="'results'" [entity]="title"
|
||||
[viewsFrameUrl]="viewsFrameUrl" [downloadsFrameUrl]="downloadsFrameUrl"
|
||||
(metricsResults)="metricsResults($event)" [properties]=properties
|
||||
[prevPath]="prevPath">
|
||||
</metrics>
|
||||
<altmetrics *ngIf="hasAltMetrics" id="{{resultLandingInfo.identifiers?.get('doi')[0]}}" type="doi"></altmetrics>
|
||||
</ng-container>
|
||||
</div>
|
||||
<div class="uk-margin-large-bottom uk-align-center">
|
||||
<div class="uk-text-meta uk-text-uppercase">Actions</div>
|
||||
<ul class="uk-list">
|
||||
<li class="uk-text-center">
|
||||
<a (click)="openAddThisModal()"
|
||||
[title]="'Share this '+getTypeName() + ' in your social networks'"
|
||||
[attr.uk-tooltip]="'pos: right; cls: uk-active uk-text-small uk-padding-small'">
|
||||
<span class="uk-icon-button uk-icon landing-action-button landing-action-button-portal">
|
||||
<icon name="share" visuallyHidden="share"></icon>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li *ngIf="isRouteAvailable('participate/direct-claim')" class="uk-text-center"
|
||||
[title]="'<span class=\'uk-flex uk-flex-middle\'>Link this '+getTypeName()+' to ...<span class=\'material-icons uk-margin-small-left\'>east</span></span>'"
|
||||
[attr.uk-tooltip]="'pos: right; cls: uk-active uk-text-small uk-padding-small'">
|
||||
<a [queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[id,type,'project'])"
|
||||
routerLinkActive="router-link-active" routerLink="/participate/direct-claim">
|
||||
<span class="uk-icon-button uk-icon landing-action-button landing-action-button-portal">
|
||||
<icon name="link" visuallyHidden="link"></icon>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="uk-text-center">
|
||||
<a (click)="openCiteModal()"
|
||||
[title]="'Cite this '+getTypeName()"
|
||||
[attr.uk-tooltip]="'pos: right; cls: uk-active uk-text-small uk-padding-small'">
|
||||
<span class="uk-icon-button uk-icon landing-action-button landing-action-button-portal">
|
||||
<icon name="quotes" visuallyHidden="cite"></icon>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li *ngIf="properties.adminToolsPortalType == 'explore' || properties.adminToolsPortalType == 'community' || properties.adminToolsPortalType == 'aggregator'"
|
||||
class="uk-text-center">
|
||||
<orcid-work [resultId]="id" [resultTitle]="resultLandingInfo.title" [resultLandingInfo]="resultLandingInfo"
|
||||
[pids]="pidsArrayString" [pageType]="'landing'">
|
||||
</orcid-work>
|
||||
</li>
|
||||
<li *ngIf=" properties.enableEoscDataTransfer && resultLandingInfo.resultType == 'dataset' &&
|
||||
resultLandingInfo.identifiers && resultLandingInfo.identifiers.get('doi')"
|
||||
class="uk-text-center">
|
||||
<egi-transfer-data [dois]="resultLandingInfo.identifiers.get('doi')" [isOpen]="egiTransferModalOpen"></egi-transfer-data>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<!-- center box-->
|
||||
<div id="landing-center-content" class="uk-width-expand uk-padding-remove uk-background-default">
|
||||
|
||||
|
@ -166,54 +102,6 @@
|
|||
<!-- in small screens there is no sticky #graph_and_feedback so margin-top is medium (40px) -->
|
||||
<!-- else margin is medium (40px) - the actual height of uk-sticky-placeholder (graph_height - 20px -> margins of #graph_and_feedback) -->
|
||||
<div [attr.style]="'margin-top: '+(graph_height? 'calc(40px + 20px - '+graph_height+'px)': '40px')">
|
||||
|
||||
<!-- Actions for mobile viewport -->
|
||||
<div class="uk-flex uk-flex-right uk-margin-medium-bottom uk-hidden@s">
|
||||
<!-- Share -->
|
||||
<div class="uk-margin-small-right">
|
||||
<a (click)="openAddThisModal()"
|
||||
[title]="'Share this '+getTypeName() + ' in your social networks'"
|
||||
[attr.uk-tooltip]="'pos: right; cls: uk-active uk-text-small uk-padding-small'">
|
||||
<span class="uk-icon-button uk-icon landing-action-button landing-action-button-portal">
|
||||
<icon name="share" visuallyHidden="share"></icon>
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
<!-- Link to -->
|
||||
<div *ngIf="isRouteAvailable('participate/direct-claim')" class="uk-margin-small-right"
|
||||
[title]="'<span class=\'uk-flex uk-flex-middle\'>Link this '+getTypeName()+' to ...<span class=\'material-icons uk-margin-small-left\'>east</span></span>'"
|
||||
[attr.uk-tooltip]="'pos: right; cls: uk-active uk-text-small uk-padding-small'">
|
||||
<a [queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[id,type,'project'])"
|
||||
routerLinkActive="router-link-active" routerLink="/participate/direct-claim">
|
||||
<span class="uk-icon-button uk-icon landing-action-button landing-action-button-portal">
|
||||
<icon name="link" visuallyHidden="link"></icon>
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
<!-- Cite this -->
|
||||
<div class="uk-margin-small-right">
|
||||
<a (click)="openCiteModal()"
|
||||
[title]="'Cite this '+getTypeName()"
|
||||
[attr.uk-tooltip]="'pos: right; cls: uk-active uk-text-small uk-padding-small'">
|
||||
<span class="uk-icon-button uk-icon landing-action-button landing-action-button-portal">
|
||||
<icon name="quotes" visuallyHidden="cite"></icon>
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
<!-- ORCID -->
|
||||
<div *ngIf="properties.adminToolsPortalType == 'explore' || properties.adminToolsPortalType == 'community' || properties.adminToolsPortalType == 'aggregator'"
|
||||
class="uk-margin-small-right">
|
||||
<orcid-work [resultId]="id" [resultTitle]="resultLandingInfo.title" [resultLandingInfo]="resultLandingInfo"
|
||||
[pids]="pidsArrayString" [pageType]="'landing'">
|
||||
</orcid-work>
|
||||
</div>
|
||||
<div *ngIf=" properties.enableEoscDataTransfer && resultLandingInfo.resultType == 'dataset' &&
|
||||
resultLandingInfo.identifiers && resultLandingInfo.identifiers.get('doi') &&
|
||||
resultLandingInfo.identifiers.get('doi').join('').indexOf('zenodo.')!=-1"
|
||||
class="">
|
||||
<egi-transfer-data [dois]="resultLandingInfo.identifiers.get('doi')" [isOpen]="egiTransferModalOpen"></egi-transfer-data>
|
||||
</div>
|
||||
</div>
|
||||
<helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0"
|
||||
[texts]="pageContents['top']"></helper>
|
||||
|
||||
|
@ -232,48 +120,15 @@
|
|||
[publiclyFunded]="resultLandingInfo.publiclyFunded"
|
||||
[projects]="resultLandingInfo.fundedByProjects">
|
||||
</landing-header>
|
||||
<!-- Labels -->
|
||||
<!-- Not used anymore - access labels will be in action bars, languages in the landing-header component -->
|
||||
<!-- <div class="uk-margin-bottom uk-grid uk-grid-small uk-flex-middle" uk-grid>
|
||||
<ng-container *ngIf="resultLandingInfo.accessMode && resultLandingInfo.accessMode.toLowerCase() !== 'not available'">
|
||||
<div>
|
||||
<span [class]="'uk-label uk-text-truncate '+ (accessClass(resultLandingInfo.accessMode) == 'open' ? 'uk-label-success' : '')"
|
||||
title="Access Mode">{{resultLandingInfo.accessMode}}
|
||||
</span>
|
||||
</div>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="resultLandingInfo.languages &&
|
||||
removeUnknown(resultLandingInfo.languages).length > 0">
|
||||
<ng-container *ngFor="let language of removeUnknown(resultLandingInfo.languages)">
|
||||
<div>
|
||||
<span class="uk-label custom-label label-language" title="Language">{{language}}</span>
|
||||
</div>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="resultLandingInfo.programmingLanguages && resultLandingInfo.programmingLanguages.length > 0">
|
||||
<ng-container *ngFor="let programmingLanguage of resultLandingInfo.programmingLanguages">
|
||||
<div>
|
||||
<span class="uk-label custom-label label-language"
|
||||
title="Programming Language">{{programmingLanguage}}</span>
|
||||
</div>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
</div> -->
|
||||
<div class="uk-text-small">
|
||||
<!-- Identifiers -->
|
||||
<div *ngIf="resultLandingInfo.identifiers && resultLandingInfo.identifiers.size > 0" class="uk-margin-small-top">
|
||||
<showIdentifiers [identifiers]="resultLandingInfo.identifiers" [showViewAll]="true"></showIdentifiers>
|
||||
</div>
|
||||
<!--Published Date, Journal and Publisher-->
|
||||
<!-- Moved inside landing-header component -->
|
||||
<!-- <div showPublisher [publisher]="resultLandingInfo.publisher"
|
||||
[publishDate]="resultLandingInfo.dateofacceptance"
|
||||
[journal]="resultLandingInfo.journal" [properties]="properties" class="uk-margin-small-top"></div> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="main-tabs-div" class="uk-sticky uk-blur-background"
|
||||
uk-sticky="end: true; media: @m" [attr.offset]="offset">
|
||||
|
||||
<div id="main-tabs-div" class="uk-sticky uk-blur-background" uk-sticky="end: true; media: @m" [attr.offset]="offset">
|
||||
<div class="uk-padding uk-padding-remove-horizontal uk-padding-remove-bottom">
|
||||
<landing-header [ngClass]="stickyHeader ? 'uk-visible@m' : 'uk-invisible'"
|
||||
[properties]="properties" [title]="resultLandingInfo.title"
|
||||
|
@ -282,7 +137,6 @@
|
|||
[date]="resultLandingInfo.dateofacceptance" [embargoEndDate]="resultLandingInfo.embargoEndDate"
|
||||
isSticky="true" [prevPath]="prevPath">
|
||||
</landing-header>
|
||||
<!-- <showTitle *ngIf="stickyHeader" [titleName]="resultLandingInfo.title" classNames="uk-margin-remove-bottom" class="uk-visible@m"></showTitle>-->
|
||||
<my-tabs (selectedActiveTab)="onSelectActiveTab($event)" [offsetForSticky]="offset" [(isSticky)]="stickyHeader">
|
||||
<my-tab tabTitle="Summary" [tabId]="'summary'" [active]="true"></my-tab>
|
||||
<my-tab *ngIf="hasSubjects"
|
||||
|
@ -362,26 +216,6 @@
|
|||
</ng-container>
|
||||
</div>
|
||||
|
||||
<!-- right box/ sidebar-->
|
||||
<ng-container *ngIf="!showFeedback && resultLandingInfo && hasRightSidebarInfo">
|
||||
<a id="landing-right-sidebar-switcher" uk-toggle href="#right-column-offcanvas"
|
||||
class="uk-offcanvas-switcher uk-flex uk-link-reset uk-flex-center uk-flex-middle uk-hidden@m"
|
||||
(click)="rightSidebarOffcanvasClicked = true;">
|
||||
<icon name="more" [ratio]="1.5" customClass="uk-text-primary" [flex]="true" visuallyHidden="sidebar"></icon>
|
||||
</a>
|
||||
<div id="right-column-offcanvas" class="uk-offcanvas" uk-offcanvas="flip: true; overlay: true;">
|
||||
<div class="uk-offcanvas-bar">
|
||||
<button class="uk-offcanvas-close uk-close uk-icon" type="button"
|
||||
(click)="rightSidebarOffcanvasClicked = false">
|
||||
<icon name="close" [ratio]="1.5" visuallyHidden="close"></icon>
|
||||
</button>
|
||||
<div *ngIf="rightSidebarOffcanvasClicked">
|
||||
<ng-container *ngTemplateOutlet="right_column"></ng-container>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ng-container>
|
||||
|
||||
<ng-template #right_column>
|
||||
<!-- new metrics box -->
|
||||
<div *ngIf="resultLandingInfo && resultLandingInfo.measure && (resultLandingInfo.measure.bip.length || resultLandingInfo.measure.counts.length) && !viewAll"
|
||||
|
@ -509,11 +343,10 @@
|
|||
</div>
|
||||
</ng-template>
|
||||
</div>
|
||||
<feedback *ngIf="showFeedback && resultLandingInfo && properties.reCaptchaSiteKey" [resultLandingInfo]="resultLandingInfo"
|
||||
[properties]="properties" [entityType]="getTypeName()" [fields]="feedbackFields"
|
||||
[(showForm)]="showFeedback" [preSelectedField]="feedbackPreSelectedField"></feedback>
|
||||
</div>
|
||||
|
||||
<feedback *ngIf="resultLandingInfo && properties.reCaptchaSiteKey" [resultLandingInfo]="resultLandingInfo"
|
||||
[properties]="properties" [entityType]="getTypeName()" [fields]="feedbackFields"
|
||||
[(showForm)]="showFeedback" [preSelectedField]="feedbackPreSelectedField"></feedback>
|
||||
</div>
|
||||
|
||||
<!-- Mobile view -->
|
||||
|
@ -886,16 +719,18 @@
|
|||
</modal-alert>
|
||||
|
||||
<modal-alert *ngIf="resultLandingInfo" #addThisModal classBody="uk-flex uk-flex-center uk-flex-middle">
|
||||
<addThis></addThis>
|
||||
<addThis *ngIf="addThisClicked"></addThis>
|
||||
</modal-alert>
|
||||
|
||||
<modal-alert *ngIf="resultLandingInfo && resultLandingInfo.organizations" #organizationsModal>
|
||||
<ng-container *ngTemplateOutlet="organizations_template; context: { threshold: resultLandingInfo.organizations.length}"></ng-container>
|
||||
<ng-container *ngIf="viewAllOrganizations">
|
||||
<ng-container *ngTemplateOutlet="organizations_template; context: { threshold: resultLandingInfo.organizations.length}"></ng-container>
|
||||
</ng-container>
|
||||
</modal-alert>
|
||||
|
||||
<modal-alert *ngIf="!isMobile && resultLandingInfo?.description" #descriptionModal
|
||||
[large]="true">
|
||||
<div [innerHTML]="resultLandingInfo.description"></div>
|
||||
<div *ngIf="descriptionClicked" [innerHTML]="resultLandingInfo.description"></div>
|
||||
</modal-alert>
|
||||
|
||||
<!--<modal-alert *ngIf="resultLandingInfo && resultLandingInfo.sdg?.length > 0"-->
|
||||
|
@ -1327,6 +1162,7 @@
|
|||
</div>
|
||||
</ng-template>
|
||||
|
||||
<ng-container *ngIf="isMobile">
|
||||
<fs-modal *ngIf="resultLandingInfo && resultLandingInfo.deletedByInferenceIds" #AlertModalDeletedByInferenceFS classTitle="uk-tile-default uk-border-bottom">
|
||||
<deletedByInference *ngIf="type == 'publication' && deleteByInferenceOpened"
|
||||
[id]="resultLandingInfo.record['result']['header']['dri:objIdentifier']"
|
||||
|
@ -1352,5 +1188,6 @@
|
|||
</fs-modal>
|
||||
|
||||
<fs-modal *ngIf="resultLandingInfo" #addThisFsModal classTitle="uk-tile-default uk-border-bottom" classBody="uk-flex uk-flex-center uk-flex-middle">
|
||||
<addThis></addThis>
|
||||
<addThis *ngIf="addThisClicked"></addThis>
|
||||
</fs-modal>
|
||||
</ng-container>
|
|
@ -74,6 +74,8 @@ export class ResultLandingComponent {
|
|||
public linkToSearchPage: string = null;
|
||||
|
||||
public citeThisClicked: boolean;
|
||||
public addThisClicked: boolean;
|
||||
public descriptionClicked: boolean;
|
||||
|
||||
// Metrics tab variables
|
||||
public metricsClicked: boolean;
|
||||
|
@ -197,6 +199,9 @@ export class ResultLandingComponent {
|
|||
private userManagementService: UserManagementService,
|
||||
private layoutService: LayoutService,
|
||||
private _contextService: ContextsService) {
|
||||
if(route.snapshot.data && route.snapshot.data['type']) {
|
||||
this.type = route.snapshot.data['type'];
|
||||
}
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
@ -864,6 +869,7 @@ export class ResultLandingComponent {
|
|||
}
|
||||
|
||||
public openAddThisModal() {
|
||||
this.addThisClicked = true;
|
||||
this.addThisModal.cancelButton = false;
|
||||
this.addThisModal.okButton = false;
|
||||
this.addThisModal.alertTitle = "Share this " + this.getTypeName() + " in your social networks";
|
||||
|
@ -1076,6 +1082,7 @@ export class ResultLandingComponent {
|
|||
this.sdgFosSuggest.subjectType="fos";
|
||||
}
|
||||
this.cdr.detectChanges();
|
||||
this.sdgFosSuggest.isOpen = true;
|
||||
this.sdgFosSuggest.openSelectionModal();
|
||||
}
|
||||
|
||||
|
@ -1090,6 +1097,7 @@ export class ResultLandingComponent {
|
|||
}
|
||||
|
||||
public openDescriptionModal() {
|
||||
this.descriptionClicked = true;
|
||||
this.descriptionModal.alertFooter = false;
|
||||
this.descriptionModal.alertTitle = "Abstract";
|
||||
this.descriptionModal.open();
|
||||
|
|
|
@ -37,10 +37,12 @@ import {SdgFosSuggestModule} from '../landing-utils/sdg-fos-suggest/sdg-fos-sugg
|
|||
import {FullScreenModalModule} from "../../utils/modal/full-screen-modal/full-screen-modal.module";
|
||||
import {SafeHtmlPipeModule} from '../../utils/pipes/safeHTMLPipe.module';
|
||||
import {EntityActionsModule} from "../../utils/entity-actions/entity-actions.module";
|
||||
import {ResultLandingRoutingModule} from "./resultLanding-routing.module";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule, LandingModule, SharedModule, RouterModule,
|
||||
ResultLandingRoutingModule,
|
||||
CiteThisModule, PagingModule, IFrameModule,
|
||||
AltMetricsModule, Schema2jsonldModule, SEOServiceModule,
|
||||
DeletedByInferenceModule, ShowAuthorsModule, HelperModule, ResultLandingUtilsModule, AlertModalModule,
|
||||
|
|
|
@ -3,7 +3,7 @@ import { Router, ActivatedRouteSnapshot, RouterStateSnapshot, UrlTree } from '@a
|
|||
import {Observable} from 'rxjs';
|
||||
import {LoginErrorCodes} from './utils/guardHelper.class';
|
||||
|
||||
@Injectable()
|
||||
@Injectable({providedIn: 'root'})
|
||||
export class FreeGuard {
|
||||
|
||||
constructor(private router: Router) {
|
||||
|
|
|
@ -7,16 +7,13 @@ import {UserRoutingModule} from './user-routing.module';
|
|||
|
||||
import {UserComponent} from './user.component';
|
||||
|
||||
import {PreviousRouteRecorder} from '../utils/piwik/previousRouteRecorder.guard';
|
||||
import {LoadingModule} from "../utils/loading/loading.module";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule, UserRoutingModule, RouterModule, LoadingModule
|
||||
],
|
||||
providers: [
|
||||
PreviousRouteRecorder
|
||||
],
|
||||
providers: [],
|
||||
declarations: [
|
||||
UserComponent
|
||||
],
|
||||
|
|
|
@ -239,7 +239,7 @@ export class Role {
|
|||
} else if (type == "organization") {
|
||||
type = "institution";
|
||||
}
|
||||
return Role.GROUP + type;
|
||||
return type;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import {NgModule} from "@angular/core";
|
||||
import {GeneralComponent} from "./general.component";
|
||||
import {GeneralRoutingModule} from "./general-routing.module";
|
||||
import {PreviousRouteRecorder} from "../../utils/piwik/previousRouteRecorder.guard";
|
||||
import {CommonModule} from "@angular/common";
|
||||
import {RouterModule} from "@angular/router";
|
||||
import {InputModule} from "../../sharedComponents/input/input.module";
|
||||
|
@ -30,9 +29,7 @@ import {
|
|||
LogoUrlPipeModule,
|
||||
SidebarMobileToggleModule
|
||||
],
|
||||
providers: [
|
||||
PreviousRouteRecorder,
|
||||
],
|
||||
providers: [],
|
||||
exports: [GeneralComponent]
|
||||
})
|
||||
export class GeneralModule {
|
||||
|
|
|
@ -12,14 +12,13 @@
|
|||
</div>
|
||||
<div actions>
|
||||
<div class="uk-section-xsmall">
|
||||
<div class="uk-flex uk-flex-center uk-flex-wrap uk-flex-middle"
|
||||
[ngClass]="properties.dashboard == 'irish' ? 'uk-flex-between@m' : 'uk-flex-right@m'">
|
||||
<div *ngIf="properties.dashboard == 'irish'" class="uk-width-medium uk-margin-small-bottom">
|
||||
<div input type="select" placeholder="Type"
|
||||
<div class="uk-flex uk-flex-center uk-flex-wrap uk-flex-middle uk-flex-between@m">
|
||||
<div class="uk-width-medium uk-margin-small-bottom">
|
||||
<div input type="select" placeholder="Type" [disabled]="loading"
|
||||
[options]="typeOptions" [formInput]="filters.get('type')">
|
||||
</div>
|
||||
</div>
|
||||
<div search-input [searchControl]="filters.get('keyword')" [expandable]="true"
|
||||
<div search-input [searchControl]="filters.get('keyword')" [expandable]="true" [disabled]="loading"
|
||||
placeholder="Search Profiles" searchInputClass="outer"
|
||||
class="uk-width-1-3@xl uk-width-2-5@l uk-width-1-2@m uk-width-1-1 uk-flex uk-flex-right"></div>
|
||||
</div>
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import {NgModule} from "@angular/core";
|
||||
import {ManageStakeholdersComponent} from "./manageStakeholders.component";
|
||||
import {ManageStakeholdersRoutingModule} from "./manageStakeholders-routing.module";
|
||||
import {PreviousRouteRecorder} from "../../utils/piwik/previousRouteRecorder.guard";
|
||||
import {CommonModule} from "@angular/common";
|
||||
import {RouterModule} from "@angular/router";
|
||||
import {InputModule} from "../../sharedComponents/input/input.module";
|
||||
|
@ -40,9 +39,7 @@ import {PagingModule} from "../../utils/paging.module";
|
|||
SliderTabsModule,
|
||||
PagingModule
|
||||
],
|
||||
providers: [
|
||||
PreviousRouteRecorder,
|
||||
],
|
||||
providers: [],
|
||||
exports: [ManageStakeholdersComponent]
|
||||
})
|
||||
export class ManageStakeholdersModule {
|
||||
|
|
|
@ -271,6 +271,12 @@
|
|||
[options]="indicatorUtils.formats" type="select">
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-width-1-2@m" formArrayName="parameters">
|
||||
<div *ngIf="getParameter(i, 'statsProfile', 'number') && statsProfiles" input [formInput]="getParameter(i, 'statsProfile', 'number').get('value')"
|
||||
[type]="'select'"
|
||||
[options]="statsProfiles"
|
||||
placeholder="Stats Profile"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div formArrayName="jsonPath" class="uk-width-1-1">
|
||||
|
@ -327,6 +333,20 @@
|
|||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="hasDifference(i, 'number')"
|
||||
class="uk-width-1-1 uk-height-1-1 refresh-indicator">
|
||||
<div class="uk-position-relative uk-height-1-1">
|
||||
<a class="uk-position-center uk-text-center uk-text-small uk-link-reset"
|
||||
[class.uk-disabled]="numberIndicatorPaths.at(i).get('url').invalid"
|
||||
(click)="refreshIndicator('number')">
|
||||
<div>
|
||||
<icon name="refresh"></icon>
|
||||
</div>
|
||||
<span>Calculate</span>
|
||||
<span *ngIf="numberIndicatorPaths.at(i).get('result').errors?.validating">Calculating...</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -400,6 +420,8 @@
|
|||
placeholder="Year (From)"></div>
|
||||
<div *ngIf="getParameter(i, 'end_year')" input class="uk-width-1-3@s" [formInput]="getParameter(i, 'end_year').get('value')"
|
||||
placeholder="Year (To)"></div>
|
||||
<div *ngIf="getParameter(i, 'statsProfile') && statsProfiles" input class="uk-width-1-3@s" [formInput]="getParameter(i, 'statsProfile').get('value')"
|
||||
[type]="'select'" [options]="statsProfiles" placeholder="Stats Profile"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="indicator && indicator.indicatorPaths[i] && indicator.indicatorPaths[i].safeResourceUrl"
|
||||
|
|
|
@ -44,6 +44,7 @@ import {NotificationService} from "../../notifications/notification.service";
|
|||
import {NotificationHandler} from "../../utils/notification-handler";
|
||||
import {IndicatorStakeholderBaseComponent} from "../utils/stakeholder-base.component";
|
||||
import {properties} from "../../../../environments/environment";
|
||||
import {StatsProfilesService} from "../utils/services/stats-profiles.service";
|
||||
|
||||
declare var UIkit;
|
||||
declare var copy;
|
||||
|
@ -68,6 +69,7 @@ export class IndicatorsComponent extends IndicatorStakeholderBaseComponent imple
|
|||
@Input()
|
||||
public user: User = null;
|
||||
public preview: string;
|
||||
public statsProfiles = [];
|
||||
public numberIndicatorFb: UntypedFormGroup;
|
||||
public chartIndicatorFb: UntypedFormGroup;
|
||||
public chartSections: UntypedFormArray;
|
||||
|
@ -119,6 +121,7 @@ export class IndicatorsComponent extends IndicatorStakeholderBaseComponent imple
|
|||
constructor(private layoutService: LayoutService,
|
||||
private stakeholderService: StakeholderService,
|
||||
private statisticsService: StatisticsService,
|
||||
private statsProfileService: StatsProfilesService,
|
||||
private notificationService: NotificationService,
|
||||
private fb: UntypedFormBuilder,
|
||||
protected _router: Router,
|
||||
|
@ -137,7 +140,16 @@ export class IndicatorsComponent extends IndicatorStakeholderBaseComponent imple
|
|||
this.setCharts();
|
||||
this.setNumbers();
|
||||
this.initReorder();
|
||||
})
|
||||
});
|
||||
if (this.isCurator) {
|
||||
this.subscriptions.push(this.statsProfileService.getStatsProfiles().subscribe(statsProfiles => {
|
||||
this.statsProfiles = [null].concat(statsProfiles);
|
||||
}, error => {
|
||||
this.statsProfiles = [];
|
||||
}));
|
||||
} else {
|
||||
this.statsProfiles = [];
|
||||
}
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
|
@ -400,7 +412,7 @@ export class IndicatorsComponent extends IndicatorStakeholderBaseComponent imple
|
|||
this.getJsonPath(index).disable();
|
||||
}
|
||||
indicatorPath.get('result').setErrors({validating: true});
|
||||
this.subscriptions.push(this.statisticsService.getNumbers(null, indicatorPath.get('url').value).subscribe(response => {
|
||||
this.subscriptions.push(this.statisticsService.getNumbers(indicatorPath.get('source').value, this.indicatorUtils.getFullUrl(this.stakeholder, this.indicator.indicatorPaths[index])).subscribe(response => {
|
||||
let result = JSON.parse(JSON.stringify(response));
|
||||
this.getJsonPath(index).controls.forEach(jsonPath => {
|
||||
if (result) {
|
||||
|
@ -448,12 +460,16 @@ export class IndicatorsComponent extends IndicatorStakeholderBaseComponent imple
|
|||
return this.section.indicators[this.index].indicatorPaths[index].jsonPath;
|
||||
}
|
||||
|
||||
public getParameters(index: number): UntypedFormArray {
|
||||
return this.chartIndicatorPaths.at(index).get('parameters') as UntypedFormArray;
|
||||
public getParameters(index: number, type: IndicatorType = 'chart'): UntypedFormArray {
|
||||
if(type === 'chart') {
|
||||
return this.chartIndicatorPaths.at(index).get('parameters') as UntypedFormArray;
|
||||
} else {
|
||||
return this.numberIndicatorPaths.at(index).get('parameters') as UntypedFormArray;
|
||||
}
|
||||
}
|
||||
|
||||
public getParameter(index: number, key: string): UntypedFormControl {
|
||||
return this.getParameters(index).controls.filter(control => control.value.key === key)[0] as UntypedFormControl;
|
||||
public getParameter(index: number, key: string, type: IndicatorType = 'chart'): UntypedFormControl {
|
||||
return this.getParameters(index, type).controls.filter(control => control.value.key === key)[0] as UntypedFormControl;
|
||||
}
|
||||
|
||||
private getSecureUrlByStakeHolder(indicatorPath: IndicatorPath) {
|
||||
|
@ -474,6 +490,7 @@ export class IndicatorsComponent extends IndicatorStakeholderBaseComponent imple
|
|||
jsonPath: jsonPath,
|
||||
result: this.fb.control(0, Validators.required),
|
||||
source: this.fb.control(source, Validators.required),
|
||||
parameters: parameters,
|
||||
format: this.fb.control(format, Validators.required)
|
||||
}
|
||||
));
|
||||
|
@ -506,6 +523,7 @@ export class IndicatorsComponent extends IndicatorStakeholderBaseComponent imple
|
|||
if (indicatorPath.source) {
|
||||
this.numberIndicatorPaths.at(index).get('source').setValue(indicatorPath.source);
|
||||
}
|
||||
(this.numberIndicatorPaths.at(index) as UntypedFormGroup).setControl('parameters', this.getParametersAsFormArray(indicatorPath));
|
||||
if (indicatorPath.jsonPath.length > 1 && this.getJsonPath(index).length == 1) {
|
||||
let paths = indicatorPath.jsonPath;
|
||||
for (let i = 0; i < paths.length; i++) {
|
||||
|
@ -568,8 +586,7 @@ export class IndicatorsComponent extends IndicatorStakeholderBaseComponent imple
|
|||
}
|
||||
this.checkForSchemaEnhancements(this.chartIndicatorPaths.at(index).get('url').value);
|
||||
(this.chartIndicatorPaths.at(index) as UntypedFormGroup).get('type').setValue(indicatorPath.type);
|
||||
let parameters = this.getParametersAsFormArray(indicatorPath);
|
||||
(this.chartIndicatorPaths.at(index) as UntypedFormGroup).setControl('parameters', parameters);
|
||||
(this.chartIndicatorPaths.at(index) as UntypedFormGroup).setControl('parameters', this.getParametersAsFormArray(indicatorPath));
|
||||
if (!this.indicator.indicatorPaths[index]) {
|
||||
this.indicator.indicatorPaths[index] = indicatorPath;
|
||||
this.indicator.indicatorPaths[index].safeResourceUrl = this.getSecureUrlByStakeHolder(indicatorPath);
|
||||
|
@ -642,7 +659,7 @@ export class IndicatorsComponent extends IndicatorStakeholderBaseComponent imple
|
|||
defaultId: this.fb.control(this.indicator.defaultId)
|
||||
});
|
||||
this.indicator.indicatorPaths.forEach(indicatorPath => {
|
||||
this.addNumberIndicatorPath(this.indicatorUtils.getNumberUrl(indicatorPath.source, this.indicatorUtils.getFullUrl(this.stakeholder, indicatorPath)), indicatorPath.parameters, indicatorPath.source, this.getJsonPathAsFormArray(indicatorPath), indicatorPath.format);
|
||||
this.addNumberIndicatorPath(this.indicatorUtils.getNumberUrl(indicatorPath.source, this.indicatorUtils.getFullUrl(this.stakeholder, indicatorPath)), this.getParametersAsFormArray(indicatorPath), indicatorPath.source, this.getJsonPathAsFormArray(indicatorPath), indicatorPath.format);
|
||||
});
|
||||
} else {
|
||||
this.indicator = new Indicator('', '', '', 'number', 'small', 'small', "PUBLIC", []);
|
||||
|
@ -754,11 +771,11 @@ export class IndicatorsComponent extends IndicatorStakeholderBaseComponent imple
|
|||
this.editing = true;
|
||||
if (this.indicator.type === 'chart') {
|
||||
this.chartIndicatorFb.get('description').enable();
|
||||
this.indicator = this.indicatorUtils.generateIndicatorByForm(this.chartIndicatorFb.value, this.indicator.indicatorPaths, this.indicator.type, true);
|
||||
this.indicator = this.indicatorUtils.generateIndicatorByForm(this.chartIndicatorFb.value, this.indicator.indicatorPaths, this.indicator.type);
|
||||
this.section = this.charts.find(section => section._id === this.section._id);
|
||||
} else {
|
||||
this.numberIndicatorFb.get('description').enable();
|
||||
this.indicator = this.indicatorUtils.generateIndicatorByForm(this.numberIndicatorFb.value, this.indicator.indicatorPaths, this.indicator.type, false);
|
||||
this.indicator = this.indicatorUtils.generateIndicatorByForm(this.numberIndicatorFb.value, this.indicator.indicatorPaths, this.indicator.type);
|
||||
this.section = this.numbers.find(section => section._id === this.section._id);
|
||||
}
|
||||
let path = [
|
||||
|
@ -917,16 +934,27 @@ export class IndicatorsComponent extends IndicatorStakeholderBaseComponent imple
|
|||
}));
|
||||
}
|
||||
|
||||
hasDifference(index: number): boolean {
|
||||
hasDifference(index: number, type: IndicatorType = 'chart'): boolean {
|
||||
let hasDifference = false;
|
||||
this.chartIndicatorPaths.at(index).value.parameters.forEach((parameter) => {
|
||||
if (parameter.value !== this.indicator.indicatorPaths[index].parameters[parameter.key]) {
|
||||
hasDifference = true;
|
||||
return;
|
||||
}
|
||||
});
|
||||
return hasDifference || this.indicator.indicatorPaths[index].safeResourceUrl.toString() !==
|
||||
this.getSecureUrlByStakeHolder(this.indicator.indicatorPaths[index]).toString();
|
||||
if(type === 'chart') {
|
||||
this.chartIndicatorPaths.at(index).value.parameters.forEach(parameter => {
|
||||
if (parameter.value !== this.indicator.indicatorPaths[index].parameters[parameter.key]) {
|
||||
hasDifference = true;
|
||||
return;
|
||||
}
|
||||
});
|
||||
return hasDifference || this.indicator.indicatorPaths[index].safeResourceUrl.toString() !==
|
||||
this.getSecureUrlByStakeHolder(this.indicator.indicatorPaths[index]).toString();
|
||||
} else if(type === 'number') {
|
||||
let indicatorPath = this.numberIndicatorPaths.at(index).value;
|
||||
indicatorPath.parameters.forEach(parameter => {
|
||||
if (parameter.value !== this.indicator.indicatorPaths[index].parameters[parameter.key]) {
|
||||
hasDifference = true;
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
return hasDifference;
|
||||
}
|
||||
|
||||
public get isAdministrator(): boolean {
|
||||
|
@ -937,11 +965,18 @@ export class IndicatorsComponent extends IndicatorStakeholderBaseComponent imple
|
|||
return this.isAdministrator || Session.isCurator(this.stakeholder.type, this.user);
|
||||
}
|
||||
|
||||
refreshIndicator() {
|
||||
this.indicator = this.indicatorUtils.generateIndicatorByForm(this.chartIndicatorFb.value, this.indicator.indicatorPaths, 'chart', true);
|
||||
this.indicator.indicatorPaths.forEach(indicatorPath => {
|
||||
indicatorPath.safeResourceUrl = this.getSecureUrlByStakeHolder(indicatorPath);
|
||||
});
|
||||
refreshIndicator(type: IndicatorType = 'chart') {
|
||||
if(type === 'chart') {
|
||||
this.indicator = this.indicatorUtils.generateIndicatorByForm(this.chartIndicatorFb.value, this.indicator.indicatorPaths, 'chart');
|
||||
this.indicator.indicatorPaths.forEach(indicatorPath => {
|
||||
indicatorPath.safeResourceUrl = this.getSecureUrlByStakeHolder(indicatorPath);
|
||||
});
|
||||
} else if(type === 'number') {
|
||||
this.indicator = this.indicatorUtils.generateIndicatorByForm(this.numberIndicatorFb.value, this.indicator.indicatorPaths, 'number');
|
||||
this.indicator.indicatorPaths.forEach((indicatorPath, index) => {
|
||||
this.validateJsonPath(index);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
deleteIndicatorOpen(section: Section, indicatorId: string, type: string, childrenAction: string = null) {
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
import {NgModule} from '@angular/core';
|
||||
import {CommonModule} from '@angular/common';
|
||||
|
||||
import {PreviousRouteRecorder} from '../../utils/piwik/previousRouteRecorder.guard';
|
||||
|
||||
import {PiwikService} from '../../utils/piwik/piwik.service';
|
||||
import {TopicComponent} from "./topic.component";
|
||||
import {TopicRoutingModule} from "./topic-routing.module";
|
||||
import {RouterModule} from "@angular/router";
|
||||
|
@ -22,9 +19,7 @@ import {LogoUrlPipeModule} from "../../utils/pipes/logoUrlPipe.module";
|
|||
import {TransitionGroupModule} from "../../utils/transition-group/transition-group.module";
|
||||
import {NumberRoundModule} from "../../utils/pipes/number-round.module";
|
||||
import {SideBarModule} from "../../dashboard/sharedComponents/sidebar/sideBar.module";
|
||||
import {
|
||||
SidebarMobileToggleModule
|
||||
} from "../../dashboard/sharedComponents/sidebar/sidebar-mobile-toggle/sidebar-mobile-toggle.module";
|
||||
import {SidebarMobileToggleModule} from "../../dashboard/sharedComponents/sidebar/sidebar-mobile-toggle/sidebar-mobile-toggle.module";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
|
@ -34,10 +29,7 @@ import {
|
|||
declarations: [
|
||||
TopicComponent, IndicatorsComponent
|
||||
],
|
||||
providers: [
|
||||
PreviousRouteRecorder,
|
||||
PiwikService
|
||||
],
|
||||
providers: [],
|
||||
exports: [
|
||||
TopicComponent
|
||||
]
|
||||
|
|
|
@ -85,7 +85,7 @@ export class StakeholderUtils {
|
|||
visibilityIcon: Map<Visibility, string> = new Map<Visibility, string>(this.visibilities.map(option => [option.value, option.icon]));
|
||||
|
||||
defaultValue(options: Option[]) {
|
||||
return options.length === 1?options[0].value:null;
|
||||
return options.length === 1 ? options[0].value : null;
|
||||
}
|
||||
|
||||
showField(options: Option[]) {
|
||||
|
@ -94,7 +94,7 @@ export class StakeholderUtils {
|
|||
|
||||
getLabel(options: Option[], value) {
|
||||
let option = options.find(option => option.value === value);
|
||||
return option?option.label:null;
|
||||
return option ? option.label : null;
|
||||
}
|
||||
|
||||
getTypesByUserRoles(user, id: string = null): Option[] {
|
||||
|
@ -317,9 +317,14 @@ export class IndicatorUtils {
|
|||
|
||||
public getFullUrl(stakeholder: Stakeholder, indicatorPath: IndicatorPath, fundingL0: string = null, startYear: string = null, endYear: string = null): string {
|
||||
let replacedUrl = indicatorPath.chartObject ? indicatorPath.chartObject : indicatorPath.url;
|
||||
if (stakeholder.statsProfile) {
|
||||
if (indicatorPath.parameters.statsProfile) {
|
||||
replacedUrl = replacedUrl.split(ChartHelper.prefix + this.statsProfileParameter + ChartHelper.suffix).join(indicatorPath.parameters.statsProfile)
|
||||
} else if (stakeholder.statsProfile) {
|
||||
replacedUrl = replacedUrl.split(ChartHelper.prefix + this.statsProfileParameter + ChartHelper.suffix).join(stakeholder.statsProfile)
|
||||
}
|
||||
replacedUrl = replacedUrl.split(ChartHelper.prefix + 'index_id' + ChartHelper.suffix).join(stakeholder.index_id);
|
||||
replacedUrl = replacedUrl.split(ChartHelper.prefix + 'index_shortName' + ChartHelper.suffix).join(stakeholder.index_shortName);
|
||||
replacedUrl = replacedUrl.split(ChartHelper.prefix + 'index_name' + ChartHelper.suffix).join(stakeholder.index_name);
|
||||
if (indicatorPath.parameters) {
|
||||
Object.keys(indicatorPath.parameters).forEach(key => {
|
||||
let replacedValue = indicatorPath.parameters[key];
|
||||
|
@ -329,16 +334,6 @@ export class IndicatorUtils {
|
|||
if (endYear && key == "end_year" && indicatorPath.filters["end_year"]) {
|
||||
replacedValue = (replacedValue > endYear) ? endYear : replacedValue;
|
||||
}
|
||||
if (key == "index_id") {
|
||||
replacedValue = stakeholder.index_id;
|
||||
}
|
||||
if (key == "index_name") {
|
||||
replacedValue = stakeholder.index_name;
|
||||
}
|
||||
if (key == "index_shortName") {
|
||||
replacedValue = stakeholder.index_shortName.toLowerCase();
|
||||
}
|
||||
|
||||
replacedUrl = replacedUrl.split(ChartHelper.prefix + key + ChartHelper.suffix).join(replacedValue)
|
||||
});
|
||||
}
|
||||
|
@ -392,19 +387,24 @@ export class IndicatorUtils {
|
|||
return (indicatorPath.chartObject ? indicatorPath.url + encodeURIComponent(replacedUrl) : replacedUrl);
|
||||
}
|
||||
|
||||
public getFullUrlWithFilters(stakeholder: Stakeholder, indicatorPath: IndicatorPath, fundingL0: string = null, startYear: string = null, endYear: string = null, coFunded: boolean = false, foslvl1:string[]=[], foslvl2:string[]=[], publiclyFunded: "all"| "true"| "false"= "all" ): string {
|
||||
public getFullUrlWithFilters(stakeholder: Stakeholder, indicatorPath: IndicatorPath, fundingL0: string = null, startYear: string = null, endYear: string = null, coFunded: boolean = false, foslvl1: string[] = [], foslvl2: string[] = [], publiclyFunded: "all" | "true" | "false" = "all"): string {
|
||||
let filterSubtitleText = [];
|
||||
indicatorPath.filtersApplied = 0;
|
||||
let replacedUrl = indicatorPath.chartObject ? indicatorPath.chartObject : indicatorPath.url;
|
||||
if (stakeholder.statsProfile) {
|
||||
replacedUrl = replacedUrl.split(ChartHelper.prefix + this.statsProfileParameter + ChartHelper.suffix).join(stakeholder.statsProfile);
|
||||
if (indicatorPath.parameters.statsProfile) {
|
||||
replacedUrl = replacedUrl.split(ChartHelper.prefix + this.statsProfileParameter + ChartHelper.suffix).join(indicatorPath.parameters.statsProfile)
|
||||
} else if (stakeholder.statsProfile) {
|
||||
replacedUrl = replacedUrl.split(ChartHelper.prefix + this.statsProfileParameter + ChartHelper.suffix).join(stakeholder.statsProfile)
|
||||
}
|
||||
replacedUrl = replacedUrl.split(ChartHelper.prefix + 'index_id' + ChartHelper.suffix).join(stakeholder.index_id);
|
||||
replacedUrl = replacedUrl.split(ChartHelper.prefix + 'index_shortName' + ChartHelper.suffix).join(stakeholder.index_shortName);
|
||||
replacedUrl = replacedUrl.split(ChartHelper.prefix + 'index_name' + ChartHelper.suffix).join(stakeholder.index_name);
|
||||
if (fundingL0) {
|
||||
if (indicatorPath.source == "stats-tool" && indicatorPath.chartObject) {
|
||||
let filterResults = this.addFilter(replacedUrl, 'fundingL0', fundingL0);
|
||||
replacedUrl = filterResults.url;
|
||||
indicatorPath.filtersApplied += filterResults.filtersApplied;
|
||||
filterSubtitleText.push( "Funding level 0: " ) ;
|
||||
filterSubtitleText.push("Funding level 0: ");
|
||||
}
|
||||
}
|
||||
if (startYear) {
|
||||
|
@ -421,7 +421,7 @@ export class IndicatorUtils {
|
|||
indicatorPath.filtersApplied += filterResults.filtersApplied;
|
||||
}
|
||||
}
|
||||
if(startYear || endYear) {
|
||||
if (startYear || endYear) {
|
||||
filterSubtitleText.push(startYear && endYear ? (startYear + ' - ' + endYear) : (endYear ? ('until ' + endYear) : ''));
|
||||
}
|
||||
if (coFunded) {
|
||||
|
@ -429,33 +429,33 @@ export class IndicatorUtils {
|
|||
let filterResults = this.addFilter(replacedUrl, 'co-funded', coFunded);
|
||||
replacedUrl = filterResults.url;
|
||||
indicatorPath.filtersApplied += filterResults.filtersApplied;
|
||||
filterSubtitleText.push( "Co-funded: " + (coFunded?'yes':'no') ) ;
|
||||
filterSubtitleText.push("Co-funded: " + (coFunded ? 'yes' : 'no'));
|
||||
}
|
||||
}
|
||||
if (publiclyFunded && publiclyFunded !="all") {
|
||||
if (publiclyFunded && publiclyFunded != "all") {
|
||||
if (indicatorPath.source == "stats-tool" && indicatorPath.chartObject) {
|
||||
let filterResults = this.addFilter(replacedUrl, 'publicly-funded', publiclyFunded);
|
||||
replacedUrl = filterResults.url;
|
||||
indicatorPath.filtersApplied += filterResults.filtersApplied;
|
||||
filterSubtitleText.push( "Publicly funded: " + (publiclyFunded?'yes':'no') ) ;
|
||||
filterSubtitleText.push("Publicly funded: " + (publiclyFunded ? 'yes' : 'no'));
|
||||
}
|
||||
}
|
||||
if (foslvl1) {
|
||||
if (indicatorPath.source == "stats-tool" && indicatorPath.chartObject) {
|
||||
let filterResults = this.addFilter(replacedUrl, 'foslvl1', foslvl1);
|
||||
replacedUrl = filterResults.url;
|
||||
indicatorPath.filtersApplied +=filterResults.filtersApplied?foslvl1.length:0;
|
||||
let filterResults = this.addFilter(replacedUrl, 'foslvl1', foslvl1);
|
||||
replacedUrl = filterResults.url;
|
||||
indicatorPath.filtersApplied += filterResults.filtersApplied ? foslvl1.length : 0;
|
||||
}
|
||||
}
|
||||
if (foslvl2) {
|
||||
if (indicatorPath.source == "stats-tool" && indicatorPath.chartObject) {
|
||||
let filterResults = this.addFilter(replacedUrl, 'foslvl2', foslvl2);
|
||||
replacedUrl = filterResults.url;
|
||||
indicatorPath.filtersApplied += filterResults.filtersApplied?foslvl2.length:0;
|
||||
let filterResults = this.addFilter(replacedUrl, 'foslvl2', foslvl2);
|
||||
replacedUrl = filterResults.url;
|
||||
indicatorPath.filtersApplied += filterResults.filtersApplied ? foslvl2.length : 0;
|
||||
}
|
||||
}
|
||||
if((foslvl1 && foslvl1.length > 0) || (foslvl2 && foslvl2.length > 0)){
|
||||
filterSubtitleText.push( "Field of Science: " + foslvl1.join(', ') + ( foslvl1.length > 0 && foslvl2.length > 0? ', ': '') + foslvl2.join(", ") ) ;
|
||||
if ((foslvl1 && foslvl1.length > 0) || (foslvl2 && foslvl2.length > 0)) {
|
||||
filterSubtitleText.push("Field of Science: " + foslvl1.join(', ') + (foslvl1.length > 0 && foslvl2.length > 0 ? ', ' : '') + foslvl2.join(", "));
|
||||
}
|
||||
if (indicatorPath.parameters) {
|
||||
Object.keys(indicatorPath.parameters).forEach(key => {
|
||||
|
@ -470,17 +470,8 @@ export class IndicatorUtils {
|
|||
//if there is a parameter that is filtered and the value of the parameter changes, count the filter as applied
|
||||
indicatorPath.filtersApplied++;
|
||||
}
|
||||
if (key == "index_id") {
|
||||
replacedValue = stakeholder.index_id;
|
||||
}
|
||||
if (key == "index_name") {
|
||||
replacedValue = stakeholder.index_name;
|
||||
}
|
||||
if (key == "index_shortName") {
|
||||
replacedValue = stakeholder.index_shortName.toLowerCase();
|
||||
}
|
||||
if (key == "subtitle" && filterSubtitleText.length > 0) {
|
||||
replacedValue = replacedValue + (replacedValue.length > 0 ? ' - ':'') + ' Active filters: ('+filterSubtitleText.join(", ") + ')';
|
||||
replacedValue = replacedValue + (replacedValue.length > 0 ? ' - ' : '') + ' Active filters: (' + filterSubtitleText.join(", ") + ')';
|
||||
}
|
||||
replacedUrl = replacedUrl.split(ChartHelper.prefix + key + ChartHelper.suffix).join(replacedValue)
|
||||
});
|
||||
|
@ -573,7 +564,7 @@ export class IndicatorUtils {
|
|||
/*Chart with proper json object*/
|
||||
//apply the filter in any select fields
|
||||
for (let select of queries["query"]["select"]) {
|
||||
let filterString = IndicatorFilterUtils.getFilter(select["field"], filterType,filterValue);
|
||||
let filterString = IndicatorFilterUtils.getFilter(select["field"], filterType, filterValue);
|
||||
if (filterString) {
|
||||
let filter = JSON.parse(filterString);
|
||||
//check if filter already exists
|
||||
|
@ -635,21 +626,19 @@ export class IndicatorUtils {
|
|||
return values.length > 1;
|
||||
}
|
||||
|
||||
generateIndicatorByForm(form: any, indicatorPaths: IndicatorPath[], type: IndicatorType, addParameters: boolean = true): Indicator {
|
||||
generateIndicatorByForm(form: any, indicatorPaths: IndicatorPath[], type: IndicatorType): Indicator {
|
||||
let indicator: Indicator = new Indicator(form.name, form.description, form.additionalDescription, type,
|
||||
form.width, form.height, form.visibility, indicatorPaths, form.defaultId);
|
||||
indicator._id = form._id;
|
||||
form.indicatorPaths.forEach((indicatorPath, index) => {
|
||||
indicator.indicatorPaths[index].type = indicatorPath.type;
|
||||
indicator.indicatorPaths[index].format = indicatorPath.format;
|
||||
if (addParameters) {
|
||||
indicatorPath.parameters.forEach(parameter => {
|
||||
indicator.indicatorPaths[index].parameters[parameter.key] = parameter.value;
|
||||
if (parameter.key === 'type') {
|
||||
indicator.indicatorPaths[index].type = parameter.value;
|
||||
}
|
||||
});
|
||||
}
|
||||
indicatorPath.parameters.forEach(parameter => {
|
||||
indicator.indicatorPaths[index].parameters[parameter.key] = parameter.value;
|
||||
if (parameter.key === 'type') {
|
||||
indicator.indicatorPaths[index].type = parameter.value;
|
||||
}
|
||||
});
|
||||
});
|
||||
return indicator;
|
||||
}
|
||||
|
@ -663,6 +652,7 @@ export class IndicatorUtils {
|
|||
let chart = JSON.parse(indicatorPath.chartObject);
|
||||
this.parameterizeDefaultQuery(chart, indicatorPath, stakeholder);
|
||||
this.extractStakeHolders(chart, indicatorPath, stakeholder);
|
||||
this.addProfile(indicatorPath);
|
||||
indicatorPath.chartObject = JSON.stringify(chart);
|
||||
if (!jsonPath || jsonPath.length == 0 || (jsonPath.length == 1 && jsonPath[0] == "")) {
|
||||
indicatorPath.jsonPath = ["data", "0", "0", "0"];
|
||||
|
@ -722,6 +712,7 @@ export class IndicatorUtils {
|
|||
this.extractStakeHolders(chart, indicatorPath, stakeholder);
|
||||
this.extractStartYear(chart, indicatorPath);
|
||||
this.extractEndYear(chart, indicatorPath);
|
||||
this.addProfile(indicatorPath);
|
||||
indicatorPath.chartObject = JSON.stringify(chart);
|
||||
}
|
||||
} else if (source === 'old') {
|
||||
|
@ -801,11 +792,11 @@ export class IndicatorUtils {
|
|||
for (let filter of query["query"]["filters"]) {
|
||||
for (let gfilter of filter["groupFilters"]) {
|
||||
//ignore field No Of Funders
|
||||
let replacedValue = this.replaceIndexValues(gfilter["values"][0], stakeholder, indicatorPath.parameters);
|
||||
if(replacedValue) { // don't proceed in replacement if no replaced value matches
|
||||
if ((gfilter["field"].indexOf(" funder") != -1 && gfilter["field"].indexOf(" funders") == -1 ) ||
|
||||
(gfilter["field"].indexOf(".funder") != -1) ||
|
||||
(gfilter["field"].indexOf(".funder.id") != -1)) {
|
||||
let replacedValue = this.replaceIndexValues(gfilter["values"][0], stakeholder);
|
||||
if (replacedValue) { // don't proceed in replacement if no replaced value matches
|
||||
if ((gfilter["field"].indexOf(" funder") != -1 && gfilter["field"].indexOf(" funders") == -1) ||
|
||||
(gfilter["field"].indexOf(".funder") != -1) ||
|
||||
(gfilter["field"].indexOf(".funder.id") != -1)) {
|
||||
gfilter["values"][0] = replacedValue;
|
||||
}
|
||||
}
|
||||
|
@ -827,10 +818,10 @@ export class IndicatorUtils {
|
|||
}
|
||||
for (let filter of query["query"]["filters"]) {
|
||||
for (let gfilter of filter["groupFilters"]) {
|
||||
let replacedValue = this.replaceIndexValues(gfilter["values"][0], stakeholder, indicatorPath.parameters);
|
||||
if(replacedValue) { // don't proceed in replacement if no replaced value matches
|
||||
let replacedValue = this.replaceIndexValues(gfilter["values"][0], stakeholder);
|
||||
if (replacedValue) { // don't proceed in replacement if no replaced value matches
|
||||
if ((gfilter["field"].indexOf(".context.name") != -1)
|
||||
|| (gfilter["field"].indexOf(".context.id") != -1)) {
|
||||
|| (gfilter["field"].indexOf(".context.id") != -1)) {
|
||||
gfilter["values"][0] = replacedValue;
|
||||
}
|
||||
}
|
||||
|
@ -854,10 +845,10 @@ export class IndicatorUtils {
|
|||
}
|
||||
for (let filter of query["query"]["filters"]) {
|
||||
for (let gfilter of filter["groupFilters"]) {
|
||||
let replacedValue = this.replaceIndexValues(gfilter["values"][0], stakeholder, indicatorPath.parameters);
|
||||
if(replacedValue) { // don't proceed in replacement if no replaced value matches
|
||||
if ((gfilter["field"].indexOf(".organization.name") != -1)||
|
||||
(gfilter["field"].indexOf(".organization.id") != -1)) {
|
||||
let replacedValue = this.replaceIndexValues(gfilter["values"][0], stakeholder);
|
||||
if (replacedValue) { // don't proceed in replacement if no replaced value matches
|
||||
if ((gfilter["field"].indexOf(".organization.name") != -1) ||
|
||||
(gfilter["field"].indexOf(".organization.id") != -1)) {
|
||||
gfilter["values"][0] = replacedValue;
|
||||
}
|
||||
}
|
||||
|
@ -865,6 +856,7 @@ export class IndicatorUtils {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
private extractDatasource(obj, indicatorPath: IndicatorPath, stakeholder: Stakeholder) {
|
||||
// works for .datasource.name and .HostedBy datasource
|
||||
// and .datasource.id
|
||||
|
@ -880,10 +872,10 @@ export class IndicatorUtils {
|
|||
}
|
||||
for (let filter of query["query"]["filters"]) {
|
||||
for (let gfilter of filter["groupFilters"]) {
|
||||
let replacedValue = this.replaceIndexValues(gfilter["values"][0], stakeholder, indicatorPath.parameters);
|
||||
if(replacedValue) { // don't proceed in replacement if no replaced value matches
|
||||
if ((gfilter["field"].indexOf(".datasource.name") != -1 || gfilter["field"].indexOf(".HostedBy datasource") != -1)||
|
||||
(gfilter["field"].indexOf(".datasource.id") != -1) || (gfilter["field"].indexOf(".hostedby") != -1)) {
|
||||
let replacedValue = this.replaceIndexValues(gfilter["values"][0], stakeholder);
|
||||
if (replacedValue) { // don't proceed in replacement if no replaced value matches
|
||||
if ((gfilter["field"].indexOf(".datasource.name") != -1 || gfilter["field"].indexOf(".HostedBy datasource") != -1) ||
|
||||
(gfilter["field"].indexOf(".datasource.id") != -1) || (gfilter["field"].indexOf(".hostedby") != -1)) {
|
||||
gfilter["values"][0] = replacedValue;
|
||||
}
|
||||
}
|
||||
|
@ -891,6 +883,7 @@ export class IndicatorUtils {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
private extractResearcher(obj, indicatorPath: IndicatorPath, stakeholder: Stakeholder) {
|
||||
// works for .orcid
|
||||
if (stakeholder.type != "researcher") {
|
||||
|
@ -905,9 +898,9 @@ export class IndicatorUtils {
|
|||
}
|
||||
for (let filter of query["query"]["filters"]) {
|
||||
for (let gfilter of filter["groupFilters"]) {
|
||||
let replacedValue = this.replaceIndexValues(gfilter["values"][0], stakeholder, indicatorPath.parameters);
|
||||
if(replacedValue) { // don't proceed in replacement if no replaced value matches
|
||||
if ((gfilter["field"].indexOf(".orcid") != -1 )) {
|
||||
let replacedValue = this.replaceIndexValues(gfilter["values"][0], stakeholder);
|
||||
if (replacedValue) { // don't proceed in replacement if no replaced value matches
|
||||
if ((gfilter["field"].indexOf(".orcid") != -1)) {
|
||||
gfilter["values"][0] = replacedValue;
|
||||
}
|
||||
}
|
||||
|
@ -915,19 +908,18 @@ export class IndicatorUtils {
|
|||
}
|
||||
}
|
||||
}
|
||||
private replaceIndexValues(currentValue, stakeholder, parameters ){
|
||||
if(currentValue == stakeholder.index_name){
|
||||
parameters["index_name"] = stakeholder.index_name;
|
||||
|
||||
private replaceIndexValues(currentValue, stakeholder) {
|
||||
if (currentValue == stakeholder.index_name) {
|
||||
return ChartHelper.prefix + "index_name" + ChartHelper.suffix;
|
||||
}else if(currentValue == stakeholder.index_id){
|
||||
parameters["index_id"] = stakeholder.index_id;
|
||||
} else if (currentValue == stakeholder.index_id) {
|
||||
return ChartHelper.prefix + "index_id" + ChartHelper.suffix;
|
||||
}else if(currentValue == stakeholder.index_shortName) {
|
||||
parameters["index_shortName"] = stakeholder.index_shortName;
|
||||
} else if (currentValue == stakeholder.index_shortName) {
|
||||
return ChartHelper.prefix + "index_shortName" + ChartHelper.suffix;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private extractStartYear(obj, indicatorPath: IndicatorPath) {
|
||||
let start_year;
|
||||
for (let query of obj[this.getDescriptionObjectName(obj)][this.getQueryObjectName(obj)]) {
|
||||
|
@ -964,6 +956,10 @@ export class IndicatorUtils {
|
|||
}
|
||||
}
|
||||
|
||||
private addProfile(indicatorPath: IndicatorPath) {
|
||||
indicatorPath.parameters['statsProfile'] = null;
|
||||
}
|
||||
|
||||
private parameterizeDefaultQuery(obj, indicatorPath: IndicatorPath, stakeholder: Stakeholder) {
|
||||
let name = "";
|
||||
for (let query of this.getQueryObjectName(obj) ? obj[this.getDescriptionObjectName(obj)][this.getQueryObjectName(obj)] : obj[this.getDescriptionObjectName(obj)]) {
|
||||
|
@ -990,13 +986,10 @@ export class IndicatorUtils {
|
|||
for (let i of index) {
|
||||
if (name.split('.').length > 3 && name.split('.')[3] == "id") {
|
||||
parameters[i] = ChartHelper.prefix + "index_id" + ChartHelper.suffix;
|
||||
indicatorPath.parameters["index_id"] = stakeholder.index_id;
|
||||
} else if (name.split('.').length > 3 && name.split('.')[3] == "shortname") {
|
||||
parameters[i] = ChartHelper.prefix + "index_shortName" + ChartHelper.suffix;
|
||||
indicatorPath.parameters["index_shortName"] = stakeholder.index_shortName.toLowerCase();
|
||||
} else if (name.split('.').length > 3 && name.split('.')[3] == "name") {
|
||||
parameters[i] = ChartHelper.prefix + "index_name" + ChartHelper.suffix;
|
||||
indicatorPath.parameters["index_name"] = stakeholder.index_name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import {SafeResourceUrl} from "@angular/platform-browser";
|
||||
import {properties} from "../../../../environments/environment";
|
||||
import {Session, User} from "../../login/utils/helper.class";
|
||||
import {StringUtils} from "../../utils/string-utils.class";
|
||||
|
||||
export const ChartHelper = {
|
||||
prefix: "((__",
|
||||
|
@ -52,6 +52,17 @@ export class Stakeholder {
|
|||
this.description = description;
|
||||
this.topics = [];
|
||||
}
|
||||
|
||||
static checkIsUpload(response: Stakeholder | Stakeholder[]): any | any[] {
|
||||
if (Array.isArray(response)) {
|
||||
response.forEach(value => {
|
||||
value.isUpload = value.logoUrl && !StringUtils.isValidUrl(value.logoUrl);
|
||||
});
|
||||
} else {
|
||||
response.isUpload = response.logoUrl && !StringUtils.isValidUrl(response.logoUrl);
|
||||
}
|
||||
return response;
|
||||
}
|
||||
}
|
||||
|
||||
export class StakeholderInfo extends Stakeholder {
|
||||
|
|
|
@ -50,10 +50,10 @@ export abstract class MonitorIndicatorStakeholderBaseComponent extends Indicator
|
|||
selectedFromAndToValues: ""
|
||||
};
|
||||
rangeFilter: RangeFilterComponent;
|
||||
|
||||
minYear = Dates.currentYear - 20;
|
||||
maxYear = Dates.currentYear;
|
||||
public numberResults: Map<string, number> = new Map<string, number>();
|
||||
public chartsActiveType: Map<string, IndicatorPath> = new Map<string, IndicatorPath>();
|
||||
public currentYear = new Date().getFullYear();
|
||||
public clipboard;
|
||||
|
||||
/** Services */
|
||||
|
@ -179,12 +179,12 @@ export abstract class MonitorIndicatorStakeholderBaseComponent extends Indicator
|
|||
|
||||
protected validateYearRange(navigateTo: boolean = false) {
|
||||
let validYears = true;
|
||||
if (this.periodFilter.selectedToValue && (this.periodFilter.selectedToValue.length == 0 || !Dates.isValidYear(this.periodFilter.selectedToValue, Dates.currentYear - 20, Dates.currentYear))) {
|
||||
this.periodFilter.selectedToValue = Dates.currentYear + "";
|
||||
if (this.periodFilter.selectedToValue && (this.periodFilter.selectedToValue.length == 0 || !Dates.isValidYear(this.periodFilter.selectedToValue, this.minYear, this.maxYear))) {
|
||||
this.periodFilter.selectedToValue = this.maxYear + "";
|
||||
validYears = false;
|
||||
}
|
||||
if (this.periodFilter.selectedFromValue && (this.periodFilter.selectedFromValue.length == 0 || !Dates.isValidYear(this.periodFilter.selectedFromValue, Dates.currentYear - 20, Dates.currentYear))) {
|
||||
this.periodFilter.selectedFromValue = Dates.currentYear - 20 + "";
|
||||
if (this.periodFilter.selectedFromValue && (this.periodFilter.selectedFromValue.length == 0 || !Dates.isValidYear(this.periodFilter.selectedFromValue, this.minYear, this.maxYear))) {
|
||||
this.periodFilter.selectedFromValue = this.minYear + "";
|
||||
validYears = false;
|
||||
}
|
||||
if (this.periodFilter.selectedFromValue && this.periodFilter.selectedFromValue.length && this.periodFilter.selectedToValue && this.periodFilter.selectedToValue.length > 0 && parseInt(this.periodFilter.selectedFromValue, 10) > parseInt(this.periodFilter.selectedToValue, 10)) {
|
||||
|
@ -208,6 +208,8 @@ export abstract class MonitorIndicatorStakeholderBaseComponent extends Indicator
|
|||
}
|
||||
|
||||
protected setIndicators() {
|
||||
this.activeSubCategory.numbers = this.activeSubCategory.numbers.filter(section => section.indicators.length > 0);
|
||||
this.activeSubCategory.charts = this.activeSubCategory.charts.filter(section => section.indicators.length > 0);
|
||||
this.periodFilter.selectedFromAndToValues = (this.periodFilter.selectedFromValue || this.periodFilter.selectedToValue ? ((this.periodFilter.selectedFromValue && !this.periodFilter.selectedToValue ? "From " : "") + (!this.periodFilter.selectedFromValue && this.periodFilter.selectedToValue ? "Until " : "") + (this.periodFilter.selectedFromValue ? this.periodFilter.selectedFromValue : "") +
|
||||
(this.periodFilter.selectedFromValue && this.periodFilter.selectedToValue ? " - " : "") + (this.periodFilter.selectedToValue ? this.periodFilter.selectedToValue : "")) : "");
|
||||
//clear numbers when filters change
|
||||
|
|
|
@ -6,7 +6,6 @@ import {HelperFunctions} from "../../utils/HelperFunctions.class";
|
|||
import {map} from "rxjs/operators";
|
||||
import {properties} from "../../../../environments/environment";
|
||||
import {CustomOptions} from "../../services/servicesUtils/customOptions.class";
|
||||
import {StringUtils} from "../../utils/string-utils.class";
|
||||
|
||||
export interface Reorder {
|
||||
action: 'moved' | 'added' | 'removed',
|
||||
|
@ -41,7 +40,7 @@ export class StakeholderService {
|
|||
if (!this.stakeholderSubject.value || this.stakeholderSubject.value.alias !== alias || shouldUpdate) {
|
||||
this.promise = new Promise<void>((resolve, reject) => {
|
||||
this.sub = this.http.get<Stakeholder>(properties.monitorServiceAPIURL + '/stakeholder/' + encodeURIComponent(alias), CustomOptions.registryOptions()).pipe(map(stakeholder => {
|
||||
return this.formalize(this.checkIsUpload(stakeholder));
|
||||
return HelperFunctions.copy(Stakeholder.checkIsUpload(stakeholder));
|
||||
})).subscribe(stakeholder => {
|
||||
this.stakeholderSubject.next(stakeholder);
|
||||
resolve();
|
||||
|
@ -53,23 +52,24 @@ export class StakeholderService {
|
|||
}
|
||||
return from(this.getStakeholderAsync());
|
||||
}
|
||||
getResearcherStakeholder( orcid, name, results, shouldUpdate: boolean = false): Observable<Stakeholder> {
|
||||
|
||||
getResearcherStakeholder(orcid, name, results, shouldUpdate: boolean = false): Observable<Stakeholder> {
|
||||
if (!this.stakeholderSubject.value || this.stakeholderSubject.value.alias !== orcid || shouldUpdate) {
|
||||
this.promise = new Promise<void>((resolve, reject) => {
|
||||
this.sub = this.http.get<Stakeholder>(properties.monitorServiceAPIURL + '/stakeholder/' + encodeURIComponent("researcher"), CustomOptions.registryOptions()).pipe(map(stakeholder => {
|
||||
return this.formalize(this.checkIsUpload(stakeholder));
|
||||
return HelperFunctions.copy(Stakeholder.checkIsUpload(stakeholder));
|
||||
})).subscribe(stakeholder => {
|
||||
stakeholder.index_id = orcid;
|
||||
stakeholder.index_name = name;
|
||||
stakeholder.name = name;
|
||||
stakeholder.alias = orcid;
|
||||
if(results <7 && stakeholder.topics[0]?.categories[0]?.subCategories[0]){
|
||||
stakeholder.topics[0].categories[0].subCategories[0].charts=[]; // keep only numbers - charts wont show much anyway
|
||||
if (results < 7 && stakeholder.topics[0]?.categories[0]?.subCategories[0]) {
|
||||
stakeholder.topics[0].categories[0].subCategories[0].charts = []; // keep only numbers - charts wont show much anyway
|
||||
}
|
||||
this.stakeholderSubject.next(stakeholder);
|
||||
resolve();
|
||||
}, error => {
|
||||
let stakeholder = new Stakeholder(null,"researcher", orcid,name,name,orcid,"PUBLIC", null, null,"");
|
||||
let stakeholder = new Stakeholder(null, "researcher", orcid, name, name, orcid, "PUBLIC", null, null, "");
|
||||
this.stakeholderSubject.next(stakeholder);
|
||||
resolve();
|
||||
});
|
||||
|
@ -89,25 +89,25 @@ export class StakeholderService {
|
|||
|
||||
getAlias(url: string): Observable<string[]> {
|
||||
return this.http.get<Stakeholder[]>(url + '/stakeholder/alias', CustomOptions.registryOptions()).pipe(map(stakeholders => {
|
||||
return this.formalize(stakeholders);
|
||||
return HelperFunctions.copy(stakeholders);
|
||||
}));
|
||||
}
|
||||
|
||||
getStakeholders(url: string, type: string = null, defaultId: string = null): Observable<(Stakeholder & StakeholderInfo)[]> {
|
||||
return this.http.get<Stakeholder[]>(url + '/stakeholder' + ((type) ? ('?type=' + type) : '') + ((!type && defaultId) ? ('?defaultId=' + defaultId) : ''), CustomOptions.registryOptions()).pipe(map(stakeholders => {
|
||||
return this.formalize(this.checkIsUpload(stakeholders));
|
||||
return HelperFunctions.copy(Stakeholder.checkIsUpload(stakeholders));
|
||||
}));
|
||||
}
|
||||
|
||||
getMyStakeholders(url: string, type: string = null): Observable<(Stakeholder & StakeholderInfo)[]> {
|
||||
return this.http.get<Stakeholder[]>(url + '/my-stakeholder' + ((type) ? ('?type=' + type) : ''), CustomOptions.registryOptions()).pipe(map(stakeholders => {
|
||||
return this.formalize(this.checkIsUpload(stakeholders));
|
||||
return HelperFunctions.copy(Stakeholder.checkIsUpload(stakeholders));
|
||||
}));
|
||||
}
|
||||
|
||||
getDefaultStakeholders(url: string, type: string = null): Observable<Stakeholder[]> {
|
||||
return this.http.get<Stakeholder[]>(url + '/stakeholder/default' + ((type) ? ('?type=' + type) : ''), CustomOptions.registryOptions()).pipe(map(stakeholders => {
|
||||
return this.formalize(this.checkIsUpload(stakeholders));
|
||||
return HelperFunctions.copy(Stakeholder.checkIsUpload(stakeholders));
|
||||
}));
|
||||
}
|
||||
|
||||
|
@ -116,7 +116,7 @@ export class StakeholderService {
|
|||
stakeholder.alias = stakeholder.alias.slice(1);
|
||||
}
|
||||
return this.http.post<Stakeholder>(url + '/build-stakeholder', stakeholder, CustomOptions.registryOptions()).pipe(map(stakeholder => {
|
||||
return this.formalize(this.checkIsUpload(stakeholder));
|
||||
return HelperFunctions.copy(Stakeholder.checkIsUpload(stakeholder));
|
||||
}));
|
||||
}
|
||||
|
||||
|
@ -130,11 +130,11 @@ export class StakeholderService {
|
|||
}
|
||||
path = HelperFunctions.encodeArray(path);
|
||||
return this.http.post<any>(url + ((path.length > 0) ? '/' : '') + path.join('/') +
|
||||
'/save', element, CustomOptions.registryOptions()).pipe(map(element => {
|
||||
'/save', element, CustomOptions.registryOptions()).pipe(map(element => {
|
||||
if (path.length === 0) {
|
||||
return this.formalize(this.checkIsUpload(element));
|
||||
return HelperFunctions.copy(Stakeholder.checkIsUpload(element));
|
||||
} else {
|
||||
return this.formalize(element);
|
||||
return HelperFunctions.copy(element);
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
@ -142,11 +142,11 @@ export class StakeholderService {
|
|||
saveBulkElements(url: string, indicators, path: string[] = []): Observable<any> {
|
||||
path = HelperFunctions.encodeArray(path);
|
||||
return this.http.post<any>(url + ((path.length > 0) ? '/' : '') + path.join('/') +
|
||||
'/save-bulk', indicators, CustomOptions.registryOptions()).pipe(map(element => {
|
||||
'/save-bulk', indicators, CustomOptions.registryOptions()).pipe(map(element => {
|
||||
if (path.length === 0) {
|
||||
return this.formalize(this.checkIsUpload(element));
|
||||
return HelperFunctions.copy(Stakeholder.checkIsUpload(element));
|
||||
} else {
|
||||
return this.formalize(element);
|
||||
return HelperFunctions.copy(element);
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
@ -154,8 +154,8 @@ export class StakeholderService {
|
|||
saveSection(url: string, element: any, path: string[] = [], index: number = -1): Observable<Section> {
|
||||
path = HelperFunctions.encodeArray(path);
|
||||
return this.http.post<Section>(url + ((path.length > 0) ? '/' : '') + path.join('/') +
|
||||
'/save/' + index, element, CustomOptions.registryOptions()).pipe(map(element => {
|
||||
return this.formalize(element);
|
||||
'/save/' + index, element, CustomOptions.registryOptions()).pipe(map(element => {
|
||||
return HelperFunctions.copy(element);
|
||||
}));
|
||||
}
|
||||
|
||||
|
@ -176,7 +176,7 @@ export class StakeholderService {
|
|||
reorderIndicators(url: string, path: string[], reorder: Reorder, type: string = 'chart'): Observable<Indicator[]> {
|
||||
path = HelperFunctions.encodeArray(path);
|
||||
return this.http.post<Indicator[]>(url + '/' + path.join('/') + '/' + type + '/reorder', reorder, CustomOptions.registryOptions()).pipe(map(indicators => {
|
||||
return this.formalize(indicators);
|
||||
return HelperFunctions.copy(indicators);
|
||||
}));
|
||||
}
|
||||
|
||||
|
@ -187,19 +187,4 @@ export class StakeholderService {
|
|||
setStakeholder(stakeholder: Stakeholder) {
|
||||
this.stakeholderSubject.next(stakeholder);
|
||||
}
|
||||
|
||||
private checkIsUpload(response: Stakeholder | Stakeholder[]): any | any[] {
|
||||
if (Array.isArray(response)) {
|
||||
response.forEach(value => {
|
||||
value.isUpload = value.logoUrl && !StringUtils.isValidUrl(value.logoUrl);
|
||||
});
|
||||
} else {
|
||||
response.isUpload = response.logoUrl && !StringUtils.isValidUrl(response.logoUrl);
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
private formalize(element: any) {
|
||||
return HelperFunctions.copy(element);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import {LoginGuard} from "../../login/loginGuard.guard";
|
||||
import {PreviousRouteRecorder} from "../../utils/piwik/previousRouteRecorder.guard";
|
||||
import {MyOrcidLinksComponent} from "./myOrcidLinks.component";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{ path: '', component: MyOrcidLinksComponent,
|
||||
canActivate: [LoginGuard], canDeactivate: [PreviousRouteRecorder]
|
||||
}
|
||||
|
||||
])
|
||||
]
|
||||
})
|
||||
export class MyOrcidLinksRoutingModule { }
|
|
@ -9,14 +9,15 @@ import {MyOrcidLinksComponent} from "./myOrcidLinks.component";
|
|||
import {SearchResearchResultsServiceModule} from "../../services/searchResearchResultsService.module";
|
||||
import {SearchMyOrcidResultsModule} from "./searchMyOrcidResults.module";
|
||||
import {AlertModalModule} from "../../utils/modal/alertModal.module";
|
||||
import {PiwikServiceModule} from "../../utils/piwik/piwikService.module";
|
||||
import {MyOrcidLinksRoutingModule} from "./myOrcidLinks-routing.module";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule,
|
||||
MyOrcidLinksRoutingModule,
|
||||
RouterModule, ErrorMessagesModule,
|
||||
ResultPreviewModule, SearchResearchResultsServiceModule, SearchMyOrcidResultsModule,
|
||||
AlertModalModule, PiwikServiceModule
|
||||
AlertModalModule
|
||||
],
|
||||
declarations: [
|
||||
MyOrcidLinksComponent
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import {LoginGuard} from "../login/loginGuard.guard";
|
||||
import {PreviousRouteRecorder} from "../utils/piwik/previousRouteRecorder.guard";
|
||||
import {OrcidComponent} from './orcid.component';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{ path: '', component: OrcidComponent,
|
||||
canActivate: [LoginGuard],
|
||||
canDeactivate: [PreviousRouteRecorder] }
|
||||
])
|
||||
]
|
||||
})
|
||||
export class OrcidRoutingModule { }
|
|
@ -5,8 +5,6 @@ import {RouterModule} from '@angular/router';
|
|||
|
||||
import {OrcidComponent} from './orcid.component';
|
||||
import {OrcidService} from './orcid.service';
|
||||
import {FreeGuard} from '../login/freeGuard.guard';
|
||||
import {PreviousRouteRecorder} from '../utils/piwik/previousRouteRecorder.guard';
|
||||
import {OrcidWorkComponent} from './orcid-work.component';
|
||||
import {AlertModalModule} from '../utils/modal/alertModal.module';
|
||||
import {ResultLandingService} from '../landingPages/result/resultLanding.service';
|
||||
|
@ -17,10 +15,11 @@ import {IconsService} from "../utils/icons/icons.service";
|
|||
import {orcid_add, orcid_bin} from "../utils/icons/icons";
|
||||
import {FullScreenModalModule} from "../utils/modal/full-screen-modal/full-screen-modal.module";
|
||||
import {LogServiceModule} from "../utils/log/LogService.module";
|
||||
import {OrcidRoutingModule} from "./orcid-routing.module";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, RouterModule, AlertModalModule, LoadingModule, ResultLandingUtilsModule,
|
||||
CommonModule, RouterModule, OrcidRoutingModule, AlertModalModule, LoadingModule, ResultLandingUtilsModule,
|
||||
IconsModule, FullScreenModalModule, LogServiceModule
|
||||
],
|
||||
declarations: [
|
||||
|
@ -28,7 +27,6 @@ import {LogServiceModule} from "../utils/log/LogService.module";
|
|||
OrcidWorkComponent
|
||||
],
|
||||
providers:[
|
||||
FreeGuard, PreviousRouteRecorder,
|
||||
OrcidService, ResultLandingService
|
||||
],
|
||||
exports: [
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import {LoginGuard} from "../../login/loginGuard.guard";
|
||||
import {PreviousRouteRecorder} from "../../utils/piwik/previousRouteRecorder.guard";
|
||||
import {SearchRecommendedResultsForOrcidComponent} from "./searchRecommendedResultsForOrcid.component";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{ path: '', component: SearchRecommendedResultsForOrcidComponent,
|
||||
canActivate: [LoginGuard],
|
||||
canDeactivate: [PreviousRouteRecorder]
|
||||
}
|
||||
|
||||
])
|
||||
]
|
||||
})
|
||||
export class SearchRecommendedResultsForOrcidRoutingModule { }
|
|
@ -8,22 +8,23 @@ import {SearchRecommendedResultsForOrcidComponent} from './searchRecommendedResu
|
|||
import {SearchResultsModule } from '../../searchPages/searchUtils/searchResults.module';
|
||||
|
||||
import {SearchFormModule} from '../../searchPages/searchUtils/searchForm.module';
|
||||
import {IsRouteEnabled} from '../../error/isRouteEnabled.guard';
|
||||
import {SearchResearchResultsModule} from "../../searchPages/searchResearchResults.module";
|
||||
import {OrcidService} from "../orcid.service";
|
||||
import {SearchRecommendedResultsForOrcidRoutingModule} from "./searchRecommendedResultsForOrcid-routing.module";
|
||||
// import {BreadcrumbsModule} from "../utils/breadcrumbs/breadcrumbs.module";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule,
|
||||
RouterModule,
|
||||
SearchRecommendedResultsForOrcidRoutingModule,
|
||||
SearchFormModule, SearchResearchResultsModule,
|
||||
// , BreadcrumbsModule
|
||||
],
|
||||
declarations: [
|
||||
SearchRecommendedResultsForOrcidComponent
|
||||
],
|
||||
providers:[ IsRouteEnabled, OrcidService],
|
||||
providers:[OrcidService],
|
||||
exports: [
|
||||
SearchRecommendedResultsForOrcidComponent
|
||||
]
|
||||
|
|
|
@ -6,8 +6,6 @@ import { RouterModule } from '@angular/router';
|
|||
import{ReloadRoutingModule } from './reload-routing.module';
|
||||
import{ReloadComponent} from './reload.component';
|
||||
|
||||
|
||||
import {PreviousRouteRecorder} from '../utils/piwik/previousRouteRecorder.guard';
|
||||
import {LoadingModule} from "../utils/loading/loading.module";
|
||||
|
||||
@NgModule({
|
||||
|
@ -19,9 +17,7 @@ import {LoadingModule} from "../utils/loading/loading.module";
|
|||
declarations: [
|
||||
ReloadComponent
|
||||
],
|
||||
providers:[
|
||||
PreviousRouteRecorder
|
||||
],
|
||||
providers:[],
|
||||
exports: [
|
||||
ReloadComponent
|
||||
]
|
||||
|
|
|
@ -2,14 +2,11 @@ import {CommonModule} from "@angular/common";
|
|||
import {NgModule} from "@angular/core";
|
||||
import {FormsModule} from "@angular/forms";
|
||||
import {RouterModule} from "@angular/router";
|
||||
import {PreviousRouteRecorder} from "../utils/piwik/previousRouteRecorder.guard";
|
||||
import {BreadcrumbsModule} from "../utils/breadcrumbs/breadcrumbs.module";
|
||||
import {RefineFieldResultsServiceModule} from "../services/refineFieldResultsService.module";
|
||||
import {LoadingModule} from "../utils/loading/loading.module";
|
||||
import {Schema2jsonldModule} from "../sharedComponents/schema2jsonld/schema2jsonld.module";
|
||||
import {SEOServiceModule} from "../sharedComponents/SEO/SEOService.module";
|
||||
import {PiwikService} from "../utils/piwik/piwik.service";
|
||||
|
||||
import {SdgRoutingModule} from './sdg-routing.module';
|
||||
import {SdgComponent} from './sdg.component';
|
||||
|
||||
|
@ -22,9 +19,7 @@ import {SdgComponent} from './sdg.component';
|
|||
declarations: [
|
||||
SdgComponent
|
||||
],
|
||||
providers: [
|
||||
PreviousRouteRecorder, PiwikService
|
||||
],
|
||||
providers: [],
|
||||
exports: [
|
||||
SdgComponent
|
||||
]
|
||||
|
|
|
@ -23,7 +23,8 @@ import {EnvProperties} from '../../utils/properties/env-properties';
|
|||
import {SEOService} from '../../sharedComponents/SEO/SEO.service';
|
||||
import {StringUtils} from '../../utils/string-utils.class';
|
||||
import {SearchCustomFilter} from "../searchUtils/searchUtils.class";
|
||||
import {Subscription} from "rxjs";
|
||||
import {combineLatest, Subscription} from "rxjs";
|
||||
import {debounceTime, map} from "rxjs/operators";
|
||||
import {AdvancedField, Filter} from "../searchUtils/searchHelperClasses.class";
|
||||
import {SearchResearchResultsComponent} from "../searchResearchResults.component";
|
||||
import {SearchProjectsComponent} from "../searchProjects.component";
|
||||
|
@ -219,9 +220,14 @@ export class SearchAllComponent {
|
|||
|
||||
loadAll() {
|
||||
this.reloadTabs();
|
||||
// https://github.com/angular/angular/issues/26764
|
||||
this.subs.push(combineLatest([this.route.params, this.route.queryParams])
|
||||
.pipe(debounceTime(0))
|
||||
.pipe(map(results => ({params: results[0], query: results[1]})))
|
||||
.subscribe(results => {
|
||||
let params = results['params'];
|
||||
let queryParams = results['query'];
|
||||
|
||||
this.subs.push(this.route.params.subscribe(params => {
|
||||
this.subs.push(this.route.queryParams.subscribe(queryParams => {
|
||||
this.parameters = Object.assign({}, queryParams);
|
||||
this.keyword = (queryParams['keyword']) ? queryParams['keyword'] : (queryParams["q"] ? queryParams["q"] : (queryParams["f0"] && queryParams["f0"] == "q" && queryParams["fv0"]?queryParams["fv0"]:""));
|
||||
this.selectedFields[0].value = StringUtils.URIDecode(this.keyword);
|
||||
|
@ -237,9 +243,8 @@ export class SearchAllComponent {
|
|||
active = ((["result","projects","organizations","datasources","services"]).indexOf(queryParams["active"])!= -1)?queryParams["active"]:null;
|
||||
delete this.parameters['active'];
|
||||
}
|
||||
|
||||
if(this.activeEntity == null) {
|
||||
if (this.activeEntity == null && (!params["entity"] || params["entity"].length == 0)) {
|
||||
// if(this.activeEntity == null) {
|
||||
if (this.activeEntity == null && (!params["entity"] || params["entity"].length == 0) && (!active || this.activeEntity != active)) {
|
||||
if (active) {
|
||||
this.activeEntity = active;
|
||||
if ((typeof document !== 'undefined')) {
|
||||
|
@ -261,7 +266,7 @@ export class SearchAllComponent {
|
|||
}
|
||||
this.activeEntity = ((["result", "projects", "organizations", "datasources", "services"]).indexOf(entity) != -1) ? entity : this.getDefaultEntityToShow();
|
||||
}
|
||||
}
|
||||
// }
|
||||
if (this.activeEntity == "result") {
|
||||
this.searchResults();
|
||||
} else if (this.activeEntity == "projects") {
|
||||
|
@ -274,7 +279,7 @@ export class SearchAllComponent {
|
|||
this.searchOrganizations();
|
||||
}
|
||||
this.count();
|
||||
}));
|
||||
// }));
|
||||
}));
|
||||
}
|
||||
|
||||
|
|
|
@ -12,7 +12,6 @@ import {SearchResearchResultsServiceModule} from '../../services/searchResearchR
|
|||
import {OrganizationsServiceModule} from '../../services/organizationsService.module';
|
||||
import {Schema2jsonldModule} from '../../sharedComponents/schema2jsonld/schema2jsonld.module';
|
||||
|
||||
import {PiwikServiceModule} from '../../utils/piwik/piwikService.module';
|
||||
import { SEOServiceModule } from '../../sharedComponents/SEO/SEOService.module';
|
||||
import {SearchAllComponent} from "./searchAll.component";
|
||||
import {AdvancedSearchFormModule} from "../searchUtils/advancedSearchForm.module";
|
||||
|
@ -20,7 +19,6 @@ import {SearchResearchResultsModule} from "../searchResearchResults.module";
|
|||
import {SearchProjectsModule} from "../searchProjects.module";
|
||||
import {SearchOrganizationsModule} from "../searchOrganizations.module";
|
||||
import {SearchDataProvidersModule} from "../searchDataProviders.module";
|
||||
import {PreviousRouteRecorder} from "../../utils/piwik/previousRouteRecorder.guard";
|
||||
import {BreadcrumbsModule} from "../../utils/breadcrumbs/breadcrumbs.module";
|
||||
import {SliderTabsModule} from "../../sharedComponents/tabs/slider-tabs.module";
|
||||
import {NumberRoundModule} from "../../utils/pipes/number-round.module";
|
||||
|
@ -31,15 +29,13 @@ import {GroupedRequestsServiceModule} from "../../services/groupedRequestsServic
|
|||
CommonModule, FormsModule, RouterModule,
|
||||
DataProvidersServiceModule, ProjectsServiceModule,
|
||||
SearchResearchResultsServiceModule, OrganizationsServiceModule,
|
||||
SearchResultsModule, PiwikServiceModule, Schema2jsonldModule, SEOServiceModule, AdvancedSearchFormModule, SearchResearchResultsModule, SearchProjectsModule, SearchOrganizationsModule, SearchDataProvidersModule, BreadcrumbsModule, SliderTabsModule, NumberRoundModule,
|
||||
SearchResultsModule, Schema2jsonldModule, SEOServiceModule, AdvancedSearchFormModule, SearchResearchResultsModule, SearchProjectsModule, SearchOrganizationsModule, SearchDataProvidersModule, BreadcrumbsModule, SliderTabsModule, NumberRoundModule,
|
||||
GroupedRequestsServiceModule
|
||||
],
|
||||
declarations: [
|
||||
SearchAllComponent
|
||||
],
|
||||
providers:[
|
||||
PreviousRouteRecorder
|
||||
],
|
||||
providers:[],
|
||||
exports: [
|
||||
SearchAllComponent
|
||||
]
|
||||
|
|
|
@ -370,7 +370,7 @@ export class SearchDataProvidersComponent {
|
|||
this.searchFiltersSub = this._searchDataProvidersService.advancedSearchDataproviders(this.searchPage.getSearchAPIQueryForAdvancedSearhFields(), 1, 0, properties, fieldsStr, [oldFilter.filterId], this.refineQuery).subscribe(
|
||||
// this.searchFiltersSub = this._refineFieldsResultsService.getAllRefineFieldResultsByFieldName(oldFilter.filterId, this.entityType, this.properties, this.refineQuery).subscribe(
|
||||
res => {
|
||||
let filter: Filter = res[1][0];
|
||||
let filter: Filter = res[2][0];
|
||||
if(filter.values.length == 0) {
|
||||
filter = oldFilter;
|
||||
filter.countAllValues = 0;
|
||||
|
|
|
@ -329,7 +329,7 @@ export class SearchOrganizationsComponent {
|
|||
this.searchFiltersSub = this._searchOrganizationsService.advancedSearchOrganizations(this.searchPage.getSearchAPIQueryForAdvancedSearhFields(), 1, 0, properties, fieldsStr, [oldFilter.filterId], this.refineQuery).subscribe(
|
||||
// this.searchFiltersSub = this._refineFieldsResultsService.getAllRefineFieldResultsByFieldName(oldFilter.filterId, "organization", this.properties, this.refineQuery).subscribe(
|
||||
res => {
|
||||
let filter: Filter = res[1][0];
|
||||
let filter: Filter = res[2][0];
|
||||
if(filter.values.length == 0) {
|
||||
filter = oldFilter;
|
||||
filter.countAllValues = 0;
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import {NgModule} from '@angular/core';
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {FormsModule} from '@angular/forms';
|
||||
import {IsRouteEnabled} from '../error/isRouteEnabled.guard';
|
||||
import {NewSearchPageModule} from "./searchUtils/newSearchPage.module";
|
||||
import {OrganizationsServiceModule} from "../services/organizationsService.module";
|
||||
import {SearchOrganizationsComponent} from "./searchOrganizations.component";
|
||||
|
|
|
@ -358,7 +358,7 @@ export class SearchProjectsComponent {
|
|||
this.searchFiltersSub = this._searchProjectsService.advancedSearchProjects(this.searchPage.getSearchAPIQueryForAdvancedSearhFields(), 1, 0, properties, fieldsStr, [oldFilter.filterId], this.refineQuery).subscribe(
|
||||
// this.searchFiltersSub = this._refineFieldsResultsService.getAllRefineFieldResultsByFieldName(oldFilter.filterId, "project", this.properties, this.refineQuery).subscribe(
|
||||
res => {
|
||||
let filter: Filter = res[1][0];
|
||||
let filter: Filter = res[2][0];
|
||||
if(filter.values.length == 0) {
|
||||
filter = oldFilter;
|
||||
filter.countAllValues = 0;
|
||||
|
|
|
@ -1,101 +1,103 @@
|
|||
<ng-template #selected_filters_pills>
|
||||
<h1>
|
||||
<div class="uk-slider filters-slider" uk-slider="finite: true">
|
||||
<div [class.uk-invisible]="list.children.length === 0" class="uk-position-relative">
|
||||
<div class="uk-slider-container">
|
||||
<ul #list class="uk-slider-items uk-grid uk-grid-small uk-margin-small-right uk-flex-nowrap" style="padding-bottom: 1px">
|
||||
<ng-container *ngFor="let customFilter of customFilters">
|
||||
<ng-container *ngIf="customFilter.isHiddenFilter">
|
||||
<li class="uk-flex uk-flex-middle">
|
||||
<span class="uk-label uk-label-secondary uk-text-truncate">
|
||||
{{customFilter.valueName}}
|
||||
<h1 class="uk-margin-remove">
|
||||
<div [class.uk-invisible]="list.children.length === 0">
|
||||
<ul #list class="uk-grid uk-grid-small uk-flex-wrap" uk-grid>
|
||||
<ng-container *ngFor="let customFilter of customFilters">
|
||||
<ng-container *ngIf="customFilter.isHiddenFilter">
|
||||
<li class="uk-flex uk-flex-middle">
|
||||
<span class="uk-label uk-label-small uk-label-secondary uk-text-truncate target1">
|
||||
{{customFilter.valueName}}
|
||||
</span>
|
||||
</li>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="resultTypes && resultTypes.countSelectedValues > 0">
|
||||
<ng-container *ngFor="let type of resultTypes.values; let i = index;">
|
||||
<ng-container *ngIf="type.selected">
|
||||
<li class="">
|
||||
<span class="uk-label uk-label-small uk-label-primary uk-flex uk-flex-middle target2">
|
||||
<span class="uk-margin-small-right uk-width-expand uk-text-truncate">{{type.name}}</span>
|
||||
<button [class.uk-disabled]="disabled" (click)="removeResultType(type.id)" class="uk-close uk-icon" [disabled]="disabled">
|
||||
<icon name="close" flex="true" ratio="0.7"></icon>
|
||||
</button>
|
||||
</span>
|
||||
</li>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="selectedRangeFilters > 0">
|
||||
<ng-container *ngFor="let filter of rangeFilters ">
|
||||
<ng-container *ngIf="filter.selectedFromAndToValues">
|
||||
<li class="">
|
||||
<span class="uk-label uk-label-small uk-label-primary uk-flex uk-flex-middle target3">
|
||||
<span class="uk-margin-small-right uk-width-expand uk-text-truncate">{{filter.selectedFromAndToValues}}</span>
|
||||
<button [class.uk-disabled]="disabled" (click)="removeRangeFilter(filter)" class="uk-close uk-icon" [disabled]="disabled">
|
||||
<icon name="close" flex="true" ratio="0.7"></icon>
|
||||
</button>
|
||||
</span>
|
||||
</li>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
<ng-container *ngFor="let filter of staticFilters">
|
||||
<ng-container *ngIf="filter.countSelectedValues > 0">
|
||||
<ng-container *ngFor="let value of getSelectedValues(filter); let i = index; let end = last; ">
|
||||
<li *ngIf="!customFilter || (customFilter.isHiddenFilter && customFilter.valueId != value.id)"
|
||||
class="">
|
||||
<span class="uk-label uk-label-small uk-label-primary uk-flex uk-flex-middle target4">
|
||||
<span
|
||||
class="uk-margin-small-right uk-width-expand uk-text-truncate">
|
||||
<ng-container *ngIf="filter.type && (filter.type == 'boolean' || filter.type == 'triplet') else noboolean">
|
||||
<span>{{filter.title}}:
|
||||
{{(value.name=='true'||value.name=='Yes')?'Yes':'No'}}
|
||||
</span>
|
||||
</ng-container>
|
||||
<ng-template #noboolean>
|
||||
<span [attr.title]="value.name" *ngIf="value.name.length > filterPillCharactersLimit">
|
||||
{{value.name | slice:0:filterPillCharactersLimit}}...
|
||||
</span>
|
||||
<span *ngIf="value.name.length <= filterPillCharactersLimit">
|
||||
{{value.name}}
|
||||
</span>
|
||||
</ng-template>
|
||||
</span>
|
||||
</li>
|
||||
<button [class.uk-disabled]="disabled" (click)="removeFilter(value, filter)" class="uk-close uk-icon" [disabled]="disabled">
|
||||
<icon name="close" flex="true" ratio="0.7"></icon>
|
||||
</button>
|
||||
</span>
|
||||
</li>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="resultTypes && resultTypes.countSelectedValues > 0">
|
||||
<ng-container *ngFor="let type of resultTypes.values; let i = index;">
|
||||
<ng-container *ngIf="type.selected">
|
||||
<li class="">
|
||||
<span class="uk-label uk-label-primary uk-flex uk-flex-middle">
|
||||
<span class="uk-margin-small-right uk-width-expand uk-text-truncate">{{type.name}}</span>
|
||||
<button [class.uk-disabled]="disabled" (click)="removeResultType(type.id)" class="uk-close uk-icon" [disabled]="disabled">
|
||||
<icon name="close" flex="true" ratio="0.7"></icon>
|
||||
</button>
|
||||
</span>
|
||||
</li>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="selectedRangeFilters > 0">
|
||||
<ng-container *ngFor="let filter of rangeFilters ">
|
||||
<ng-container *ngIf="filter.selectedFromAndToValues">
|
||||
<li class="">
|
||||
<span class="uk-label uk-label-primary uk-flex uk-flex-middle">
|
||||
<span class="uk-margin-small-right uk-width-expand uk-text-truncate">{{filter.selectedFromAndToValues}}</span>
|
||||
<button [class.uk-disabled]="disabled" (click)="removeRangeFilter(filter)" class="uk-close uk-icon" [disabled]="disabled">
|
||||
<icon name="close" flex="true" ratio="0.7"></icon>
|
||||
</button>
|
||||
</span>
|
||||
</li>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
<ng-container *ngFor="let filter of staticFilters">
|
||||
<ng-container *ngIf="filter.countSelectedValues > 0">
|
||||
<ng-container *ngFor="let value of getSelectedValues(filter); let i = index; let end = last; ">
|
||||
<li *ngIf="!customFilter || (customFilter.isHiddenFilter && customFilter.valueId != value.id)"
|
||||
class="">
|
||||
<span class="uk-label uk-label-primary uk-flex uk-flex-middle">
|
||||
<span
|
||||
class="uk-margin-small-right uk-width-expand uk-text-truncate">
|
||||
<ng-container *ngIf="filter.type && (filter.type == 'boolean' || filter.type == 'triplet') else noboolean">
|
||||
<!-- *ngIf="filter.type == 'boolean'"-->
|
||||
<span>{{filter.title}}:
|
||||
{{(value.name=='true'||value.name=='Yes')?'Yes':'No'}}
|
||||
</span>
|
||||
<!-- <span *ngIf="filter.type == 'triplet'">{{value.name=='true'?'':'Not '}}{{filter.title}}</span>-->
|
||||
</ng-container>
|
||||
<ng-template #noboolean>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
<ng-container *ngFor="let filter of filters ">
|
||||
<ng-container *ngIf="filter.countSelectedValues > 0">
|
||||
<ng-container *ngFor="let value of getSelectedValues(filter); let i = index; let end = last; ">
|
||||
<li *ngIf="!customFilters || (customFilters[0].isHiddenFilter && customFilters[0].valueId != value.id)">
|
||||
<span class="uk-label uk-label-small uk-label-primary uk-flex uk-flex-middle target5">
|
||||
<span class="uk-margin-small-right uk-width-expand uk-text-truncate">
|
||||
<ng-container *ngIf="filter.type && (filter.type == 'boolean' || filter.type == 'triplet') else noboolean">
|
||||
<span>{{filter.title}}:
|
||||
{{(value.name=='true'||value.name=='Yes')?'Yes':'No'}}
|
||||
</span>
|
||||
</ng-container>
|
||||
<ng-template #noboolean>
|
||||
<span [attr.title]="value.name" *ngIf="value.name.length > filterPillCharactersLimit">
|
||||
{{value.name | slice:0:filterPillCharactersLimit}}...
|
||||
</span>
|
||||
<span *ngIf="value.name.length <= filterPillCharactersLimit">
|
||||
{{value.name}}
|
||||
</ng-template></span>
|
||||
<button [class.uk-disabled]="disabled" (click)="removeFilter(value, filter)" class="uk-close uk-icon" [disabled]="disabled">
|
||||
<icon name="close" flex="true" ratio="0.7"></icon>
|
||||
</button>
|
||||
</span>
|
||||
</li>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
</span>
|
||||
</ng-template>
|
||||
</span>
|
||||
<button [class.uk-disabled]="disabled" (click)="removeFilter(value, filter)" class="uk-close uk-icon" [disabled]="disabled">
|
||||
<icon name="close" flex="true" ratio="0.7"></icon>
|
||||
</button>
|
||||
</span>
|
||||
</li>
|
||||
</ng-container>
|
||||
<ng-container *ngFor="let filter of filters ">
|
||||
<ng-container *ngIf="filter.countSelectedValues > 0">
|
||||
<ng-container *ngFor="let value of getSelectedValues(filter); let i = index; let end = last; ">
|
||||
<li *ngIf="!customFilters || (customFilters[0].isHiddenFilter && customFilters[0].valueId != value.id)"
|
||||
class="">
|
||||
<span class="uk-label uk-label-primary uk-flex uk-flex-middle">
|
||||
<span
|
||||
class="uk-margin-small-right uk-width-expand uk-text-truncate">
|
||||
<ng-container *ngIf="filter.type && (filter.type == 'boolean' || filter.type == 'triplet') else noboolean">
|
||||
<span>{{filter.title}}:
|
||||
{{(value.name=='true'||value.name=='Yes')?'Yes':'No'}}
|
||||
</span>
|
||||
</ng-container>
|
||||
<ng-template #noboolean>
|
||||
{{value.name}}
|
||||
</ng-template></span>
|
||||
<button [class.uk-disabled]="disabled" (click)="removeFilter(value, filter)" class="uk-close uk-icon" [disabled]="disabled">
|
||||
<icon name="close" flex="true" ratio="0.7"></icon>
|
||||
</button>
|
||||
</span>
|
||||
</li>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
</ul>
|
||||
</div>
|
||||
<a class="uk-position-center-left uk-blur-background" uk-slider-item="previous"><span uk-icon="chevron-left"></span></a>
|
||||
<a class="uk-position-center-right uk-blur-background" uk-slider-item="next"><span uk-icon="chevron-right"></span></a>
|
||||
</div>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
</ul>
|
||||
</div>
|
||||
</h1>
|
||||
</ng-template>
|
||||
|
@ -170,10 +172,6 @@
|
|||
<ng-container *ngFor="let filter of filters ">
|
||||
<li *ngIf="filter.values && filter.values.length > 0
|
||||
&& filter.filterId != 'resultbestaccessright' && filter.filterId != 'instancetypename' && filter.filterId != 'projectoamandatepublications'">
|
||||
<!-- <search-filter [filterValuesNum]="filterValuesNum" [showMoreInline]="showMoreFilterValuesInline"-->
|
||||
<!-- [isDisabled]="disabled"-->
|
||||
<!-- [filter]="filter" [showResultCount]=showResultCount-->
|
||||
<!-- (onFilterChange)="filterChanged($event)" [actionRoute]="true"></search-filter>-->
|
||||
<ng-container *ngTemplateOutlet="search_filter; context: {filter: filter, showResultCount: showResultCount}"></ng-container>
|
||||
</li>
|
||||
</ng-container>
|
||||
|
@ -190,31 +188,7 @@
|
|||
</ul>
|
||||
</div>
|
||||
</ng-template>
|
||||
<ng-template #sorting let-mobile="mobile">
|
||||
<div *ngIf="searchUtils.totalResults > 10 || sort || searchUtils.totalResults > searchUtils.size ||
|
||||
(!loadPaging && oldTotalResults > searchUtils.size && searchUtils.status == errorCodes.LOADING)"
|
||||
class="uk-grid uk-flex-middle uk-child-width-1-1 uk-child-width-1-2@m" uk-grid>
|
||||
<div>
|
||||
<div class="uk-grid uk-flex-middle uk-grid-column-collapse" uk-grid>
|
||||
<div *ngIf="searchUtils.totalResults > 10 && !mobile" class="uk-width-small uk-margin-right">
|
||||
<div input type="select" placeholder="Results per page" inputClass="flat x-small"
|
||||
[options]="pageOptions" [(value)]="searchUtils.size" [disabled]="disabled"
|
||||
(valueChange)="sizeChanged($event)"></div>
|
||||
</div>
|
||||
<search-sorting *ngIf="sort && searchUtils.totalResults > 0"
|
||||
[entityType]="entityType" [sortBy]="searchUtils.sortBy"
|
||||
(sortByChange)="sortByChanged($event)"
|
||||
[isDisabled]="disabled">
|
||||
</search-sorting>
|
||||
</div>
|
||||
</div>
|
||||
<search-paging *ngIf="!mobile" [type]="type" [loadPaging]="loadPaging" [oldTotalResults]="oldTotalResults"
|
||||
[searchUtils]="searchUtils" [results]="results" [baseUrl]="searchUtils.baseUrl"
|
||||
[parameterNames]="parameterNames" [parameterValues]="parameterValues"
|
||||
[isDisabled]="disabled">
|
||||
</search-paging>
|
||||
</div>
|
||||
</ng-template>
|
||||
|
||||
<ng-template #main let-mobile="mobile">
|
||||
<div *ngIf="mobile && showRefine && (searchUtils.refineStatus != errorCodes.LOADING || existingFiltersWithValues !== 0)"
|
||||
class="filters-toggle-button">
|
||||
|
@ -294,9 +268,6 @@
|
|||
<icon name="close" ratio="1.5" visuallyHidden="close filters"></icon>
|
||||
</a>
|
||||
<div *ngIf="showOffCanvas" class="uk-padding-small uk-padding-remove-vertical">
|
||||
<div class="uk-margin-medium-top">
|
||||
<ng-container *ngTemplateOutlet="sorting; context: {mobile: mobile}"></ng-container>
|
||||
</div>
|
||||
<div class="uk-margin-medium-top">
|
||||
<ng-container *ngTemplateOutlet="filters_column; context: {}"></ng-container>
|
||||
</div>
|
||||
|
@ -315,7 +286,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-container" [class.uk-container-large]="!mobile" [class.uk-container-expand]="mobile" [class.uk-padding-remove-horizontal]="mobile">
|
||||
<div class="uk-container uk-margin-top" [class.uk-container-large]="!mobile" [class.uk-container-expand]="mobile" [class.uk-padding-remove-horizontal]="mobile">
|
||||
<div class="uk-grid uk-margin-large-bottom" [class.uk-margin-top]="!mobile" uk-grid>
|
||||
<div *ngIf="!mobile && showRefine && (results.length > 0 || (searchUtils.refineStatus == errorCodes.LOADING && searchUtils.status != errorCodes.LOADING) || (!hideFilters &&
|
||||
(existingFiltersWithValues > 0 || (selectedRangeFilters + selectedFilters + selectedTypesNum) > 0))) "
|
||||
|
@ -337,31 +308,10 @@
|
|||
[href]="openaireLink+this.routerHelper.createQueryParamsString(this.parameterNames, this.parameterValues)"
|
||||
target="_blank"> OpenAIRE - Explore</a>.
|
||||
</div>
|
||||
<div class="uk-flex uk-flex-middle uk-flex-wrap uk-child-width-1-1 uk-child-width-auto@m" [class.uk-flex-between]="!mobile"
|
||||
[class.uk-margin-top]="mobile">
|
||||
<!-- Total results, number of pages -->
|
||||
<div class="uk-width-expand@m uk-margin-remove-bottom uk-text-truncate" [class.uk-margin-medium-right]="!mobile" [class.uk-h6]="!mobile" [class.uk-text-center]="mobile">
|
||||
<ng-container *ngIf="results && searchUtils.totalResults > 0">
|
||||
<span>{{searchUtils.totalResults|number}}</span>
|
||||
<span class="uk-text-meta uk-text-capitalize"> {{type}}</span>
|
||||
<ng-container *ngIf="searchTerm && simpleView">
|
||||
<span class="uk-text-meta"> for </span>
|
||||
<span class="uk-text-bold">{{searchTerm}}</span>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="!simpleView && advancedSearchTerms > 0">
|
||||
<span class="uk-text-bold"> ({{advancedSearchTerms}} rule{{advancedSearchTerms == 1 ? '' : 's'}} applied)</span>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="!loadPaging && oldTotalResults > 0 && searchUtils.status == errorCodes.LOADING">
|
||||
<span>{{oldTotalResults|number}}</span>
|
||||
<span class="uk-text-meta uk-text-capitalize"> {{type}}, page </span>
|
||||
<span>{{searchUtils.page | number}}</span>
|
||||
<span class="uk-text-meta"> of {{(totalPages(oldTotalResults)|number)}}</span>
|
||||
</ng-container>
|
||||
</div>
|
||||
<ng-container *ngIf="mobile">
|
||||
<!-- Download results -->
|
||||
<div *ngIf="showDownload && (searchUtils.status !== errorCodes.LOADING || !loadPaging)"
|
||||
class="uk-margin-small-bottom uk-flex uk-margin-small-top" [class.uk-flex-center]="mobile" [class.uk-margin-medium-top]="mobile">
|
||||
class="uk-margin-small-bottom uk-flex uk-flex-center">
|
||||
<search-download
|
||||
*ngIf="( entityType !='community' && entityType != 'stakeholder') && usedBy == 'search'"
|
||||
[isDisabled]="disabled"
|
||||
|
@ -373,12 +323,41 @@
|
|||
</a>
|
||||
</ng-container>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="(searchUtils.status !== errorCodes.LOADING || !loadPaging) && !mobile" class="uk-margin-top">
|
||||
<ng-container *ngTemplateOutlet="selected_filters_pills;"></ng-container>
|
||||
</div>
|
||||
<div *ngIf="!mobile" class="uk-margin-medium-topuk-margin-medium-top">
|
||||
<ng-container *ngTemplateOutlet="sorting; context: {mobile: mobile}"></ng-container>
|
||||
</ng-container>
|
||||
<div *ngIf="(searchUtils.status !== errorCodes.LOADING || !loadPaging) && !mobile" class="uk-flex uk-flex-top">
|
||||
<!-- filters pills -->
|
||||
<div class="uk-width-expand@m">
|
||||
<ng-container *ngTemplateOutlet="selected_filters_pills;"></ng-container>
|
||||
</div>
|
||||
<div class="uk-width-auto@m uk-margin-medium-left uk-flex uk-flex-middle">
|
||||
<div *ngIf="searchUtils.totalResults > 10 || sort || searchUtils.totalResults > searchUtils.size ||
|
||||
(!loadPaging && oldTotalResults > searchUtils.size && searchUtils.status == errorCodes.LOADING)"
|
||||
class="uk-grid uk-flex-middle uk-child-width-1-1 uk-child-width-1-2@m" uk-grid>
|
||||
<div>
|
||||
<div class="uk-grid uk-flex-middle uk-grid-column-collapse" uk-grid>
|
||||
<search-sorting *ngIf="sort && searchUtils.totalResults > 0"
|
||||
[entityType]="entityType" [sortBy]="searchUtils.sortBy"
|
||||
(sortByChange)="sortByChanged($event)"
|
||||
[isDisabled]="disabled">
|
||||
</search-sorting>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Download results -->
|
||||
<div *ngIf="showDownload && (searchUtils.status !== errorCodes.LOADING || !loadPaging)"
|
||||
class="uk-margin-small-left uk-flex uk-flex-middle" [class.uk-flex-center]="mobile" [class.uk-margin-medium-top]="mobile">
|
||||
<search-download
|
||||
*ngIf="( entityType !='community' && entityType != 'stakeholder') && usedBy == 'search'"
|
||||
[isDisabled]="disabled"
|
||||
[type]="csvPath" [csvParams]="csvParams" [totalResults]="searchUtils.totalResults">
|
||||
</search-download>
|
||||
<ng-container *ngIf="properties.zenodoDumpUrl && entityType == 'result'">
|
||||
<a [href]="properties.zenodoDumpUrl" target="_blank" class=" uk-margin-left uk-button uk-button-link uk-flex uk-flex-middle">
|
||||
<img src="assets/common-assets/common/zenodoDump.png" width="20"><span class="uk-margin-xsmall-left">Data dump</span>
|
||||
</a>
|
||||
</ng-container>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div [class]="searchUtils.page > pagingLimit ? 'search-results' : ''"
|
||||
*ngIf="(searchUtils.page >= pagingLimit) && (searchUtils.totalResults > searchUtils.size*pagingLimit)">
|
||||
|
|
|
@ -131,6 +131,7 @@ export class NewSearchPageComponent implements OnInit, OnDestroy, OnChanges {
|
|||
public parameterNames: string[] = [];
|
||||
public parameterValues: string[] = [];
|
||||
|
||||
filterPillCharactersLimit: number = 35;
|
||||
public csvLimit: number = 0;
|
||||
public pagingLimit: number = 0;
|
||||
public resultsPerPage: number = 0;
|
||||
|
|
|
@ -13,8 +13,6 @@ import {SearchPagingModule} from './searchPaging.module';
|
|||
import {SearchSortingModule} from './searchSorting.module';
|
||||
import {SearchDownloadModule} from './searchDownload.module';
|
||||
import {ModalModule} from '../../utils/modal/modal.module';
|
||||
import {PiwikServiceModule} from '../../utils/piwik/piwikService.module';
|
||||
import {PreviousRouteRecorder} from '../../utils/piwik/previousRouteRecorder.guard';
|
||||
import {HelperModule} from '../../utils/helper/helper.module';
|
||||
import {Schema2jsonldModule} from '../../sharedComponents/schema2jsonld/schema2jsonld.module';
|
||||
import {SEOServiceModule} from '../../sharedComponents/SEO/SEOService.module';
|
||||
|
@ -39,7 +37,7 @@ import {graph} from "../../utils/icons/icons";
|
|||
LoadingModalModule, ReportsServiceModule,
|
||||
SearchPagingModule, SearchSortingModule, SearchDownloadModule, ModalModule,
|
||||
SearchFilterModule, RangeFilterModule,
|
||||
PiwikServiceModule, HelperModule, Schema2jsonldModule, SEOServiceModule, SearchResultsModule,
|
||||
HelperModule, Schema2jsonldModule, SEOServiceModule, SearchResultsModule,
|
||||
SearchResultsInDepositModule, SearchResultsForOrcidModule,
|
||||
AdvancedSearchFormModule, QuickSelectionsModule, BreadcrumbsModule, AlertModalModule, ClickModule, IconsModule, LoadingModule,
|
||||
InputModule
|
||||
|
@ -47,9 +45,7 @@ import {graph} from "../../utils/icons/icons";
|
|||
declarations: [
|
||||
NewSearchPageComponent
|
||||
],
|
||||
providers: [
|
||||
PreviousRouteRecorder
|
||||
],
|
||||
providers: [],
|
||||
exports: [
|
||||
NewSearchPageComponent
|
||||
]
|
||||
|
|
|
@ -15,12 +15,11 @@ import {properties} from "../../../../environments/environment";
|
|||
selector: 'search-download',
|
||||
template: `
|
||||
<button [attr.uk-tooltip]="'title: Download' + ((totalResults > csvLimit)?' the first 2000 ':' ') + 'results.' +
|
||||
((totalResults > csvLimit && properties.zenodoDumpUrl)?' To get all results download the data dump. ':' ') "
|
||||
class="uk-button uk-button-link uk-flex uk-flex-middle" [class.uk-disabled]="isDisabled"
|
||||
[disabled]="isDisabled"
|
||||
(click)="downloadfile(downloadURLAPI+'?format=csv'+csvParams,type+'-report-'+((totalResults > csvLimit)?'2000 ':totalResults))">
|
||||
<icon name="download" [flex]="true"></icon>
|
||||
<span class="uk-margin-xsmall-left">Download Results</span>
|
||||
((totalResults > csvLimit && properties.zenodoDumpUrl)?' To get all results download the data dump. ':' ') "
|
||||
class="uk-button uk-button-link uk-flex uk-flex-middle" [class.uk-disabled]="isDisabled"
|
||||
[disabled]="isDisabled"
|
||||
(click)="downloadfile(downloadURLAPI+'?format=csv'+csvParams,type+'-report-'+((totalResults > csvLimit)?'2000 ':totalResults))">
|
||||
<icon name="download" [flex]="true"></icon>
|
||||
</button>
|
||||
<modal-loading></modal-loading>
|
||||
<modal-alert #AlertModalCsvError></modal-alert>
|
||||
|
|
|
@ -7,7 +7,7 @@ import {properties} from "../../../../environments/environment";
|
|||
template: `
|
||||
<div *ngIf="options" class="uk-width-small">
|
||||
<div input
|
||||
type="select" placeholder="Sort by" inputClass="flat x-small"
|
||||
type="select" placeholder="Sort by" inputClass="border-bottom"
|
||||
[options]="options" [(value)]="sortBy" [disabled]="isDisabled"
|
||||
(valueChange)="sortByChanged()"></div>
|
||||
</div>
|
||||
|
|
|
@ -8,9 +8,11 @@ import {OrganizationInfo} from '../utils/entities/organizationInfo';
|
|||
import{EnvProperties} from '../utils/properties/env-properties';
|
||||
import {map} from "rxjs/operators";
|
||||
import {ParsingFunctions} from "../landingPages/landing-utils/parsingFunctions.class";
|
||||
import {properties} from "../../../environments/environment";
|
||||
|
||||
@Injectable()
|
||||
export class OrganizationService {
|
||||
public parsingFunctions: ParsingFunctions = new ParsingFunctions();
|
||||
|
||||
constructor(private http: HttpClient ) {}
|
||||
|
||||
|
@ -92,6 +94,10 @@ export class OrganizationService {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(organization['pid'] && properties.environment != "production") {
|
||||
this.organizationInfo.identifiers = this.parsingFunctions.parseIdentifiers(organization['pid']);
|
||||
}
|
||||
}
|
||||
|
||||
//Comment Parsing Projects info
|
||||
|
|
|
@ -9,9 +9,11 @@ import{EnvProperties} from '../utils/properties/env-properties';
|
|||
import {StringUtils} from '../utils/string-utils.class';
|
||||
import {map} from "rxjs/operators";
|
||||
import {ParsingFunctions} from "../landingPages/landing-utils/parsingFunctions.class";
|
||||
import {properties} from "../../../environments/environment";
|
||||
|
||||
@Injectable()
|
||||
export class SearchOrganizationsService {
|
||||
public parsingFunctions: ParsingFunctions = new ParsingFunctions();
|
||||
|
||||
constructor(private http: HttpClient ) {}
|
||||
|
||||
|
@ -173,7 +175,11 @@ export class SearchOrganizationsService {
|
|||
result.country = resData.country.classname;
|
||||
}
|
||||
|
||||
results.push(result);
|
||||
if(resData['pid'] && properties.environment != "production") {
|
||||
result.identifiers = this.parsingFunctions.parseIdentifiers(resData['pid']);
|
||||
}
|
||||
|
||||
results.push(result);
|
||||
}
|
||||
|
||||
return results;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<ng-template #grant>
|
||||
<div class="uk-margin-small-top">
|
||||
<div>
|
||||
<img style="max-width: 42px;" [src]="assetsPath + 'common/commission.jpg'" alt="flag black white low" width="50px" loading="lazy">
|
||||
</div>
|
||||
<div class="uk-margin-left">
|
||||
|
@ -64,7 +64,7 @@
|
|||
height="50px" class="el-image" alt="OpenAIRE" loading="lazy">
|
||||
</div>
|
||||
<div *ngIf="showCommision" class="uk-width-expand">
|
||||
<div class="uk-flex uk-flex-top uk-flex-center">
|
||||
<div class="uk-flex uk-flex-middle uk-flex-center uk-margin-small-top">
|
||||
<ng-container *ngTemplateOutlet="grant"></ng-container>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -208,7 +208,7 @@
|
|||
height="50px" class="el-image" alt="OpenAIRE" loading="lazy">
|
||||
</div>
|
||||
<div *ngIf="showCommision" class="uk-width-expand">
|
||||
<div class="uk-flex uk-flex-top uk-flex-center">
|
||||
<div class="uk-flex uk-flex-middle uk-flex-center uk-margin-small-top">
|
||||
<ng-container *ngTemplateOutlet="grant"></ng-container>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -336,7 +336,12 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang
|
|||
@Input()
|
||||
set options(options: (Option | string | number) []) {
|
||||
this.optionsArray = options.map(option => {
|
||||
if (typeof option === 'string' || typeof option === 'number') {
|
||||
if(option === null) {
|
||||
return {
|
||||
label: this.noValueSelected,
|
||||
value: ''
|
||||
};
|
||||
} else if (typeof option === 'string' || typeof option === 'number') {
|
||||
return {
|
||||
label: option.toString(),
|
||||
value: option
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<div class="quick-contact">
|
||||
<button class="uk-button uk-box-shadow-default uk-box-shadow-default-hover uk-button-secondary uk-flex uk-flex-middle">
|
||||
<button class="uk-button uk-box-shadow-default uk-box-shadow-default-hover uk-button-secondary uk-flex uk-flex-middle" (click)="quickContactClicked=true">
|
||||
<icon *ngIf="!showDrop" name="mail" [flex]="true"></icon>
|
||||
<icon *ngIf="showDrop" name="close" [flex]="true"></icon>
|
||||
<span class="uk-margin-small-left">{{contact}}</span>
|
||||
</button>
|
||||
<div #drop id="quick-contact" class="uk-drop"
|
||||
uk-drop="mode: click; pos: top-right; animation: uk-animation-fade; offset: 20">
|
||||
<div class="uk-card uk-card-default uk-box-shadow-default uk-flex uk-flex-column uk-height-1-1">
|
||||
<div *ngIf="quickContactClicked" class="uk-card uk-card-default uk-box-shadow-default uk-flex uk-flex-column uk-height-1-1">
|
||||
<div class="uk-card-header uk-padding-small uk-text-center" [class.uk-light]="backgroundHeader.dark" [ngClass]="backgroundHeader.class">
|
||||
<div class="uk-text-small">
|
||||
Send a message
|
||||
|
|
|
@ -11,6 +11,7 @@ declare var UIkit;
|
|||
styleUrls: ['quick-contact.component.less']
|
||||
})
|
||||
export class QuickContactComponent implements OnInit, OnDestroy {
|
||||
public quickContactClicked: boolean = false;
|
||||
public showDrop: boolean = false;
|
||||
@Input()
|
||||
public contactForm: FormGroup;
|
||||
|
|
|
@ -13,7 +13,7 @@ export class TimeoutInterceptor implements HttpInterceptor {
|
|||
private static TIMEOUT_WHITELIST = [
|
||||
properties.csvAPIURL, properties.registryUrl, properties.claimsAPIURL,
|
||||
properties.searchCrossrefAPIURL, properties.searchDataciteAPIURL,
|
||||
properties.statisticsAPIURL, properties.searchAPIURLLAst, properties.monitorStatsFrameUrl];
|
||||
properties.statisticsAPIURL, properties.monitorStatsFrameUrl];
|
||||
|
||||
constructor(@Inject(DEFAULT_TIMEOUT) protected defaultTimeout: number, @Inject(PLATFORM_ID) private platformId: any) {
|
||||
}
|
||||
|
|
|
@ -26,4 +26,5 @@ export class OrganizationInfo {
|
|||
// organizations: {name: string; url: string}[]}[];
|
||||
|
||||
deletedByInferenceIds: string[];
|
||||
identifiers: Map<string, string[]>; //key is the classname
|
||||
}
|
||||
|
|
|
@ -14,8 +14,7 @@ import {EnvProperties} from "../properties/env-properties";
|
|||
<div *ngIf="linking && isRouteAvailable('participate/direct-claim')">
|
||||
<a [queryParams]="routerHelper.createQueryParams(['id','type','linkTo'], [id,type,linkTo])"
|
||||
routerLinkActive="router-link-active" routerLink="/participate/direct-claim"
|
||||
[title]="'Link '+openaireEntities.RESULTS+' with a '+openaireEntities.PROJECT+', a '+openaireEntities.COMMUNITY+' or other '+openaireEntities.RESULTS+' and make the new information available in OpenAIRE information space.'"
|
||||
[attr.uk-tooltip]="'pos: bottom; cls: uk-active uk-text-small uk-padding-small uk-width-medium'"
|
||||
[attr.uk-tooltip]="showTooltip ? 'title: Link '+openaireEntities.RESULTS+' with a '+openaireEntities.PROJECT+', a '+openaireEntities.COMMUNITY+' or other '+openaireEntities.RESULTS+' and make the new information available in OpenAIRE information space.; pos: bottom; cls: uk-active uk-text-small uk-padding-small uk-width-medium' : 'cls: uk-invisible'"
|
||||
class="uk-flex uk-flex-middle uk-button-link" [ngClass]="isMobile ? 'uk-margin-left uk-margin-xsmall-bottom' : 'uk-text-bolder uk-flex-center'">
|
||||
<icon [flex]="true" [ratio]="0.7" name="link_to" visuallyHidden="link"></icon>
|
||||
<span class="uk-margin-xsmall-left">Link to</span>
|
||||
|
@ -23,8 +22,7 @@ import {EnvProperties} from "../properties/env-properties";
|
|||
</div>
|
||||
<div *ngIf="share">
|
||||
<a (click)="openAddThisModal()"
|
||||
[title]="'Share this '+getTypeName() + ' in your social networks'"
|
||||
[attr.uk-tooltip]="'pos: right; cls: uk-active uk-text-small uk-padding-small'"
|
||||
[attr.uk-tooltip]="showTooltip ? 'title: Share this '+getTypeName()+' in your social networks; pos: bottom; cls: uk-active uk-text-small uk-padding-small' : 'cls: uk-invisible'"
|
||||
class="uk-flex uk-flex-middle uk-button-link" [ngClass]="isMobile ? 'uk-margin-left uk-margin-xsmall-bottom' : 'uk-text-bolder uk-flex-center'">
|
||||
<icon class="uk-text-bolder" [flex]="true" [ratio]="0.8" name="share" visuallyHidden="share"></icon>
|
||||
<span class="uk-margin-xsmall-left">Share</span>
|
||||
|
@ -39,8 +37,7 @@ import {EnvProperties} from "../properties/env-properties";
|
|||
</div>
|
||||
<div *ngIf="deposit && isRouteAvailable('participate/deposit/learn-how')">
|
||||
<a routerLinkActive="router-link-active" routerLink="/participate/deposit/learn-how"
|
||||
[title]="'Find a repository to deposit or publish your research in Open Access'"
|
||||
[attr.uk-tooltip]="'pos: bottom; cls: uk-active uk-text-small uk-padding-small uk-width-medium'"
|
||||
[attr.uk-tooltip]="showTooltip ? 'title: Find a repository to deposit or publish your research in Open Access; pos: bottom; cls: uk-active uk-text-small uk-padding-small uk-width-medium' : 'cls: uk-invisible'"
|
||||
class="uk-flex uk-flex-middle uk-button-link" [ngClass]="isMobile ? 'uk-margin-left uk-margin-xsmall-bottom' : 'uk-text-bolder uk-flex-center'">
|
||||
<icon flex="true" ratio="0.7" name="upload" visuallyHidden="upload"></icon>
|
||||
<span class="uk-margin-xsmall-left">Deposit</span>
|
||||
|
@ -48,8 +45,7 @@ import {EnvProperties} from "../properties/env-properties";
|
|||
</div>
|
||||
<div *ngIf="embed" >
|
||||
<a (click)="openEmbedResultsModal()"
|
||||
[title]="'Embed the related '+openaireEntities.RESULTS+' of this '+getTypeName()+' in your website'"
|
||||
[attr.uk-tooltip]="'pos: bottom; cls: uk-active uk-text-small uk-padding-small uk-width-medium'"
|
||||
[attr.uk-tooltip]="showTooltip ? 'title: Embed the related '+openaireEntities.RESULTS+' of this '+getTypeName()+' in your website; pos: bottom; cls: uk-active uk-text-small uk-padding-small uk-width-medium' : 'cls: uk-invisible'"
|
||||
class="uk-flex uk-flex-middle uk-button-link" [ngClass]="isMobile ? 'uk-margin-left uk-margin-xsmall-bottom' : 'uk-text-bolder uk-flex-center'">
|
||||
<icon flex="true" ratio="0.8" name="code" visuallyHidden="code"></icon>
|
||||
<span class="uk-margin-xsmall-left">Embed</span>
|
||||
|
@ -99,6 +95,7 @@ export class EntityActionsComponent implements OnInit {
|
|||
@Input() embed: boolean = false;
|
||||
@Input() url: string;
|
||||
@Input() isMobile: boolean = false;
|
||||
@Input() showTooltip: boolean = true;
|
||||
public citeThisClicked: boolean;
|
||||
public routerHelper: RouterHelper = new RouterHelper();
|
||||
@ViewChild('citeModal') citeModal;
|
||||
|
|
|
@ -6,7 +6,7 @@ import {properties} from "../../../../environments/environment";
|
|||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
}) // do not forget to register this class as a provider
|
||||
})
|
||||
export class PreviousRouteRecorder {
|
||||
constructor(private router: Router) {
|
||||
}
|
||||
|
|
|
@ -45,6 +45,10 @@ export interface EnvProperties {
|
|||
openDoarURL?: string;
|
||||
r3DataURL?: string;
|
||||
swhURL?: string;
|
||||
rorURL?: string;
|
||||
isniURL?: string;
|
||||
wikiDataURL?: string;
|
||||
fundRefURL?: string;
|
||||
fairSharingURL?: string,
|
||||
eoscMarketplaceURL?: string,
|
||||
sherpaURL?: string;
|
||||
|
|
|
@ -6,7 +6,7 @@ export let common: EnvProperties = {
|
|||
useNewStatistisTool: true,
|
||||
openCitationsAPIURL: "https://services.openaire.eu/opencitations/getCitations?id=",
|
||||
searchCrossrefAPIURL: "https://api.crossref.org/works",
|
||||
searchDataciteAPIURL: "https://api.datacite.org/works",
|
||||
searchDataciteAPIURL: "https://api.datacite.org/dois",
|
||||
searchOrcidURL: "https://pub.orcid.org/v2.1/",
|
||||
orcidURL: "https://orcid.org/",
|
||||
orcidAPIURL: "https://services.openaire.eu/uoa-orcid-service/",
|
||||
|
@ -20,6 +20,10 @@ export let common: EnvProperties = {
|
|||
openDoarURL: "http://v2.sherpa.ac.uk/id/repository/",
|
||||
r3DataURL: "http://service.re3data.org/repository/",
|
||||
swhURL: "https://archive.softwareheritage.org/",
|
||||
rorURL: "https://ror.org/",
|
||||
isniURL: "https://isni.org/isni/",
|
||||
wikiDataURL: "https://www.wikidata.org/wiki/",
|
||||
fundRefURL: "https://api.crossref.org/funders/",
|
||||
fairSharingURL: "https://fairsharing.org/",
|
||||
eoscMarketplaceURL: "https://marketplace.eosc-portal.eu/services/",
|
||||
sherpaURL: "http://sherpa.ac.uk/romeo/issn/",
|
||||
|
@ -77,7 +81,7 @@ export let common: EnvProperties = {
|
|||
b2noteAPIURL: 'https://b2note.eudat.eu/',
|
||||
myOrcidLinksPage: "/my-orcid-links",
|
||||
|
||||
footerGrantText: "OpenAIRE has received funding from the European Union's Horizon 2020 research and innovation programme under grant agreements No. 777541 and 101017452",
|
||||
footerGrantText: "OpenAIRE has received funding from <a href='https://www.openaire.eu/projects' target='_blank'>a series of EU funded projects</a>.",
|
||||
|
||||
//connect
|
||||
enermapsURL: "https://lab.idiap.ch/enermaps",
|
||||
|
@ -86,6 +90,9 @@ export let common: EnvProperties = {
|
|||
afterLoginRedirectLink: '/myCommunities',
|
||||
searchLinkToCommunities: '/search/find/communities',
|
||||
openOrgsUrl:"https://beta.orgs.openaire.eu",
|
||||
|
||||
// monitor
|
||||
searchLinkToStakeholders: "/browse"
|
||||
}
|
||||
|
||||
export let commonDev: EnvProperties = {
|
||||
|
|
|
@ -21,7 +21,7 @@ export class RangeFilterComponent {
|
|||
@Input() yearMax: number = Dates.yearMax;
|
||||
@Input() mandatoryRange:boolean = false;
|
||||
public currentYear: number = Dates.currentYear;
|
||||
public yearValidators = [StringUtils.inValidYearValidator(this.yearMin, this.yearMax)];
|
||||
public yearValidators;
|
||||
public formValidators = [StringUtils.fromYearAfterToYearValidator];
|
||||
public rangeForm: UntypedFormGroup;
|
||||
public yearRange: YearRange = {
|
||||
|
@ -41,6 +41,11 @@ export class RangeFilterComponent {
|
|||
constructor(private _router: Router, private route: ActivatedRoute, private _fb: UntypedFormBuilder) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.yearValidators = [StringUtils.inValidYearValidator(this.yearMin, this.yearMax)];
|
||||
this.yearRange = {
|
||||
from: {control: 'yearFrom', placeholder: this.yearMin.toString()},
|
||||
to: {control: 'yearTo', placeholder: this.yearMax.toString()}
|
||||
}
|
||||
if(this.mandatoryRange) {
|
||||
this.formValidators.push(StringUtils.rangeRequired(this.mandatoryRange));
|
||||
}
|
||||
|
|
|
@ -187,7 +187,8 @@
|
|||
[deposit]="deposit" [embed]="embed"
|
||||
[type]="result.resultType"
|
||||
[result]="result" [id]="result.objId?result.objId:result.id"
|
||||
[url]="properties.domain + properties.baseLink + url + '?' + urlParam + '=' + result.id">
|
||||
[url]="properties.domain + properties.baseLink + url + '?' + urlParam + '=' + result.id"
|
||||
[showTooltip]="false">
|
||||
<span *ngIf="orcid">
|
||||
<orcid-work *ngIf="showOrcid && result.identifiers && result.identifiers.size > 0"
|
||||
[resultId]="result.relcanId" [resultTitle]="result.title"
|
||||
|
@ -224,7 +225,7 @@
|
|||
</span>
|
||||
<span class="uk-margin-xsmall-left">Access Routes</span>
|
||||
</a>
|
||||
<div uk-drop="pos: top-right" class="uk-drop">
|
||||
<div uk-drop="pos: top-right; mode: click" class="uk-drop">
|
||||
<div class="uk-card uk-card-default uk-border uk-box-no-shadow uk-padding-small">
|
||||
<table>
|
||||
<tr *ngIf="result.oaRoutes.green">
|
||||
|
@ -263,7 +264,7 @@
|
|||
<span *ngIf="isNumber(result.measure.bip[0].value)" class="uk-margin-xsmall-left">{{formatNumber(result.measure.bip[0].value)}}</span>
|
||||
<span *ngIf="!isNumber(result.measure.bip[0].value)" class="uk-margin-xsmall-left">{{result.measure.bip[0].value}}</span>
|
||||
</a>
|
||||
<div uk-drop="pos: top-right" class="uk-drop">
|
||||
<div uk-drop="pos: top-right; mode: click" class="uk-drop">
|
||||
<div class="uk-card uk-card-default uk-border uk-box-no-shadow uk-padding-small">
|
||||
<table>
|
||||
<tr *ngFor="let metric of result.measure.bip">
|
||||
|
@ -289,7 +290,7 @@
|
|||
[name]="result.measure.counts[0].icon"></icon>
|
||||
<span class="uk-margin-xsmall-left">{{formatNumber(result.measure.counts[0].value)}}</span>
|
||||
</a>
|
||||
<div uk-drop="pos: top-right" class="uk-card uk-card-default uk-border uk-box-no-shadow uk-padding-small">
|
||||
<div uk-drop="pos: top-right; mode: click" class="uk-card uk-card-default uk-border uk-box-no-shadow uk-padding-small">
|
||||
<table>
|
||||
<tr *ngFor="let metric of result.measure.counts">
|
||||
<td class="text-usage-counts">
|
||||
|
@ -331,7 +332,8 @@
|
|||
[type]="result.resultType"
|
||||
[result]="result" [id]="result.objId?result.objId:result.id"
|
||||
[url]="properties.domain + properties.baseLink + url + '?' + urlParam + '=' + result.id"
|
||||
[isMobile]="isMobile">
|
||||
[isMobile]="isMobile"
|
||||
[showTooltip]="false">
|
||||
<span *ngIf="orcid">
|
||||
<orcid-work *ngIf="showOrcid && result.identifiers && result.identifiers.size > 0"
|
||||
[resultId]="result.relcanId" [resultTitle]="result.title"
|
||||
|
|
Loading…
Reference in New Issue