0 || showOptions.show=='result'"
@@ -288,28 +164,25 @@
0?'linksbaskettitlesPortalColor ':'uk-disabled')+ ' linksbaskettitles uk-padding-small'"
- (click)="openSelectionModal(); ">
-
-
CONTINUE TO - LINK TO
0">({{(results.length) | number}})
+ [class]="((sources.length)>0?'uk-background-secondary uk-light ':'uk-disabled uk-background-muted ')+ ' linksbaskettitles uk-padding-small'"
+ (click)="stepHasChanged('source') ">
+
+ STEP 2 - LINK SOURCES TO ENTITIES
-
- Entities to link with the sources
-
+
0?'linksbaskettitlesPortalColor ':'uk-disabled')+ ' linksbaskettitles uk-margin-small-top uk-padding-small'"
- style="height:auto !important; " (click)="showOptions.show = 'claim'; scrollUp();">
+ [class]="((results.length)>0?'uk-background-secondary uk-light ':'uk-disabled uk-background-muted ')+
+ ' linksbaskettitles uk-margin-small-top uk-padding-small'"
+ style="height:auto !important; " (click)="stepHasChanged('source')">
-
- FINISH LINKING
+
+ STEP {{inlineEntity?'2':'3'}} - FINALISE AND FINISH
+
0" [texts]="pageContents['bottom']">
diff --git a/claims/linking/linkingGeneric.component.ts b/claims/linking/linkingGeneric.component.ts
index 23b41780..747b1e36 100644
--- a/claims/linking/linkingGeneric.component.ts
+++ b/claims/linking/linkingGeneric.component.ts
@@ -1,4 +1,4 @@
-import {Component, Input, ViewChild} from '@angular/core';
+import {ChangeDetectorRef, Component, Input, ViewChild} from '@angular/core';
import {ActivatedRoute, Router} from '@angular/router';
import {Meta, Title} from '@angular/platform-browser';
import {EnvProperties} from '../../utils/properties/env-properties';
@@ -12,25 +12,16 @@ import {PiwikService} from "../../utils/piwik/piwik.service";
import {Subscriber} from "rxjs";
import {properties} from "../../../../environments/environment";
import {Breadcrumb} from "../../utils/breadcrumbs/breadcrumbs.component";
+import {MetricsService} from "../../services/metrics.service";
declare var UIkit:any;
@Component({
selector: 'linking-generic',
templateUrl: 'linkingGeneric.component.html',
- styles:[ `
- .mat-stepper-horizontal-line {
- border-top-width: 1px;
- border-top-style: solid;
- flex: auto;
- height: 0;
- margin: 0 -16px;
- margin-left: -16px;
- min-width: 32px;
-}
-.mat-horizontal-stepper-header::before, .mat-horizontal-stepper-header::after, .mat-stepper-horizontal-line {
- border-top-color: rgba(0, 0, 0, 0.12);
-}
+ styles:[ `
+
+
`]
@@ -63,7 +54,7 @@ export class LinkingGenericComponent {
constructor (private _router: Router, private route: ActivatedRoute, private entitySearch:EntitiesSearchService,
private _meta: Meta, private _title: Title, private _piwikService:PiwikService,
- private seoService: SEOService, private helper: HelperService ) {
+ private seoService: SEOService, private helper: HelperService, private cdr: ChangeDetectorRef ) {
}
subscriptions = [];
@@ -74,8 +65,8 @@ export class LinkingGenericComponent {
}
this.showOptions.show = 'source';
if(this.inlineEntity){
- this.showOptions.basketShowSources = false;
- this.showOptions.basketShowLinksTo = true;
+ this.showOptions.showLinkTo();
+ // this.showOptions.basketShowLinksTo = true;
this.showOptions.show = this.showOptions.linkTo;
}
@@ -161,4 +152,52 @@ export class LinkingGenericComponent {
private updateUrl(url:string) {
this._meta.updateTag({content:url},"property='og:url'");
}
+
+ stepHasChanged(stepId){
+
+ if(stepId == 'source'){
+ console.log("show source")
+ this.showOptions.showSource();
+ }else if(stepId == 'target'){
+ console.log("show target")
+ this.showOptions.show = this.showOptions.linkTo;
+ this.showOptions.showLinkTo();
+ }else if(stepId == 'claim'){
+ console.log("show target")
+ this.showOptions.show = 'claim';
+ }
+ this.cdr.detectChanges();
+ console.log('stepHasChanged', stepId, this.showOptions.show)
+ }
+
+ stepStatus(stepId){
+ if(stepId == 'source'){
+ if(this.showOptions.show == 'source'){
+ return 'active';
+ }else if(this.sources.length > 0){
+ return 'done';
+ }else{
+ return 'default';
+ }
+ }else if(stepId=='target'){
+ if(this.showOptions.show != 'source' && this.showOptions.show != 'claim'){
+ return 'active';
+ }else if(this.results.length > 0){
+ return 'done';
+ }else if(this.sources.length == 0){
+ return 'disabled';
+ }else{
+ return 'default';
+ }
+ }else if(stepId=='claim'){
+ if(this.showOptions.show == 'claim'){
+ return 'active';
+ }else if(this.results.length > 0 && (this.inlineEntity || this.sources.length > 0)){
+ return 'default';
+ }else if(!(this.results.length > 0 && (this.inlineEntity || this.sources.length > 0))){
+ return 'disabled';
+ }
+ }
+ }
+
}
diff --git a/claims/linking/linkingGeneric.module.ts b/claims/linking/linkingGeneric.module.ts
index 25de2f5a..d1bcd4e2 100644
--- a/claims/linking/linkingGeneric.module.ts
+++ b/claims/linking/linkingGeneric.module.ts
@@ -22,6 +22,7 @@ import {ClaimEntitiesMetadataModule} from "./selected/ClaimEntitiesMetadata.modu
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";
@NgModule({
imports: [
@@ -31,7 +32,7 @@ import {BreadcrumbsModule} from "../../utils/breadcrumbs/breadcrumbs.module";
ClaimContextSearchFormModule, ClaimProjectsSearchFormModule, BulkClaimModule, ClaimResultSearchFormModule,
HelperModule, Schema2jsonldModule, SEOServiceModule, MetadataPreviewModule, ClaimEntitiesMetadataModule, AlertModalModule,
PiwikServiceModule,
- MatSelectModule, BreadcrumbsModule
+ MatSelectModule, BreadcrumbsModule, StepperModule
],
providers:[LoginGuard, PreviousRouteRecorder, IsRouteEnabled],
declarations: [
diff --git a/claims/linking/selected/ClaimEntityProjectMetadata.component.ts b/claims/linking/selected/ClaimEntityProjectMetadata.component.ts
index 70b7060b..5ac502af 100644
--- a/claims/linking/selected/ClaimEntityProjectMetadata.component.ts
+++ b/claims/linking/selected/ClaimEntityProjectMetadata.component.ts
@@ -8,16 +8,16 @@ import {ClaimEntity} from '../../claim-utils/claimHelper.class';
- Funder {{entity.project.funderName}}
+ Funder: {{entity.project.funderName}}
+
+
+ GrandID: {{entity.project.code}}
-
- GrandId {{entity.project.code}}
-
Duration {{(entity.project.startDate) ? entity.project.startDate : 'Unknown'}}{{'-' + ((entity.project.endDate) ? entity.project.endDate : 'Unknown')}}
+ class="uk-text-muted uk-margin-small-right">Duration: {{(entity.project.startDate) ? entity.project.startDate : 'Unknown'}}{{'-' + ((entity.project.endDate) ? entity.project.endDate : 'Unknown')}}
diff --git a/claims/linking/selected/ClaimEntityResultMetadata.component.ts b/claims/linking/selected/ClaimEntityResultMetadata.component.ts
index 2addc8c8..a8be5cef 100644
--- a/claims/linking/selected/ClaimEntityResultMetadata.component.ts
+++ b/claims/linking/selected/ClaimEntityResultMetadata.component.ts
@@ -6,23 +6,23 @@ import {ClaimEntity} from '../../claim-utils/claimHelper.class';
template:
`
-
0 " class="uk-text-small">
-
Authors
+
0 " class="uk-text-small uk-margin-small-bottom">
+ Authors:
{{sliceArray(entity.result.authors)}}
-
0" class="uk-text-small">
-
Editors
+
0" class="uk-text-small uk-margin-small-bottom">
+ Editors:
{{sliceArray(entity.result.editors)}}
-
+
Publisher {{entity.result.publisher}}
+ class="uk-text-muted uk-margin-small-right uk-margin-small-bottom">Publisher: {{entity.result.publisher}}
Journal {{entity.result.journal}}
+ class="uk-text-muted uk-margin-small-right uk-margin-small-bottom">Journal: {{entity.result.journal}}
-
Published in Published: {{entity.result.date}}
{{getProjectDurationMessage(entity)}}
diff --git a/claims/linking/selected/ClaimEntityTitle.component.ts b/claims/linking/selected/ClaimEntityTitle.component.ts
index debcc7a3..44c56264 100644
--- a/claims/linking/selected/ClaimEntityTitle.component.ts
+++ b/claims/linking/selected/ClaimEntityTitle.component.ts
@@ -6,7 +6,7 @@ import {StringUtils} from "../../../utils/string-utils.class";
selector: 'claim-title',
template:
`
-
+
`
diff --git a/claims/linking/selected/metadataPreview.component.html b/claims/linking/selected/metadataPreview.component.html
index 91e7069f..14613363 100644
--- a/claims/linking/selected/metadataPreview.component.html
+++ b/claims/linking/selected/metadataPreview.component.html
@@ -10,31 +10,23 @@
-
+
+
+
-
+
-
SOURCES ({{sources.length + (inlineEntity ? 1 : 0) | number}})
-
+ SOURCES ({{sources.length + (inlineEntity ? 1 : 0) | number}})
- Edit
sources
-
- - 0)?' warningBorder ':'')+
- +((inlineEntity.errorMessages.length > 0)?' dangerBorder ':'') +
- ' uk-alert'" >
+
+ -
{{(!inlineEntity.result) ? inlineEntity.type : ((inlineEntity.result && inlineEntity.result.source == 'openaire') ? inlineEntity.type : (inlineEntity.result && inlineEntity.result.source + ' result'))}}
@@ -47,7 +39,7 @@
-
+
@@ -56,17 +48,13 @@
-
SOURCES cannot be empty.
+
SOURCES cannot be empty.
Start by adding your linking sources first, go to
- sources
- page.
+ step 1.
-
0 " class="uk-list uk-animation-fade">
- - 0)?' warningBorder ':'')+
- +((entity.errorMessages.length > 0)?' dangerBorder ':'') +
- ' uk-alert'">
+
0 " class="uk-list uk-animation-fade uk-list-divider">
+ -
@@ -80,7 +68,7 @@
-
+
-
LINK TO ({{results.length | number}})
+
LINK TO ({{results.length | number}})
-
Edit
entities
-
LINK TO list cannot be empty.
- Select an entity type to link to:
-
-
-
-
-
-
Research results
-
-
-
-
+
LINK TO list cannot be empty.
+ Start by adding sources to link to first, go to
+ step 2.
+
-
0 " class="uk-list uk-animation-fade">
+ 0 " class="uk-list uk-animation-fade uk-list-divider">
- 0)?' warningBorder ':'')+
- +((entity.errorMessages.length > 0)?' dangerBorder ':'') +
- ' uk-alert'" style="z-index: 0 !important;">
+ style="z-index: 0 !important;">
{{(!entity.result) ? entity.type : ((entity.result && entity.result.source == 'openaire') ? entity.type : (entity.result && entity.result.source + ' result'))}}
@@ -242,7 +186,7 @@
-
+
+
+
-
+ [class]="((results.length > 0 && (sources.length > 0 || inlineEntity))?'uk-background-secondary uk-light':'uk-background-muted uk-disabled ')+' uk-padding-small'">
+
diff --git a/claims/linking/selected/selectedResults.component.html b/claims/linking/selected/selectedResults.component.html
index e81d9d4e..9eadfcab 100644
--- a/claims/linking/selected/selectedResults.component.html
+++ b/claims/linking/selected/selectedResults.component.html
@@ -10,10 +10,8 @@
diff --git a/searchPages/searchUtils/searchFilter.component.html b/searchPages/searchUtils/searchFilter.component.html
index a3d7f4ac..a3980f09 100644
--- a/searchPages/searchUtils/searchFilter.component.html
+++ b/searchPages/searchUtils/searchFilter.component.html
@@ -11,15 +11,15 @@
-
filterValuesNum">
-
0"
- [class]="((isDisabled)?'uk-disabled uk-link-muted ':' portal-link ') + ' uk-margin-small-top'"
- [attr.uk-toggle]="'target: #toggle-'+filter.filterId" (click)="toggle()">
+ filterValuesNum ">
+
0 "
+ [class]="' uk-link ' + ((isDisabled)?'uk-disabled uk-link-muted ':' portal-link ') + ' uk-margin-small-top'"
+ (click)="toggle()">
+ View all
-
+
-
diff --git a/searchPages/searchUtils/searchFilter.component.ts b/searchPages/searchUtils/searchFilter.component.ts
index 846a459b..0a5e1881 100644
--- a/searchPages/searchUtils/searchFilter.component.ts
+++ b/searchPages/searchUtils/searchFilter.component.ts
@@ -32,14 +32,14 @@ export class SearchFilterComponent implements OnInit, OnChanges {
@Output() modalChange = new EventEmitter();
@Output() onFilterChange = new EventEmitter();
keyword = "";
- sortBy = "name";
+ sortBy: "name" | "num" = "name";
queryParams = {};
paramPosition = 0;
@Input() actionRoute: boolean = false;
@Input() quickFilter: { filter: Filter, selected: boolean, filterId: string, value: string };
sub;
public isOpen: boolean = false;
-
+ sortedValues;
constructor(private _router: Router, private route: ActivatedRoute) {
}
@@ -50,11 +50,18 @@ export class SearchFilterComponent implements OnInit, OnChanges {
}
ngOnInit() {
+ if(this.filterValuesNum == 0){
+ this.isOpen = true;
+ this.sortBy = "num";
+ }else{
+ this.isOpen = false;
+ }
this.sub = this.route.queryParams.subscribe(params => {
this.queryParams = Object.assign({}, params);
this.paramPosition = SearchFields.getParameterOrder(this.filter.filterId, this.getEntries(params));
});
this.filter.values = this.filter.values.filter(value => !value.name.toLowerCase().includes('unknown') && !value.name.toLowerCase().includes('not available'));
+ this.sort(this.filter.values);
if (this.filter.filterType == "radio") {
this.filter.radioValue = "";
this.filter.values.forEach(value => {
@@ -236,11 +243,13 @@ export class SearchFilterComponent implements OnInit, OnChanges {
return 0;
});
}
- return sorted;
+ event.stopPropagation();
+ this.sortedValues = Object.assign(sorted);
}
toggle() {
this.isOpen = !this.isOpen;
+ event.stopPropagation();
}
disabled(value) {