linking updates
This commit is contained in:
parent
dcffb611a2
commit
c9ed6a255b
|
@ -118,6 +118,11 @@
|
|||
</ng-container>
|
||||
</div>
|
||||
<div class="uk-width-expand@m uk-width-1-1@s uk-first-column">
|
||||
|
||||
<div *ngIf="openaireResultsStatus == errorCodes.LOADING" class="uk-animation-fade uk-margin-top uk-width-1-1"
|
||||
role="alert"><span class="loading-gif uk-align-center"></span></div>
|
||||
<claim-results [localStoragePrefix]="localStoragePrefix" [results]=openaireResults
|
||||
[selectedResults]=selectedProjects [basketLimit]="basketLimit"></claim-results>
|
||||
<div *ngIf="openaireResultsNum != null && openaireResultsNum > 0" class="uk-clearfix ">
|
||||
<div class= "paging-hr searchPaging uk-margin-small-bottom"
|
||||
*ngIf="(openaireResultsNum > 0) || (openaireResultsStatus == errorCodes.LOADING)">
|
||||
|
@ -138,10 +143,6 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="openaireResultsStatus == errorCodes.LOADING" class="uk-animation-fade uk-margin-top uk-width-1-1"
|
||||
role="alert"><span class="loading-gif uk-align-center"></span></div>
|
||||
<claim-results [localStoragePrefix]="localStoragePrefix" [results]=openaireResults
|
||||
[selectedResults]=selectedProjects [basketLimit]="basketLimit"></claim-results>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -59,7 +59,7 @@
|
|||
class="portal-color">{{countTotalPages(crossrefResultsNum)|number}}</span>
|
||||
|
||||
</div>-->
|
||||
<div class="uk-width-1-1@s uk-width-1-2@m uk-text-uppercase"
|
||||
<!-- <div class="uk-width-1-1@s uk-width-1-2@m uk-text-uppercase"
|
||||
*ngIf="crossrefResultsNum > 0">
|
||||
{{crossrefResultsNum|number}}
|
||||
<span class="uk-text-muted uk-text-uppercase"> research outcomes, page </span>
|
||||
|
@ -71,7 +71,7 @@
|
|||
<paging-no-load class="uk-float-right" [currentPage]="crossrefPage" [totalResults]="crossrefResultsNum"
|
||||
[term]="keyword"
|
||||
[size]="size" (pageChange)="crossrefPageChange($event)"></paging-no-load>
|
||||
</div>
|
||||
</div>-->
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="crossrefStatus === errorCodes.LOADING" class="uk-animation-fade uk-margin-top uk-width-1-1"
|
||||
|
@ -81,6 +81,10 @@
|
|||
<claim-results [localStoragePrefix]=localStoragePrefix [results]=crossrefResults
|
||||
[selectedResults]=selectedResults [basketLimit]="basketLimit"></claim-results>
|
||||
</div>
|
||||
<paging-no-load *ngIf="crossrefStatus != errorCodes.LOADING && crossrefResultsNum>0 " class="uk-float-right"
|
||||
[currentPage]="crossrefPage" [totalResults]="crossrefResultsNum"
|
||||
[term]="keyword"
|
||||
[size]="size" (pageChange)="crossrefPageChange($event)"></paging-no-load>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="activeTab == 'openaire'" id="openaire" class="uk-animation-fade">
|
||||
|
@ -204,30 +208,7 @@
|
|||
<div *ngIf="orcidStatus == errorCodes.NONE && orcidResultsNum == -1"
|
||||
class="uk-alert uk-alert-primary "> No results found
|
||||
</div>
|
||||
<div *ngIf=" ((orcidResultsNum >0) && (totalPages > 1) && ( 0 < page && page <= totalPages )) "
|
||||
class="uk-clearfix">
|
||||
<div class="uk-grid">
|
||||
<!--<div *ngIf="orcidResultsNum>0" class="uk-width-1-2">
|
||||
<span class="portal-color">{{orcidResultsNum|number}}</span> research outcomes, page <span
|
||||
class="portal-color">{{orcidPage | number}}</span> of <span
|
||||
class="portal-color">{{countTotalPages(orcidResultsNum)|number}}</span>
|
||||
|
||||
</div>-->
|
||||
<div class="uk-width-1-1@s uk-width-1-2@m uk-text-uppercase"
|
||||
*ngIf="orcidResultsNum > 0">
|
||||
{{orcidResultsNum|number}}
|
||||
<span class="uk-text-muted uk-text-uppercase"> research outcomes, page </span>
|
||||
{{orcidPage | number}}
|
||||
<span class="uk-text-muted uk-text-uppercase"> of </span>
|
||||
{{(countTotalPages(orcidResultsNum)|number)}}
|
||||
</div>
|
||||
<div class="uk-width-1-2 uk-padding-remove-left">
|
||||
<paging-no-load class="uk-float-right" [currentPage]="orcidPage" [totalResults]="orcidResultsNum"
|
||||
[term]="keyword" [size]="size"
|
||||
(pageChange)="orcidPageChange($event)"></paging-no-load>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="orcidResultsNum >= 0" class="panel-body">
|
||||
<span><span class="uk-text-bold">Showing results for</span>
|
||||
<a target="_blank" href="http://orcid.org/{{authorId}}"> <span
|
||||
|
@ -257,6 +238,15 @@
|
|||
[selectedResults]=selectedResults [basketLimit]="basketLimit"></claim-results>
|
||||
<div *ngIf="orcidResultsNum == 0" class="uk-alert uk-alert-primary uk-margin-top"> No results found</div>
|
||||
</div>
|
||||
<div *ngIf=" ((orcidResultsNum >0) && (totalPages > 1) && ( 0 < page && page <= totalPages )) "
|
||||
class="uk-clearfix">
|
||||
|
||||
<paging-no-load class="uk-float-right" [currentPage]="orcidPage" [totalResults]="orcidResultsNum"
|
||||
[term]="keyword" [size]="size"
|
||||
(pageChange)="orcidPageChange($event)"></paging-no-load>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="orcidStatus == errorCodes.LOADING" class="uk-animation-fade uk-margin-top uk-width-1-1" role="alert">
|
||||
<span class="loading-gif uk-align-center"></span></div>
|
||||
|
@ -270,35 +260,18 @@
|
|||
role="alert">Service not available
|
||||
</div>
|
||||
<div class="uk-margin-top">
|
||||
<div *ngIf="dataciteResultsNum != null && dataciteResultsNum > 0" class="uk-clearfix ">
|
||||
<div class="uk-grid">
|
||||
<!-- <div *ngIf="dataciteResultsNum>0" class="uk-width-1-2">
|
||||
<span class="portal-color">{{dataciteResultsNum|number}}</span> research outcomes, page <span
|
||||
class="portal-color">{{datacitePage | number}}</span> of <span
|
||||
class="portal-color">{{countTotalPages(dataciteResultsNum)|number}}</span>
|
||||
|
||||
</div>-->
|
||||
<div class="uk-width-1-1@s uk-width-1-2@m uk-text-uppercase"
|
||||
*ngIf="dataciteResultsNum > 0">
|
||||
{{dataciteResultsNum|number}}
|
||||
<span class="uk-text-muted uk-text-uppercase"> research outcomes, page </span>
|
||||
{{datacitePage | number}}
|
||||
<span class="uk-text-muted uk-text-uppercase"> of </span>
|
||||
{{(countTotalPages(dataciteResultsNum)|number)}}
|
||||
</div>
|
||||
<div class="uk-width-1-2 uk-padding-remove-left">
|
||||
<paging-no-load class="uk-float-right" [currentPage]="datacitePage" [totalResults]="dataciteResultsNum"
|
||||
[term]="keyword"
|
||||
[size]="size" (pageChange)="datacitePageChange($event)"></paging-no-load>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="dataciteStatus == errorCodes.LOADING" class="uk-animation-fade uk-margin-top uk-width-1-1"
|
||||
role="alert"><span class="loading-gif uk-align-center"></span></div>
|
||||
<div>
|
||||
<claim-results [localStoragePrefix]=localStoragePrefix *ngIf="dataciteResults.length > 0 "
|
||||
[results]=dataciteResults [selectedResults]=selectedResults [basketLimit]="basketLimit"></claim-results>
|
||||
</div>
|
||||
<div *ngIf="dataciteResultsNum != null && dataciteResultsNum > 0" class="uk-clearfix ">
|
||||
<paging-no-load class="uk-float-right" [currentPage]="datacitePage" [totalResults]="dataciteResultsNum"
|
||||
[term]="keyword"
|
||||
[size]="size" (pageChange)="datacitePageChange($event)"></paging-no-load>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -37,14 +37,12 @@ import {Subscriber} from "rxjs";
|
|||
<div class="uk-clearfix">
|
||||
|
||||
<div>
|
||||
<div *ngIf="!claiming " (click)="insert()" style="width: 350px;"
|
||||
<a *ngIf="!claiming " (click)="insert()"
|
||||
[class]="getButtonClass()">CONFIRM LINKING
|
||||
<span [class]="(defaultColors?'':' uk-margin-small-top ')+'uk-icon uk-float-right uk-text-bold uk-margin-small-right'">
|
||||
<svg width="30" height="30" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"
|
||||
icon="chevron-right" ratio="1.5"><polyline fill="none" stroke="#000" stroke-width="1.03"
|
||||
points="7 4 13 10 7 16"></polyline></svg>
|
||||
<span [class]="(defaultColors?'':' uk-margin-small-top ')+'uk-icon uk-text-bold uk-margin-small-right'" uk-icon="arrow-right">
|
||||
|
||||
</span>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -524,8 +522,6 @@ export class ClaimInsertComponent {
|
|||
}
|
||||
if(this.defaultColors){
|
||||
buttonClass+=" linksbaskettitles uk-padding-small ";
|
||||
}else{
|
||||
buttonClass+=" uk-button uk-button-large ";
|
||||
}
|
||||
return buttonClass + "uk-text-center ";
|
||||
}
|
||||
|
|
|
@ -1,23 +1,38 @@
|
|||
<breadcrumbs [breadcrumbs]="breadcrumbs"></breadcrumbs>
|
||||
<div class="" >
|
||||
<div class=" uk-grid uk-child-width-1-3">
|
||||
<div>
|
||||
<div>Find Sources</div>
|
||||
<div class=" uk-flex uk-flex-center uk-text-small" >
|
||||
<div class=" uk-grid uk-flex uk-flex-center uk-flex-middle uk-width-auto">
|
||||
<div class=" uk-width-auto">
|
||||
|
||||
<a class="uk-icon-button uk-border-circle" [class.uk-button-primary]="showOptions.show !='source'"
|
||||
[class.uk-button-secondary]="showOptions.show =='source'">1</a>
|
||||
</div>
|
||||
<div>
|
||||
<div>Link Sources to Entities</div>
|
||||
<a class=" uk-icon-button " [class.uk-button-primary]="showOptions.show =='claim'"
|
||||
[class.uk-button-secondary]="showOptions.show =='link'">2</a>
|
||||
</div>
|
||||
<div><div>Summarize and finish</div>
|
||||
<a class="uk-icon-button uk-border-circle"
|
||||
[class.uk-button-secondary]="showOptions.show =='claim'">3</a>
|
||||
</div>
|
||||
<progress class="uk-progress" value="0" max="100"></progress>
|
||||
[class.uk-button-secondary]="showOptions.show =='source'" (click)="showOptions.show = 'source';
|
||||
scrollUp();">
|
||||
<span *ngIf="showOptions.show == 'source' || sources.length == 0 ">1</span>
|
||||
<span *ngIf="showOptions.show != 'source' && sources.length > 0 " uk-icon="check"></span>
|
||||
</a>
|
||||
<span class="uk-margin-small-left">Find Sources</span>
|
||||
|
||||
</div>
|
||||
<div class="mat-stepper-horizontal-line uk-margin-small-left"></div>
|
||||
<div class=" uk-width-auto">
|
||||
<a class=" uk-icon-button " [class.uk-button-primary]="showOptions.show =='claim'"
|
||||
[class.uk-button-secondary]="showOptions.show !='claim'" [class.uk-disabled]="sources.length == 0"
|
||||
(click)="openSelectionModal();">
|
||||
<span *ngIf="(showOptions.show != 'source' && showOptions.show != 'claim') || results.length == 0 ">2</span>
|
||||
<span *ngIf="!(showOptions.show != 'source' && showOptions.show != 'claim') && results.length > 0 " uk-icon="check"></span>
|
||||
|
||||
</a>
|
||||
<span class="uk-margin-small-left">Link Sources to Entities</span>
|
||||
</div>
|
||||
<div class="mat-stepper-horizontal-line uk-margin-small-left"></div>
|
||||
<div class=" uk-width-auto">
|
||||
<a class="uk-icon-button uk-border-circle" [class.uk-disabled]="sources.length == 0 || results.length == 0 "
|
||||
[class.uk-button-secondary]="showOptions.show =='claim'" (click)="showOptions.show = 'claim'; scrollUp();">3</a>
|
||||
<span class="uk-margin-small-left">Summarize and finish</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<metadata-preview *ngIf="showOptions.show=='claim' && properties" class="uk-margin-top"
|
||||
[results]="results" [sources]="sources"
|
||||
|
@ -48,7 +63,7 @@
|
|||
<div class="uk-width-2-3">
|
||||
<div class="uk-margin-small-bottom">
|
||||
|
||||
<span *ngIf="showOptions.show!='source' && showOptions.show != 'claim' && showOptions.linkToEntities.length > 1"
|
||||
<!--<span *ngIf="showOptions.show!='source' && showOptions.show != 'claim' && showOptions.linkToEntities.length > 1"
|
||||
class="uk-flex-inline uk-flex-middle uk-width-3-5@m uk-width-1-1@s">
|
||||
<span class="uk-width-1-4 uk-text-muted uk-text-large">LINK TO </span>
|
||||
<mat-select [(ngModel)]="showOptions.show" class="uk-width-3-4@m matSelection"
|
||||
|
@ -62,9 +77,9 @@
|
|||
<mat-option *ngIf="showOptions.linkToEntities.indexOf('context')!=-1 " value="context">COMMUNITIES
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</span>
|
||||
</span>-->
|
||||
|
||||
<span *ngIf="showOptions.show!='source' && showOptions.show != 'claim' && showOptions.linkToEntities.length ==1">
|
||||
<!--<span *ngIf="showOptions.show!='source' && showOptions.show != 'claim' && showOptions.linkToEntities.length ==1">
|
||||
<span>LINK TO </span>
|
||||
<span class=" uk-width-auto uk-text-bold">
|
||||
<span *ngIf="showOptions.linkToEntities.indexOf('project')!=-1 "
|
||||
|
@ -74,7 +89,7 @@
|
|||
<span *ngIf="showOptions.linkToEntities.indexOf('context')!=-1 " value="context">COMMUNITIES
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</span>-->
|
||||
<!--<span *ngIf="showOptions.show=='source'" class="uk-text-bold">
|
||||
ADD LINKING SOURCES
|
||||
</span>-->
|
||||
|
@ -323,7 +338,8 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<modal-alert (alertOutput)="closeSelectionModal($event)" >
|
||||
<div class="uk-grid uk-text-center uk-margin-expand uk-padding uk-child-width-1-3">
|
||||
|
||||
|
|
|
@ -17,7 +17,22 @@ declare var UIkit:any;
|
|||
|
||||
@Component({
|
||||
selector: 'linking-generic',
|
||||
templateUrl: 'linkingGeneric.component.html'
|
||||
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);
|
||||
}
|
||||
|
||||
`]
|
||||
|
||||
})
|
||||
export class LinkingGenericComponent {
|
||||
|
|
|
@ -1,34 +1,4 @@
|
|||
<div class="uk-section uk-padding-remove-top uk-padding-remove-bottom ">
|
||||
<div
|
||||
[class]="((defaultColors)?'linkingToolbar':'communityPanelBackground')+' uk-padding-small'">
|
||||
<div class="uk-container uk-container-large uk-margin-small-top uk-padding-small">
|
||||
<div class="uk-grid">
|
||||
<div class="uk-padding-remove-left uk-margin-auto-vertical back uk-link">
|
||||
<span
|
||||
(click)="showOptions.showLinkTo()"
|
||||
style="cursor:pointer">
|
||||
<span class="uk-icon">
|
||||
<svg width="30" height="30" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="chevron-left"
|
||||
ratio="1.5"><polyline fill="none" stroke="#000" stroke-width="1.03"
|
||||
points="13 16 7 10 13 4"></polyline></svg></span>
|
||||
BACK
|
||||
</span>
|
||||
</div>
|
||||
<div class="uk-width-expand">
|
||||
<h6 class="uk-text-bold">
|
||||
LINKING CONFIRMATION
|
||||
</h6>
|
||||
Confirm that the links you provided are all correct
|
||||
</div>
|
||||
<claim-insert [results]="results" [sources]="sources" [inlineEntity]="inlineEntity"
|
||||
[properties]=properties [localStoragePrefix]=localStoragePrefix
|
||||
class=" " [errors]="errors" (insertFinished)="runValidation(false); updateLocalStorage();"
|
||||
[defaultColors]="defaultColors" [communityId]="communityId">
|
||||
</claim-insert>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="tm-main" class="uk-section uk-margin-small-top tm-middle uk-padding-remove-top">
|
||||
<div class="tm-main uk-width-1-1@s uk-width-1-1@m uk-width-1-1@l uk-row-first ">
|
||||
|
@ -39,13 +9,13 @@
|
|||
|
||||
|
||||
<div class="uk-margin-top">
|
||||
<div class="uk-grid">
|
||||
<div class="uk-width-expand">
|
||||
<div class="uk-grid ">
|
||||
<div class="uk-grid uk-width-expand uk-child-width-1-2@m uk-child-width-1-1@s">
|
||||
<!-- Sources-->
|
||||
<div>
|
||||
<div class=" uk-margin uk-h6 uk-text-primary uk-animation-toggle"
|
||||
(click)="showSources=!showSources; ">
|
||||
SOURCES ({{sources.length + (inlineEntity ? 1 : 0) | number}})
|
||||
<span *ngIf="!showSources" class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20"
|
||||
<div class=" uk-margin uk-animation-toggle">
|
||||
<span class="uk-h6 uk-text-primary "> SOURCES ({{sources.length + (inlineEntity ? 1 : 0) | number}})
|
||||
<!--<span *ngIf="!showSources" class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20"
|
||||
xmlns="http://www.w3.org/2000/svg" icon="chevron-left"
|
||||
ratio="1"><polyline fill="none" stroke="#000"
|
||||
stroke-width="1.03"
|
||||
|
@ -54,9 +24,13 @@
|
|||
xmlns="http://www.w3.org/2000/svg" icon="chevron-down"
|
||||
ratio="1"><polyline fill="none" stroke="#000"
|
||||
stroke-width="1.03"
|
||||
points="16 7 10 13 4 7"></polyline></svg></span>
|
||||
points="16 7 10 13 4 7"></polyline></svg></span>-->
|
||||
</span>
|
||||
<a class="uk-float-right" (click)="showOptions.showSource() "> <span
|
||||
uk-icon="pencil"></span>Edit
|
||||
sources</a>
|
||||
</div>
|
||||
<ul *ngIf="inlineEntity && showSources" class="uk-list uk-animation-fade">
|
||||
<ul *ngIf="inlineEntity" class="uk-list uk-animation-fade">
|
||||
<li
|
||||
[class]="((inlineEntity.warningMessages.length > 0)?' warningBorder ':'')+
|
||||
+((inlineEntity.errorMessages.length > 0)?' dangerBorder ':'') +
|
||||
|
@ -79,7 +53,7 @@
|
|||
<claim-project-metadata [entity]="inlineEntity"></claim-project-metadata>
|
||||
</li>
|
||||
</ul>
|
||||
<div *ngIf="!inlineEntity && sources.length == 0 && showSources">
|
||||
<div *ngIf="!inlineEntity && sources.length == 0 ">
|
||||
|
||||
<div class="uk-alert dangerBorder no-selected-message uk-text-center">
|
||||
<span class="uk-text-bold uk-text-danger"> SOURCES cannot be empty.</span>
|
||||
|
@ -88,7 +62,7 @@
|
|||
page</a>.
|
||||
</div>
|
||||
</div>
|
||||
<ul *ngIf="!inlineEntity && sources.length > 0 && showSources" class="uk-list uk-animation-fade">
|
||||
<ul *ngIf="!inlineEntity && sources.length > 0 " class="uk-list uk-animation-fade">
|
||||
<li *ngFor=" let entity of sources "
|
||||
[class]="((entity.warningMessages.length > 0)?' warningBorder ':'')+
|
||||
+((entity.errorMessages.length > 0)?' dangerBorder ':'') +
|
||||
|
@ -112,23 +86,23 @@
|
|||
<div *ngIf="entity.result && entity.result.source && entity.result.source!='openaire' "
|
||||
class="uk-grid uk-margin-remove-left uk-margin-small-top uk-text-small">
|
||||
<div class="uk-width-1-2 uk-padding-remove-left">
|
||||
<!-- <span class="uk-text-muted">Type </span>-->
|
||||
<!-- <mat-select [(ngModel)]="entity.type" name="{{'select_type_'+entity.id}}"-->
|
||||
<!-- class="uk-select uk-width-small matSelection"-->
|
||||
<!-- [disableOptionCentering]="true"-->
|
||||
<!-- panelClass="entitiesSelectionPanel">-->
|
||||
<!-- <mat-option [value]="'publication'"-->
|
||||
<!-- (click)="onTypeChanged('publication',entity, false)">Publication-->
|
||||
<!-- </mat-option>-->
|
||||
<!-- <mat-option [value]="'dataset'"-->
|
||||
<!-- (click)="onTypeChanged('dataset',entity, false)">Research data-->
|
||||
<!-- </mat-option>-->
|
||||
<!-- <mat-option [value]="'software'" (click)="onTypeChanged('software',entity, false)">Software-->
|
||||
<!-- </mat-option>-->
|
||||
<!-- <mat-option [value]="'other'"-->
|
||||
<!-- (click)="onTypeChanged('other',entity, false)">Other research product-->
|
||||
<!-- </mat-option>-->
|
||||
<!-- </mat-select>-->
|
||||
<!-- <span class="uk-text-muted">Type </span>-->
|
||||
<!-- <mat-select [(ngModel)]="entity.type" name="{{'select_type_'+entity.id}}"-->
|
||||
<!-- class="uk-select uk-width-small matSelection"-->
|
||||
<!-- [disableOptionCentering]="true"-->
|
||||
<!-- panelClass="entitiesSelectionPanel">-->
|
||||
<!-- <mat-option [value]="'publication'"-->
|
||||
<!-- (click)="onTypeChanged('publication',entity, false)">Publication-->
|
||||
<!-- </mat-option>-->
|
||||
<!-- <mat-option [value]="'dataset'"-->
|
||||
<!-- (click)="onTypeChanged('dataset',entity, false)">Research data-->
|
||||
<!-- </mat-option>-->
|
||||
<!-- <mat-option [value]="'software'" (click)="onTypeChanged('software',entity, false)">Software-->
|
||||
<!-- </mat-option>-->
|
||||
<!-- <mat-option [value]="'other'"-->
|
||||
<!-- (click)="onTypeChanged('other',entity, false)">Other research product-->
|
||||
<!-- </mat-option>-->
|
||||
<!-- </mat-select>-->
|
||||
|
||||
<mat-form-field class="matSelectionFormField">
|
||||
<mat-label>Type</mat-label>
|
||||
|
@ -153,7 +127,7 @@
|
|||
</div>
|
||||
<div class="uk-width-1-2">
|
||||
<div class="uk-grid">
|
||||
<!-- <span class="uk-text-muted uk-margin-small-top uk-padding-remove-left">Access mode</span>-->
|
||||
<!-- <span class="uk-text-muted uk-margin-small-top uk-padding-remove-left">Access mode</span>-->
|
||||
<mat-form-field class="matSelectionFormField">
|
||||
<mat-label>Access mode </mat-label>
|
||||
<mat-select [(ngModel)]="entity.result.accessRights" name="{{'select_rights_'+entity.id}}"
|
||||
|
@ -195,21 +169,15 @@
|
|||
</div>
|
||||
<!-- Results-->
|
||||
<div>
|
||||
<div class=" uk-margin uk-h6 uk-text-primary "
|
||||
(click)="showLinksTo=!showLinksTo; ">
|
||||
LINK TO ({{results.length | number}})
|
||||
<div class=" uk-margin " >
|
||||
<span class=" uk-h6 uk-text-primary"> LINK TO ({{results.length | number}})</span>
|
||||
|
||||
<span *ngIf="!showLinksTo" class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
icon="chevron-left" ratio="1"><polyline
|
||||
fill="none" stroke="#000" stroke-width="1.03" points="13 16 7 10 13 4"></polyline></svg></span>
|
||||
<span *ngIf="showLinksTo" class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
icon="chevron-down" ratio="1"><polyline
|
||||
fill="none" stroke="#000" stroke-width="1.03" points="16 7 10 13 4 7"></polyline></svg></span>
|
||||
|
||||
<a class="uk-float-right" (click)="showOptions.show = 'sources';"> <span
|
||||
uk-icon="pencil"></span>Edit
|
||||
entities</a>
|
||||
</div>
|
||||
<div *ngIf="results.length == 0 && showLinksTo">
|
||||
<div *ngIf="results.length == 0">
|
||||
<div class="uk-alert dangerBorder no-selected-message uk-text-center">
|
||||
<span class="uk-text-bold uk-text-danger"> LINK TO list cannot be empty.</span>
|
||||
Select an entity type to link to:
|
||||
|
@ -257,7 +225,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<ul *ngIf="results.length > 0 && showLinksTo" class="uk-list uk-animation-fade">
|
||||
<ul *ngIf="results.length > 0 " class="uk-list uk-animation-fade">
|
||||
<li *ngFor=" let entity of results "
|
||||
[class]="((entity.warningMessages.length > 0)?' warningBorder ':'')+
|
||||
+((entity.errorMessages.length > 0)?' dangerBorder ':'') +
|
||||
|
@ -280,7 +248,7 @@
|
|||
<div *ngIf="entity.result && entity.result.source && entity.result.source!='openaire' "
|
||||
class="uk-grid uk-text-small uk-margin-remove-left uk-margin-small-top">
|
||||
<div class="uk-width-1-2 uk-padding-remove-left">
|
||||
<!-- <span class="uk-text-muted">Type </span>-->
|
||||
<!-- <span class="uk-text-muted">Type </span>-->
|
||||
<mat-form-field class="matSelectionFormField">
|
||||
<mat-label>Type</mat-label>
|
||||
<mat-select [(ngModel)]="entity.type" name="{{'select_type_'+entity.id}}"
|
||||
|
@ -303,7 +271,7 @@
|
|||
</div>
|
||||
<div class="uk-width-1-2">
|
||||
<div class="uk-grid">
|
||||
<!-- <span class="uk-text-muted uk-margin-small-top uk-padding-remove-left">Access mode</span>-->
|
||||
<!-- <span class="uk-text-muted uk-margin-small-top uk-padding-remove-left">Access mode</span>-->
|
||||
<mat-form-field class="matSelectionFormField">
|
||||
<mat-label>Access mode </mat-label>
|
||||
<mat-select [(ngModel)]="entity.result.accessRights" name="{{'select_rights_'+entity.id}}"
|
||||
|
@ -344,27 +312,36 @@
|
|||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="uk-section uk-padding-remove-top uk-padding-remove-bottom uk-width-1-1">
|
||||
<div
|
||||
[class]="((defaultColors)?'linkingToolbar':'communityPanelBackground')+' uk-padding-small'">
|
||||
<div class="uk-container uk-container-large uk-margin-small-top uk-padding-small">
|
||||
<div class="uk-grid uk-flex uk-flex-center">
|
||||
|
||||
|
||||
<claim-insert [results]="results" [sources]="sources" [inlineEntity]="inlineEntity"
|
||||
[properties]=properties [localStoragePrefix]=localStoragePrefix
|
||||
class=" " [errors]="errors" (insertFinished)="runValidation(false); updateLocalStorage();"
|
||||
[defaultColors]="defaultColors" [communityId]="communityId">
|
||||
</claim-insert>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="uk-width-1-3" *ngIf="errors.length > 0 || warnings.length > 0">
|
||||
<!-- Errors and Warning -->
|
||||
<div *ngIf="errors.length > 0" class=" uk-margin uk-h6 uk-text-primary uk-animation-toggle"
|
||||
(click)="showErrors=!showErrors ">
|
||||
<div *ngIf="errors.length > 0" class=" uk-margin uk-h6 uk-text-danger uk-animation-toggle" >
|
||||
ERRORS ({{errors.length | number}})
|
||||
<span *ngIf="!showErrors" class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
icon="chevron-left" ratio="1"><polyline
|
||||
fill="none" stroke="#000" stroke-width="1.03" points="13 16 7 10 13 4"></polyline></svg></span>
|
||||
<span *ngIf="showErrors" class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
icon="chevron-down" ratio="1"><polyline
|
||||
fill="none" stroke="#000" stroke-width="1.03" points="16 7 10 13 4 7"></polyline></svg></span>
|
||||
|
||||
</div>
|
||||
<div *ngIf="errors.length > 0 && showErrors" class=" uk-animation-fade">
|
||||
<div *ngFor=" let message of errors " class="uk-alert dangerBorder">
|
||||
<div *ngIf="errors.length > 0 " class="">
|
||||
<div *ngFor=" let message of errors " class="uk-alert uk-alert-danger">
|
||||
<div *ngIf="message.type == 'claimServiceFail2Insert'">
|
||||
<div class="">
|
||||
|
||||
<span class="uk-text-danger uk-text-bold"> Fail to save {{message.failed|number}}
|
||||
<span class=" uk-text-bold"> Fail to save {{message.failed|number}}
|
||||
{{message.failed > 1 ? 'links.' : 'link.'}}</span>
|
||||
<br>
|
||||
<div
|
||||
|
@ -380,7 +357,7 @@
|
|||
<div *ngIf="message.type == 'claimServiceFail'">
|
||||
|
||||
<div class="">
|
||||
<span class="uk-text-danger uk-text-bold"> An error occured while saving your links.</span>
|
||||
<span class=" uk-text-bold"> An error occured while saving your links.</span>
|
||||
<br>
|
||||
None of the links saved.
|
||||
</div>
|
||||
|
@ -388,24 +365,16 @@
|
|||
</div>
|
||||
</div>
|
||||
<div *ngIf="warnings.length > 0"
|
||||
class=" uk-margin uk-h6 uk-text-primary uk-animation-toggle"
|
||||
(click)="showWarnings=!showWarnings "> WARNINGS
|
||||
class=" uk-margin uk-h6 uk-text-warning uk-animation-toggle"> WARNINGS
|
||||
({{warnings.length
|
||||
| number}})
|
||||
<span *ngIf="!showWarnings" class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
icon="chevron-left" ratio="1"><polyline
|
||||
fill="none" stroke="#000" stroke-width="1.03" points="13 16 7 10 13 4"></polyline></svg></span>
|
||||
<span *ngIf="showWarnings" class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
icon="chevron-down" ratio="1"><polyline
|
||||
fill="none" stroke="#000" stroke-width="1.03" points="16 7 10 13 4 7"></polyline></svg></span>
|
||||
|
||||
</div>
|
||||
|
||||
<div *ngIf="warnings.length > 0 && showWarnings " class=" uk-animation-fade">
|
||||
<div *ngFor=" let message of warnings " class="uk-alert warningBorder">
|
||||
<div *ngIf="warnings.length > 0 " class="">
|
||||
<div *ngFor=" let message of warnings " class="uk-alert uk-alert-warning">
|
||||
<div *ngIf="message.type == 'embargoEndDate'">
|
||||
<div class="uk-text-warning uk-text-bold">
|
||||
<div class="uk-text-bold">
|
||||
Embargo date must be later than published date in
|
||||
</div>
|
||||
<div class="">
|
||||
|
@ -413,7 +382,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div *ngIf="message.type == 'projectDuration'">
|
||||
<div class="uk-text-warning uk-text-bold">
|
||||
<div class="uk-text-bold">
|
||||
Published date must be in the project's date boundaries
|
||||
(from {{message.projectInfo.startDate}}{{(message.projectInfo.endDate) ? (' to ' + (addStringToNumber(message.projectInfo.endDate, 5))) : ''}}) in
|
||||
</div>
|
||||
|
@ -434,7 +403,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<modal-alert (alertOutput)="confirmClose()">
|
||||
</modal-alert>
|
||||
</div>
|
||||
|
@ -444,10 +413,11 @@
|
|||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<helper *ngIf="pageContents && pageContents['bottom'] && pageContents['bottom'].length > 0" [texts]="pageContents['bottom']"></helper>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -12,10 +12,10 @@ import {HelperFunctions} from "../../../utils/HelperFunctions.class";
|
|||
})
|
||||
export class MetadataPreviewComponent {
|
||||
|
||||
showSources = true;
|
||||
showLinksTo = true;
|
||||
showErrors = true;
|
||||
showWarnings = true;
|
||||
/* showSources = true;
|
||||
showLinksTo = true;*/
|
||||
// showErrors = true;
|
||||
// showWarnings = true;
|
||||
@Input() results: ClaimEntity[];
|
||||
@Input() sources: ClaimEntity[];
|
||||
@Input() title: string = "Research Results";
|
||||
|
@ -40,10 +40,10 @@ export class MetadataPreviewComponent {
|
|||
|
||||
ngOnInit() {
|
||||
this.setEmbargoEndDates();
|
||||
if (this.inlineEntity) {
|
||||
/* if (this.inlineEntity) {
|
||||
this.showSources = true;
|
||||
this.showLinksTo = true;
|
||||
}
|
||||
}*/
|
||||
this.runValidation(true);
|
||||
}
|
||||
setEmbargoEndDates(){
|
||||
|
|
|
@ -6,7 +6,7 @@ export class ConnectHelper {
|
|||
|
||||
public static getCommunityFromDomain(domain: string): string{
|
||||
if(properties.environment == "development") {
|
||||
// domain = "aginfra.openaire.eu"; //for testing
|
||||
domain = "covid-19.openaire.eu"; //for testing
|
||||
}
|
||||
domain = domain.indexOf("//") != -1? domain.split("//")[1]:domain; //remove https:// prefix
|
||||
if (domain.indexOf('eosc-portal.eu') != -1) {
|
||||
|
|
Loading…
Reference in New Issue