openaire-library/claims/linking/linkingGeneric.component.html

385 lines
25 KiB
HTML
Raw Normal View History

2022-02-25 13:52:36 +01:00
<breadcrumbs [breadcrumbs]="breadcrumbs"></breadcrumbs>
2022-03-02 11:18:24 +01:00
<div class="" >
2022-03-02 17:08:37 +01:00
<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'" (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>
2022-02-25 13:52:36 +01:00
</div>
</div>
2022-03-02 17:08:37 +01:00
<metadata-preview *ngIf="showOptions.show=='claim' && properties" class="uk-margin-top"
[results]="results" [sources]="sources"
[localStoragePrefix]="localStoragePrefix" [inlineEntity]="inlineEntity"
[showOptions]="showOptions" [properties]=properties [pageContents]="pageContents"
[defaultColors]="(communityId?false:true)" [communityId]="communityId"
>
</metadata-preview>
<div id="tm-main" class="uk-section uk-padding-remove-top tm-middle" *ngIf="showOptions.show != 'claim'">
<div class="uk-grid">
<div class="tm-main uk-width-1-1@s uk-width-1-1@m uk-width-1-1@l uk-row-first ">
<schema2jsonld *ngIf="url" [URL]="url" name="Link your research outcomes" type="other"></schema2jsonld>
<div [class]="((showOptions.show == 'claim')?'':' uk-margin-top ')+' uk-container uk-container-large '">
<div>
<!-- <div class="uk-width-1-1">
<helper position="top"></helper>
</div> -->
<div class="uk-grid helper-grid">
<!-- <helper position="left" styleName=" uk-width-1-5 uk-padding-left"></helper>-->
<div class="uk-width-expand">
<div *ngIf="properties" class="uk-section uk-section-default white-box-with-border uk-padding-small uk-padding-remove-top">
<div style=""
[class]="((showOptions.show == 'claim')?'':' uk-margin-top ')+' uk-container uk-container-large '">
<div id="basketStickTop"></div>
<div class="uk-grid" *ngIf="showOptions.show!='claim'" >
<div class="uk-width-2-3">
<div class="uk-margin-small-bottom">
2022-03-02 17:08:37 +01:00
<!--<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"
*ngIf="showOptions.linkToEntities.length > 1"
[disableOptionCentering]="true"
panelClass="matSelectionPanel">
<mat-option *ngIf="showOptions.linkToEntities.indexOf('project')!=-1 "
value="project">PROJECTS</mat-option>
<mat-option *ngIf="showOptions.linkToEntities.indexOf('result')!=-1 " value="result">RESEARCH
RESULTS</mat-option>
<mat-option *ngIf="showOptions.linkToEntities.indexOf('context')!=-1 " value="context">COMMUNITIES
</mat-option>
</mat-select>
2022-03-02 17:08:37 +01:00
</span>-->
2022-03-02 17:08:37 +01:00
<!--<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 "
value="project">PROJECTS</span>
<span *ngIf="showOptions.linkToEntities.indexOf('result')!=-1 " value="result">RESEARCH
RESULTS</span>
<span *ngIf="showOptions.linkToEntities.indexOf('context')!=-1 " value="context">COMMUNITIES
</span>
</span>
2022-03-02 17:08:37 +01:00
</span>-->
2022-02-25 13:52:36 +01:00
<!--<span *ngIf="showOptions.show=='source'" class="uk-text-bold">
ADD LINKING SOURCES
2022-02-25 13:52:36 +01:00
</span>-->
</div>
<div *ngIf="showOptions.show=='source'">
<claim-result-search-form [selectedResults]="sources" [properties]=properties
[localStoragePrefix]="localStoragePrefix+'sources'" [basketLimit]="basketLimit"
></claim-result-search-form>
</div>
<div *ngIf="showOptions.show=='project'">
<claim-projects-search-form [selectedProjects]="results" [properties]=properties
[localStoragePrefix]="localStoragePrefix+'results'" [basketLimit]="basketLimit"
></claim-projects-search-form>
</div>
<div *ngIf="showOptions.show=='context'">
<claim-contexts-search-form [communityId]=communityId [results]="results" [sources]="sources"
[properties]=properties
[localStoragePrefix]="localStoragePrefix+'results'" [basketLimit]="basketLimit"
></claim-contexts-search-form>
</div>
<div *ngIf="showOptions.show=='result'">
<claim-result-search-form [selectedResults]="results" [properties]=properties
[localStoragePrefix]="localStoragePrefix+'results'" [basketLimit]="basketLimit"
></claim-result-search-form>
</div>
</div>
<!-- Basket-->
<div *ngIf="showOptions.show != 'claim'" class="uk-width-1-3" style="" >
<div id="basket" uk-sticky=" offset: 130; top:#basketStickTop; bottom: #basketStickBottom;"
style="z-index: 0">
2022-02-25 13:52:36 +01:00
<div class="linksbasket uk-inline uk-width-1-1" style="">
<div *ngIf="inlineEntity == null">
2022-02-25 13:52:36 +01:00
<ul class="" uk-tab>
<li class="uk-active"><a href="#">Sources to link ({{(sources.length) | number}})</a></li>
<li [class.uk-disabled]="sources.length == 0"><a href="#">Link to <span
*ngIf="results.length
> 0">(
{{(results.length) | number}})</span></a></li>
</ul>
<ul class="uk-switcher" >
<!--<div class="linksbaskettitles uk-padding-small uk-animation-toggle"
(click)="showOptions.showBasketSources()"
[style.cursor]="(showOptions.show!='source'?'pointer':'default')">
<div class="uk-h6 uk-margin-remove portal-color" >
SOURCES ({{(sources.length) | number}})
<span *ngIf="showOptions.show!='source' && !showOptions.basketShowSources"
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="showOptions.show!='source' && showOptions.basketShowSources"
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>
Research results to link
2022-02-25 13:52:36 +01:00
</div>-->
<li>
<div
class=" uk-margin-remove-top uk-height-medium uk-overflow-auto ">
2022-02-25 13:52:36 +01:00
<div class=" uk-padding-small " style="min-height: 17px;">
<!-- <div *ngIf="showOptions.show != 'source'" class="uk-text-center">
<a (click)="showOptions.showSource()">
2022-02-25 13:52:36 +01:00
&lt;!&ndash;span class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="plus" ratio="1"><rect x="9" y="1" width="1" height="17"></rect><rect x="1" y="9" width="17" height="1"></rect></svg></span&ndash;&gt;
Edit sources</a>
2022-02-25 13:52:36 +01:00
</div>-->
<start-over *ngIf="showOptions.show == 'source' && (sources.length)> 0"
[results]="sources"
[localStoragePrefix]="localStoragePrefix+'sources'"
message="all sources" class="uk-float-right"></start-over>
<bulk-claim *ngIf="showOptions.show == 'source'" [results]="sources"
[properties]=properties
[localStoragePrefix]="localStoragePrefix+'sources'" [basketLimit]="basketLimit"
>
</bulk-claim>
</div>
<div class="uk-animation-slide-top-small uk-padding-small">
2022-02-25 13:52:36 +01:00
<div *ngIf="(sources.length) == 0 " class=" uk-text-center">
No Sources added yet. Start adding sources from the left panel. Or upload a DOI's CSV file.
</div>
<div *ngIf="sources.length >= basketLimit "
class="uk-alert uk-alert-warning uk-text-center">
Basket reached the size limit. No more sources can be added.
</div>
<claim-selected-results [results]="sources"
[localStoragePrefix]="localStoragePrefix+'sources'" class=""
2022-02-25 13:52:36 +01:00
[enableRemove]="true">
</claim-selected-results>
<div id="test1"></div>
</div>
</div>
2022-02-25 13:52:36 +01:00
</li>
<!--<div *ngIf="inlineEntity"
class="linkInlineEntity uk-padding-small">
<div class="uk-h6 linkInlineEntity uk-margin-small-bottom ">
SOURCE
</div>
<claim-title [entity]="inlineEntity" [slice]="true" [sliceSize]="45"
[shortVersion]="true"></claim-title>
<div class="uk-margin-small-top">
<span class="uk-label custom-label linkInlineEntityLabel"
title="Type">{{inlineEntity.type}}</span>
<span *ngIf="inlineEntity.project">
<span class="uk-label custom-label linkInlineEntityLabel"
title="Funder">{{inlineEntity.project.funderName}}</span>
2022-02-25 13:52:36 +01:00
&lt;!&ndash; <span class="uk-label custom-label " title="Type">{{inlineEntity.type}}</span>&ndash;&gt;
</span>
<span *ngIf="inlineEntity.result">
<span class="uk-label custom-label linkInlineEntityLabel "
title="Access mode">{{inlineEntity.result.accessRights}}</span>
</span>
</div>
2022-02-25 13:52:36 +01:00
</div>-->
<li>
<div >
<!-- <div class=" linksbaskettitles uk-padding-small uk-animation-toggle" (click)="showOptions.basketShowLinksTo=!showOptions.basketShowLinksTo;
showOptions.basketShowSources=!showOptions.basketShowLinksTo ">
2022-02-25 13:52:36 +01:00
<div *ngIf="!inlineEntity"> &lt;!&ndash;Enable toggle &ndash;&gt;
<span class="uk-h6 uk-margin-remove portal-color" >
LINK TO ({{(results.length) | number}})
<span *ngIf="!showOptions.basketShowLinksTo" 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="showOptions.basketShowLinksTo" 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>
</span>
</div>
2022-02-25 13:52:36 +01:00
<div *ngIf="inlineEntity"> &lt;!&ndash;Inline Entity - no toggle &ndash;&gt;
<span class="uk-h6 uk-margin-remove portal-color">
LINK TO ({{(results.length) | number}})
</span>
</div>
<div class="linksBasketSubtitles">
Entities to link with the sources
</div>
2022-02-25 13:52:36 +01:00
</div>-->
<div
class="uk-height-medium uk-overflow-auto">
<div *ngIf=" (results.length)> 0 || showOptions.show=='result'"
2022-02-25 13:52:36 +01:00
class=" uk-padding-small " style="min-height: 17px;">
<start-over *ngIf=" (results.length)> 0"
[results]="results" [localStoragePrefix]="localStoragePrefix+'results'"
message="all results (projects, communities, research results)"
class="uk-float-right"></start-over>
<bulk-claim *ngIf="showOptions.show=='result'" [results]="results" [properties]=properties
[localStoragePrefix]="localStoragePrefix+'results'" [basketLimit]="basketLimit"></bulk-claim>
</div>
<div class="uk-padding-small uk-animation-slide-top-small">
<div *ngIf="results.length >= basketLimit "
class="uk-alert uk-alert-warning uk-text-center">
Basket reached the size limit. No more entities can be added.
</div>
<claim-selected-results sectionTitle="Selected Results" [results]="results"
[localStoragePrefix]="localStoragePrefix+'results'">
</claim-selected-results>
2022-02-25 13:52:36 +01:00
<div *ngIf="(results.length) == 0 " class=" uk-text-center">
No entities to link with the sources. Start adding entities from the left panel.
</div>
</div>
</div>
</div>
2022-02-25 13:52:36 +01:00
</li>
</ul>
<div *ngIf="showOptions.show=='source'"
[class]="((sources.length)>0?'linksbaskettitlesPortalColor ':'uk-disabled')+ ' linksbaskettitles uk-padding-small'"
(click)="openSelectionModal(); ">
<!--show = linkTo; basketShowSources=false;
basketShowLinksTo=true;-->
<div class="uk-h6 uk-margin-remove portal-color">CONTINUE TO - LINK TO <span
*ngIf="results.length > 0">({{(results.length) | number}})</span>
<span class="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>
</div>
<div class="linksBasketSubtitles">
Entities to link with the sources
</div>
</div>
<div *ngIf="showOptions.show!='source'"
[class]="((results.length)>0?'linksbaskettitlesPortalColor ':'uk-disabled')+ ' linksbaskettitles uk-margin-small-top uk-padding-small'"
style="height:auto !important; " (click)="showOptions.show = 'claim'; scrollUp();">
2022-03-02 17:08:37 +01:00
<div class="uk-margin-remove portal-color uk-text-center">
FINISH LINKING
<span class="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>
</div>
</div>
</div>
</div>
</div>
<div id="basketStickBottom"></div>
<helper *ngIf="pageContents && pageContents['bottom'] && pageContents['bottom'].length > 0" [texts]="pageContents['bottom']"></helper>
</div>
<!-- <helper position="right" styleName=" uk-width-1-5"></helper>-->
</div>
<!-- <helper position="bottom"></helper>-->
</div>
</div>
</div>
</div>
</div>
</div>
</div>
2022-03-02 17:08:37 +01:00
</div>
</div>
<modal-alert (alertOutput)="closeSelectionModal($event)" >
<div class="uk-grid uk-text-center uk-margin-expand uk-padding uk-child-width-1-3">
<div *ngIf="showOptions.linkToEntities.indexOf('project')!=-1 " (click)="closeSelectionModal('project')"
style="cursor:pointer;">
<button class="uk-icon-button portal-button">
<span class="uk-icon">
<svg height="20" icon="album" ratio="1" viewBox="0 0 20 20" width="20"
xmlns="http://www.w3.org/2000/svg"><rect height="1" width="10" x="5" y="2"></rect><rect
height="1" width="14" x="3" y="4"></rect><rect fill="none" height="11" stroke="#000"
width="17" x="1.5" y="6.5"></rect></svg></span>
</button>
<div>Projects</div>
</div>
<div *ngIf="showOptions.linkToEntities.indexOf('result')!=-1 " (click)="closeSelectionModal('result')"
style="cursor:pointer;">
<button class="uk-icon-button portal-button">
<span class="uk-icon">
<svg height="20" icon="copy" ratio="1" viewBox="0 0 20 20" width="20"
xmlns="http://www.w3.org/2000/svg"><rect fill="none" height="16" stroke="#000"
width="12" x="3.5" y="2.5"></rect><polyline
fill="none" points="5 0.5 17.5 0.5 17.5 17" stroke="#000"></polyline></svg></span>
</button>
<div>Research results</div>
</div>
<div *ngIf="showOptions.linkToEntities.indexOf('context')!=-1 " (click)="closeSelectionModal('context')"
style="cursor:pointer;">
<button class="uk-icon-button portal-button">
<span class="uk-icon">
<svg height="20" icon="users" ratio="1" viewBox="0 0 20 20" width="20"
xmlns="http://www.w3.org/2000/svg"><circle cx="7.7" cy="8.6" fill="none" r="3.5"
stroke="#000" stroke-width="1.1"></circle><path
d="M1,18.1 C1.7,14.6 4.4,12.1 7.6,12.1 C10.9,12.1 13.7,14.8 14.3,18.3" fill="none"
stroke="#000" stroke-width="1.1"></path><path
d="M11.4,4 C12.8,2.4 15.4,2.8 16.3,4.7 C17.2,6.6 15.7,8.9 13.6,8.9 C16.5,8.9 18.8,11.3 19.2,14.1"
fill="none" stroke="#000" stroke-width="1.1"></path></svg></span>
</button>
<div>Communities</div>
</div>
</div>
</modal-alert>