Compare commits
343 Commits
grouped-qu
...
master
Author | SHA1 | Date |
---|---|---|
Konstantina Galouni | b57c46d969 | |
Konstantinos Triantafyllou | 9ae1ee928a | |
Konstantinos Triantafyllou | 35276059f1 | |
Konstantinos Triantafyllou | b0a2ed1865 | |
Konstantina Galouni | ca6f1fd751 | |
Konstantinos Triantafyllou | d0a6af2745 | |
Konstantinos Triantafyllou | 2bfe25103b | |
Konstantinos Triantafyllou | 3a6b01ebe8 | |
Konstantinos Triantafyllou | 3ab0983c89 | |
Konstantinos Triantafyllou | f8186cb2ea | |
Konstantinos Triantafyllou | 0736d42385 | |
Konstantinos Triantafyllou | 2d9141d5c1 | |
Konstantinos Triantafyllou | 2b2aaed2b8 | |
Konstantinos Triantafyllou | df2516f8f7 | |
Konstantinos Triantafyllou | 41b46b754e | |
Konstantina Galouni | 5db039ea0d | |
Konstantinos Triantafyllou | ea5275da2d | |
Konstantinos Triantafyllou | 5197f88ade | |
Konstantinos Triantafyllou | e9eb05de64 | |
Konstantinos Triantafyllou | 65a60ddad1 | |
Konstantina Galouni | 59fc73bf4d | |
Konstantina Galouni | cc6b5aeffe | |
Konstantinos Triantafyllou | 1ac4365e05 | |
argirok | 5af682b1b6 | |
Konstantina Galouni | 9722024643 | |
argirok | 9fb155d95f | |
Konstantina Galouni | d1392adc2d | |
Konstantina Galouni | 43990dc582 | |
Konstantina Galouni | 632d11c82c | |
argirok | 7a517e49ed | |
argirok | 79b723e75c | |
Konstantinos Triantafyllou | 5a912f02b7 | |
Konstantinos Triantafyllou | dede290a52 | |
Konstantina Galouni | d6a2ba004a | |
Konstantina Galouni | 633f3250ac | |
Konstantina Galouni | 2a28cd8ad5 | |
Konstantina Galouni | 8bcafd3026 | |
Konstantina Galouni | d3746b28d0 | |
Konstantina Galouni | 019530c222 | |
Konstantina Galouni | 1f4c0566c7 | |
Konstantina Galouni | f595ec5035 | |
argirok | c1a8151184 | |
argirok | c00403a24c | |
argirok | 8a8b58eeaa | |
Konstantinos Triantafyllou | 6e96974364 | |
Alex Martzios | c4b57e91ab | |
Konstantinos Triantafyllou | b054a823da | |
Konstantinos Triantafyllou | b41357c4b8 | |
Konstantinos Triantafyllou | fb34dd415e | |
Konstantinos Triantafyllou | bc2dd7d285 | |
Konstantina Galouni | cdfced0dd8 | |
Konstantina Galouni | 2127bfdf16 | |
Konstantinos Triantafyllou | 4231b65880 | |
Konstantinos Triantafyllou | 9b79d0c1e0 | |
Konstantina Galouni | 01f54d788d | |
Konstantina Galouni | ac46ecb997 | |
Konstantina Galouni | 786f4c9864 | |
Konstantina Galouni | c5bd710621 | |
Konstantinos Triantafyllou | 267944103f | |
Konstantina Galouni | aedc2e1f6f | |
Konstantina Galouni | 2cd8059794 | |
Konstantina Galouni | 353ff67ea5 | |
Konstantina Galouni | e74dc1b58f | |
Konstantina Galouni | 22d0498f8a | |
Konstantina Galouni | ce87f0690d | |
argirok | 68125b3577 | |
argirok | 474a73e2f7 | |
argirok | afdf6bf964 | |
Konstantina Galouni | 5f8988eac1 | |
Konstantinos Triantafyllou | 9e9332f1a3 | |
Konstantinos Triantafyllou | a2b1bb8f70 | |
Konstantina Galouni | 559220c77c | |
Konstantina Galouni | 4d80f6f39c | |
Konstantina Galouni | cc43504306 | |
Konstantinos Triantafyllou | b729341199 | |
Konstantina Galouni | eeb63a2de9 | |
Konstantina Galouni | 4b3e805d31 | |
Konstantina Galouni | 1613916dfd | |
Konstantina Galouni | c219c8370b | |
Konstantina Galouni | 6886df2caa | |
Alex Martzios | 9b04260a60 | |
Alex Martzios | 6d9d118d57 | |
Konstantina Galouni | c7817731f0 | |
Konstantina Galouni | 438075f8df | |
Konstantinos Triantafyllou | 8f4e653d50 | |
Alex Martzios | c4180c7aa2 | |
Alex Martzios | 31e61d55a0 | |
argirok | 609f09cc9f | |
argirok | 275b94dec3 | |
Konstantinos Triantafyllou | 4f9f2f2505 | |
Konstantinos Triantafyllou | 0111ea6681 | |
Konstantinos Triantafyllou | c69d1cd94d | |
Konstantinos Triantafyllou | 901f9f769d | |
Konstantinos Triantafyllou | e6d03d324f | |
Konstantinos Triantafyllou | 69cdb2cec2 | |
Konstantinos Triantafyllou | 4f10c5c5f4 | |
Konstantinos Triantafyllou | e91830f2f8 | |
Konstantinos Triantafyllou | 0fb20de588 | |
Konstantinos Triantafyllou | b71bdfa559 | |
Konstantina Galouni | dc1679c565 | |
Konstantinos Triantafyllou | d63092cd9e | |
Konstantina Galouni | c351349f8e | |
Konstantina Galouni | dcfc6b0b6a | |
Konstantina Galouni | 07569f24e1 | |
Konstantina Galouni | 18791ec9d2 | |
Konstantina Galouni | 78d262dd3b | |
Konstantinos Triantafyllou | 44e821b1f1 | |
Konstantinos Triantafyllou | 828dfc0671 | |
Konstantinos Triantafyllou | b34f42326c | |
Konstantinos Triantafyllou | e8ec49a69b | |
Konstantinos Triantafyllou | 0c75394621 | |
Alex Martzios | 894667955c | |
Alex Martzios | cafe0e4926 | |
Konstantina Galouni | b6cda48e2f | |
argirok | d6b924bcaa | |
argirok | 95097beaae | |
Alex Martzios | 6c4a4d9721 | |
Konstantina Galouni | ca8b732a64 | |
argirok | c64df20405 | |
argirok | 6b907fe97d | |
Konstantinos Triantafyllou | 622459c26c | |
Alex Martzios | b0c69be6ef | |
Konstantinos Triantafyllou | c33af181bb | |
Konstantina Galouni | 6ab50b04cc | |
Konstantina Galouni | e0de892998 | |
Konstantina Galouni | da3c2fccf2 | |
Konstantinos Triantafyllou | c630b29247 | |
Konstantina Galouni | 6a41954109 | |
Konstantina Galouni | 00a5150042 | |
Konstantina Galouni | da4a5f3321 | |
Alex Martzios | ec57ba0dcc | |
Alex Martzios | 3e8ed4f504 | |
Alex Martzios | 69d6feb665 | |
Konstantina Galouni | edf49c4019 | |
Konstantina Galouni | efa0f72cc3 | |
Konstantinos Triantafyllou | 9ef3f71ea6 | |
Konstantina Galouni | 17e237c179 | |
Konstantina Galouni | 49cd8a6232 | |
Konstantinos Triantafyllou | f43025b21c | |
Konstantina Galouni | f6654f7b93 | |
Konstantina Galouni | 43b1882956 | |
Konstantinos Triantafyllou | 110c2ab4b3 | |
Konstantinos Triantafyllou | 79d39db833 | |
argirok | abbe118035 | |
argirok | 7c3c082fc0 | |
argirok | f5ca757771 | |
Konstantinos Triantafyllou | e71aa35b98 | |
Konstantinos Triantafyllou | ba87ad69d3 | |
Konstantina Galouni | 590bdaf2e3 | |
Konstantinos Triantafyllou | a45122565a | |
Konstantinos Triantafyllou | fbf7e9f527 | |
Konstantinos Triantafyllou | 45a9737d84 | |
Konstantina Galouni | 51dba6da3a | |
Konstantina Galouni | 50244801d6 | |
Alex Martzios | af6174c5de | |
Konstantinos Triantafyllou | 35323bd744 | |
Konstantina Galouni | e30672043b | |
Konstantinos Triantafyllou | 368ef1aba4 | |
Konstantinos Triantafyllou | 3204ba18ff | |
argirok | 9b9f817e62 | |
argirok | c50c3e2ad6 | |
argirok | cf0ebe0fb0 | |
argirok | 9c8a67e612 | |
Konstantina Galouni | 56faf6f6a4 | |
argirok | 6c9c477c24 | |
argirok | cdddec6925 | |
Konstantinos Triantafyllou | c803674ceb | |
Konstantinos Triantafyllou | 7562210daa | |
Konstantinos Triantafyllou | 5195306ee6 | |
Konstantinos Triantafyllou | 14cd46bdb4 | |
Konstantinos Triantafyllou | 6e2cf28aee | |
Konstantinos Triantafyllou | 1cfe22f406 | |
Konstantinos Triantafyllou | 3d08ffeb52 | |
Konstantinos Triantafyllou | 0fe358c781 | |
Konstantinos Triantafyllou | 87fb820421 | |
Konstantina Galouni | c3cb2d56ca | |
Konstantina Galouni | a7294685fb | |
Konstantina Galouni | f55107b8d5 | |
Konstantinos Triantafyllou | d2aa28225a | |
Konstantinos Triantafyllou | c43e7caeea | |
Konstantina Galouni | b89278af70 | |
Konstantina Galouni | 0757b7a98f | |
Konstantina Galouni | 83de7adc09 | |
Konstantina Galouni | 75ecd0da5e | |
Konstantina Galouni | d9465d5d05 | |
Konstantina Galouni | 7b8ca9ca66 | |
argirok | bedb7f013b | |
argirok | a6ea10fd90 | |
argirok | 4662a3a185 | |
argirok | 3e96a5f889 | |
argirok | 0c85072ac3 | |
argirok | 70b7e30b70 | |
Konstantinos Triantafyllou | 4c55fb252c | |
Konstantinos Triantafyllou | 340dd96dc2 | |
Konstantinos Triantafyllou | a40f1431ed | |
Konstantina Galouni | e3fe71a623 | |
Konstantina Galouni | 134ab8240e | |
Konstantinos Triantafyllou | bbcfa595da | |
Konstantinos Triantafyllou | b83101fd74 | |
Konstantinos Triantafyllou | 017b54f57c | |
Konstantinos Triantafyllou | e1f6549e89 | |
argirok | 6034bcfe77 | |
argirok | 93ae0db4dd | |
Konstantinos Triantafyllou | f629a9c715 | |
Konstantinos Triantafyllou | d0aa12ab4d | |
argirok | adb4c86d2f | |
Konstantinos Triantafyllou | f07d1778c5 | |
Konstantinos Triantafyllou | ba1a3b9e62 | |
argirok | ced24dc2af | |
Konstantinos Triantafyllou | 037c32c545 | |
Konstantinos Triantafyllou | c5759235e4 | |
argirok | 9a96851e70 | |
argirok | 0a01288a46 | |
Konstantinos Triantafyllou | ae4b3b7b95 | |
Konstantina Galouni | 9bcc1bb4d5 | |
Konstantina Galouni | 88b5e06aa8 | |
Konstantinos Triantafyllou | 8c5990133f | |
Konstantina Galouni | bef191edba | |
Konstantina Galouni | c202b7671b | |
Konstantinos Triantafyllou | 070ae45480 | |
Konstantinos Triantafyllou | d6d3c7bab9 | |
argirok | bc259c7c3c | |
Konstantinos Triantafyllou | 54a7ad165e | |
Konstantinos Triantafyllou | d61a70cc5a | |
Konstantinos Triantafyllou | b52ef07306 | |
Konstantina Galouni | ab0ae376b9 | |
argirok | 0f52dcbdca | |
argirok | 010709202b | |
Konstantina Galouni | 4f0c8ae5e9 | |
argirok | 69a9512d14 | |
argirok | 9013db4b6b | |
Alex Martzios | 1157c0f4a7 | |
Konstantinos Triantafyllou | f81f5d7bfb | |
Konstantinos Triantafyllou | bc4e30c3f2 | |
Konstantinos Triantafyllou | 367bdc3092 | |
Konstantinos Triantafyllou | 9709062383 | |
Alex Martzios | abaa7764b9 | |
Alex Martzios | 5d7e72eb3d | |
Konstantinos Triantafyllou | 21f49bbc6c | |
Alex Martzios | cba56ca4c0 | |
Konstantina Galouni | 03b61d1fc6 | |
Konstantinos Triantafyllou | 9fc6d0c0a0 | |
Konstantinos Triantafyllou | 617489a565 | |
Konstantina Galouni | 60d4bb914f | |
Konstantina Galouni | 59bd3918e8 | |
Konstantina Galouni | 0870766720 | |
argirok | 0707914088 | |
Konstantina Galouni | 1853b1cf57 | |
Konstantina Galouni | 51dbad03d7 | |
Konstantina Galouni | bbe1ced87a | |
Konstantina Galouni | 9a7a14ea87 | |
Konstantina Galouni | c225d81c16 | |
argirok | fe0860d41a | |
argirok | c6dd26dcee | |
argirok | 8f009f3fee | |
argirok | 677372a332 | |
argirok | 2a64a0c951 | |
argirok | 4922906bcd | |
argirok | e900c28318 | |
Konstantinos Triantafyllou | 48ce09e400 | |
Alex Martzios | 52d63ece25 | |
Alex Martzios | 31220578cf | |
Konstantinos Triantafyllou | 3c7b330167 | |
argirok | d804da4dd8 | |
argirok | cfc6a07f7c | |
argirok | c977bb0898 | |
argirok | 5060151e09 | |
argirok | e4ae0ca35c | |
argirok | f4fc3eddf6 | |
argirok | 6b062dc2fb | |
argirok | 837e121684 | |
argirok | 941db7102a | |
argirok | 704f52c969 | |
Konstantina Galouni | c12cadf0f1 | |
Konstantinos Triantafyllou | a4bb94daa7 | |
Konstantinos Triantafyllou | 684c9ac4c0 | |
Konstantinos Triantafyllou | 7d97f05e6e | |
Konstantinos Triantafyllou | 3e02680f5e | |
Alex Martzios | 7e007c9511 | |
Alex Martzios | 2e336b93a8 | |
argirok | 38b8865be0 | |
argirok | f3c7ddec93 | |
argirok | 76003bf6d9 | |
argirok | 8c5c4923d3 | |
Konstantinos Triantafyllou | 736546c0eb | |
argirok | 0b90448e01 | |
Konstantinos Triantafyllou | a2706af35d | |
Konstantinos Triantafyllou | 1a2a5f81d6 | |
Konstantinos Triantafyllou | 7b79146f12 | |
Konstantinos Triantafyllou | 65f8676a08 | |
argirok | f853d96ed4 | |
argirok | f27b8e11f7 | |
argirok | 550c27a464 | |
Konstantinos Triantafyllou | 1a7624eed1 | |
Alex Martzios | 6f214cb08a | |
Konstantinos Triantafyllou | 205b97487c | |
Konstantinos Triantafyllou | 246cafa43f | |
Konstantinos Triantafyllou | 3c1b72e7e4 | |
Konstantinos Triantafyllou | 79d49c80e3 | |
Konstantinos Triantafyllou | 752baad8de | |
Konstantinos Triantafyllou | 552f1ed43a | |
Konstantinos Triantafyllou | fc58721e2a | |
Konstantinos Triantafyllou | 16b6a34d25 | |
Konstantinos Triantafyllou | b8162fa1e3 | |
Konstantinos Triantafyllou | 920f3a454a | |
argirok | a5265ab98d | |
Konstantinos Triantafyllou | a8c91dc04c | |
argirok | 5480de5812 | |
Konstantinos Triantafyllou | edda550b63 | |
Konstantinos Triantafyllou | e80f73f9a9 | |
argirok | 1ff833ed8a | |
argirok | 62d4ab1a36 | |
argirok | ffec391448 | |
Konstantina Galouni | e8ed5da8ba | |
argirok | ce8b104c20 | |
Konstantinos Triantafyllou | a773cd8d1d | |
Konstantinos Triantafyllou | 50a8d53221 | |
Konstantina Galouni | e63d61b469 | |
Argiro Kokogiannaki | f42d160308 | |
Konstantinos Triantafyllou | 5cd1e29871 | |
Konstantinos Triantafyllou | ba6dcf3b1c | |
argirok | c1e58e76a0 | |
argirok | c168416e3e | |
Konstantinos Triantafyllou | 6492211dc3 | |
Konstantinos Triantafyllou | 106cb5dcf8 | |
argirok | 79aa405507 | |
Konstantinos Triantafyllou | be84e2d986 | |
argirok | 9eee47f0d2 | |
argirok | cdb5f1ecd0 | |
Konstantinos Triantafyllou | 67547421b6 | |
Konstantinos Triantafyllou | 9213755662 | |
Konstantinos Triantafyllou | c4ecc8fcae | |
Konstantinos Triantafyllou | 115ba0c49e | |
argirok | 60a3e552b4 | |
Konstantinos Triantafyllou | 2348b6adcf | |
Konstantinos Triantafyllou | 89ba510256 | |
argirok | 33b763ca38 | |
argirok | 606df73c74 | |
Konstantina Galouni | b06e41c9a3 | |
argirok | 1a030e2a0d | |
Konstantina Galouni | 9b2524c1c7 | |
Konstantinos Triantafyllou | 31f42cfc71 | |
Konstantinos Triantafyllou | c292215ada |
|
@ -129,7 +129,7 @@ export class ClaimContextSearchFormComponent {
|
|||
|
||||
}
|
||||
select(communityId, communityLabel) {
|
||||
console.log("SELECT", communityId)
|
||||
// console.log("SELECT", communityId)
|
||||
this.selectedCommunityId = communityId;
|
||||
this.selectedCommunityLabel = communityLabel;
|
||||
this.getCategories();
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
//Classes used in linking / inlinelinking when selecting an entity
|
||||
import {HelperFunctions} from "../../utils/HelperFunctions.class";
|
||||
import {OpenaireEntities} from "../../utils/properties/searchFields";
|
||||
import {ClaimsProperties} from "./claims.properties";
|
||||
|
||||
export class ClaimResult {
|
||||
public source: string;
|
||||
|
@ -28,6 +29,7 @@ export class ClaimResult {
|
|||
|
||||
export class ClaimProject {
|
||||
public funderId: string;
|
||||
public funderShortname: string;
|
||||
public funderName: string;
|
||||
public acronym: string;
|
||||
public startDate: string;
|
||||
|
@ -37,6 +39,12 @@ export class ClaimProject {
|
|||
public fundingLevel0: string;
|
||||
public url: string;
|
||||
}
|
||||
export class ClaimOrganization {
|
||||
public name: string;
|
||||
// public shortName: string;
|
||||
public url: string;
|
||||
// public country: string;
|
||||
}
|
||||
|
||||
export class ClaimContext {
|
||||
public community: string;
|
||||
|
@ -71,6 +79,7 @@ export class ClaimEntity {
|
|||
result: ClaimResult;
|
||||
project: ClaimProject;
|
||||
context: ClaimContext;
|
||||
organization: ClaimOrganization;
|
||||
|
||||
constructor() {
|
||||
this.warningMessages = [];
|
||||
|
@ -92,6 +101,7 @@ export class ClaimRecord2Insert {
|
|||
targetAccessRights: string;
|
||||
targetEmbargoEndDate: string;
|
||||
claimedInDashboard: string;
|
||||
idSuffix:string;
|
||||
|
||||
constructor() {
|
||||
|
||||
|
@ -115,7 +125,12 @@ export class ClaimDBContext {
|
|||
title: string;
|
||||
openaireId: string;
|
||||
}
|
||||
|
||||
export class ClaimDBOrganization {
|
||||
openaireId: string;
|
||||
name: string;
|
||||
shortName: string;
|
||||
country: string;
|
||||
}
|
||||
export class ClaimDBProject {
|
||||
openaireId: string;
|
||||
name: string;
|
||||
|
@ -175,17 +190,18 @@ export class ShowOptions {
|
|||
|
||||
}
|
||||
|
||||
initSelectOptions(){
|
||||
initSelectOptions(claimProperties:ClaimsProperties){
|
||||
let options =[];
|
||||
if(this.linkToEntities.indexOf('result')!=-1){
|
||||
options.push({value: 'result',label: OpenaireEntities.RESULTS})
|
||||
}
|
||||
if(this.linkToEntities.indexOf('project')!=-1){
|
||||
options.push({value: 'project',label: OpenaireEntities.PROJECTS})
|
||||
options.push({value: 'project',label: claimProperties.SELECT_ENTITIES.projects})
|
||||
}
|
||||
if(this.linkToEntities.indexOf('context')!=-1){
|
||||
options.push({value: 'context',label: OpenaireEntities.COMMUNITIES})
|
||||
}
|
||||
this.selectOptions = options;
|
||||
// console.log(options, claimProperties.SELECT_ENTITIES.projects)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,69 +1,25 @@
|
|||
<div class="uk-width-xlarge@l uk-width-large" [ngClass]="centerAlign ? 'uk-align-center':''">
|
||||
<div class="uk-width-expand" [ngClass]="centerAlign ? 'uk-align-center':''">
|
||||
<advanced-search-input (searchEmitter)="search(page,size)">
|
||||
<div input type="select" [(value)]="showOptions.show" placeholder="Type" hint="Select..."
|
||||
[options]="showOptions.selectOptions" class="uk-width-2-5"></div>
|
||||
<div class="uk-width-expand" input type="text" [(value)]="keyword" [searchable]="true" placeholder="Entities to link"
|
||||
[hint]="'Search for ' + openaireEntities.PROJECTS + '...'" tooltip="true"></div>
|
||||
[options]="showOptions.selectOptions" class="uk-width-medium@xl uk-width-auto"></div>
|
||||
<div *ngIf="funderOptions && funderOptions.length > 0" input type="select" [(value)]="selectedFunder" placeholder="Funder" hint="Select Funder..."
|
||||
[options]="funderOptions" class="uk-width-expand" (valueChange)="funderChanged($event)"></div>
|
||||
<div class="uk-width-expand" input type="text" [(value)]="keyword" [searchable]="true" placeholder="Projects to link"
|
||||
[hint]="'Search for ' + openaireEntities.PROJECTS + '...'" tooltip="true" [disabled]="isNoProjectFunder"></div>
|
||||
</advanced-search-input>
|
||||
</div>
|
||||
<div *ngIf="!showResults">
|
||||
<div *ngIf=" openaireResultsStatus != errorCodes.LOADING && !isNoProjectFunder && this.selectedFunder && openaireResults.length == 0">
|
||||
<div class="uk-text-center uk-text-large uk-text-meta uk-margin-large-top">No {{openaireEntities.PROJECT.toLowerCase()}} results yet... <br>Start
|
||||
searching for {{openaireEntities.PROJECTS.toLowerCase()}} to add them in the Basket
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="showResults" class="uk-margin-top">
|
||||
<div *ngIf=" openaireResultsStatus != errorCodes.LOADING && this.funderOptions.length > 1 && !this.selectedFunder">
|
||||
<div class="uk-text-center uk-text-large uk-text-meta uk-margin-large-top">Select funder or search for projects to proceed
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-margin-top">
|
||||
<div class="uk-grid" uk-grid>
|
||||
<div class="search-filters uk-width-1-1">
|
||||
<!--<div *ngIf="countFilters()>0 && openaireResultsNum > 0" class="uk-grid uk-flex uk-flex-bottom">
|
||||
<div class="uk-grid">
|
||||
<h6 class="uk-text-bold">Filters</h6>
|
||||
<a *ngIf="countFilters()>1" (click)="clearFilters()"
|
||||
[class]="((openaireResultsStatus ==
|
||||
errorCodes.LOADING)?'uk-disabled uk-link-muted':'')+' portal-link '">
|
||||
Clear All
|
||||
</a>
|
||||
</div>
|
||||
<div *ngIf="countFilters()>0" class="uk-grid uk-grid-small uk-text-small uk-margin-small-top " uk-grid>
|
||||
<ng-container *ngFor="let filter of rangeFilters " >
|
||||
<ng-container *ngIf = "filter.selectedFromAndToValues">
|
||||
<span [title]="'Remove '+ filter.selectedFromAndToValues" (click) = "removeRangeFilter(filter) " >
|
||||
<span class="selectedFilterLabel ">
|
||||
<a [class]="((openaireResultsStatus ==
|
||||
errorCodes.LOADING)?' uk-disabled':' ')+' uk-link-text '">
|
||||
<span class=" clickable" aria-hidden="true">
|
||||
<span class="uk-icon">
|
||||
<svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="close" ratio="0.8"><path fill="none" stroke="#000" stroke-width="1.6" d="M16,16 L4,4"></path><path fill="none" stroke="#000" stroke-width="1.6" d="M16,4 L4,16"></path></svg>
|
||||
</span>
|
||||
</span>
|
||||
<span class="uk-margin-small-left">{{filter.selectedFromAndToValues}}</span>
|
||||
</a>
|
||||
</span>
|
||||
</span>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
|
||||
<ng-container *ngFor="let filter of filters " >
|
||||
<ng-container *ngIf = "filter.countSelectedValues > 0">
|
||||
<span *ngFor="let value of getSelectedValues(filter); let i = index; let end = last; "
|
||||
[title]="'Remove '+value.name" (click) = "removeFilter(value, filter) " >
|
||||
<!– if no grid on the div above, remove it and move class 'selectedFilterLabel' on top span –>
|
||||
<span class="selectedFilterLabel ">
|
||||
<a [class]="((openaireResultsStatus ==
|
||||
errorCodes.LOADING)?' uk-disabled':' ')+' uk-link-text '">
|
||||
<span class=" clickable" aria-hidden="true">
|
||||
<span class="uk-icon">
|
||||
<svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="close" ratio="0.8"><path fill="none" stroke="#000" stroke-width="1.6" d="M16,16 L4,4"></path><path fill="none" stroke="#000" stroke-width="1.6" d="M16,4 L4,16"></path></svg>
|
||||
</span>
|
||||
</span>
|
||||
<span class="uk-margin-small-left" [innerHtml]="(value.name.length > 34)?value.name.substring(0,34)+'...':value.name"></span>
|
||||
</a>
|
||||
</span>
|
||||
</span>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
</div>
|
||||
</div>-->
|
||||
<!-- <ng-container *ngIf="openaireResultsNum > 0">-->
|
||||
<div *ngIf="!isNoProjectFunder && openaireResultsStatus != errorCodes.LOADING && openaireResultsNum > 1 " class="search-filters uk-width-1-1">
|
||||
<div class="uk-grid uk-grid-small" uk-grid>
|
||||
<ng-container *ngFor="let filter of rangeFilters">
|
||||
<div>
|
||||
|
@ -104,9 +60,12 @@
|
|||
role="alert">Service not available
|
||||
</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>
|
||||
role="alert">
|
||||
<loading></loading>
|
||||
</div>
|
||||
<claim-results [localStoragePrefix]="localStoragePrefix" [results]=openaireResults
|
||||
[selectedResults]=selectedProjects [basketLimit]="basketLimit"></claim-results>
|
||||
<div *ngIf="isNoProjectFunder && openaireResultsStatus != errorCodes.LOADING " class="uk-alert uk-alert-default">No projects for funder <span class=" uk-text-bold">{{selectedFunder.name}}</span>. </div>
|
||||
<div *ngIf="openaireResultsNum != null && openaireResultsNum > 0 && openaireResultsStatus != errorCodes.LOADING " class="uk-flex uk-flex-center ">
|
||||
<paging-no-load [currentPage]="openaireResultsPage"
|
||||
[totalResults]="openaireResultsNum" [term]="keyword"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import {Component, ElementRef, EventEmitter, Input, Output} from '@angular/core';
|
||||
import {Component, ElementRef, EventEmitter, Input, Output, ViewChild} from '@angular/core';
|
||||
import {SearchProjectsService} from '../../services/searchProjects.service';
|
||||
import {ProjectService} from '../../landingPages/project/project.service';
|
||||
import {ClaimEntity, ClaimProject} from './claimHelper.class';
|
||||
|
@ -10,6 +10,7 @@ import {RangeFilter} from "../../utils/rangeFilter/rangeFilterHelperClasses.clas
|
|||
import {OpenaireEntities, SearchFields} from "../../utils/properties/searchFields";
|
||||
import {NewSearchPageComponent} from "../../searchPages/searchUtils/newSearchPage.component";
|
||||
import {Subscriber} from "rxjs";
|
||||
import { properties } from 'src/environments/environment';
|
||||
|
||||
declare var UIkit:any;
|
||||
|
||||
|
@ -26,12 +27,11 @@ export class ClaimProjectsSearchFormComponent {
|
|||
public elementRef;
|
||||
|
||||
@Output() projectSelected = new EventEmitter();
|
||||
@Input() public properties:EnvProperties;
|
||||
public properties:EnvProperties = properties;
|
||||
@Input() public inlineClaim:boolean=false;
|
||||
@Input() localStoragePrefix:string = "";
|
||||
@Input() basketLimit;
|
||||
@Input() showOptions;
|
||||
|
||||
public errorCodes:ErrorCodes = new ErrorCodes();
|
||||
public projects:string[];
|
||||
public warningMessage = "";
|
||||
|
@ -53,47 +53,85 @@ export class ClaimProjectsSearchFormComponent {
|
|||
public rangeFields:string[][] = this.searchFields.PROJECT_RANGE_FIELDS;
|
||||
openaireEntities = OpenaireEntities;
|
||||
sub;
|
||||
|
||||
selectedFunder = null;
|
||||
funderOptions = [];
|
||||
isNoProjectFunder = false;
|
||||
|
||||
constructor(private _service: ProjectService, private _projectService: SearchProjectsService, myElement: ElementRef) {
|
||||
this.elementRef = myElement;
|
||||
this.rangeFilters = RangeFilter.parse(this.rangeFields,"project");
|
||||
|
||||
this.rangeFilters = RangeFilter.parse(this.rangeFields,"project");
|
||||
this.getFunders();
|
||||
}
|
||||
ngOnDestroy() {
|
||||
if (this.sub instanceof Subscriber) {
|
||||
this.sub.unsubscribe();
|
||||
}
|
||||
}
|
||||
getFunders(){
|
||||
this.openaireResultsStatus = this.errorCodes.LOADING;
|
||||
this.showResults = true;
|
||||
this.sub = this._projectService.advancedSearchProjects("", 1, 0, this.properties,
|
||||
this.refineFieldsQuery, this.refineFields, "&type=projects&sf=funder").subscribe(
|
||||
data => {
|
||||
let option = {value : null, label: "No funder selected"};
|
||||
this.funderOptions.push(option);
|
||||
for(let v of data[2][0].values){
|
||||
let option = {value : v, label: v.name};
|
||||
this.funderOptions.push(option);
|
||||
}
|
||||
this.openaireResultsStatus = this.errorCodes.DONE;
|
||||
}, error =>{
|
||||
this.openaireResultsStatus = this.errorCodes.ERROR;
|
||||
})
|
||||
}
|
||||
|
||||
search(page,size) {
|
||||
if(this.keyword.length == 0){
|
||||
this.showResults =false;
|
||||
return;
|
||||
funderChanged(value){
|
||||
this.keyword = ""
|
||||
this.selectedFunder = value;
|
||||
this.isNoProjectFunder = this.selectedFunder && this.selectedFunder.number == 1;
|
||||
this.openaireResults = [];
|
||||
if(this.isNoProjectFunder){
|
||||
this.showResults = true;
|
||||
this.search(1,1);
|
||||
}else{
|
||||
this.openaireResults = [];
|
||||
}
|
||||
this.showResults =true;
|
||||
}
|
||||
search(page,size) {
|
||||
/* if (this.keyword.length == 0) {
|
||||
this.showResults = false;
|
||||
return;
|
||||
}*/
|
||||
this.showResults = true;
|
||||
this.openaireResults = [];
|
||||
this.openaireResultsStatus = this.errorCodes.LOADING;
|
||||
this.prevFilters = this.filters;
|
||||
|
||||
//searchProjects (params: string, refineParams:string, page: number, size: number, refineFields:string[] , properties:EnvProperties ):any {
|
||||
this.sub = this._projectService.searchProjects(this.createOpenaireQueryParams(),(page==1)? this.refineFieldsQuery:null, page, size, (page==1)?this.refineFields:[], this.properties).subscribe(
|
||||
this.sub = this._projectService.advancedSearchProjects(this.createOpenaireQueryParams(), page, size, this.properties, this.createOpenaireRefineQuery(), [], null).subscribe(
|
||||
// this.sub = this._projectService.searchProjects(this.createOpenaireQueryParams(),(page==1)? this.refineFieldsQuery:null, page, size, (page==1)?this.refineFields:[], this.properties).subscribe(
|
||||
data => {
|
||||
if(data != null) {
|
||||
this.openaireResultsPage=page;
|
||||
this.openaireResultsNum = data[0];
|
||||
this.openaireResults =ClaimProjectsSearchFormComponent.openaire2ClaimEntity(data[1], this.properties);
|
||||
if(data[2] && data[2].length > 0){
|
||||
this.filters = this.checkSelectedFilters( data[2], this.prevFilters);
|
||||
}
|
||||
|
||||
this.openaireResultsStatus = this.errorCodes.DONE;
|
||||
if(this.openaireResultsNum == 0){
|
||||
this.openaireResultsStatus = this.errorCodes.NONE;
|
||||
this.filters = this.checkSelectedFilters( [], this.prevFilters);
|
||||
}
|
||||
}else {
|
||||
this.openaireResultsStatus = this.errorCodes.ERROR;
|
||||
if (data != null) {
|
||||
this.openaireResultsPage = page;
|
||||
this.openaireResultsNum = data[0];
|
||||
this.openaireResults = ClaimProjectsSearchFormComponent.openaire2ClaimEntity(data[1], this.properties);
|
||||
if (data[2] && data[2].length > 0) {
|
||||
this.filters = this.checkSelectedFilters(data[2], this.prevFilters);
|
||||
}
|
||||
},
|
||||
|
||||
this.openaireResultsStatus = this.errorCodes.DONE;
|
||||
if (this.openaireResultsNum == 0) {
|
||||
this.openaireResultsStatus = this.errorCodes.NONE;
|
||||
this.filters = this.checkSelectedFilters([], this.prevFilters);
|
||||
}
|
||||
/* if(this.isNoProjectFunder && this.claimResultsComponent){
|
||||
this.claimResultsComponent.add(this.openaireResults[0])
|
||||
}*/
|
||||
} else {
|
||||
this.openaireResultsStatus = this.errorCodes.ERROR;
|
||||
}
|
||||
},
|
||||
err => {
|
||||
this.openaireResultsStatus = this.errorCodes.ERROR;
|
||||
//console.log(err.status);
|
||||
|
@ -101,85 +139,23 @@ export class ClaimProjectsSearchFormComponent {
|
|||
}
|
||||
);
|
||||
}
|
||||
// select(entity){
|
||||
// if(this.selectedProjects.length > 50){
|
||||
// UIkit.notification({
|
||||
// message : 'Your basket exceeds the number of allowed projects (50)',
|
||||
// status : 'warning',
|
||||
// timeout : 1500,
|
||||
// pos : 'top-center'
|
||||
// });
|
||||
// return;
|
||||
// }
|
||||
// this.query = "";
|
||||
// // this.searchTermStream.next(this.query); //clear
|
||||
// entity = entity.value;
|
||||
// // var project: ClaimProject = new ClaimProject();
|
||||
// // project.funderId = entity.funderId;
|
||||
// // project.funderName = entity.funderName;
|
||||
// // project.id = entity.id;
|
||||
// // project.projectName = entity.projectName;
|
||||
// // project.projectAcronym = entity.projectAcronym;
|
||||
// // project.startDate = entity.startDate;
|
||||
// // project.endDate = entity.endDate;
|
||||
// // project.code = entity.code;
|
||||
// // project.jurisdiction = entity.jurisdiction;
|
||||
// // project.fundingLevel0 = entity.fundingLevel0;
|
||||
//
|
||||
//
|
||||
// var index:number =this.selectedProjects.indexOf(entity);
|
||||
// var found:boolean = false;
|
||||
// this.warningMessage = "";
|
||||
//
|
||||
// for (var _i = 0; _i < this.selectedProjects.length; _i++) {
|
||||
// let project = this.selectedProjects[_i];
|
||||
// if(entity.id == project.id){
|
||||
// found=true;
|
||||
// this.warningMessage = "Project already in your basket";
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// if (!found) {
|
||||
// this.selectedProjects.push(entity);
|
||||
// if(this.selectedProjects != null){
|
||||
// localStorage.setItem(this.localStoragePrefix + "projects", JSON.stringify(this.selectedProjects));
|
||||
// }
|
||||
// this.projectSelected.emit({
|
||||
// value: true
|
||||
// });
|
||||
//
|
||||
// }
|
||||
// }
|
||||
/* static showItem(item):string{
|
||||
return ((item.field[1]['@value'])?item.field[1]['@value']+" - ":"" ) + item.field[3]['@value'];
|
||||
}*/
|
||||
remove(item){
|
||||
remove(item){
|
||||
let index:number =this.selectedProjects.indexOf(item);
|
||||
if (index > -1) {
|
||||
this.selectedProjects.splice(index, 1);
|
||||
}
|
||||
|
||||
}
|
||||
/* handleClick(event){
|
||||
var clickedComponent = event.target;
|
||||
var inside = false;
|
||||
do {
|
||||
if (clickedComponent === this.elementRef.nativeElement) {
|
||||
inside = true;
|
||||
}
|
||||
clickedComponent = clickedComponent.parentNode;
|
||||
} while (clickedComponent);
|
||||
|
||||
}*/
|
||||
static openaire2ClaimEntity(items, properties:EnvProperties){
|
||||
static openaire2ClaimEntity(items, properties:EnvProperties){
|
||||
const projects: ClaimEntity[] = [];
|
||||
for(const item of items){
|
||||
const entity: ClaimEntity = new ClaimEntity();
|
||||
entity.project = new ClaimProject();
|
||||
entity.project.funderId = item.funderId;
|
||||
entity.project.funderName = item.funderShortname;
|
||||
entity.project.funderShortname = item.funderShortname?item.funderShortname:(entity.project.funderId?entity.project.funderId.split("::")[1]:"");
|
||||
entity.project.funderName = item.funderName;
|
||||
entity.id = item.id;
|
||||
entity.project.url = properties.searchLinkToProject + entity.id;
|
||||
entity.project.url = (item.code !="unidentified") ? properties.searchLinkToProject + entity.id : null;
|
||||
entity.title = item.title.name;
|
||||
entity.project.acronym = item.acronym;
|
||||
entity.project.startDate = item.startYear;
|
||||
|
@ -202,43 +178,47 @@ export class ClaimProjectsSearchFormComponent {
|
|||
}
|
||||
|
||||
|
||||
createOpenaireQueryParams():string {
|
||||
createOpenaireQueryParams(): string {
|
||||
let query = "";
|
||||
if(this.keyword.length > 0){
|
||||
query += "q=" + StringUtils.quote(StringUtils.URIEncode(this.keyword));
|
||||
if (this.keyword.length > 0) {
|
||||
// query += "q=" + StringUtils.quote(StringUtils.URIEncode(this.keyword));
|
||||
query += StringUtils.quote(StringUtils.URIEncode(this.keyword));
|
||||
}
|
||||
return query;
|
||||
}
|
||||
|
||||
/*if(this.startYear.length > 0 ){
|
||||
query+='&fq=projectstartyear exact \"'+this.startYear+'\"'
|
||||
}
|
||||
if(this.endYear.length > 0 ){
|
||||
query+='&fq=projectendyear exact \"'+this.endYear+'\"'
|
||||
}*/
|
||||
createOpenaireRefineQuery(): string {
|
||||
let allFqs = "";
|
||||
for (let filter of this.filters){
|
||||
if(filter.countSelectedValues > 0){
|
||||
let count_selected=0;
|
||||
for (let filter of this.filters) {
|
||||
if (filter.countSelectedValues > 0) {
|
||||
let count_selected = 0;
|
||||
let fq = "";
|
||||
for (let value of filter.values){
|
||||
if(value.selected == true){
|
||||
for (let value of filter.values) {
|
||||
if (value.selected == true) {
|
||||
count_selected++;
|
||||
fq+=(fq.length > 0 ? " " + filter.filterOperator + " ":"" ) + filter.filterId + " exact " + (StringUtils.quote(value.id));
|
||||
fq += (fq.length > 0 ? " " + filter.filterOperator + " " : "") + filter.filterId + " exact " + (StringUtils.quote(value.id));
|
||||
}
|
||||
}
|
||||
if(count_selected > 0){
|
||||
fq="&fq="+StringUtils.URIEncode(fq);
|
||||
if (count_selected > 0) {
|
||||
fq = "&fq=" + StringUtils.URIEncode(fq);
|
||||
allFqs += fq;
|
||||
}
|
||||
}
|
||||
}
|
||||
for (let i=0; i<this.rangeFilters.length; i++){
|
||||
if(this.selectedFunder){
|
||||
allFqs += "&fq=" + StringUtils.URIEncode( "funder exact " + (StringUtils.quote(this.selectedFunder.id)));
|
||||
}
|
||||
if(!this.isNoProjectFunder || !this.selectedFunder){
|
||||
allFqs += '&fq=(projectcode<>"unidentified")'
|
||||
}
|
||||
for (let i = 0; i < this.rangeFilters.length; i++) {
|
||||
let filter = this.rangeFilters[i];
|
||||
//selectedFromValue, selectedToValue, equalityOp, equalityOpFrom, equalityOpTo, filterOp ){
|
||||
allFqs+= NewSearchPageComponent.createRangeFilterQuery(this.rangeFields[i],filter.selectedFromValue, filter.selectedToValue, " within ", ">=" ,"<=", "and" )
|
||||
allFqs += NewSearchPageComponent.createRangeFilterQuery(this.rangeFields[i], filter.selectedFromValue, filter.selectedToValue, " within ", ">=", "<=", "and")
|
||||
}
|
||||
return query+allFqs;
|
||||
|
||||
return allFqs + "&type=projects";
|
||||
}
|
||||
|
||||
public yearChanged() {
|
||||
this.search(this.page, this.size);
|
||||
|
||||
|
@ -273,20 +253,21 @@ export class ClaimProjectsSearchFormComponent {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
filter.countAllValues = filter.values.length;
|
||||
}
|
||||
if(filters.length == 0 ){
|
||||
for(let j=0; j< prevFilters.length ; j++){
|
||||
let filter = Object.assign({}, prevFilters[j]);
|
||||
filter.values = [];
|
||||
for(let filterValue of prevFilters[j].values) {
|
||||
if(filterValue.selected){
|
||||
filterValue.number = 0;
|
||||
filter.values.push(filterValue);
|
||||
}
|
||||
}
|
||||
filters.push(filter)
|
||||
for(let j=0; j< prevFilters.length ; j++) {
|
||||
let filter = Object.assign({}, prevFilters[j]);
|
||||
filter.values = [];
|
||||
for (let filterValue of prevFilters[j].values) {
|
||||
if (filterValue.selected) {
|
||||
filterValue.number = 0;
|
||||
filter.values.push(filterValue);
|
||||
}
|
||||
}
|
||||
filter.countAllValues = filter.values.length;
|
||||
filters.push(filter)
|
||||
}
|
||||
}
|
||||
return filters;
|
||||
}
|
||||
|
|
|
@ -17,14 +17,15 @@ import {RangeFilterModule} from "../../utils/rangeFilter/rangeFilter.module";
|
|||
import {AdvancedSearchInputModule} from "../../sharedComponents/advanced-search-input/advanced-search-input.module";
|
||||
import {InputModule} from "../../sharedComponents/input/input.module";
|
||||
import {DropdownFilterModule} from "../../utils/dropdown-filter/dropdown-filter.module";
|
||||
import {LoadingModule} from "../../utils/loading/loading.module";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
SharedModule, CommonModule,
|
||||
// LoadingModalModule,
|
||||
ProjectServiceModule, ProjectsServiceModule, EntitiesAutocompleteModule, HelperModule,
|
||||
PagingModule, SearchFilterModule, ClaimResultsModule, RangeFilterModule, AdvancedSearchInputModule, InputModule, DropdownFilterModule
|
||||
],
|
||||
imports: [
|
||||
SharedModule, CommonModule,
|
||||
// LoadingModalModule,
|
||||
ProjectServiceModule, ProjectsServiceModule, EntitiesAutocompleteModule, HelperModule,
|
||||
PagingModule, SearchFilterModule, ClaimResultsModule, RangeFilterModule, AdvancedSearchInputModule, InputModule, DropdownFilterModule, LoadingModule
|
||||
],
|
||||
providers:[
|
||||
],
|
||||
declarations: [
|
||||
|
|
|
@ -51,7 +51,9 @@
|
|||
</div>
|
||||
</div>
|
||||
<div *ngIf="crossrefStatus === errorCodes.LOADING" class="uk-animation-fade uk-margin-top uk-width-1-1"
|
||||
role="alert"><span class="loading-gif uk-align-center"></span></div>
|
||||
role="alert">
|
||||
<loading></loading>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
<claim-results [localStoragePrefix]=localStoragePrefix [results]=crossrefResults
|
||||
|
@ -114,7 +116,7 @@
|
|||
|
||||
<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">Loading...</span></div>
|
||||
role="alert"><loading></loading></div>
|
||||
<claim-results [localStoragePrefix]=localStoragePrefix
|
||||
[results]=openaireResults [selectedResults]=selectedResults [basketLimit]="basketLimit"></claim-results>
|
||||
<div class="uk-flex uk-flex-center" *ngIf=" openaireResultsStatus != errorCodes.LOADING && openaireResultsNum != null && openaireResultsNum > 0" >
|
||||
|
@ -177,7 +179,7 @@
|
|||
</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>
|
||||
<loading></loading></div>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="activeTab == 'datacite'" id="datacite" class="uk-animation-fade">
|
||||
|
@ -190,7 +192,7 @@
|
|||
<div class="uk-margin-top">
|
||||
|
||||
<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>
|
||||
role="alert"><loading></loading></div>
|
||||
<div>
|
||||
<claim-results [localStoragePrefix]=localStoragePrefix *ngIf="dataciteResults.length > 0 "
|
||||
[results]=dataciteResults [selectedResults]=selectedResults [basketLimit]="basketLimit"></claim-results>
|
||||
|
|
|
@ -22,10 +22,11 @@ import {AdvancedSearchInputModule} from "../../sharedComponents/advanced-search-
|
|||
import {InputModule} from "../../sharedComponents/input/input.module";
|
||||
import {SearchInputModule} from "../../sharedComponents/search-input/search-input.module";
|
||||
import {DropdownFilterModule} from "../../utils/dropdown-filter/dropdown-filter.module";
|
||||
import {LoadingModule} from "../../utils/loading/loading.module";
|
||||
|
||||
@NgModule({
|
||||
imports: [SharedModule, CommonModule, SearchResearchResultsServiceModule, PagingModule, SearchCrossrefServiceModule,
|
||||
SearchDataciteServiceModule, HelperModule, SearchFilterModule, ClaimResultsModule, MatSelectModule, QuickSelectionsModule, RangeFilterModule, ClaimProjectsSearchFormModule, AdvancedSearchInputModule, InputModule, SearchInputModule, DropdownFilterModule],
|
||||
SearchDataciteServiceModule, HelperModule, SearchFilterModule, ClaimResultsModule, MatSelectModule, QuickSelectionsModule, RangeFilterModule, ClaimProjectsSearchFormModule, AdvancedSearchInputModule, InputModule, SearchInputModule, DropdownFilterModule, LoadingModule],
|
||||
providers:[
|
||||
SearchOrcidService
|
||||
],
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
export class ClaimsProperties{
|
||||
ALLOW_ORGANIZATION_LINKING:boolean = false;
|
||||
SELECT_ENTITIES = {
|
||||
projects:"Funding"
|
||||
}
|
||||
INLINE_ENTITY = {
|
||||
show: true,
|
||||
guideText : null
|
||||
}
|
||||
BASKET ={
|
||||
source_title: "Source",
|
||||
target_title: "Link source to"
|
||||
}
|
||||
METADATA_PREVIEW ={
|
||||
source_title: "Source",
|
||||
target_title: "Link to",
|
||||
edit_source_title: "Edit",
|
||||
edit_target_title: "Edit",
|
||||
edit_target_icon: "edit"
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -1,25 +1,27 @@
|
|||
<schema2jsonld *ngIf="url" [URL]="url" [name]="pageTitle" type="other"></schema2jsonld>
|
||||
<div class="uk-grid">
|
||||
<div class="uk-width-expand uk-position-relative">
|
||||
<div class="uk-width-expand uk-position-relative uk-margin-small-top">
|
||||
<helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0"
|
||||
[texts]="pageContents['top']"></helper>
|
||||
<div *ngIf="filterForm" [id]="actions?'page_content_actions':null" [class.uk-blur-background]="actions" [attr.uk-sticky]="(actions)?'media: @m':null" [attr.offset]="offset">
|
||||
<div [class.uk-padding-small]="actions" class="uk-padding-remove-vertical">
|
||||
<div class="uk-section-xsmall">
|
||||
|
||||
<div class="uk-flex uk-flex-right@m uk-flex-center uk-flex-wrap uk-flex-middle">
|
||||
<div search-input [disabled]="loading" [searchControl]="filterForm.controls.keyword" searchInputClass="outer"
|
||||
placeholder="Search links" class="uk-width-1-3@xl uk-width-2-5@l uk-width-1-2@m uk-width-1-1"
|
||||
(searchEmitter)="changeKeyword()" [expandable]="true"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div [class.uk-padding]="actions" class="uk-padding-remove-vertical">
|
||||
<div class="uk-margin-medium-top">
|
||||
<div class="uk-margin-small-top">
|
||||
<results-and-pages [type]="resultsNum !== 1?'Links':'Link'" [page]="page" [pageSize]="size" [hasSearch]="true" [searchTerm]="keyword"
|
||||
[totalResults]="resultsNum" customClasses="uk-margin-remove"></results-and-pages>
|
||||
</div>
|
||||
<div class="uk-grid uk-flex-middle uk-margin-medium-top" uk-grid>
|
||||
<div class="uk-grid uk-flex-middle uk-margin-small-top" uk-grid>
|
||||
<div *ngIf="fetchBy != 'User' && properties.environment == 'development'" >
|
||||
<input [(ngModel)]="mine" [checked]="mine" (ngModelChange)="goTo(1)" type="checkbox" class="uk-checkbox"> Mine
|
||||
</div>
|
||||
<div>
|
||||
<dropdown-filter #dropdownFilter dropdownClass="uk-width-medium uk-padding-small"
|
||||
name="Type of Entity" [disabled]="loading" [count]="entities.length">
|
||||
|
@ -43,6 +45,7 @@
|
|||
type="select" [options]="sortOptions">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="uk-width-expand@l uk-width-1-1 uk-flex uk-flex-right@m uk-flex-center">
|
||||
<paging-no-load [currentPage]="page" [totalResults]="resultsNum" [size]="size"
|
||||
[loading]="false" (pageChange)="pageChange($event)"></paging-no-load>
|
||||
|
@ -56,57 +59,76 @@
|
|||
<div *ngIf="claims && claims.length == 0" class="uk-card uk-card-default uk-padding-large uk-text-center uk-margin-bottom uk-text-bold">
|
||||
<div>No links found</div>
|
||||
</div>
|
||||
<ul class="uk-margin-small-top uk-list uk-list-xlarge">
|
||||
<li *ngFor="let claim of claims; let i=index" class="uk-card uk-card-default">
|
||||
<div class="uk-card-body">
|
||||
<div class="uk-grid uk-grid-small" uk-grid>
|
||||
<div class="uk-width-expand">
|
||||
<div class="uk-margin-bottom">
|
||||
<claim-entity [entity]="claim.target" [type]="claim.targetType" [properties]=properties
|
||||
[externalPortalUrl]=externalPortalUrl [source]="true" [linkAvailable]="isClaimAvailable(claim)"></claim-entity>
|
||||
</div>
|
||||
<div class="uk-margin-bottom">
|
||||
<span *ngIf="isClaimAvailable(claim) else notAvailable" class="uk-label uk-label-success"
|
||||
[attr.uk-tooltip]="'title: The link information is available in the portal and the APIs.'">available</span>
|
||||
<ng-template #notAvailable>
|
||||
<span class="uk-label uk-label-danger"
|
||||
[attr.uk-tooltip]="'title:The link information will be added in the portal and the APIs in the next content provision workflow.'">pending</span>
|
||||
</ng-template>
|
||||
</div>
|
||||
<div class="uk-text-small">
|
||||
<div *ngIf="showUserEmail" class="uk-margin-small-bottom">
|
||||
<span class="uk-text-meta">Claimed by:</span>
|
||||
<span class="uk-margin-xsmall-left">{{claim.userMail}}</span>
|
||||
<ng-container *ngIf="claims && claims.length > 0">
|
||||
|
||||
<div class="uk-flex uk-flex-middle uk-margin-top uk-margin-small-bottom uk-padding-small uk-padding-remove-horizontal">
|
||||
<div class="uk-width-xsmall uk-flex uk-flex-center uk-flex-middle">
|
||||
<label>
|
||||
<input id="checkAll" type="checkbox" (click)="selectAll($event)" class="uk-checkbox" title="Select All"
|
||||
[ngModel]="selected.length == claims.length"/>
|
||||
</label>
|
||||
</div>
|
||||
<button class="uk-button uk-button-link" [class.uk-disabled]="selected.length == 0" [disabled]="selected.length == 0"
|
||||
(click)="deleteOpen()">
|
||||
<span>Delete ({{selected.length}})</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<ul class="uk-margin-small-top uk-list uk-list-striped">
|
||||
<li *ngFor="let claim of claims; let i=index" class="uk-flex uk-flex-middle uk-padding-small uk-padding-remove-horizontal">
|
||||
<div class="uk-width-xsmall uk-flex uk-flex-center uk-flex-middle">
|
||||
<input type="checkbox" class="uk-checkbox"
|
||||
[id]="claim.id" (click)="selectClaim(claim, $event)" [ngModel]="isSelectedClaim(claim.id)">
|
||||
</div>
|
||||
<div class="uk-width-expand">
|
||||
<div class="uk-grid uk-grid-small uk-flex-middle" uk-grid>
|
||||
<div class="uk-width-expand">
|
||||
<div class="uk-margin-small-bottom">
|
||||
<claim-entity [entity]="claim.target" [type]="claim.targetType" [properties]=properties
|
||||
[externalPortalUrl]=externalPortalUrl [source]="true" [linkAvailable]="isClaimAvailable(claim)"></claim-entity>
|
||||
</div>
|
||||
<div>
|
||||
<span class="uk-text-meta">Claimed date:</span>
|
||||
<span class="uk-margin-xsmall-left">{{claim.date}}</span>
|
||||
<div class="uk-margin-small-bottom">
|
||||
<span *ngIf="isClaimAvailable(claim) else notAvailable" class="uk-label uk-label-small uk-label-success"
|
||||
[attr.uk-tooltip]="'title: The link information is available in the portal and the APIs.'">available</span>
|
||||
<ng-template #notAvailable>
|
||||
<span class="uk-label uk-label-small uk-label-danger"
|
||||
[attr.uk-tooltip]="'title:The link information will be added in the portal and the APIs in the next content provision workflow.'">pending</span>
|
||||
</ng-template>
|
||||
</div>
|
||||
<div class="uk-text-small">
|
||||
<div *ngIf="showUserEmail" class="uk-margin-xsmall-bottom">
|
||||
<span class="uk-text-meta">Claimed by:</span>
|
||||
<span class="uk-margin-xsmall-left">{{claim.userMail}}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="uk-text-meta">Claimed date:</span>
|
||||
<span class="uk-margin-xsmall-left">{{claim.date}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-visible@m">
|
||||
<div class="claim-divider">
|
||||
<icon class="uk-position-center" name="link" customClass="uk-text-primary" ratio="2" [flex]="true"></icon>
|
||||
<div class="uk-visible@m">
|
||||
<div class="claim-divider">
|
||||
<icon class="uk-position-center" name="link" customClass="uk-text-primary" ratio="2" [flex]="true"></icon>
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-width-1-2@m uk-width-1-1">
|
||||
<claim-entity [entity]="claim.source" [type]="claim.sourceType" [source]="false" [properties]=properties
|
||||
[externalPortalUrl]=externalPortalUrl></claim-entity>
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-width-1-2@m uk-width-1-1 uk-flex uk-flex-column uk-flex-center">
|
||||
<claim-entity [entity]="claim.source" [type]="claim.sourceType" [source]="false" [properties]=properties
|
||||
[externalPortalUrl]=externalPortalUrl></claim-entity>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-card-footer uk-flex uk-flex-right">
|
||||
<button class="uk-button uk-button-link uk-flex uk-flex-middle" (click)="deleteOpen(i)">
|
||||
<icon name="delete" [flex]="true"></icon>
|
||||
<span class="uk-margin-xsmall-left">Delete</span>
|
||||
</button>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="uk-margin-medium-top uk-flex uk-flex-center uk-flex-right@m">
|
||||
<paging-no-load *ngIf="resultsNum" [currentPage]="page" [totalResults]="resultsNum" [size]="size"
|
||||
(pageChange)="pageChange($event)"></paging-no-load>
|
||||
</div>
|
||||
<div class="uk-width-xsmall uk-flex uk-flex-center uk-flex-middle">
|
||||
<button class="uk-button uk-button-link uk-flex uk-flex-middle" (click)="deleteOpen(i)">
|
||||
<icon name="delete" [flex]="true"></icon>
|
||||
</button>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="uk-margin-medium-top uk-flex uk-flex-center uk-flex-right@m">
|
||||
<paging-no-load *ngIf="resultsNum" [currentPage]="page" [totalResults]="resultsNum" [size]="size"
|
||||
(pageChange)="pageChange($event)"></paging-no-load>
|
||||
</div>
|
||||
</ng-container>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -4,14 +4,4 @@
|
|||
position: relative;
|
||||
padding: 0 20px;
|
||||
height: 100%;
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 50%;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
border-left: @global-border-width solid @global-border;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ export class DisplayClaimsComponent implements OnInit, OnDestroy {
|
|||
page: number = 1;
|
||||
size: number = 50;
|
||||
keyword: string; // the keyword string to give to the request as parameter
|
||||
types = ["All", "Project", "Context", "Result", "User"];
|
||||
types = ["All", "Project", "Context", "Result", "User", "Organization"];
|
||||
loading: boolean = false;
|
||||
@Input() fetchBy: string;
|
||||
@Input() fetchId: string;
|
||||
|
@ -52,6 +52,8 @@ export class DisplayClaimsComponent implements OnInit, OnDestroy {
|
|||
lastIndexDate = null;
|
||||
public filterForm: FormGroup;
|
||||
public entities: string[] = [];
|
||||
selected = [];
|
||||
mine = false;
|
||||
|
||||
allOptions: Option[] = [
|
||||
{label: OpenaireEntities.PUBLICATIONS, value: "publication"},
|
||||
|
@ -110,10 +112,12 @@ export class DisplayClaimsComponent implements OnInit, OnDestroy {
|
|||
this.updateDescription(description);
|
||||
this.updateUrl(this.url);
|
||||
this.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle).subscribe());
|
||||
|
||||
this.subscriptions.push(this.helper.getPageHelpContents(this.properties, this.communityId, this._router.url).subscribe(contents => {
|
||||
this.pageContents = contents;
|
||||
}));
|
||||
|
||||
if(properties.adminToolsPortalType !== "explore") {
|
||||
this.subscriptions.push(this.helper.getPageHelpContents(this.properties, this.communityId, this._router.url).subscribe(contents => {
|
||||
this.pageContents = contents;
|
||||
}));
|
||||
}
|
||||
this.subscriptions.push(this.indexInfoService.getLastIndexDate(this.properties).subscribe(res => {
|
||||
this.lastIndexDate = res;
|
||||
}));
|
||||
|
@ -130,6 +134,7 @@ export class DisplayClaimsComponent implements OnInit, OnDestroy {
|
|||
this.fetchId = this.fetchId ? this.fetchId : '';
|
||||
}
|
||||
let page = (params['page'] === undefined) ? 1 : +params['page'];
|
||||
this.mine = (params['mine'] == 'true' ? true:false);
|
||||
this.keyword = (params['keyword'] ? params['keyword'] : "");
|
||||
this.filterForm.get('keyword').setValue(this.keyword);
|
||||
this.page = (page <= 0) ? 1 : page;
|
||||
|
@ -183,6 +188,16 @@ export class DisplayClaimsComponent implements OnInit, OnDestroy {
|
|||
this.handleErrors(err, "Error getting claims for project with id: " + this.fetchId);
|
||||
}
|
||||
);
|
||||
} else if (this.fetchBy == "Organization") {
|
||||
this.subResults = this._claimService.getClaimsByOrganization(this.size, this.page, this.fetchId, this.keyword, this.filterForm.get("sort").value.sort, this.filterForm.get("sort").value.descending, types, this.properties.claimsAPIURL, this.mine).subscribe(
|
||||
data => {
|
||||
this.manageAPIData(data);
|
||||
this.loading = false;
|
||||
},
|
||||
err => {
|
||||
this.handleErrors(err, "Error getting claims for project with id: " + this.fetchId);
|
||||
}
|
||||
);
|
||||
} else if (this.fetchBy == "User") {
|
||||
this.subResults = this._claimService.getClaimsByUser(this.size, this.page, this.fetchId, this.keyword, this.filterForm.get("sort").value.sort, this.filterForm.get("sort").value.descending, types, this.properties.claimsAPIURL).subscribe(
|
||||
data => {
|
||||
|
@ -206,7 +221,7 @@ export class DisplayClaimsComponent implements OnInit, OnDestroy {
|
|||
}
|
||||
);
|
||||
} else if (this.fetchBy == "Context") {
|
||||
this.subResults = this._claimService.getClaimsBycontext(this.size, this.page, this.fetchId, this.keyword, this.filterForm.get("sort").value.sort, this.filterForm.get("sort").value.descending, types, this.properties.claimsAPIURL).subscribe(
|
||||
this.subResults = this._claimService.getClaimsBycontext(this.size, this.page, this.fetchId, this.keyword, this.filterForm.get("sort").value.sort, this.filterForm.get("sort").value.descending, types, this.properties.claimsAPIURL, this.mine).subscribe(
|
||||
data => {
|
||||
this.manageAPIData(data);
|
||||
this.loading = false;
|
||||
|
@ -217,7 +232,7 @@ export class DisplayClaimsComponent implements OnInit, OnDestroy {
|
|||
}
|
||||
);
|
||||
} else {
|
||||
this.subResults = this._claimService.getClaims(this.size, this.page, this.keyword, this.filterForm.get("sort").value.sort, this.filterForm.get("sort").value.descending, types, this.properties.claimsAPIURL).subscribe(
|
||||
this.subResults = this._claimService.getClaims(this.size, this.page, this.keyword, this.filterForm.get("sort").value.sort, this.filterForm.get("sort").value.descending, types, this.properties.claimsAPIURL, this.mine).subscribe(
|
||||
data => {
|
||||
this.manageAPIData(data);
|
||||
this.loading = false;
|
||||
|
@ -256,15 +271,8 @@ export class DisplayClaimsComponent implements OnInit, OnDestroy {
|
|||
types += (types.length > 0 ? ',' : '') + type;
|
||||
}
|
||||
params += (this.entities.length > 0) ? (params.length > 0 ? '&' : '') + "types=" + types : "";
|
||||
if (this.isAdmin) {
|
||||
params += (this.fetchBy == 'All' ? "" : (params.length > 0 ? '&' : '') + "fetchBy=" + this.fetchBy);
|
||||
params += (this.fetchId == '' ? "" : (params.length > 0 ? '&' : '') + "fetchId=" + this.fetchId);
|
||||
}
|
||||
params += (this.filterForm.get("sort").value.sort == 'date' && this.filterForm.get("sort").value.descending ? "" : (params.length > 0 ? '&' : '') + "sort=" + this.filterForm.get("sort").value.sort + "-" + this.filterForm.get("sort").value.descending);
|
||||
params += (this.keyword == '' ? "" : (params.length > 0 ? '&' : '') + "keyword=" + this.keyword);
|
||||
if (this.communityId != null) {
|
||||
params += "&communityId=" + this.communityId;
|
||||
}
|
||||
return params;
|
||||
}
|
||||
|
||||
|
@ -308,23 +316,34 @@ export class DisplayClaimsComponent implements OnInit, OnDestroy {
|
|||
}
|
||||
|
||||
isSelected(value: string) {
|
||||
return this.filterForm && this.filterForm.get('entities').value.find(entity => entity === value)
|
||||
return this.filterForm && this.filterForm.get('entities').value.find(entity => entity === value);
|
||||
}
|
||||
|
||||
deleteOpen(index: number) {
|
||||
deleteOpen(index: number = null) {
|
||||
this.index = index;
|
||||
this.deleteModal.alertTitle = 'Delete Confirmation';
|
||||
this.deleteModal.message = 'Are you sure you want to delete this link?';
|
||||
this.deleteModal.message = 'Are you sure you want to delete ' + (this.index != null ? '1' : this.selected.length) + ' link(s)?';
|
||||
this.deleteModal.okButtonText = 'Yes';
|
||||
this.deleteModal.open();
|
||||
}
|
||||
|
||||
delete() {
|
||||
this.subscriptions.push(this._claimService.deleteBulk([this.claims[this.index].id], this.properties.claimsAPIURL).subscribe(
|
||||
let claimsToBeDeleted = ((this.index != null) ? [this.claims[this.index].id] : this.selected.map(claim => claim.id));
|
||||
// console.log(claimsToBeDeleted);
|
||||
this.subscriptions.push(this._claimService.deleteBulk(claimsToBeDeleted, this.properties.claimsAPIURL).subscribe(
|
||||
res => {
|
||||
this.claims.splice(this.index, 1);
|
||||
this.resultsNum = this.resultsNum - 1;
|
||||
NotificationHandler.rise('Link has been deleted successfully');
|
||||
if (this.index != null) {
|
||||
this.claims.splice(this.index, 1);
|
||||
this.resultsNum = this.resultsNum - 1;
|
||||
NotificationHandler.rise('Link has been deleted successfully');
|
||||
} else {
|
||||
claimsToBeDeleted.forEach(claimId => {
|
||||
this.claims.splice(this.claims.findIndex((id) => id == claimId), 1);
|
||||
});
|
||||
this.resultsNum = this.resultsNum - claimsToBeDeleted.length;
|
||||
NotificationHandler.rise(claimsToBeDeleted.length + ' links have been deleted successfully');
|
||||
}
|
||||
this.selected = [];
|
||||
let goToPage = this.page;
|
||||
if (this.totalPages(this.resultsNum) < this.page && this.page > 0) {
|
||||
goToPage = this.page - 1;
|
||||
|
@ -332,7 +351,8 @@ export class DisplayClaimsComponent implements OnInit, OnDestroy {
|
|||
this.goTo(goToPage);
|
||||
}, err => {
|
||||
this.handleErrors(err, "Error deleting claim with id: " + this.claims[this.index].id);
|
||||
}));
|
||||
}
|
||||
));
|
||||
}
|
||||
|
||||
pageChange($event) {
|
||||
|
@ -349,7 +369,7 @@ export class DisplayClaimsComponent implements OnInit, OnDestroy {
|
|||
if (claimDateStr < lastUpdateDateStr) {
|
||||
return true;
|
||||
} else {
|
||||
return claim.target.collectedFrom != "infrastruct_::openaire" && claim.indexed;
|
||||
return claim.target.collectedFrom != "infrastruct_::openaire";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -360,7 +380,44 @@ export class DisplayClaimsComponent implements OnInit, OnDestroy {
|
|||
}
|
||||
return totalPages;
|
||||
}
|
||||
|
||||
|
||||
selectClaim(item: any, event) {
|
||||
let value = event.currentTarget.checked;
|
||||
if (value) {
|
||||
this.selected.push(item);
|
||||
} else {
|
||||
for (var _i = 0; _i < this.selected.length; _i++) {
|
||||
let claim = this.selected[_i];
|
||||
if (claim['id'] == item.id) {
|
||||
this.selected.splice(_i, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
selectAll(event) {
|
||||
let value = event.currentTarget.checked;
|
||||
if (value) {
|
||||
this.selected = [];
|
||||
for (let _i = 0; _i < this.claims.length; _i++) {
|
||||
let claim = this.claims[_i];
|
||||
this.selected.push(claim);
|
||||
}
|
||||
} else {
|
||||
this.selected = [];
|
||||
}
|
||||
}
|
||||
|
||||
isSelectedClaim(id: string) {
|
||||
for (let _i = 0; _i < this.selected.length; _i++) {
|
||||
let claim = this.selected[_i];
|
||||
if (claim['id'] == id) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private updateDescription(description: string) {
|
||||
this._meta.updateTag({content: description}, "name='description'");
|
||||
this._meta.updateTag({content: description}, "property='og:description'");
|
||||
|
|
|
@ -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
|
||||
|
||||
],
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import {Component, Input} from '@angular/core';
|
||||
import {EnvProperties} from '../../../utils/properties/env-properties';
|
||||
import {ClaimDBContext, ClaimDBProject, ClaimDBResult} from "../claimHelper.class";
|
||||
import {ClaimDBContext, ClaimDBOrganization, ClaimDBProject, ClaimDBResult} from "../claimHelper.class";
|
||||
import {OpenaireEntities} from "../../../utils/properties/searchFields";
|
||||
import {StringUtils} from "../../../utils/string-utils.class";
|
||||
|
||||
|
@ -15,27 +15,32 @@ import {StringUtils} from "../../../utils/string-utils.class";
|
|||
<div *ngIf="source" class="uk-text-small">
|
||||
{{getEntityName(type)}}
|
||||
</div>
|
||||
<div class="uk-flex">
|
||||
<span *ngIf="!source" class="uk-text-meta uk-margin-small-right uk-text-large uk-text-nowrap">Link to:</span>
|
||||
<div>
|
||||
<span *ngIf="!source" class="uk-text-meta uk-text-small uk-margin-small-right uk-text-nowrap">Link to:</span>
|
||||
<publication-title [entity]="entity" param="id"
|
||||
path="/search/result" [externalPortalUrl]=externalPortalUrl [linkAvailable]="linkAvailable"></publication-title>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="type == 'project'" [attr.uk-tooptip]="getEntityName(type)"
|
||||
class="uk-flex">
|
||||
<span class="uk-text-meta uk-margin-small-right uk-text-large uk-text-nowrap">Link to:</span>
|
||||
<div *ngIf="type == 'project'" [attr.uk-tooptip]="getEntityName(type)">
|
||||
<span class="uk-text-meta uk-text-small uk-margin-small-right uk-text-nowrap">Link to:</span>
|
||||
<project-title [project]="entity" [searchLink]=properties.searchLinkToProject
|
||||
[externalPortalUrl]=externalPortalUrl></project-title>
|
||||
</div>
|
||||
<div *ngIf="type == 'context'" class="uk-flex uk-text-large">
|
||||
<span class="uk-text-meta uk-margin-small-right uk-text-nowrap">Link to:</span>
|
||||
<span class="uk-text-truncate" uk-tooltip="Concept">{{entity.title}}</span>
|
||||
<div *ngIf="type == 'organization'" [attr.uk-tooptip]="getEntityName(type)">
|
||||
<span class="uk-text-meta uk-text-small uk-margin-small-right uk-text-nowrap">Link to:</span>
|
||||
<organization-title [organization]="entity"></organization-title>
|
||||
</div>
|
||||
<div *ngIf="type == 'context'">
|
||||
<span class="uk-text-meta uk-text-small uk-margin-small-right uk-text-nowrap">Link to:</span>
|
||||
<h6 class="uk-h6 uk-margin-remove">
|
||||
<span class="uk-text-truncate" uk-tooltip="Concept">{{entity.title}}</span>
|
||||
</h6>
|
||||
</div>
|
||||
`
|
||||
})
|
||||
|
||||
export class ClaimEntityFormatter {
|
||||
@Input() entity: ClaimDBResult | ClaimDBContext | ClaimDBProject;
|
||||
@Input() entity: ClaimDBResult | ClaimDBContext | ClaimDBProject | ClaimDBOrganization;
|
||||
@Input() type: string;
|
||||
@Input() properties: EnvProperties;
|
||||
@Input() externalPortalUrl: string = null;
|
||||
|
|
|
@ -5,18 +5,19 @@ import { RouterModule } from '@angular/router';
|
|||
import {ProjectTitleFormatter} from './projectTitleFormatter.component';
|
||||
import {PublicationTitleFormatter} from './publicationTitleFormatter.component';
|
||||
import {ClaimEntityFormatter} from './claimEntityFormatter.component';
|
||||
import {OrganizationTitleFormatterComponent} from "./organizationTitleFormatter.component";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, RouterModule
|
||||
],
|
||||
declarations: [
|
||||
ProjectTitleFormatter, PublicationTitleFormatter, ClaimEntityFormatter
|
||||
ProjectTitleFormatter, PublicationTitleFormatter, ClaimEntityFormatter, OrganizationTitleFormatterComponent
|
||||
|
||||
],
|
||||
providers: [ ],
|
||||
exports: [
|
||||
ProjectTitleFormatter, PublicationTitleFormatter, ClaimEntityFormatter
|
||||
ProjectTitleFormatter, PublicationTitleFormatter, ClaimEntityFormatter, OrganizationTitleFormatterComponent
|
||||
|
||||
]
|
||||
})
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
import {Component, Input} from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'organization-title',
|
||||
template: `
|
||||
<h6 *ngIf="organization" class="uk-margin-remove multi-line-ellipsis lines-2">
|
||||
<p class="uk-margin-remove">
|
||||
{{(organization.shortName ? ('[' + organization.shortName + '] ') : '')}}{{organization.name}}
|
||||
</p>
|
||||
</h6>
|
||||
`
|
||||
})
|
||||
|
||||
export class OrganizationTitleFormatterComponent {
|
||||
@Input() organization: any;
|
||||
public url: string;
|
||||
|
||||
}
|
|
@ -10,17 +10,17 @@ import {properties} from "../../../../../environments/environment";
|
|||
<ng-container>
|
||||
<h6 class="uk-margin-remove multi-line-ellipsis lines-2">
|
||||
<p class="uk-margin-remove">
|
||||
<a *ngIf="externalPortalUrl" [href]="externalPortalUrl + projectUrl + '?projectId='+project['openaireId']" class="uk-link uk-link-heading">
|
||||
<a *ngIf="externalPortalUrl" [href]="externalPortalUrl + projectUrl + '?projectId='+project['openaireId']" class="uk-link uk-link-heading" [class.uk-disabled]="project.name == 'unidentified'">
|
||||
{{(project['acronym'] ? ('[' + project['acronym'] + '] ') : '')}}{{project['name']}}
|
||||
</a>
|
||||
<a *ngIf="!externalPortalUrl" [routerLink]="projectUrl" [queryParams]="routerHelper.createQueryParam('projectId',project['openaireId'])" class="uk-link uk-link-heading">
|
||||
<a *ngIf="!externalPortalUrl" [routerLink]="projectUrl" [queryParams]="routerHelper.createQueryParam('projectId',project['openaireId'])" class="uk-link uk-link-heading" [class.uk-disabled]="project.name == 'unidentified'">
|
||||
{{(project['acronym'] ? ('[' + project['acronym'] + '] ') : '')}}{{project['name']}}
|
||||
</a>
|
||||
</p>
|
||||
</h6>
|
||||
</ng-container>
|
||||
<span *ngIf="project['funderName']" class="uk-margin-small-top">
|
||||
<span class="uk-text-muted">Funder: </span>{{project['funderName']}}
|
||||
<span class="uk-text-meta">Funder: </span>{{project['funderName']}}
|
||||
</span>
|
||||
`
|
||||
})
|
||||
|
|
|
@ -12,8 +12,8 @@ export class ClaimsService {
|
|||
private getClaimRequest(size : number, page : number, url :string, fromCache:boolean):any {
|
||||
return this.http.get(url, CustomOptions.getAuthOptionsWithBody());
|
||||
}
|
||||
getClaims( size : number, page : number, keyword:string, sortby: string, descending: boolean, types: string, apiUrl:string):any {
|
||||
let url = apiUrl +"claims"+"?offset="+(size*(page-1) + "&limit="+size)+"&keyword="+keyword+"&sortby="+sortby+"&descending="+descending+(types.length>0?"&"+types:types);
|
||||
getClaims( size : number, page : number, keyword:string, sortby: string, descending: boolean, types: string, apiUrl:string, mine:boolean):any {
|
||||
let url = apiUrl +"claims"+"?offset="+(size*(page-1) + "&limit="+size)+"&keyword="+keyword+"&sortby="+sortby+"&descending="+descending+(types.length>0?"&"+types:types) + (mine?"&mine=true":"") + (mine?"&mine=true":"");
|
||||
return this.getClaimRequest(size,page,url,true);
|
||||
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ export class ClaimsService {
|
|||
return this.getClaimRequest(size,page,url,false);
|
||||
|
||||
}
|
||||
getClaimsBycontext( size : number, page : number, contextId:string, keyword:string, sortby: string, descending: boolean, types: string , apiUrl:string):any {
|
||||
getClaimsBycontext( size : number, page : number, contextId:string, keyword:string, sortby: string, descending: boolean, types: string , apiUrl:string, mine:boolean):any {
|
||||
//console.info('ClaimsService: getClaims for context : '+contextId);
|
||||
let url = apiUrl +"contexts/"+contextId+"/claims"+"?offset="+(size*(page-1) + "&limit="+size)+"&keyword="+keyword+"&sortby="+sortby+"&descending="+descending+(types.length>0?"&"+types:types);
|
||||
return this.getClaimRequest(size,page,url,true);
|
||||
|
@ -40,6 +40,10 @@ export class ClaimsService {
|
|||
let url = apiUrl +"projects/"+projectId+"/claims"+"?offset="+(size*(page-1) + "&limit="+size)+"&keyword="+keyword+"&sortby="+sortby+"&descending="+descending+(types.length>0?"&"+types:types);
|
||||
return this.getClaimRequest(size,page,url,true);
|
||||
}
|
||||
getClaimsByOrganization( size : number, page : number, organizationId:string, keyword:string, sortby: string, descending: boolean, types: string, apiUrl:string, mine:boolean):any {
|
||||
let url = apiUrl +"organizations/"+organizationId+"/claims"+"?offset="+(size*(page-1) + "&limit="+size)+"&keyword="+keyword+"&sortby="+sortby+"&descending="+descending+(types.length>0?"&"+types:types) + (mine?"&mine=true":"");
|
||||
return this.getClaimRequest(size,page,url,true);
|
||||
}
|
||||
|
||||
deleteClaimById(claimId:string , apiUrl:string):any{
|
||||
//console.warn('Trying to delete claim with id : '+claimId);
|
||||
|
|
|
@ -58,22 +58,20 @@ export class SearchDataciteService {
|
|||
entity.result.journal = null;
|
||||
entity.result.DOI = item.attributes.doi;
|
||||
entity.id = item.attributes.doi;
|
||||
entity.title = item.attributes.title;
|
||||
entity.title = Array.isArray(item.attributes.titles) && item.attributes.titles[0].title?item.attributes.titles[0].title:null;
|
||||
entity.result.url = properties.doiURL + item.attributes.doi;
|
||||
entity.result.source = 'datacite';
|
||||
entity.type = 'dataset';
|
||||
entity.result.date = item.attributes.published;
|
||||
entity.result.date = item.attributes.publicationYear;
|
||||
entity.result.accessRights = "OPEN";
|
||||
entity.result.publisher = item.attributes['container-title'];
|
||||
entity.result.publisher = item.attributes['publisher'];
|
||||
entity.result.journal = null;
|
||||
entity.result.record = item;
|
||||
if (item.attributes.author) {
|
||||
if (item.attributes.creators) {
|
||||
entity.result.authors = [];
|
||||
for (let j = 0; j < item.attributes.author.length; j++) {
|
||||
const author = item.attributes.author[j];
|
||||
if(author.family || author.literal) {
|
||||
entity.result.authors.push((author.family) ? author.family + (author.given ? ', ' + author.given : '') : author.literal);
|
||||
}
|
||||
for (let j = 0; j < item.attributes.creators.length; j++) {
|
||||
const author = item.attributes.creators[j].name;
|
||||
entity.result.authors.push(author);
|
||||
}
|
||||
}
|
||||
results.push(entity);
|
||||
|
|
|
@ -21,14 +21,38 @@ export class SearchOrcidService {
|
|||
let url = properties.searchOrcidURL + term + '/record';
|
||||
|
||||
return this.http.get(url, { headers: headers })
|
||||
//.map(res => res.json()['person'])
|
||||
.pipe(map(res => res['person']))
|
||||
.pipe(map(res => [res['name']['given-names'],
|
||||
res['name']['family-name'],
|
||||
res['name']]))
|
||||
.pipe(map(res => SearchOrcidService.parseOrcidAuthor(res, authorIds, authors, addId)));
|
||||
}
|
||||
//.map(res => res.json()['person'])
|
||||
.pipe(map(res => res['person']))
|
||||
.pipe(map(res => [res['name']['given-names'],
|
||||
res['name']['family-name'],
|
||||
res['name'], res['name']['institution-name']]))
|
||||
|
||||
.pipe(map(res => SearchOrcidService.parseOrcidAuthor(res, authorIds, authors, addId)));
|
||||
}
|
||||
searchOrcidSingleAuthor(term: string, properties: EnvProperties, addId): any {
|
||||
|
||||
//var headers = new Headers();
|
||||
//headers.append('Accept', 'application/orcid+json');
|
||||
let headers = new HttpHeaders({'Accept': 'application/orcid+json'});
|
||||
|
||||
let url ="https://pub.orcid.org/v3.0/expanded-search/?q=orcid:" + term + '&start=0&rows=50';
|
||||
return this.http.get(url, {headers: headers})
|
||||
.pipe(map(res => res['expanded-result']))
|
||||
.pipe(map(res => {
|
||||
if(res) {
|
||||
for (let auth_result of res) {
|
||||
const author = {};
|
||||
author['id'] = auth_result['orcid-id'];
|
||||
author['authorGivenName'] = auth_result['given-names'];
|
||||
author['authorFamilyName'] = auth_result['family-names'];
|
||||
author['institutions'] = auth_result['institution-name'];
|
||||
return author;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
||||
}));
|
||||
}
|
||||
searchOrcidAuthors(term: string,
|
||||
properties: EnvProperties): any {
|
||||
|
||||
|
@ -45,14 +69,42 @@ export class SearchOrcidService {
|
|||
|
||||
}
|
||||
|
||||
searchOrcidAuthorsNew(term: string,
|
||||
properties: EnvProperties, size = 10): any {
|
||||
let headers = new HttpHeaders({'Accept': 'application/orcid+json'});
|
||||
// let url = properties.searchOrcidURL+'search?defType=edismax&q='+term+'&qf=given-name^1.0+family-name^2.0+other-names^1.0+credit-name^1.0&start=0&rows=10';
|
||||
let url = /*properties.searchOrcidURL +*/ 'https://pub.orcid.org/v3.0/expanded-search?q=' + StringUtils.URIEncode('{!edismax qf="given-and-family-names^50.0 family-name^10.0 given-names^10.0 credit-name^10.0 other-names^5.0 text^1.0" pf="given-and-family-names^50.0" bq="current-institution-affiliation-name:[* TO *]^100.0 past-institution-affiliation-name:[* TO *]^70" mm=1}') + term + '&start=0&rows=' + size;
|
||||
// given-and-family-names^50.0 family-name^10.0 given-names^10.0 credit-name^10.0 other-names^5.0 text^1.0" pf="given-and-family-names^50.0" bq="current-institution-affiliation-name:[* TO *]^100.0 past-institution-affiliation-name:[* TO *]^70" mm=1}
|
||||
// https://pub.orcid.org/v3.0/expanded-search/?q=%7B!edismax%20qf%3D%22given-and-family-names%5E50.0%20family-name%5E10.0%20given-names%5E10.0%20credit-name%5E10.0%20other-names%5E5.0%20text%5E1.0%22%20pf%3D%22given-and-family-names%5E50.0%22%20bq%3D%22current-institution-affiliation-name%3A%5B*%20TO%20*%5D%5E100.0%20past-institution-affiliation-name%3A%5B*%20TO%20*%5D%5E70%22%20mm%3D1%7Dpaolo%20manghi&start=0&rows=50
|
||||
|
||||
//q={!edismax qf="given-and-family-names^50.0 family-name^10.0 given-names^5.0 credit-name^10.0 other-names^5.0 text^1.0" pf="given-and-family-names^50.0" mm=1}alessia bardi&start=0&rows=10
|
||||
let key = url;
|
||||
return this.http.get(url, {headers: headers})
|
||||
.pipe(map(res => res['expanded-result']))
|
||||
.pipe(map(res => {
|
||||
let authors = [];
|
||||
if(res) {
|
||||
for (let auth_result of res) {
|
||||
const author = {};
|
||||
author['id'] = auth_result['orcid-id'];
|
||||
author['authorGivenName'] = auth_result['given-names'];
|
||||
author['authorFamilyName'] = auth_result['family-names'];
|
||||
author['institutions'] = auth_result['institution-name'];
|
||||
authors.push(author);
|
||||
}
|
||||
}
|
||||
return authors;
|
||||
|
||||
}));
|
||||
}
|
||||
|
||||
searchOrcidPublications(id: string, properties: EnvProperties, parse: boolean = false): any {
|
||||
let headers = new HttpHeaders({'Accept': 'application/orcid+json'});
|
||||
let url = properties.searchOrcidURL + id + '/works';
|
||||
return this.http.get(url, { headers: headers })
|
||||
.pipe(map(res => res['group']))
|
||||
.pipe(map(request => (parse ? SearchOrcidService.parse(id, request) : request)));
|
||||
}
|
||||
return this.http.get(url, { headers: headers })
|
||||
.pipe(map(res => res['group']))
|
||||
.pipe(map(request => (parse ? SearchOrcidService.parse(id, request) : request)));
|
||||
}
|
||||
|
||||
|
||||
static parseOrcidAuthor(data: any, authorIds: string[], authors, addId): any {
|
||||
|
@ -72,6 +124,9 @@ export class SearchOrcidService {
|
|||
} else {
|
||||
author['authorFamilyName'] = "";
|
||||
}
|
||||
if (data[3] != null) {
|
||||
author['institution'] = data[3];
|
||||
}
|
||||
authors.push(author);
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
import { NgModule} from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import {SearchOrcidService} from "./searchOrcid.service";
|
||||
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule
|
||||
],
|
||||
declarations: [
|
||||
],
|
||||
providers:[
|
||||
SearchOrcidService
|
||||
],
|
||||
exports: [
|
||||
]
|
||||
})
|
||||
export class SearchOrcidServiceModule { }
|
|
@ -37,7 +37,6 @@ export class ClaimsAdminComponent {
|
|||
@Input() isConnect: boolean = false;
|
||||
@Input() externalPortalUrl: string;
|
||||
@Input() claimsInfoURL: string;
|
||||
@Input() userInfoURL: string;
|
||||
public user: User = null;
|
||||
sub;
|
||||
|
||||
|
|
|
@ -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
|
||||
],
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<loading *ngIf="validInput === null" [full]="true" class="uk-position-center"></loading>
|
||||
<linking-generic *ngIf="validInput" [localStoragePrefix]="localStoragePrefix" [results]="results" [sources]="sources"
|
||||
[communityId]="communityId" [inlineEntity]="inlineEntity" [showOptions]="showOptions"
|
||||
pageTitle="Direct Linking">
|
||||
pageTitle="Direct Linking" [claimsProperties]="claimsProperties">
|
||||
</linking-generic>
|
||||
|
||||
<div *ngIf="validInput== false" id="tm-main" class=" uk-section uk-padding-remove-top tm-middle">
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import {Component, Input, ViewChild} from '@angular/core';
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
import {EnvProperties} from '../../utils/properties/env-properties';
|
||||
import {ClaimEntity, ClaimProject, ShowOptions} from '../claim-utils/claimHelper.class';
|
||||
import {ClaimEntity, ClaimOrganization, ClaimProject, ShowOptions} from '../claim-utils/claimHelper.class';
|
||||
import {EntitiesSearchService} from '../../utils/entitiesAutoComplete/entitySearch.service';
|
||||
import {SearchResearchResultsService} from '../../services/searchResearchResults.service';
|
||||
import {LinkingGenericComponent} from "../linking/linkingGeneric.component";
|
||||
|
@ -11,6 +11,7 @@ import {properties} from "../../../../environments/environment";
|
|||
import {OpenaireEntities} from "../../utils/properties/searchFields";
|
||||
import {StringUtils} from "../../utils/string-utils.class";
|
||||
import {ClaimProjectsSearchFormComponent} from "../claim-utils/claimProjectSearchForm.component";
|
||||
import {ClaimsProperties} from "../claim-utils/claims.properties";
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -24,18 +25,20 @@ export class DirectLinkingComponent {
|
|||
|
||||
// linkType: string = "project"; // link type (selected in home page) : project, context, software, etc
|
||||
/* url Parameters for inline linking */
|
||||
id: string = null; //entity id
|
||||
@Input() id: string = null; //entity id
|
||||
type: string = null; // entity type (publication or dataset)
|
||||
// linkTo: string = null; // entity type (project or context or entity)
|
||||
// linkToEntities: string[] = [];
|
||||
showOptions:ShowOptions = new ShowOptions();
|
||||
validEntityTypes = ["dataset", "publication", "software", "orp", "project", "context"];
|
||||
validEntityTypes = ["dataset", "publication", "software", "other", "project", "context", "organization"];
|
||||
sources: ClaimEntity[] = [];
|
||||
inlineEntity: ClaimEntity = null;
|
||||
validInput: boolean = null;//'true;
|
||||
properties: EnvProperties;
|
||||
@Input() communityId: string = null;
|
||||
localStoragePrefix: string = "";
|
||||
@Input() organizationClaim: boolean = false;
|
||||
@Input() claimsProperties:ClaimsProperties = new ClaimsProperties();
|
||||
constructor(private _router: Router, private route: ActivatedRoute,private entitySearch:EntitiesSearchService,
|
||||
private _searchResearchResultsService: SearchResearchResultsService) {}
|
||||
subscriptions = [];
|
||||
|
@ -48,11 +51,18 @@ export class DirectLinkingComponent {
|
|||
}
|
||||
ngOnInit() {
|
||||
this.properties = properties;
|
||||
|
||||
/* if(!this.claimsProperties){
|
||||
this.claimsProperties = new ClaimsProperties();
|
||||
}*/
|
||||
this.subscriptions.push(this.route.queryParams.subscribe(params => {
|
||||
this.id = params['id'];
|
||||
this.type = params['type'];
|
||||
this.showOptions.linkTo = params['linkTo'];
|
||||
if(this.organizationClaim){
|
||||
this.type = "organization";
|
||||
this.showOptions.linkTo = "result";
|
||||
}else {
|
||||
this.id = params['id'];
|
||||
this.type = params['type'];
|
||||
this.showOptions.linkTo = params['linkTo'];
|
||||
}
|
||||
if (this.type != null && this.showOptions.linkTo != null) {
|
||||
this.type = (this.validEntityTypes.indexOf(this.type) != -1) ? this.type : 'publication';
|
||||
this.showOptions.linkTo = (this.validEntityTypes.indexOf(this.showOptions.linkTo) != -1 || this.showOptions.linkTo == "result") ? this.showOptions.linkTo : 'project';
|
||||
|
@ -68,20 +78,22 @@ export class DirectLinkingComponent {
|
|||
if (this.type == "project") {
|
||||
// this.linkType = "project";
|
||||
this.getProjectById(this.id);
|
||||
} else if (this.type == "organization") {
|
||||
this.getOrganizationById(this.id);
|
||||
} else if (this.type == "publication") {
|
||||
this.getResearchResultById("publication", this.id);
|
||||
} else if (this.type == "dataset") {
|
||||
this.getResearchResultById("dataset", this.id);
|
||||
} else if (this.type == "software") {
|
||||
this.getResearchResultById("software", this.id);
|
||||
} else if (this.type == "orp") {
|
||||
} else if (this.type == "other") {
|
||||
this.getResearchResultById("other", this.id);
|
||||
} else {
|
||||
this.validInput = this.isValidInput(null);
|
||||
}
|
||||
//set which entities it is allowed to link to.
|
||||
// add first the
|
||||
if(this.type == "project"){
|
||||
if(this.type == "project" || this.type == "organization"){
|
||||
this.showOptions.linkToEntities = ["result"];
|
||||
this.showOptions.linkTo = "result";
|
||||
}else{
|
||||
|
@ -95,24 +107,27 @@ export class DirectLinkingComponent {
|
|||
this.showOptions.linkToEntities = ["result","project","context" ];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
this.validInput = this.isValidInput(null);
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
this.validInput = this.isValidInput(null);
|
||||
}));
|
||||
|
||||
}
|
||||
|
||||
}));
|
||||
}
|
||||
|
||||
isValidInput(result: ClaimEntity) {
|
||||
if (result == null) {
|
||||
return false;
|
||||
} else if (this.type == "project" && this.showOptions.linkTo != "result") {
|
||||
} else if (this.type == "organization" && !this.claimsProperties.ALLOW_ORGANIZATION_LINKING) {
|
||||
return false;
|
||||
} else if (["dataset", "publication", "software", "orp"].indexOf(this.type) != -1 && (["project", "context", "result"].indexOf(this.showOptions.linkTo) == -1)) {
|
||||
} else if ((this.type == "project" || this.type == "organization") && this.showOptions.linkTo != "result") {
|
||||
return false;
|
||||
} else if (["project", "dataset", "publication", "software", "orp"].indexOf(this.type) == -1) {
|
||||
} else if (["dataset", "publication", "software", "other"].indexOf(this.type) != -1 && (["project", "context", "result"].indexOf(this.showOptions.linkTo) == -1)) {
|
||||
return false;
|
||||
} else if (["project", "dataset", "publication", "software", "other", "organization"].indexOf(this.type) == -1) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
|
@ -130,6 +145,17 @@ export class DirectLinkingComponent {
|
|||
this.handleError("Error getting project by id: " + id, err);
|
||||
}));
|
||||
}
|
||||
getOrganizationById(id: string) {
|
||||
this.subscriptions.push(this.entitySearch.fetchByType(id,"organization", this.properties).subscribe(
|
||||
data => {
|
||||
this.createClaimEntity(data, "organization");
|
||||
},
|
||||
err => {
|
||||
this.validInput = this.isValidInput(null);
|
||||
//console.log("An error occured")
|
||||
this.handleError("Error getting project by id: " + id, err);
|
||||
}));
|
||||
}
|
||||
|
||||
getResearchResultById(resultType: string, id: string) {
|
||||
this.subscriptions.push(this._searchResearchResultsService.searchById(resultType, id, this.properties).subscribe(data => {
|
||||
|
@ -156,12 +182,23 @@ export class DirectLinkingComponent {
|
|||
entity.project.code = project.code;
|
||||
entity.project.endDate = project.endDate;
|
||||
entity.project.funderId = project.funderId;
|
||||
entity.project.funderShortname = project.funderShortName?project.funderShortName:(entity.project.funderId.split("::")[1]);
|
||||
entity.project.funderName = project.funderName;
|
||||
entity.project.fundingLevel0 = project.fundingLevel0;
|
||||
entity.project.jurisdiction = project.jurisdiction;
|
||||
entity.project.startDate = project.startDate;
|
||||
this.inlineEntity = entity;
|
||||
}else{
|
||||
}else if(type =="organization"){
|
||||
let organization = data[0];
|
||||
let entity:ClaimEntity = new ClaimEntity();
|
||||
entity.id = organization.id;
|
||||
entity.type = "organization";
|
||||
entity.title = organization.label;
|
||||
entity.organization = new ClaimOrganization();
|
||||
// entity.organization.url = properties.searchLinkToOrganization + entity.id;
|
||||
entity.organization.name = organization.label;
|
||||
this.inlineEntity = entity;
|
||||
}else{
|
||||
results = ClaimResultSearchFormComponent.openaire2ClaimResults(data, this.properties);
|
||||
}
|
||||
|
||||
|
|
|
@ -5,20 +5,18 @@ 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';
|
||||
import {LoadingModule} from "../../utils/loading/loading.module";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
SharedModule,
|
||||
EntitySearchServiceModule, SearchResearchResultsServiceModule,
|
||||
Schema2jsonldModule, SEOServiceModule, LinkingGenericModule
|
||||
Schema2jsonldModule, SEOServiceModule, LinkingGenericModule, LoadingModule
|
||||
],
|
||||
providers:[LoginGuard, PreviousRouteRecorder, IsRouteEnabled],
|
||||
providers:[],
|
||||
declarations: [
|
||||
DirectLinkingComponent
|
||||
], exports:[DirectLinkingComponent]
|
||||
|
|
|
@ -133,11 +133,11 @@ export class BulkClaimComponent {
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
upload() {
|
||||
this.enableUpload = false;
|
||||
this.showReport = false;
|
||||
this.errorMessage = "";
|
||||
console.log(this.filesToUpload);
|
||||
if (this.filesToUpload.length == 0) {
|
||||
this.errorMessage = "There is no selected file to upload.";
|
||||
return;
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
));
|
||||
}
|
||||
|
|
|
@ -16,6 +16,7 @@ import {
|
|||
import {UserManagementService} from "../../../services/user-management.service";
|
||||
import {Subscriber, timer} from "rxjs";
|
||||
import {map} from "rxjs/operators";
|
||||
import {LogService} from "../../../utils/log/log.service";
|
||||
|
||||
@Component({
|
||||
selector: 'claim-insert',
|
||||
|
@ -59,7 +60,7 @@ import {map} from "rxjs/operators";
|
|||
})
|
||||
export class ClaimInsertComponent {
|
||||
constructor(private claimService: ClaimsService, private _router: Router, private route: ActivatedRoute,
|
||||
private userManagementService: UserManagementService) {
|
||||
private userManagementService: UserManagementService, private _logService: LogService) {
|
||||
}
|
||||
subscriptions = [];
|
||||
ngOnDestroy() {
|
||||
|
@ -127,6 +128,7 @@ export class ClaimInsertComponent {
|
|||
public feedRecordsJob;
|
||||
public claims2Insert;
|
||||
public records2Insert
|
||||
infoToLog = [];
|
||||
public insert() {
|
||||
this.confirmOpen();
|
||||
}
|
||||
|
@ -145,6 +147,7 @@ export class ClaimInsertComponent {
|
|||
this.errorInClaims = [];
|
||||
this.insertedRecords = [];
|
||||
this.errorInRecords = [];
|
||||
this.infoToLog = [];
|
||||
this.subscriptions.push(this.userManagementService.getUserInfo().subscribe(user => {
|
||||
if (!user) {
|
||||
this.saveAndNavigate();
|
||||
|
@ -153,13 +156,14 @@ export class ClaimInsertComponent {
|
|||
this.loading.open();
|
||||
let claims: ClaimRecord2Insert[] = [];
|
||||
let directclaims: DirectIndexRecord[] = [];
|
||||
let idSuffix = (new Date()).getTime() + "";
|
||||
let dashboard = this.properties.environment+"_"+this.properties.dashboard + (this.communityId?("_"+this.communityId):'');
|
||||
for (let j = 0; j < this.sources.length; j++) { // if an external result -> direct insert in the index
|
||||
const result: ClaimEntity = this.sources[j];
|
||||
if (result.result && ["crossref", "datacite", "orcid"].indexOf(result.result.source) != -1) {
|
||||
directclaims.push({
|
||||
"id": result.id,
|
||||
"record": ClaimInsertComponent.createDirectClaim(result, this.results)
|
||||
"record": ClaimInsertComponent.createDirectClaim(result, this.results, idSuffix)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -170,12 +174,12 @@ export class ClaimInsertComponent {
|
|||
if (this.sources.length > 0) {
|
||||
directclaims.push({
|
||||
"id": entity.id,
|
||||
"record": ClaimInsertComponent.createDirectClaim(entity, this.sources)
|
||||
"record": ClaimInsertComponent.createDirectClaim(entity, this.sources, idSuffix)
|
||||
});
|
||||
} else if (this.inlineEntity) {
|
||||
} else if (this.inlineEntity && this.inlineEntity.type != "organization") {
|
||||
directclaims.push({
|
||||
"id": entity.id,
|
||||
"record": ClaimInsertComponent.createDirectClaim(entity, [this.inlineEntity])
|
||||
"record": ClaimInsertComponent.createDirectClaim(entity, [this.inlineEntity], idSuffix)
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -184,28 +188,35 @@ export class ClaimInsertComponent {
|
|||
for (let j = 0; j < this.sources.length; j++) {
|
||||
const result: ClaimEntity = this.sources[j]; // this is a research result
|
||||
if (entity.result) {
|
||||
claims.push(ClaimInsertComponent.createResultClaim(result, entity, user.email, dashboard));
|
||||
claims.push(ClaimInsertComponent.createResultClaim(result, entity, user.email, dashboard, idSuffix));
|
||||
} else if (entity.context) {
|
||||
claims.push(ClaimInsertComponent.createContextClaim(result, entity, user.email, dashboard));
|
||||
claims.push(ClaimInsertComponent.createContextClaim(result, entity, user.email, dashboard, idSuffix));
|
||||
} else if (entity.project) {
|
||||
claims.push(ClaimInsertComponent.createProjectClaim(result, entity, user.email, dashboard));
|
||||
claims.push(ClaimInsertComponent.createProjectClaim(result, entity, user.email, dashboard, idSuffix));
|
||||
/* } else if (entity.organization) {
|
||||
claims.push(ClaimInsertComponent.createOrganizationClaim(result, entity, user.email, dashboard, idSuffix));*/
|
||||
}
|
||||
|
||||
this.infoToLog.push([ result.title?result.title: result.id, entity.title?entity.title:entity.id]);
|
||||
|
||||
}
|
||||
if (this.inlineEntity) {
|
||||
this.infoToLog.push([ this.inlineEntity.title?this.inlineEntity.title: this.inlineEntity.id, entity.title?entity.title:entity.id]);
|
||||
if (this.inlineEntity.result) {
|
||||
if (entity.result) {
|
||||
|
||||
claims.push(ClaimInsertComponent.createResultClaim(this.inlineEntity, entity, user.email, dashboard));
|
||||
claims.push(ClaimInsertComponent.createResultClaim(this.inlineEntity, entity, user.email, dashboard, idSuffix));
|
||||
} else if (entity.context) {
|
||||
claims.push(ClaimInsertComponent.createContextClaim(this.inlineEntity, entity, user.email, dashboard));
|
||||
claims.push(ClaimInsertComponent.createContextClaim(this.inlineEntity, entity, user.email, dashboard, idSuffix));
|
||||
} else if (entity.project) {
|
||||
claims.push(ClaimInsertComponent.createProjectClaim(this.inlineEntity, entity, user.email, dashboard));
|
||||
claims.push(ClaimInsertComponent.createProjectClaim(this.inlineEntity, entity, user.email, dashboard, idSuffix));
|
||||
}
|
||||
} else if (this.inlineEntity.project) {
|
||||
if (entity.result) {
|
||||
claims.push(ClaimInsertComponent.createProjectClaim(entity, this.inlineEntity, user.email, dashboard));
|
||||
claims.push(ClaimInsertComponent.createProjectClaim(entity, this.inlineEntity, user.email, dashboard, idSuffix));
|
||||
}
|
||||
} else if (this.inlineEntity.organization) {
|
||||
if (entity.result) {
|
||||
claims.push(ClaimInsertComponent.createOrganizationClaim(entity, this.inlineEntity, user.email, dashboard, idSuffix));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -221,7 +232,7 @@ export class ClaimInsertComponent {
|
|||
data => {
|
||||
this.feedRecordsJob = data.data;
|
||||
this.records2Insert = directclaims.length;
|
||||
console.log(data);
|
||||
// console.log(data);
|
||||
// this.insertedRecords = data.insertedIds;
|
||||
//
|
||||
// this.errorInRecords = data.errorInClaims;
|
||||
|
@ -256,6 +267,12 @@ export class ClaimInsertComponent {
|
|||
data => {
|
||||
this.claims2Insert = claims.length;
|
||||
this.claimsJob = data.data;
|
||||
if(this.properties.logServiceUrl) {
|
||||
for(let info of this.infoToLog) {
|
||||
this.subscriptions.push(this._logService.logLink(this.properties, info[0],info[1]).subscribe(res => {
|
||||
}));
|
||||
}
|
||||
}
|
||||
this.saveLocalStorage();
|
||||
let timerSubscription = timer(0, 10000).pipe(
|
||||
map(() => {
|
||||
|
@ -374,13 +391,18 @@ export class ClaimInsertComponent {
|
|||
localStorage.removeItem(this.localStoragePrefix + "results");
|
||||
localStorage.removeItem(this.localStoragePrefix + "claimsJob");
|
||||
localStorage.removeItem(this.localStoragePrefix + "feedRecordsJob");
|
||||
|
||||
this._router.navigate(['/myclaims'], {queryParams: this.params});
|
||||
if(this.properties.myClaimsLink && this.properties.myClaimsLink.indexOf(".") == -1) {
|
||||
this._router.navigate([this.properties.myClaimsLink], {queryParams: this.params});
|
||||
}else if(this.properties.myClaimsLink && this.properties.myClaimsLink.indexOf(".") != -1) {
|
||||
this._router.navigate([this.properties.myClaimsLink], {relativeTo: this.route});
|
||||
}else{
|
||||
this._router.navigate(["/"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static createContextClaim(resultEntity: ClaimEntity, contextEntity: ClaimEntity, user: any, dashboard:string): ClaimRecord2Insert {
|
||||
private static createContextClaim(resultEntity: ClaimEntity, contextEntity: ClaimEntity, user: any, dashboard:string, idSuffix:string): ClaimRecord2Insert {
|
||||
return {
|
||||
claimedBy: user,
|
||||
sourceId: contextEntity.context.concept.id,
|
||||
|
@ -393,11 +415,12 @@ export class ClaimInsertComponent {
|
|||
targetCollectedFrom: resultEntity.result.source,
|
||||
targetAccessRights: resultEntity.result.accessRights,
|
||||
targetEmbargoEndDate: ClaimInsertComponent.getEmbargoEndDate(resultEntity),
|
||||
claimedInDashboard : dashboard
|
||||
claimedInDashboard : dashboard,
|
||||
idSuffix : idSuffix
|
||||
};
|
||||
}
|
||||
|
||||
private static createProjectClaim(resultEntity: ClaimEntity, projectEntity: ClaimEntity, user: any, dashboard:string): ClaimRecord2Insert {
|
||||
private static createProjectClaim(resultEntity: ClaimEntity, projectEntity: ClaimEntity, user: any, dashboard:string, idSuffix:string): ClaimRecord2Insert {
|
||||
return {
|
||||
claimedBy: user,
|
||||
sourceId: projectEntity.id,
|
||||
|
@ -410,11 +433,29 @@ export class ClaimInsertComponent {
|
|||
targetCollectedFrom: resultEntity.result.source,
|
||||
targetAccessRights: resultEntity.result.accessRights,
|
||||
targetEmbargoEndDate: ClaimInsertComponent.getEmbargoEndDate(resultEntity),
|
||||
claimedInDashboard : dashboard
|
||||
claimedInDashboard : dashboard,
|
||||
idSuffix : idSuffix
|
||||
};
|
||||
}
|
||||
private static createOrganizationClaim(resultEntity: ClaimEntity, organizationEntity: ClaimEntity, user: any, dashboard:string, idSuffix:string): ClaimRecord2Insert {
|
||||
return {
|
||||
claimedBy: user,
|
||||
sourceId: organizationEntity.id,
|
||||
sourceType: "organization",
|
||||
sourceCollectedFrom: "openaire",
|
||||
sourceAccessRights: "OPEN",
|
||||
sourceEmbargoEndDate: "",
|
||||
targetId: resultEntity.id,
|
||||
targetType: resultEntity.type,
|
||||
targetCollectedFrom: resultEntity.result.source,
|
||||
targetAccessRights: resultEntity.result.accessRights,
|
||||
targetEmbargoEndDate: ClaimInsertComponent.getEmbargoEndDate(resultEntity),
|
||||
claimedInDashboard : dashboard,
|
||||
idSuffix : idSuffix
|
||||
};
|
||||
}
|
||||
|
||||
private static createResultClaim(inlineResult: ClaimEntity, resultEntity: ClaimEntity, user: string, dashboard:string): ClaimRecord2Insert {
|
||||
private static createResultClaim(inlineResult: ClaimEntity, resultEntity: ClaimEntity, user: string, dashboard:string, idSuffix:string): ClaimRecord2Insert {
|
||||
|
||||
return {
|
||||
claimedBy: user,
|
||||
|
@ -428,7 +469,9 @@ export class ClaimInsertComponent {
|
|||
targetCollectedFrom: inlineResult.result.source,
|
||||
targetAccessRights: inlineResult.result.accessRights,
|
||||
targetEmbargoEndDate: ClaimInsertComponent.getEmbargoEndDate(inlineResult),
|
||||
claimedInDashboard : dashboard
|
||||
claimedInDashboard : dashboard,
|
||||
idSuffix : idSuffix
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -438,12 +481,13 @@ export class ClaimInsertComponent {
|
|||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
static createDirectClaim(resultEntity: ClaimEntity, results: ClaimEntity[]) {
|
||||
static createOpenAIREId(id, idSuffix:string):string {
|
||||
return id.indexOf( "::" ) == -1 ? ("userclaim___::" + Md5.hashStr(id + idSuffix)):id;
|
||||
}
|
||||
static createDirectClaim(resultEntity: ClaimEntity, results: ClaimEntity[], idSuffix:string) {
|
||||
let entity = {};
|
||||
const md5_id = Md5.hashStr(resultEntity.id);
|
||||
entity["originalId"] = "userclaim___::" + md5_id;
|
||||
entity["openaireId"] = "userclaim___::" + md5_id;
|
||||
entity["originalId"] = this.createOpenAIREId(resultEntity.id, idSuffix);
|
||||
entity["openaireId"] = this.createOpenAIREId(resultEntity.id, idSuffix);
|
||||
entity["title"] = resultEntity.title;
|
||||
entity["title"] = (Array.isArray(resultEntity.title) && resultEntity.title.length > 0) ? resultEntity.title[0] : resultEntity.title;
|
||||
|
||||
|
@ -492,7 +536,7 @@ export class ClaimInsertComponent {
|
|||
entity["linksToProjects"] = [];
|
||||
}
|
||||
let project: ClaimEntity = results[i];
|
||||
entity["linksToProjects"].push("info:eu-repo/grantAgreement/" + project.project.funderName + "/" + project.project.fundingLevel0 + "/" + project.project.code + "/" + project.project.jurisdiction + "/" + project.title + "/" + project.project.acronym);
|
||||
entity["linksToProjects"].push("info:eu-repo/grantAgreement/" + project.project.funderShortname + "/" + project.project.fundingLevel0 + "/" + project.project.code + "/" + project.project.jurisdiction + "/" + project.title + "/" + project.project.acronym);
|
||||
|
||||
} else if (results[i].context) {
|
||||
|
||||
|
|
|
@ -6,10 +6,11 @@ import {LoadingModalModule} from '../../../utils/modal/loadingModal.module';
|
|||
import {ClaimInsertComponent} from './insertClaim.component';
|
||||
import {ClaimServiceModule} from '../../claim-utils/service/claimsService.module';
|
||||
import {IconsModule} from "../../../utils/icons/icons.module";
|
||||
import {LogServiceModule} from "../../../utils/log/LogService.module";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
SharedModule, AlertModalModule, LoadingModalModule, ClaimServiceModule, IconsModule
|
||||
SharedModule, AlertModalModule, LoadingModalModule, ClaimServiceModule, IconsModule, LogServiceModule
|
||||
],
|
||||
declarations: [ClaimInsertComponent],
|
||||
exports:[ ClaimInsertComponent]
|
||||
|
|
|
@ -67,18 +67,19 @@
|
|||
[results]="results" [sources]="sources"
|
||||
[localStoragePrefix]="localStoragePrefix" [inlineEntity]="inlineEntity"
|
||||
[showOptions]="showOptions" [properties]=properties [pageContents]="pageContents"
|
||||
[defaultColors]="!communityId" [communityId]="communityId"
|
||||
[defaultColors]="!communityId" [communityId]="communityId" [claimsProperties]="claimsProperties"
|
||||
>
|
||||
</metadata-preview>
|
||||
<div id="tm-main" class="uk-section uk-padding-remove-top" *ngIf="showOptions.show != 'claim'">
|
||||
<div>
|
||||
<schema2jsonld *ngIf="url" [URL]="url" name="Link your {{openaireEntities.RESULTS}}" type="other"></schema2jsonld>
|
||||
<div class="uk-container uk-container-large">
|
||||
<div *ngIf="properties" class="uk-section uk-padding-remove-top">
|
||||
<div *ngIf="properties && claimsProperties" class="uk-section uk-padding-remove-top">
|
||||
<div class="uk-container uk-container-large">
|
||||
<div class="uk-grid basketContainer" *ngIf="showOptions.show!='claim'" uk-grid>
|
||||
<div class="uk-width-2-3@m uk-position-z-index uk-flex-first@m uk-flex-last uk-margin-medium-top">
|
||||
<h2 *ngIf="inlineEntity" class="uk-text-center">Link source to</h2>
|
||||
<h2 *ngIf="inlineEntity && claimsProperties.INLINE_ENTITY.show" class="uk-text-center">Link source to</h2>
|
||||
<div *ngIf="inlineEntity && claimsProperties.INLINE_ENTITY.guideText" class="uk-text-center">{{claimsProperties.INLINE_ENTITY.guideText}}</div>
|
||||
<div *ngIf="showOptions.show=='source'">
|
||||
<claim-result-search-form [selectedResults]="sources" [properties]=properties
|
||||
[localStoragePrefix]="localStoragePrefix+'sources'"
|
||||
|
@ -115,16 +116,16 @@
|
|||
<div class="uk-card-body uk-padding-small">
|
||||
<div>
|
||||
<ng-container *ngIf="inlineEntity">
|
||||
<div class="uk-margin-small-bottom">
|
||||
<div class="uk-text-emphasis uk-text-bolder">Source</div>
|
||||
<div *ngIf="claimsProperties.INLINE_ENTITY.show" class="uk-margin-small-bottom">
|
||||
<div class="uk-text-emphasis uk-text-bolder">{{claimsProperties.BASKET.source_title}}</div>
|
||||
<claim-selected-results [results]="[inlineEntity]"
|
||||
[localStoragePrefix]="localStoragePrefix+'sources'" class=""
|
||||
[enableRemove]="false" type="source">
|
||||
</claim-selected-results>
|
||||
</div>
|
||||
<div class="uk-padding-small uk-padding-remove-horizontal"><hr class="uk-margin-remove"/></div>
|
||||
<div *ngIf="claimsProperties.INLINE_ENTITY.show" class="uk-padding-small uk-padding-remove-horizontal"><hr class="uk-margin-remove"/></div>
|
||||
<div class="uk-margin-small-top">
|
||||
<div class="uk-text-emphasis uk-text-bolder">Link source to <span *ngIf="results.length> 0">({{(results.length) | number}})</span></div>
|
||||
<div class="uk-text-emphasis uk-text-bolder">{{claimsProperties.BASKET.target_title}} <span *ngIf="results.length> 0">({{(results.length) | number}})</span></div>
|
||||
<ng-container *ngTemplateOutlet="destinations_basket"></ng-container>
|
||||
</div>
|
||||
</ng-container>
|
||||
|
|
|
@ -18,6 +18,7 @@ import {RouterHelper} from "../../utils/routerHelper.class";
|
|||
import { Location } from '@angular/common';
|
||||
import {LoginErrorCodes} from "../../login/utils/guardHelper.class";
|
||||
import {UserManagementService} from "../../services/user-management.service";
|
||||
import {ClaimsProperties} from "../claim-utils/claims.properties";
|
||||
|
||||
@Component({
|
||||
selector: 'linking-generic',
|
||||
|
@ -41,7 +42,7 @@ export class LinkingGenericComponent {
|
|||
// show linkToEntities /values: result, project, context
|
||||
|
||||
@Input() sources:ClaimEntity[] =[];
|
||||
properties:EnvProperties;
|
||||
properties:EnvProperties = properties;
|
||||
public openaireEntities = OpenaireEntities;
|
||||
@Input() localStoragePrefix:string = "linking_";
|
||||
url=null;
|
||||
|
@ -49,7 +50,7 @@ export class LinkingGenericComponent {
|
|||
public pageContents = null;
|
||||
@Input() breadcrumbs: Breadcrumb[] = [];
|
||||
public routerHelper: RouterHelper = new RouterHelper();
|
||||
|
||||
@Input() claimsProperties:ClaimsProperties = new ClaimsProperties();
|
||||
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 cdr: ChangeDetectorRef,
|
||||
|
@ -58,6 +59,9 @@ export class LinkingGenericComponent {
|
|||
subscriptions = [];
|
||||
|
||||
ngOnInit() {
|
||||
/* if(!this.claimsProperties){
|
||||
this.claimsProperties = new ClaimsProperties();
|
||||
}*/
|
||||
this.subscriptions.push(this.userManagementService.getUserInfo().subscribe(user => {
|
||||
if (!user) {
|
||||
this.saveStateAndRedirectLogin();
|
||||
|
@ -68,14 +72,13 @@ export class LinkingGenericComponent {
|
|||
this.breadcrumbs.push({name: "Link", route: null});
|
||||
}
|
||||
this.showOptions.show = 'source';
|
||||
this.showOptions.initSelectOptions();
|
||||
this.showOptions.initSelectOptions(this.claimsProperties);
|
||||
if(this.inlineEntity){
|
||||
this.showOptions.showLinkTo();
|
||||
// this.showOptions.basketShowLinksTo = true;
|
||||
this.showOptions.show = this.showOptions.linkTo;
|
||||
}
|
||||
|
||||
this.properties = properties;
|
||||
this.url = this.properties.domain + this.properties.baseLink+this._router.url;
|
||||
|
||||
var description = "Linking is a functionality provided by OpenAIRE, in order to link research results with a project, a research community or other research results.";
|
||||
|
@ -87,9 +90,11 @@ export class LinkingGenericComponent {
|
|||
|
||||
this.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle).subscribe());
|
||||
|
||||
if(properties.adminToolsPortalType !== "explore") {
|
||||
this.helper.getPageHelpContents(this.properties, this.communityId, this._router.url).subscribe(contents => {
|
||||
this.pageContents = contents;
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
if( typeof localStorage !== 'undefined') {
|
||||
|
@ -164,19 +169,19 @@ export class LinkingGenericComponent {
|
|||
stepHasChanged(stepId){
|
||||
|
||||
if(stepId == 'source'){
|
||||
console.log("show source")
|
||||
// console.log("show source")
|
||||
this.showOptions.showSource();
|
||||
}else if(stepId == 'target'){
|
||||
console.log("show target")
|
||||
// console.log("show target")
|
||||
this.showOptions.show = this.showOptions.linkTo;
|
||||
this.showOptions.showLinkTo();
|
||||
}else if(stepId == 'claim'){
|
||||
console.log("show target")
|
||||
// console.log("show target")
|
||||
this.showOptions.show = 'claim';
|
||||
}
|
||||
this.cdr.detectChanges();
|
||||
HelperFunctions.scroll(true);
|
||||
console.log('stepHasChanged', stepId, this.showOptions.show)
|
||||
// console.log('stepHasChanged', stepId, this.showOptions.show)
|
||||
}
|
||||
|
||||
stepStatus(stepId){
|
||||
|
|
|
@ -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,13 +3,21 @@ import {SharedModule} from '../../../../openaireLibrary/shared/shared.module';
|
|||
import {ClaimEntityTitleComponent} from "./ClaimEntityTitle.component";
|
||||
import {ClaimEntityResultMetadataComponent} from "./ClaimEntityResultMetadata.component";
|
||||
import {ClaimEntityProjectMetadataComponent} from "./ClaimEntityProjectMetadata.component";
|
||||
import {IconsService} from "../../../utils/icons/icons.service";
|
||||
import {coins} from "../../../utils/icons/icons";
|
||||
import {IconsModule} from "../../../utils/icons/icons.module";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
SharedModule
|
||||
SharedModule,
|
||||
IconsModule
|
||||
],
|
||||
declarations: [
|
||||
ClaimEntityTitleComponent, ClaimEntityResultMetadataComponent, ClaimEntityProjectMetadataComponent
|
||||
], exports:[ ClaimEntityTitleComponent, ClaimEntityResultMetadataComponent, ClaimEntityProjectMetadataComponent]
|
||||
})
|
||||
export class ClaimEntitiesMetadataModule { }
|
||||
export class ClaimEntitiesMetadataModule {
|
||||
constructor(private _iconsService:IconsService) {
|
||||
this._iconsService.registerIcons([coins])
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,20 +8,28 @@ import {ClaimEntity} from '../../claim-utils/claimHelper.class';
|
|||
<div *ngIf="!shortVersion" class="claim-entity-metadata uk-flex-inline uk-flex-wrap uk-text-xsmall uk-text-emphasis"
|
||||
[class.uk-margin-xsmall-top]="!shortVersion">
|
||||
<span class="uk-text-capitalize">
|
||||
{{entity.type}}
|
||||
{{entity.type == 'project' && entity.project.code == 'unidentified'?'funder':entity.type}}
|
||||
</span>
|
||||
<span *ngIf="entity.project.startDate || entity.project.endDate">
|
||||
{{(entity.project.startDate) ? entity.project.startDate : 'Unknown'}}{{'-' + ((entity.project.endDate) ? entity.project.endDate : 'Unknown')}}
|
||||
</span>
|
||||
</div>
|
||||
<div class="uk-text-small uk-flex uk-flex-wrap" [style.grid-gap]="shortVersion?'10px':'20px'"
|
||||
<div *ngIf="shortVersion && entity.type == 'project' && entity.project.code == 'unidentified'" class="claim-entity-metadata uk-flex-inline uk-flex-wrap uk-text-xsmall uk-text-emphasis"
|
||||
[class.uk-margin-xsmall-top]="!shortVersion">
|
||||
<span class="uk-text-capitalize">
|
||||
funder
|
||||
</span>
|
||||
|
||||
</div>
|
||||
<div *ngIf="entity.project.code!='unidentified'" class="uk-text-small uk-flex uk-flex-wrap" [style.grid-gap]="shortVersion?'0px':'10px'"
|
||||
[class.uk-margin-small-top]="!shortVersion">
|
||||
<div *ngIf="entity.project.funderName">
|
||||
<span class="uk-text-meta">Funder: </span>{{entity.project.funderName}}
|
||||
</div>
|
||||
<div *ngIf="entity.project.code">
|
||||
<span class="uk-text-meta">Project Code: </span>{{entity.project.code}}
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="entity.project.funderName || entity.project.funderShortname">
|
||||
<span class="uk-text-meta">Funding: </span>{{entity.project.funderName?entity.project.funderName:entity.project.funderShortname}}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</ng-container>
|
||||
`,
|
||||
|
|
|
@ -5,16 +5,18 @@ import {ClaimEntity} from '../../claim-utils/claimHelper.class';
|
|||
selector: 'claim-title',
|
||||
template: `
|
||||
<div class="uk-grid uk-flex uk-flex-middle">
|
||||
<span *ngIf="showIcon" class="uk-flex">
|
||||
<span *ngIf="entity.result" class="material-icons uk-text-small uk-text-meta">
|
||||
insert_drive_file
|
||||
</span>
|
||||
<span *ngIf="entity.project" class="material-icons uk-text-small uk-text-meta">
|
||||
assignment_turned_in
|
||||
</span>
|
||||
<span *ngIf="entity.type=='community'" class="material-icons uk-text-small uk-text-meta" style="margin-right: 2px;">
|
||||
people
|
||||
</span>
|
||||
<span *ngIf="showIcon" class="uk-flex uk-margin-xsmall-right">
|
||||
<icon *ngIf="entity.result" class=" uk-text-small uk-text-meta" name="insert_drive_file">
|
||||
|
||||
</icon>
|
||||
<icon *ngIf="entity.project && entity.project.code !='unidentified'" class=" uk-text-small uk-text-meta" name="assignment_turned_in">
|
||||
</icon>
|
||||
<icon *ngIf="entity.project && entity.project.code =='unidentified'" class="uk-text-small uk-text-meta" name="coins" [ratio]="1.4">
|
||||
</icon>
|
||||
<icon *ngIf="entity.organization" class=" uk-text-small uk-text-meta" name="account_balance">
|
||||
</icon>
|
||||
<icon *ngIf="entity.type=='community'" class=" uk-text-small uk-text-meta" style="margin-right: 2px;" name="people">
|
||||
</icon>
|
||||
</span>
|
||||
<div class="uk-width-expand multi-line-ellipsis lines-3" style="word-break: break-word;"
|
||||
[class.uk-padding-remove-left]="showIcon" [class.uk-text-truncate]="shortVersion">
|
||||
|
@ -27,7 +29,15 @@ import {ClaimEntity} from '../../claim-utils/claimHelper.class';
|
|||
<span *ngIf="(entity.result && !entity.result.url)">
|
||||
{{entity.title ? sliceString(entity.title) : '[No title available]'}}
|
||||
</span>
|
||||
<span *ngIf="entity.type=='project' && entity.project">
|
||||
<span *ngIf="entity.type=='project' && entity.project && entity.project.code =='unidentified'">
|
||||
<span *ngIf="!shortVersion">
|
||||
{{(entity.project.funderShortname ? '[' + entity.project.funderShortname + '] ' : '') + entity.project.funderName}}
|
||||
</span>
|
||||
<span *ngIf="shortVersion">
|
||||
{{sliceString(entity.project.funderName)}}
|
||||
</span>
|
||||
</span>
|
||||
<span *ngIf="entity.type=='project' && entity.project && entity.project.code!='unidentified'">
|
||||
<a *ngIf="entity.project && entity.project.url" target="_blank" [href]="entity.project.url"
|
||||
class="uk-link uk-text-decoration-none uk-width-expand">
|
||||
<span *ngIf="!shortVersion">
|
||||
|
@ -46,6 +56,9 @@ import {ClaimEntity} from '../../claim-utils/claimHelper.class';
|
|||
</span>
|
||||
</span>
|
||||
</span>
|
||||
<span *ngIf="entity.type=='organization' && entity.organization">
|
||||
{{sliceString(entity.title)}}
|
||||
</span>
|
||||
<span *ngIf="entity.type=='community' && entity.context">
|
||||
<span *ngIf=" entity.context.community != entity.context.concept.label">
|
||||
{{entity.context.community }} > {{entity.context.category}} >
|
||||
|
|
|
@ -6,15 +6,14 @@
|
|||
<div class="uk-width-expand">
|
||||
<div class="uk-card uk-card-default">
|
||||
<div class="uk-card-body">
|
||||
<div class="uk-grid uk-grid-divider uk-child-width-1-2@m uk-child-width-1-1@s" uk-grid>
|
||||
<div class="uk-grid uk-grid-divider uk-child-width-1-1@s" uk-grid [class.uk-child-width-1-2@m] = "claimsProperties.INLINE_ENTITY.show" >
|
||||
<!-- Sources-->
|
||||
<div>
|
||||
<div *ngIf="claimsProperties.INLINE_ENTITY.show">
|
||||
<div class=" uk-margin uk-animation-toggle">
|
||||
<span class="uk-h6 "> SOURCES ({{sources.length + (inlineEntity ? 1 : 0) | number}})
|
||||
<span class="uk-h6 "> {{claimsProperties.METADATA_PREVIEW.source_title}} ({{sources.length + (inlineEntity ? 1 : 0) | number}})
|
||||
</span>
|
||||
<a *ngIf="!inlineEntity" class="uk-float-right uk-text-small" (click)="showOptions.showSource() "> <span
|
||||
uk-icon="pencil" class="uk-margin-xsmall-right"></span>Edit
|
||||
sources</a>
|
||||
uk-icon="pencil" class="uk-margin-xsmall-right"></span>{{claimsProperties.METADATA_PREVIEW.edit_source_title}}</a>
|
||||
</div>
|
||||
<ul *ngIf="inlineEntity" class="uk-list uk-animation-fade uk-list-divider">
|
||||
<li>
|
||||
|
@ -153,13 +152,15 @@
|
|||
</div>
|
||||
<!-- Results-->
|
||||
<div class=" ">
|
||||
<div class=" uk-margin ">
|
||||
<span class=" uk-h6 "> LINK TO ({{results.length | number}})</span>
|
||||
<div class=" uk-margin uk-grid">
|
||||
<span class=" uk-h6 uk-width-expand"> {{claimsProperties.METADATA_PREVIEW.target_title}} ({{results.length | number}})</span>
|
||||
|
||||
<div class="uk-width-auto uk-flex">
|
||||
|
||||
<a class="uk-float-right uk-text-small" (click)="showOptions.showLinkTo()"> <span
|
||||
uk-icon="pencil" class="uk-margin-xsmall-right"></span>Edit
|
||||
entities</a>
|
||||
<icon [name]="claimsProperties.METADATA_PREVIEW.edit_target_icon" [flex]="true"></icon>
|
||||
<a class=" uk-margin-left-xsmall uk-text-small" (click)="showOptions.showLinkTo()">
|
||||
{{claimsProperties.METADATA_PREVIEW.edit_target_title}}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="results.length == 0">
|
||||
<div class="uk-alert dangerBorder no-selected-message uk-text-center">
|
||||
|
|
|
@ -4,6 +4,7 @@ import {ClaimEntity, ClaimsErrorMessage, Message, ShowOptions} from '../../claim
|
|||
import {EnvProperties} from "../../../utils/properties/env-properties";
|
||||
import {Dates} from "../../../utils/string-utils.class";
|
||||
import {HelperFunctions} from "../../../utils/HelperFunctions.class";
|
||||
import {ClaimsProperties} from "../../claim-utils/claims.properties";
|
||||
|
||||
@Component({
|
||||
selector: 'metadata-preview',
|
||||
|
@ -28,6 +29,7 @@ export class MetadataPreviewComponent {
|
|||
@ViewChild(AlertModal) alertApplyAll;
|
||||
@Input() localStoragePrefix: string = "";
|
||||
@Input() communityId:string= null;
|
||||
@Input() claimsProperties:ClaimsProperties;
|
||||
errors:ClaimsErrorMessage[] = [];
|
||||
warnings:Message[] = [];
|
||||
public commonAccessRights = "OPEN"; // for access rights- changes when user apply a change to every entity
|
||||
|
|
|
@ -11,16 +11,17 @@ import { MatInputModule } from '@angular/material/input';
|
|||
import { MatSelectModule } from '@angular/material/select';
|
||||
import {HelperModule} from "../../../utils/helper/helper.module";
|
||||
import {SelectedPublicationsModule} from "./selectedResults.module";
|
||||
import {IconsModule} from "../../../utils/icons/icons.module";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
SharedModule,
|
||||
AlertModalModule,
|
||||
ClaimEntitiesMetadataModule,
|
||||
InsertClaimsModule,
|
||||
MatDatepickerModule, MatNativeDateModule, MatFormFieldModule, MatInputModule, MatSelectModule,
|
||||
HelperModule, SelectedPublicationsModule
|
||||
],
|
||||
imports: [
|
||||
SharedModule,
|
||||
AlertModalModule,
|
||||
ClaimEntitiesMetadataModule,
|
||||
InsertClaimsModule,
|
||||
MatDatepickerModule, MatNativeDateModule, MatFormFieldModule, MatInputModule, MatSelectModule,
|
||||
HelperModule, SelectedPublicationsModule, IconsModule
|
||||
],
|
||||
declarations: [MetadataPreviewComponent],
|
||||
exports:[MetadataPreviewComponent]
|
||||
})
|
||||
|
|
|
@ -30,7 +30,6 @@ import {Subscriber} from "rxjs";
|
|||
export class MyClaimsComponent {
|
||||
@Input() claimsInfoURL: string;
|
||||
@Input() communityId:string;
|
||||
@Input() userInfoURL: string;
|
||||
public user: User = null;
|
||||
|
||||
constructor(private userManagementService: UserManagementService, private _router: Router) {}
|
||||
|
|
|
@ -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]
|
||||
|
|
|
@ -6,6 +6,9 @@ import {CommunityInfo} from "./community/communityInfo";
|
|||
export class ConnectHelper {
|
||||
|
||||
public static getCommunityFromDomain(domain: string): string{
|
||||
if(properties.dashboard === 'irish') {
|
||||
return properties.adminToolsCommunity;
|
||||
}
|
||||
if(properties.environment == "development" &&
|
||||
(properties.adminToolsPortalType == "connect" || properties.adminToolsPortalType == "community"
|
||||
|| properties.adminToolsPortalType == "aggregator" || properties.adminToolsPortalType == "eosc")) {
|
||||
|
|
|
@ -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]
|
||||
|
|
|
@ -1,17 +1,18 @@
|
|||
import {Option} from "../../sharedComponents/input/input.component";
|
||||
import {StakeholderEntities} from "../../monitor/entities/stakeholder";
|
||||
import {StakeholderConfiguration} from "../../monitor-admin/utils/indicator-utils";
|
||||
|
||||
export class PortalUtils{
|
||||
export class PortalUtils {
|
||||
|
||||
portalTypes: Option[] = [
|
||||
{value: 'explore', label: 'Explore Portal'},
|
||||
{value: 'connect', label: 'Connect portal'},
|
||||
{value: 'monitor', label: 'Monitor portal'},
|
||||
{value: 'community', label: 'Community Gateway'},
|
||||
{value: 'funder', label: StakeholderEntities.FUNDER + ' Dashboard'},
|
||||
{value: 'ri', label: StakeholderEntities.RI + ' Dashboard'},
|
||||
{value: 'organization', label: StakeholderEntities.ORGANIZATION + ' Dashboard'},
|
||||
{value: 'project', label: StakeholderEntities.PROJECT + ' Dashboard'}
|
||||
{value: 'funder', label: StakeholderConfiguration.ENTITIES.funder + ' ' + StakeholderConfiguration.ENTITIES.stakeholder},
|
||||
{value: 'ri', label: StakeholderConfiguration.ENTITIES.ri + ' ' + StakeholderConfiguration.ENTITIES.stakeholder},
|
||||
{value: 'organization', label: StakeholderConfiguration.ENTITIES.organization + ' ' + StakeholderConfiguration.ENTITIES.stakeholder},
|
||||
{value: 'project', label: StakeholderConfiguration.ENTITIES.project + ' ' + StakeholderConfiguration.ENTITIES.stakeholder},
|
||||
{value: 'country', label: StakeholderConfiguration.ENTITIES.country + ' ' + StakeholderConfiguration.ENTITIES.stakeholder},
|
||||
];
|
||||
|
||||
}
|
||||
|
|
|
@ -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]
|
||||
|
|
|
@ -132,42 +132,6 @@ export class PageContentComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||
this.sticky.footer = UIkit.sticky(this.sticky_footer.nativeElement, {end: true, offset: footer_offset});
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
*
|
||||
* Should be smooth
|
||||
*
|
||||
* */
|
||||
private observeBottom() {
|
||||
let bottom = document.getElementById('bottom');
|
||||
if (bottom) {
|
||||
let bottomObs = new IntersectionObserver(entries => {
|
||||
entries.forEach(entry => {
|
||||
this.shouldSticky = !entry.isIntersecting;
|
||||
})
|
||||
});
|
||||
this.subscriptions.push(bottomObs);
|
||||
bottomObs.observe(bottom);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* */
|
||||
private observeHeader() {
|
||||
if (this.header) {
|
||||
let headerObs = new IntersectionObserver(entries => {
|
||||
entries.forEach(entry => {
|
||||
if (entry.boundingClientRect.height > 0) {
|
||||
this.layoutService.setReplaceHeader(!entry.isIntersecting);
|
||||
}
|
||||
})
|
||||
});
|
||||
this.subscriptions.push(headerObs);
|
||||
headerObs.observe(this.header.nativeElement);
|
||||
}
|
||||
}
|
||||
|
||||
private observeStickyFooter() {
|
||||
if (this.sticky_footer) {
|
||||
let resizeObs = new ResizeObserver(entries => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import {Injectable} from "@angular/core";
|
||||
import {AfterViewInit, Injectable} from "@angular/core";
|
||||
import {BehaviorSubject, Observable, Subscriber} from "rxjs";
|
||||
import {ActivationStart, Router} from "@angular/router";
|
||||
import {Icon} from "../../../sharedComponents/menu";
|
||||
|
@ -83,7 +83,16 @@ export class LayoutService {
|
|||
* Add hasStickyHeaderOnMobile: true in order to activate uk-sticky in header of mobile/tablet devices.
|
||||
* */
|
||||
private hasStickyHeaderOnMobileSubject: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);
|
||||
|
||||
/**
|
||||
* Add a class in root element of the html. (For different theme apply)
|
||||
* Handle it manually in the component, it doesn't use data
|
||||
* */
|
||||
private rootClassSubject: BehaviorSubject<string> = new BehaviorSubject<string>(null);
|
||||
/**
|
||||
* Display help pop-up on non-admin pages. (default true for the rest of the pages)
|
||||
* */
|
||||
private hasHelpPopUpSubject: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(true);
|
||||
private isBottomIntersectingSubject: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);
|
||||
private subscriptions: any[] = [];
|
||||
|
||||
ngOnDestroy() {
|
||||
|
@ -111,6 +120,20 @@ export class LayoutService {
|
|||
this.subscriptions.push(resizeObs);
|
||||
resizeObs.observe(document.documentElement);
|
||||
}
|
||||
if(typeof document !== "undefined") {
|
||||
setTimeout(() => {
|
||||
let bottom = document.getElementById('bottom');
|
||||
if (bottom) {
|
||||
let bottomObs = new IntersectionObserver(entries => {
|
||||
entries.forEach(entry => {
|
||||
this.isBottomIntersectingSubject.next(entry.isIntersecting);
|
||||
})
|
||||
});
|
||||
this.subscriptions.push(bottomObs);
|
||||
bottomObs.observe(bottom);
|
||||
}
|
||||
}, 500)
|
||||
}
|
||||
}
|
||||
|
||||
constructor(private router: Router) {
|
||||
|
@ -329,4 +352,26 @@ export class LayoutService {
|
|||
setHasStickyHeaderOnMobile(value: boolean) {
|
||||
this.hasStickyHeaderOnMobileSubject.next(value);
|
||||
}
|
||||
|
||||
get rootClass(): Observable<string> {
|
||||
return this.rootClassSubject.asObservable();
|
||||
}
|
||||
|
||||
setRootClass(value: string = null): void {
|
||||
if(this.rootClassSubject.value != value) {
|
||||
this.rootClassSubject.next(value);
|
||||
}
|
||||
}
|
||||
|
||||
get hasHelpPopUp(): Observable<boolean> {
|
||||
return this.hasHelpPopUpSubject.asObservable();
|
||||
}
|
||||
|
||||
setHasHelpPopUp(value: boolean) {
|
||||
this.hasHelpPopUpSubject.next(value);
|
||||
}
|
||||
|
||||
get isBottomIntersecting(): Observable<boolean> {
|
||||
return this.isBottomIntersectingSubject.asObservable();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,6 +28,9 @@
|
|||
[class.hide-on-close]="backItem.icon">{{backItem.title}}</span>
|
||||
</a>
|
||||
</div>
|
||||
<div *ngIf="logoURL" id="sidebar_logo" class="uk-margin-top">
|
||||
<img [src]="logoURL">
|
||||
</div>
|
||||
<div *ngIf="items.length > 0" class="menu_section uk-margin-large-top" [class.mobile]="mobile" style="min-height: 30vh">
|
||||
<ul #nav class="uk-list uk-nav" [class.uk-list-large]="mobile"
|
||||
[class.uk-nav-default]="!mobile" [class.uk-nav-primary]="mobile" uk-nav="duration: 400">
|
||||
|
@ -37,7 +40,7 @@
|
|||
<a [routerLink]="getItemRoute(item)" [title]="item.title" (click)="item.items.length === 0?closeOffcanvas():null"
|
||||
[queryParams]="item.route?item.params:null" [queryParamsHandling]="item.route?queryParamsHandling:null" class="uk-flex uk-flex-middle">
|
||||
<div *ngIf="item.icon && (item.icon.svg || item.icon.name)" class="uk-width-auto">
|
||||
<icon class="menu-icon" [customClass]="item.icon.class" [name]="item.icon.name" ratio="0.9" [svg]="item.icon.svg" [flex]="true"></icon>
|
||||
<icon class="menu-icon" [customClass]="item.icon.class" [name]="item.icon.name" [ratio]="item.icon.ratio?item.icon.ratio:0.9" [svg]="item.icon.svg" [flex]="true"></icon>
|
||||
</div>
|
||||
<span [class.hide-on-close]="item.icon" class="uk-width-expand@l uk-text-truncate uk-margin-small-left">{{item.title}}</span>
|
||||
<span *ngIf="item.items.length > 0" class="uk-nav-parent-icon hide-on-close"></span>
|
||||
|
|
|
@ -28,6 +28,7 @@ export class SideBarComponent implements OnInit, AfterViewInit, OnDestroy, OnCha
|
|||
@Input() activeSubItem: string = '';
|
||||
@Input() backItem: MenuItem = null;
|
||||
@Input() queryParamsHandling;
|
||||
@Input() logoURL: string;
|
||||
@ViewChild("nav") nav: ElementRef;
|
||||
@ViewChild("sidebar_offcanvas") sidebar_offcanvas: ElementRef;
|
||||
public offset: number;
|
||||
|
|
|
@ -0,0 +1,48 @@
|
|||
import {ChangeDetectorRef, Directive, OnInit} from "@angular/core";
|
||||
import {BaseComponent} from "../../../sharedComponents/base/base.component";
|
||||
import {MenuItem} from "../../../sharedComponents/menu";
|
||||
import {LayoutService} from "./layout.service";
|
||||
|
||||
@Directive()
|
||||
export class SidebarBaseComponent extends BaseComponent implements OnInit {
|
||||
hasSidebar: boolean = false;
|
||||
hasInternalSidebar: boolean = false;
|
||||
hasAdminMenu: boolean = false;
|
||||
/**
|
||||
* Menu Items
|
||||
* */
|
||||
sideBarItems: MenuItem[] = [];
|
||||
adminMenuItems: MenuItem[] = [];
|
||||
backItem: MenuItem = null;
|
||||
|
||||
protected layoutService: LayoutService;
|
||||
protected cdr: ChangeDetectorRef;
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.subscriptions.push(this.layoutService.hasSidebar.subscribe(hasSidebar => {
|
||||
this.hasSidebar = hasSidebar;
|
||||
this.cdr.detectChanges();
|
||||
}));
|
||||
this.subscriptions.push(this.layoutService.hasInternalSidebar.subscribe(hasInternalSidebar => {
|
||||
this.hasInternalSidebar = hasInternalSidebar;
|
||||
this.cdr.detectChanges();
|
||||
}));
|
||||
this.subscriptions.push(this.layoutService.hasAdminMenu.subscribe(hasAdminMenu => {
|
||||
this.hasAdminMenu = hasAdminMenu;
|
||||
this.cdr.detectChanges();
|
||||
}));
|
||||
this.layoutService.setOpen(true);
|
||||
}
|
||||
|
||||
public get open() {
|
||||
return this.layoutService.open;
|
||||
}
|
||||
|
||||
public get hover() {
|
||||
return this.layoutService.hover;
|
||||
}
|
||||
}
|
|
@ -8,26 +8,26 @@
|
|||
<div class="uk-flex uk-flex-left@m uk-flex-center uk-width-expand">
|
||||
<ul class="uk-subnav uk-subnav-pill">
|
||||
<li [class.uk-active]="showCurrent" (click)="showCurrent = true">
|
||||
<a class="uk-text-capitalize">{{role}}s</a>
|
||||
<a class="uk-text-capitalize">{{roleUtils.roles[role]}}s</a>
|
||||
</li>
|
||||
<li [class.uk-active]="!showCurrent" (click)="showCurrent = false">
|
||||
<a>Pending {{role}}s</a>
|
||||
<a>Pending {{roleUtils.roles[role]}}s</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="uk-width-expand@m uk-width-1-1 uk-grid uk-flex-right@m uk-flex-center uk-flex-middle" uk-grid>
|
||||
<div *ngIf="showCurrent" [disabled]="loadActive" search-input class="uk-width-expand@l uk-width-1-1"
|
||||
[searchControl]="filterForm.get('active')" [expandable]="true" [placeholder]="'Search ' + role + 's'" searchInputClass="outer">
|
||||
[searchControl]="filterForm.get('active')" [expandable]="true" [placeholder]="'Search ' + roleUtils.roles[role] + 's'" searchInputClass="outer">
|
||||
</div>
|
||||
<div *ngIf="!showCurrent" [disabled]="loadPending" search-input class="uk-width-expand@l uk-width-1-1"
|
||||
[searchControl]="filterForm.get('pending')" [expandable]="true" [placeholder]="'Search invitations'" searchInputClass="outer">
|
||||
</div>
|
||||
<div>
|
||||
<button *ngIf="exists" class="uk-button uk-button-default uk-flex uk-flex-middle"
|
||||
<button *ngIf="canInvite" class="uk-button uk-button-default uk-flex uk-flex-middle"
|
||||
[attr.uk-tooltip]="inviteDisableMessage" [class.uk-disabled]="loadPending || loadPending"
|
||||
[disabled]="loadActive || loadPending || !!inviteDisableMessage" (click)="openInviteModal()">
|
||||
<icon name="person_add" [flex]="true" type="filled"></icon>
|
||||
<span class="uk-margin-small-left uk-text-bold uk-text-uppercase">Invite {{role}}</span>
|
||||
<span class="uk-margin-small-left uk-text-bold uk-text-uppercase">Invite {{roleUtils.roles[role]}}</span>
|
||||
</button>
|
||||
<button *ngIf="!exists && isCurator" class="uk-button uk-button-default uk-flex uk-flex-middle"
|
||||
(click)="openCreateRoleModal()">
|
||||
|
@ -47,16 +47,16 @@
|
|||
<div *ngIf="!loadActive && !loadPending">
|
||||
<div *ngIf="(showCurrent && showActive.length == 0) || (!showCurrent && showPending.length == 0)"
|
||||
class="uk-card uk-card-default uk-padding-large uk-text-center uk-margin-bottom uk-text-bold">
|
||||
<div *ngIf="showCurrent">No {{role}}s found</div>
|
||||
<div *ngIf="!showCurrent">No pending {{role}} invitations found</div>
|
||||
<div *ngIf="showCurrent">No {{roleUtils.roles[role]}}s found</div>
|
||||
<div *ngIf="!showCurrent">No pending {{roleUtils.roles[role]}} invitations found</div>
|
||||
</div>
|
||||
<div *ngIf="(showCurrent && showActive.length > 0) || (!showCurrent && showPending.length > 0)">
|
||||
<no-load-paging *ngIf="showCurrent" [type]="(showActive.length > 1)?(role + 's'):role"
|
||||
<no-load-paging *ngIf="showCurrent" [type]="(showActive.length > 1)?(roleUtils.roles[role] + 's'):role"
|
||||
(pageChange)="updateActivePage($event)"
|
||||
[page]="activePage" [pageSize]="pageSize"
|
||||
[totalResults]="showActive.length">
|
||||
</no-load-paging>
|
||||
<no-load-paging *ngIf="!showCurrent" [type]="role + ' ' + (showPending.length > 1?'invitations':'invitation')"
|
||||
<no-load-paging *ngIf="!showCurrent" [type]="roleUtils.roles[role] + ' ' + (showPending.length > 1?'invitations':'invitation')"
|
||||
(pageChange)="updatePendingPage($event)"
|
||||
[page]="pendingPage" [pageSize]="pageSize"
|
||||
[totalResults]="showPending.length">
|
||||
|
@ -109,12 +109,12 @@
|
|||
</modal-alert>
|
||||
<modal-alert #deleteModal [overflowBody]="false" (alertOutput)="deleteActive()" classTitle="uk-background-primary uk-light">
|
||||
<div *ngIf="selectedUser">
|
||||
Are you sure you want to remove <span class="uk-text-bold">{{selectedUser}}</span> from {{role}}s?
|
||||
Are you sure you want to remove <span class="uk-text-bold">{{selectedUser}}</span> from {{roleUtils.roles[role]}}s?
|
||||
</div>
|
||||
</modal-alert>
|
||||
<modal-alert #deletePendingModal [overflowBody]="false" (alertOutput)="deletePending()" classTitle="uk-background-primary uk-light">
|
||||
<div *ngIf="selectedUser">
|
||||
Are you sure you want to cancel {{role}} invitation of <span class="uk-text-bold">{{selectedUser}}</span>?
|
||||
Are you sure you want to cancel {{roleUtils.roles[role]}} invitation of <span class="uk-text-bold">{{selectedUser}}</span>?
|
||||
</div>
|
||||
</modal-alert>
|
||||
<modal-alert #createRoleModal [overflowBody]="false" (alertOutput)="createGroup()" classTitle="uk-background-primary uk-light"
|
||||
|
|
|
@ -8,19 +8,12 @@ import {
|
|||
SimpleChanges,
|
||||
ViewChild
|
||||
} from '@angular/core';
|
||||
import {
|
||||
UntypedFormArray,
|
||||
UntypedFormBuilder,
|
||||
UntypedFormControl,
|
||||
UntypedFormGroup,
|
||||
ValidatorFn,
|
||||
Validators
|
||||
} from '@angular/forms';
|
||||
import {UntypedFormArray, UntypedFormBuilder, UntypedFormGroup, ValidatorFn, Validators} from '@angular/forms';
|
||||
import {AlertModal} from "../../../utils/modal/alert";
|
||||
import {UserRegistryService} from "../../../services/user-registry.service";
|
||||
import {EnvProperties} from "../../../utils/properties/env-properties";
|
||||
import {properties} from "../../../../../environments/environment";
|
||||
import {Role, Session, User} from "../../../login/utils/helper.class";
|
||||
import {Role, RoleUtils, Session, User} from "../../../login/utils/helper.class";
|
||||
import {UserManagementService} from "../../../services/user-management.service";
|
||||
import {Router} from "@angular/router";
|
||||
import {StringUtils} from "../../../utils/string-utils.class";
|
||||
|
@ -29,8 +22,8 @@ import {forkJoin, of, Subscription} from "rxjs";
|
|||
import {NotificationHandler} from "../../../utils/notification-handler";
|
||||
import {ClearCacheService} from "../../../services/clear-cache.service";
|
||||
import {catchError, map, tap} from "rxjs/operators";
|
||||
import notification = CKEDITOR.plugins.notification;
|
||||
import {InputComponent} from "../../../sharedComponents/input/input.component";
|
||||
import {StakeholderUtils} from "../../../monitor-admin/utils/indicator-utils";
|
||||
|
||||
class InvitationResponse {
|
||||
email: string;
|
||||
|
@ -51,7 +44,9 @@ export class RoleUsersComponent implements OnInit, OnDestroy, OnChanges {
|
|||
@Input()
|
||||
public id: string;
|
||||
@Input()
|
||||
public type: string;
|
||||
set type(type: string) {
|
||||
this._type = Role.mapType(type);
|
||||
}
|
||||
@Input()
|
||||
public name: string;
|
||||
@Input()
|
||||
|
@ -61,6 +56,8 @@ export class RoleUsersComponent implements OnInit, OnDestroy, OnChanges {
|
|||
@Input()
|
||||
public deleteAuthorizationLevel: 'curator' | 'manager' = 'curator';
|
||||
@Input()
|
||||
public inviteAuthorizationLevel: 'curator' | 'manager' = 'manager';
|
||||
@Input()
|
||||
public message: string = null;
|
||||
@Input()
|
||||
public emailComposer: Function;
|
||||
|
@ -94,12 +91,14 @@ export class RoleUsersComponent implements OnInit, OnDestroy, OnChanges {
|
|||
@ViewChild('deleteModal') deleteModal: AlertModal;
|
||||
@ViewChild('deletePendingModal') deletePendingModal: AlertModal;
|
||||
@ViewChild('createRoleModal') createRoleModal: AlertModal;
|
||||
public stakeholderUtils: StakeholderUtils = new StakeholderUtils();
|
||||
public roleUtils: RoleUtils = new RoleUtils();
|
||||
private _type: string;
|
||||
|
||||
constructor(private userRegistryService: UserRegistryService,
|
||||
private userManagementService: UserManagementService,
|
||||
private clearCacheService: ClearCacheService,
|
||||
private notificationService: NotificationService,
|
||||
private router: Router,
|
||||
private cdr: ChangeDetectorRef,
|
||||
private fb: UntypedFormBuilder) {
|
||||
}
|
||||
|
@ -148,9 +147,8 @@ export class RoleUsersComponent implements OnInit, OnDestroy, OnChanges {
|
|||
updateLists() {
|
||||
this.loadActive = true;
|
||||
this.loadPending = true;
|
||||
this.subs.push(this.userRegistryService.getActive(this.type, this.id, this.role).subscribe(users => {
|
||||
this.subs.push(this.userRegistryService.getActive(this._type, this.id, this.role, true).subscribe(users => {
|
||||
this.active = users;
|
||||
// users.forEach(user => this.active.push(user));
|
||||
this.filterActiveBySearch(this.filterForm.value.active);
|
||||
this.loadActive = false;
|
||||
this.exists = true;
|
||||
|
@ -162,7 +160,7 @@ export class RoleUsersComponent implements OnInit, OnDestroy, OnChanges {
|
|||
}
|
||||
this.loadActive = false;
|
||||
}));
|
||||
this.subs.push(this.userRegistryService.getPending(this.type, this.id, this.role).subscribe(users => {
|
||||
this.subs.push(this.userRegistryService.getPending(this._type, this.id, this.role, true).subscribe(users => {
|
||||
this.pending = users;
|
||||
this.filterPendingBySearch(this.filterForm.value.pending);
|
||||
this.loadPending = false;
|
||||
|
@ -191,7 +189,7 @@ export class RoleUsersComponent implements OnInit, OnDestroy, OnChanges {
|
|||
openDeleteModal(item: any) {
|
||||
if (this.showCurrent) {
|
||||
this.selectedUser = item.email;
|
||||
this.deleteModal.alertTitle = 'Delete ' + this.role;
|
||||
this.deleteModal.alertTitle = 'Delete ' + this.roleUtils.roles[this.role];
|
||||
this.deleteModal.open();
|
||||
} else {
|
||||
this.selectedUser = item;
|
||||
|
@ -201,7 +199,7 @@ export class RoleUsersComponent implements OnInit, OnDestroy, OnChanges {
|
|||
}
|
||||
|
||||
openInviteModal() {
|
||||
this.inviteModal.alertTitle = 'Invite ' + this.role;
|
||||
this.inviteModal.alertTitle = 'Invite ' + this.roleUtils.roles[this.role];
|
||||
this.inviteModal.okButtonLeft = false;
|
||||
this.inviteModal.okButtonText = 'Send';
|
||||
this.emailsForm = this.fb.array([], Validators.required);
|
||||
|
@ -214,8 +212,8 @@ export class RoleUsersComponent 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();
|
||||
|
@ -226,7 +224,7 @@ export class RoleUsersComponent implements OnInit, OnDestroy, OnChanges {
|
|||
|
||||
deleteActive() {
|
||||
this.loadActive = true;
|
||||
this.subs.push(this.userRegistryService.remove(this.type, this.id, this.selectedUser, this.role).subscribe(() => {
|
||||
this.subs.push(this.userRegistryService.remove(this._type, this.id, this.selectedUser, this.role).subscribe(() => {
|
||||
this.active = this.active.filter(user => user.email != this.selectedUser);
|
||||
if (this.currentActivePage.length === 0) {
|
||||
this.activePage = 1;
|
||||
|
@ -244,13 +242,13 @@ export class RoleUsersComponent implements OnInit, OnDestroy, OnChanges {
|
|||
|
||||
deletePending() {
|
||||
this.loadPending = true;
|
||||
this.subs.push(this.userRegistryService.cancelInvitation(this.type, this.id, this.selectedUser, this.role).subscribe(() => {
|
||||
this.subs.push(this.userRegistryService.cancelInvitation(this._type, this.id, this.selectedUser, this.role).subscribe(() => {
|
||||
this.pending = this.pending.filter(user => user != this.selectedUser);
|
||||
this.filterPendingBySearch(this.filterForm.value.pending);
|
||||
if (this.currentPendingPage.length === 0) {
|
||||
this.pendingPage = 1;
|
||||
}
|
||||
NotificationHandler.rise(StringUtils.capitalize(this.role) + ' invitation to ' + this.selectedUser + ' has been <b>canceled</b>');
|
||||
NotificationHandler.rise(StringUtils.capitalize(this.roleUtils.roles[this.role]) + ' invitation to ' + this.selectedUser + ' has been <b>canceled</b>');
|
||||
this.loadPending = false;
|
||||
}, error => {
|
||||
NotificationHandler.rise('An error has occurred. Please try again later', 'danger');
|
||||
|
@ -271,12 +269,12 @@ export class RoleUsersComponent implements OnInit, OnDestroy, OnChanges {
|
|||
let current = null;
|
||||
let invitations = (<Array<any>>this.emailsForm.value).map(email => {
|
||||
current = email;
|
||||
return this.userRegistryService.invite(this.type, this.id, {
|
||||
return this.userRegistryService.invite(this._type, this.id, {
|
||||
link: this.link,
|
||||
email: this.emailComposer(this.name, email, this.role)
|
||||
}, this.role).pipe(map(invitation => new InvitationResponse(email, invitation), catchError(error => {
|
||||
return of(new InvitationResponse(current, null));
|
||||
})));
|
||||
}, this.role).pipe(catchError(error => {
|
||||
return of(null);
|
||||
}), map(invitation => new InvitationResponse(email, invitation)));
|
||||
});
|
||||
this.subs.push(forkJoin(invitations).subscribe(responses => {
|
||||
let notifications = responses.map(response => {
|
||||
|
@ -285,7 +283,7 @@ export class RoleUsersComponent implements OnInit, OnDestroy, OnChanges {
|
|||
if (!this.pending.includes(response.email)) {
|
||||
this.pending.push(response.email);
|
||||
}
|
||||
if(this.notificationFn) {
|
||||
if(this.notificationFn && properties.notificationsAPIURL) {
|
||||
return this.notificationService.sendNotification(this.notificationFn(this.name, response.email, this.role, response.invitation)).pipe(map(notification => {
|
||||
return notification;
|
||||
}), tap(() => {
|
||||
|
@ -298,7 +296,8 @@ export class RoleUsersComponent implements OnInit, OnDestroy, OnChanges {
|
|||
return of(null);
|
||||
}
|
||||
} else {
|
||||
NotificationHandler.rise('An error has occurred while sending the invitation mail to ' + response.email + '.Please try again later', 'danger');
|
||||
NotificationHandler.rise('An error has occurred while sending the invitation mail to ' +
|
||||
response.email + '.Check if the user is already a ' + this.roleUtils.roles[this.role] + ' or try again later', 'danger');
|
||||
return of(null);
|
||||
}
|
||||
});
|
||||
|
@ -313,12 +312,12 @@ export class RoleUsersComponent implements OnInit, OnDestroy, OnChanges {
|
|||
createGroup() {
|
||||
this.loadActive = true;
|
||||
this.loadPending = true;
|
||||
this.userRegistryService.createRole(this.type, this.id).subscribe(() => {
|
||||
this.userRegistryService.createRole(this._type, this.id).subscribe(() => {
|
||||
NotificationHandler.rise('Group has been <b> successfully created</b>');
|
||||
this.updateLists();
|
||||
}, error => {
|
||||
if(error.status === 409) {
|
||||
NotificationHandler.rise('Group already exists. You can try to invite a ' + this.role + ' instead.', 'warning');
|
||||
NotificationHandler.rise('Group already exists. You can try to invite a ' + this.roleUtils.roles[this.role] + ' instead.', 'warning');
|
||||
this.updateLists();
|
||||
} else {
|
||||
NotificationHandler.rise('An error has occurred. Please try again later', 'danger');
|
||||
|
@ -331,17 +330,21 @@ export class RoleUsersComponent implements OnInit, OnDestroy, OnChanges {
|
|||
public get canDelete() {
|
||||
return (this.deleteAuthorizationLevel === 'curator'?this.isCurator:this.isManager);
|
||||
}
|
||||
|
||||
public get canInvite() {
|
||||
return this.exists && (this.inviteAuthorizationLevel === 'curator'?this.isCurator:this.isManager);
|
||||
}
|
||||
|
||||
public isMe(userId: string) {
|
||||
return userId && userId.includes(this.user.id) && !this.isCurator;
|
||||
}
|
||||
|
||||
public get isManager(): boolean {
|
||||
return this.isCurator || !!Session.isManager(this.type, this.id, this.user);
|
||||
return this.isCurator || !!Session.isManager(this._type, this.id, this.user);
|
||||
}
|
||||
|
||||
public get isCurator(): boolean {
|
||||
return this.isPortalAdmin || !!Session.isCurator(this.type, this.user);
|
||||
return this.isPortalAdmin || !!Session.isCurator(this._type, this.user);
|
||||
}
|
||||
|
||||
public get isPortalAdmin(): boolean {
|
||||
|
|
|
@ -105,7 +105,7 @@ export class SubscribersComponent implements OnInit, OnDestroy, OnChanges {
|
|||
|
||||
updateList() {
|
||||
this.loading = true;
|
||||
this.subs.push( this.userRegistryService.getActive(this.type, this.id, 'member').subscribe(users => {
|
||||
this.subs.push( this.userRegistryService.getActive(this.type, this.id, 'member', true).subscribe(users => {
|
||||
this.subscribers = users;
|
||||
this.filterBySearch(this.filterForm.value.keyword);
|
||||
this.loading = false;
|
||||
|
@ -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();
|
||||
|
|
|
@ -15,7 +15,7 @@ import {FullScreenModalComponent} from '../utils/modal/full-screen-modal/full-sc
|
|||
@Component({
|
||||
selector: 'deposit-first-page',
|
||||
template: `
|
||||
<div class="deposit">
|
||||
<div>
|
||||
<div class="uk-container uk-container-large uk-section uk-section-small uk-padding-remove-bottom">
|
||||
<div class="uk-padding-small uk-padding-remove-horizontal">
|
||||
<breadcrumbs [breadcrumbs]="breadcrumbs"></breadcrumbs>
|
||||
|
|
|
@ -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
|
||||
]
|
||||
|
|
|
@ -11,7 +11,7 @@ import * as url from "url";
|
|||
@Injectable()
|
||||
export class ErrorInterceptorService implements HttpInterceptor {
|
||||
|
||||
private static UNAUTHORIZED_WHITELIST = [properties.userInfoUrl, properties.orcidAPIURL, properties.registryUrl? (properties.registryUrl + 'verification/'):null, properties.eoscDataTransferAPI].filter(value => !!value);
|
||||
private static UNAUTHORIZED_WHITELIST = [properties.orcidAPIURL, properties.registryUrl? (properties.registryUrl + 'verification/'):null, properties.eoscDataTransferAPI].filter(value => !!value);
|
||||
private url: string = null;
|
||||
|
||||
constructor(private router: Router) {
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -32,13 +32,15 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="uk-width-2-5@m uk-width-1-1@s uk-text-center" uk-scrollspy-class>
|
||||
<img src="assets/common-assets/fos/fos-hero-img.svg" loading="lazy">
|
||||
<img src="assets/common-assets/fos/fos-hero-img.svg" loading="lazy" alt="FoS logo">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="fos?.length" class="uk-container uk-container-large uk-section" uk-scrollspy="target: [uk-scrollspy-class]; cls: uk-animation-slide-bottom-medium; delay: 200">
|
||||
|
||||
<div *ngIf="fos?.length" id="levels" class="uk-container uk-container-large uk-section"
|
||||
uk-scrollspy="target: [uk-scrollspy-class]; cls: uk-animation-slide-bottom-medium; delay: 200">
|
||||
<div class="uk-visible@m">
|
||||
<div uk-sticky="offset: 50;" class="uk-sticky uk-background-default uk-padding uk-padding-remove-bottom uk-padding-remove-horizontal">
|
||||
<div id="keyword_search" uk-sticky="offset: 50;" class="uk-sticky uk-background-default uk-padding uk-padding-remove-bottom uk-padding-remove-horizontal">
|
||||
<div class="uk-flex uk-flex-right uk-margin-small-bottom">
|
||||
<div search-input [searchControl]="keywordControl" [options]="fosOptions" iconPosition="left" placeholder="Write a key word to filter the content"
|
||||
searchInputClass="border-bottom" class="uk-width-large"></div>
|
||||
|
@ -53,11 +55,29 @@
|
|||
<ul *ngIf="!keyword" class="uk-tab uk-tab-left">
|
||||
<li *ngFor="let item of fos; index as i" [class.uk-active]="activeSection === item.id"
|
||||
class="uk-margin-small-bottom uk-text-capitalize">
|
||||
<a routerLink="./" [fragment]="item.id">{{item.id}}</a>
|
||||
<a (click)="selectedParentLevels=[]" routerLink="./" [fragment]="item.id">
|
||||
<div>
|
||||
{{item.id}}
|
||||
<ng-container *ngIf="selectedParentLevels.length > 0 && selectedParentLevels[0].id==item.id">
|
||||
<div class="uk-margin-left uk-margin-xsmall-top">
|
||||
<span class="uk-flex uk-flex-middle">
|
||||
<icon [flex]="true" ratio="1" name="subdirectory_arrow_right"></icon>
|
||||
{{selectedParentLevels[1].id}}
|
||||
</span>
|
||||
<div class="uk-margin-left uk-margin-xsmall-top">
|
||||
<span class="uk-flex uk-flex-middle">
|
||||
<icon [flex]="true" ratio="1" name="subdirectory_arrow_right"></icon>
|
||||
{{selectedParentLevels[2].label}}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</ng-container>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<ul *ngIf="keyword?.length" class="uk-tab uk-tab-left">
|
||||
<li *ngFor="let item of viewResults; index as i"
|
||||
<li *ngFor="let item of viewResults; index as i"
|
||||
class="uk-margin-small-bottom uk-text-capitalize" [class.uk-active]="activeSection === item.id">
|
||||
<a routerLink="./" [fragment]="item.id">{{item.id}}</a>
|
||||
</li>
|
||||
|
@ -91,7 +111,34 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="uk-width-expand@m">
|
||||
<ng-container *ngIf="!keyword">
|
||||
<div *ngIf="!keyword && selectedParentLevels.length > 0" [id]="selectedParentLevels[0].id+'||'+selectedParentLevels[1].code+'||'+selectedParentLevels[2].code">
|
||||
<a (click)="backClicked();"
|
||||
class="uk-button-link uk-flex uk-flex-middle uk-margin-bottom">
|
||||
<icon name="arrow_back" visuallyHidden="back" flex="true" ratio="1"></icon>
|
||||
<span class="uk-margin-small-left">Back</span>
|
||||
</a>
|
||||
<div>
|
||||
<h2 class="uk-h4 uk-text-capitalize uk-margin-remove">
|
||||
<a [routerLink]="properties.searchLinkToResults" [queryParams]="buildFosQueryParam(selectedParentLevels[2])"
|
||||
class="uk-link-text">
|
||||
{{selectedParentLevels[2].label}}
|
||||
</a>
|
||||
</h2>
|
||||
<div class="uk-grid uk-child-width-1-3 uk-margin-large-top uk-margin-xlarge-bottom" uk-grid="masonry: false">
|
||||
<div *ngFor="let level4 of selectedParentLevels[2].children">
|
||||
<div class="uk-text-capitalize">
|
||||
<h3 class="uk-h6 uk-margin-small-bottom">
|
||||
<a [routerLink]="properties.searchLinkToResults" [queryParams]="buildFosQueryParam(level4)"
|
||||
class="uk-link-text">
|
||||
{{level4.label}}
|
||||
</a>
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<ng-container *ngIf="!keyword && selectedParentLevels.length == 0">
|
||||
<div [id]="item.id" *ngFor="let item of fos; index as i">
|
||||
<div class="uk-text-capitalize">
|
||||
<h2 class="uk-h4 uk-margin-remove">
|
||||
|
@ -110,12 +157,51 @@
|
|||
{{child.id}}
|
||||
</a>
|
||||
</h3>
|
||||
<div *ngFor="let subChild of child.children" style="margin-bottom: 5px;">
|
||||
<a [routerLink]="properties.searchLinkToResults" [queryParams]="buildFosQueryParam(subChild)"
|
||||
class="uk-link-text">
|
||||
{{searchFieldsHelper.getFosParameter() == 'foslabel' ? subChild.label : subChild.id}}
|
||||
</a>
|
||||
</div>
|
||||
<!-- class="parent uk-transition-toggle" tabindex="0"-->
|
||||
<div *ngFor="let subChild of child.children; let i=index" style="margin-bottom: 7px;"
|
||||
class="uk-flex uk-flex-middle uk-flex-between uk-transition-toggle" tabindex="0">
|
||||
<!-- <span class="uk-flex uk-flex-between">-->
|
||||
<a [routerLink]="properties.searchLinkToResults" [queryParams]="buildFosQueryParam(subChild)"
|
||||
class="uk-link-text uk-width-expand">
|
||||
{{searchFieldsHelper.getFosParameter() == 'foslabel' ? subChild.label : subChild.id}}
|
||||
</a>
|
||||
<span *ngIf="properties.environment == 'development' && subChild.children?.length > 0" (click)="moreClicked(item, child, subChild)"
|
||||
class="uk-transition-fade uk-width-auto uk-flex uk-flex-middle uk-margin-left label4 uk-text-small uk-text-meta">
|
||||
<!-- <a class="view-more-less-link uk-link-text uk-text-lowercase">-->
|
||||
<!-- +{{subChild.children.length}} more-->
|
||||
<!--<!– <icon [flex]="true" ratio="1" name="chevron_right"></icon>–>-->
|
||||
<!-- </a>-->
|
||||
|
||||
<icon [flex]="true" ratio="0.7" name="subdirectory_arrow_right"></icon>
|
||||
<a class="uk-link-text uk-text-lowercase">
|
||||
more
|
||||
</a>
|
||||
</span>
|
||||
|
||||
<!-- <div *ngIf="subChild.children?.length > 0" (click)="selectedParentLevels=[item, child, subChild]"-->
|
||||
<!-- class="uk-flex uk-flex-middle uk-margin-left label4 uk-text-small uk-text-meta">-->
|
||||
<!-- <a class="uk-link-text">{{subChild.children.length}} Subcategories</a>-->
|
||||
<!-- <icon [flex]="true" ratio="1" name="chevron_right"></icon>-->
|
||||
<!-- </div>-->
|
||||
|
||||
<!-- <span *ngIf="subChild?.children?.length > 0" (click)="fosAccordions.set(subChild.id, !fosAccordions.get(subChild.id))" class="uk-accordion-title uk-padding-remove"></span>-->
|
||||
<!-- </span>-->
|
||||
<!-- <div *ngIf="fosAccordions.get(subChild.id)" class="uk-margin-left">-->
|
||||
<!-- <div *ngFor="let level4 of subChild.children" style="margin-bottom: 7px;">-->
|
||||
<!-- <a [routerLink]="properties.searchLinkToResults" [queryParams]="buildFosQueryParam(level4)"-->
|
||||
<!-- class="label4 uk-text-small uk-text-meta">-->
|
||||
<!-- {{searchFieldsHelper.getFosParameter() == 'foslabel' ? level4.label : level4.id}}-->
|
||||
<!-- </a>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
|
||||
<!-- uk-transition-slide-top-->
|
||||
<!-- <div *ngIf="subChild.children?.length > 0" class="uk-transition-slide-top">-->
|
||||
<!-- <div class="child">-->
|
||||
<!-- <a class="uk-link uk-margin-left">{{subChild.children.length}} Subcategories ></a>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -137,10 +223,16 @@
|
|||
class="uk-link-text" [innerHTML]="highlightKeyword(subItem.id)">
|
||||
</a>
|
||||
</h3>
|
||||
<div *ngFor="let subSubItem of subItem.children" style="margin-bottom: 5px;">
|
||||
<div *ngFor="let subSubItem of subItem.children" style="margin-bottom: 7px;">
|
||||
<a [routerLink]="properties.searchLinkToResults" [queryParams]="buildFosQueryParam(subSubItem)"
|
||||
class="uk-link-text" [innerHTML]="highlightKeyword(searchFieldsHelper.getFosParameter() == 'foslabel' ? subSubItem.label : subSubItem.id)">
|
||||
</a>
|
||||
|
||||
<div *ngFor="let level4 of subSubItem?.children" class="uk-margin-left">
|
||||
<a [routerLink]="properties.searchLinkToResults" [queryParams]="buildFosQueryParam(level4)"
|
||||
class="uk-text-small uk-text-meta uk-margin-xsmall-bottom" [innerHTML]="highlightKeyword(searchFieldsHelper.getFosParameter() == 'foslabel' ? level4.label : level4.id)">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -16,6 +16,7 @@ import {debounceTime, distinctUntilChanged} from "rxjs/operators";
|
|||
import Timeout = NodeJS.Timeout;
|
||||
import {ISVocabulariesService} from "../utils/staticAutoComplete/ISVocabularies.service";
|
||||
import {SearchFields} from "../utils/properties/searchFields";
|
||||
import {HelperFunctions} from "../utils/HelperFunctions.class";
|
||||
|
||||
declare var UIkit;
|
||||
|
||||
|
@ -28,6 +29,8 @@ export class FosComponent implements OnInit, OnDestroy {
|
|||
public url: string = null;
|
||||
public pageTitle: string = "OpenAIRE | Fields of Science";
|
||||
public pageDescription: string = "We have integrated a Field-of-Science (FoS) taxonomy into our dataset to organize and discover research more effectively. Using the full capabilities of the OpenAIRE Graph (full-texts, citations, references, venues) we apply AI and bring forward any multidisciplinarity potential.";
|
||||
public scrollPos = 0;
|
||||
public selectedParentLevels = [];
|
||||
public fos: any[] = [];
|
||||
public fosOptions: string[] = [];
|
||||
public activeSection: string;
|
||||
|
@ -82,21 +85,43 @@ export class FosComponent implements OnInit, OnDestroy {
|
|||
item.classList.remove('uk-active');
|
||||
});
|
||||
if (this.route.snapshot.fragment) {
|
||||
this.activeSection = this.route.snapshot.fragment;
|
||||
let i = this.fos.findIndex(item => item.id == this.route.snapshot.fragment);
|
||||
slider.show(i);
|
||||
let splitFragment = this.route.snapshot.fragment.split("||");
|
||||
this.activeSection = this.route.snapshot.fragment.split("||")[0];
|
||||
let i = this.fos.findIndex(item => (item.id == this.route.snapshot.fragment || this.route.snapshot.fragment.startsWith(item.id+"||")));
|
||||
if(i <0 || i>this.fos.length-1) {
|
||||
this._router.navigate(['./'], {fragment: "", relativeTo: this.route, state: {disableScroll: true}});
|
||||
} else {
|
||||
if (splitFragment.length > 1) {
|
||||
let level1 = this.fos[i];
|
||||
let level2 = null;
|
||||
let level3 = null;
|
||||
if (level1.children) {
|
||||
level2 = level1.children.find(item => item.code == splitFragment[1]);
|
||||
if (level2 && level2.children) {
|
||||
level3 = level2.children.find(item => item.code == splitFragment[2]);
|
||||
this.selectedParentLevels = [this.fos[i], level2, level3];
|
||||
}
|
||||
}
|
||||
if(!level2 || !level3) {
|
||||
this._router.navigate(['./'], {fragment: level1.id, relativeTo: this.route, state: {disableScroll: true}});
|
||||
}
|
||||
} else {
|
||||
slider.show(i);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.activeSection = this.fos[0].id;
|
||||
}
|
||||
this.cdr.detectChanges();
|
||||
});
|
||||
}
|
||||
|
||||
this.subscriptions.push(this.route.fragment.subscribe(fragment => {
|
||||
if(fragment) {
|
||||
this.activeSection = fragment;
|
||||
this.activeSection = fragment.split("||")[0];
|
||||
if(this.tabs) {
|
||||
let slider = UIkit.slider(this.tabs.nativeElement);
|
||||
let i = this.fos.findIndex(item => item.id == fragment);
|
||||
let i = this.fos.findIndex(item => (item.id == fragment || fragment.startsWith(item.id+"||")));
|
||||
slider.show(i);
|
||||
}
|
||||
} else {
|
||||
|
@ -105,13 +130,16 @@ export class FosComponent implements OnInit, OnDestroy {
|
|||
}));
|
||||
this.keywordControl = this.fb.control('');
|
||||
this.subscriptions.push(this.keywordControl.valueChanges.pipe(debounceTime(500), distinctUntilChanged()).subscribe(value => {
|
||||
this.keyword = value;
|
||||
this.findMatches(this.keyword);
|
||||
if (typeof IntersectionObserver !== 'undefined') {
|
||||
setTimeout(() => {
|
||||
this.setObserver();
|
||||
});
|
||||
}
|
||||
if(this.keyword !== undefined || value) {
|
||||
this.selectedParentLevels = [];
|
||||
}
|
||||
this.keyword = value;
|
||||
this.findMatches(this.keyword);
|
||||
if (typeof IntersectionObserver !== 'undefined') {
|
||||
setTimeout(() => {
|
||||
this.setObserver();
|
||||
});
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
|
@ -154,11 +182,16 @@ export class FosComponent implements OnInit, OnDestroy {
|
|||
this.fos.forEach(fos => {
|
||||
this.fosOptions.push(fos.id);
|
||||
if(fos.children) {
|
||||
fos.children.forEach(child => {
|
||||
this.fosOptions.push(child.id);
|
||||
if(child.children) {
|
||||
child.children.forEach(child2 => {
|
||||
this.fosOptions.push(child2.id);
|
||||
fos.children.forEach(l2 => {
|
||||
this.fosOptions.push(l2.id);
|
||||
if(l2.children) {
|
||||
l2.children.forEach(l3 => {
|
||||
this.fosOptions.push(l3.id);
|
||||
if(l3.children) {
|
||||
l3.children.forEach(l4 => {
|
||||
this.fosOptions.push(l4.id);
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
@ -170,19 +203,29 @@ export class FosComponent implements OnInit, OnDestroy {
|
|||
this.viewResults = JSON.parse(JSON.stringify(this.fos));
|
||||
let matchLevel1: boolean = false;
|
||||
let matchLevel2: boolean = false;
|
||||
let matchLevel3: boolean = false;
|
||||
// 1st level search
|
||||
if(this.viewResults.length) {
|
||||
this.viewResults = this.viewResults.filter(item => {
|
||||
matchLevel1 = !!item.id.includes(value?.toLowerCase());
|
||||
// // 2nd level search
|
||||
// 2nd level search
|
||||
if(item.children?.length && !matchLevel1) {
|
||||
item.children = item.children.filter(subItem => {
|
||||
matchLevel2 = !!subItem.id.includes(value?.toLowerCase());
|
||||
// 3rd level search
|
||||
if(subItem.children?.length && !matchLevel2) {
|
||||
subItem.children = subItem.children.filter(subSubItem => subSubItem.id.includes(value?.toLowerCase()));
|
||||
subItem.children = subItem.children.filter(subSubItem => {
|
||||
matchLevel3 = subSubItem.id.includes(value?.toLowerCase());
|
||||
// 4th level search
|
||||
if(subSubItem.children?.length && !matchLevel3) {
|
||||
subSubItem.children = subSubItem.children.filter(level4Item => {
|
||||
return level4Item.id.toLowerCase().includes(value?.toLowerCase())
|
||||
});
|
||||
}
|
||||
return subSubItem.children?.length > 0 || matchLevel3;
|
||||
});
|
||||
}
|
||||
return subItem.children?.length > 0 || matchLevel2;
|
||||
return subItem.children?.length > 0;
|
||||
});
|
||||
}
|
||||
return item.children?.length > 0;
|
||||
|
@ -191,7 +234,7 @@ export class FosComponent implements OnInit, OnDestroy {
|
|||
}
|
||||
|
||||
highlightKeyword(name) {
|
||||
if(name.includes(this.keyword.toLowerCase())) {
|
||||
if(name.toLowerCase().includes(this.keyword.toLowerCase())) {
|
||||
return name.replace(new RegExp(this.keyword, "gi"), (matchedValue) => `<mark class="highlighted">${matchedValue}</mark>`);
|
||||
} else {
|
||||
return name;
|
||||
|
@ -221,4 +264,41 @@ export class FosComponent implements OnInit, OnDestroy {
|
|||
// return {'foslabel': this.urlEncodeAndQuote(fos.id+"||"+fos.label)};
|
||||
return (this.searchFieldsHelper.getFosParameter() == 'foslabel' ? ({'foslabel': this.urlEncodeAndQuote(fos.id+"||"+fos.label)}) : ({'fos': this.urlEncodeAndQuote(fos.id)}));
|
||||
}
|
||||
|
||||
public backClicked() {
|
||||
let id = this.selectedParentLevels[0].id;
|
||||
this.selectedParentLevels=[];
|
||||
this.cdr.detectChanges();
|
||||
|
||||
if(this.scrollPos) {
|
||||
HelperFunctions.scrollTo(0, this.scrollPos);
|
||||
this._router.navigate(['./'], {fragment: id, relativeTo: this.route, state: {disableScroll: true}});
|
||||
} else {
|
||||
this._router.navigate(['./'], {
|
||||
fragment: id,
|
||||
relativeTo: this.route,
|
||||
state: {disableScroll: false, behavior: 'auto'}
|
||||
});
|
||||
}
|
||||
|
||||
this.cdr.detectChanges();
|
||||
if (typeof IntersectionObserver !== 'undefined') {
|
||||
setTimeout(() => {
|
||||
this.setObserver();
|
||||
}, 200);
|
||||
}
|
||||
}
|
||||
|
||||
public moreClicked(level1, level2, level3) {
|
||||
this.scrollPos = window.scrollY;
|
||||
|
||||
if(this.observer) {
|
||||
this.observer.disconnect();
|
||||
}
|
||||
this.selectedParentLevels=[level1, level2, level3];
|
||||
this.cdr.detectChanges();
|
||||
this._router.navigate(['./'],
|
||||
{fragment: this.selectedParentLevels[0].id+"||"+this.selectedParentLevels[1].code+"||"+this.selectedParentLevels[2].code,
|
||||
relativeTo: this.route, state: {disableScroll: false, behavior: 'auto'}});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 { }
|
|
@ -2,7 +2,9 @@
|
|||
<schema2jsonld *ngIf="dataProviderInfo"
|
||||
[data]=dataProviderInfo [URL]="canonicalUrl" type="datasource"
|
||||
[otherURL]="(dataProviderInfo.provenance)?provenanceUrls:null"></schema2jsonld>
|
||||
|
||||
<div *ngIf="dataProviderInfo && !dataProviderInfo.belongsTo && !isBottomIntersecting" [innerHTML]="dataProviderInfo.message"
|
||||
class="uk-alert uk-alert-warning uk-position-fixed uk-position-bottom-center uk-text-small" style="z-index: 1000;">
|
||||
</div>
|
||||
<!-- Desktop view -->
|
||||
<div class="uk-visible@m landing uk-section uk-padding-remove tm-middle">
|
||||
<div *ngIf="!isMobile" class="tm-main">
|
||||
|
|
|
@ -148,14 +148,13 @@ export class DataProviderComponent {
|
|||
@ViewChild("descriptionDiv") descriptionDiv: ElementRef;
|
||||
@ViewChild('descriptionModal') descriptionModal;
|
||||
|
||||
// public shouldSticky: boolean = true;
|
||||
|
||||
subscriptions = [];
|
||||
private sub: Subscription;
|
||||
properties: EnvProperties = properties;
|
||||
public openaireEntities = OpenaireEntities;
|
||||
|
||||
public isMobile: boolean = false;
|
||||
public isBottomIntersecting: boolean = false;
|
||||
public mobileContent: "info" | "metrics" | "actions" = "info";
|
||||
public tabMobile: string = "";
|
||||
public viewAllMobile: string = "";
|
||||
|
@ -198,6 +197,11 @@ export class DataProviderComponent {
|
|||
ngOnInit() {
|
||||
this.subscriptions.push(this.layoutService.isMobile.subscribe(isMobile => {
|
||||
this.isMobile = isMobile;
|
||||
this.cdr.detectChanges();
|
||||
}));
|
||||
this.subscriptions.push(this.layoutService.isBottomIntersecting.subscribe(isBottomIntersecting => {
|
||||
this.isBottomIntersecting = isBottomIntersecting;
|
||||
this.cdr.detectChanges();
|
||||
}));
|
||||
if (typeof document !== 'undefined') {
|
||||
this.subscriptions.push(this.indexInfoService.getLastIndexDate(this.properties).subscribe(lastIndexUpdate => {
|
||||
|
@ -206,8 +210,10 @@ export class DataProviderComponent {
|
|||
}
|
||||
}));
|
||||
}
|
||||
//this.getDivContents();
|
||||
this.getPageContents();
|
||||
if(properties.adminToolsPortalType !== "explore") {
|
||||
//this.getDivContents();
|
||||
this.getPageContents();
|
||||
}
|
||||
this.updateUrl(this.properties.domain + this.properties.baseLink + this._router.url);
|
||||
this.seoService.createLinkForCanonicalURL(this.properties.domain +this.properties.baseLink + this._router.url);
|
||||
this.subscriptions.push(this.route.queryParams.subscribe(data => {
|
||||
|
@ -259,16 +265,6 @@ export class DataProviderComponent {
|
|||
} else {
|
||||
this.offset = 0;
|
||||
}
|
||||
// let bottom = document.getElementById('bottom');
|
||||
// if(bottom) {
|
||||
// let observer = new IntersectionObserver(entries => {
|
||||
// entries.forEach(entry => {
|
||||
// this.shouldSticky = !entry.isIntersecting;
|
||||
// })
|
||||
// });
|
||||
// this.subscriptions.push(observer);
|
||||
// observer.observe(bottom);
|
||||
// }
|
||||
if(this.graph_and_feedback) {
|
||||
this.observeGraphAndFeedback();
|
||||
}
|
||||
|
@ -387,6 +383,7 @@ export class DataProviderComponent {
|
|||
this.dataProviderInfo = data;
|
||||
this.getProvenanceUrls();
|
||||
this.datasourceId = this.dataProviderInfo.objIdentifier;
|
||||
this.dataProviderInfo.setBelongsTo(this.datasourceId);
|
||||
let pid:Identifier = Identifier.getPIDFromIdentifiers(this.dataProviderInfo.identifiers);
|
||||
this.canonicalUrl = this.properties.domain+ properties.baseLink + ( pid ? (this.linkToLandingPage.split("?")[0] + "?pid=" + encodeURIComponent(pid.id)):
|
||||
(this.linkToLandingPage + this.dataProviderInfo.relcanId));
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -17,8 +17,8 @@ import {OpenaireEntities} from "../../utils/properties/searchFields";
|
|||
</errorMessages>
|
||||
|
||||
<div *ngIf="fetchResults.searchUtils.status == errorCodes.DONE && !loading" class="uk-text-small">
|
||||
<div class="uk-text-meta uk-margin-medium-bottom">
|
||||
*Only top 100 {{openaireEntities.DATASOURCES}} that host {{openaireEntities.RESULTS}} which are also available via the Federated Research Data Repository are shown.
|
||||
<div *ngIf="results.length > 90" class="uk-text-meta uk-margin-medium-bottom">
|
||||
*Only top 100 {{openaireEntities.DATASOURCES}} that host {{openaireEntities.RESULTS}} which are also available via {{collectedFromName}} are shown.
|
||||
</div>
|
||||
<results-and-pages *ngIf="results.length >pageSize" [type]="openaireEntities.DATASOURCES"
|
||||
[page]="page" [pageSize]="pageSize"
|
||||
|
|
|
@ -9,7 +9,8 @@
|
|||
<landing-header *ngIf="resultLandingInfo" [properties]="properties" [title]="title"
|
||||
[subTitle]="resultLandingInfo.subtitle" [underCuration]="resultLandingInfo.underCurationMessage"
|
||||
[entityType]="entityType" [types]="resultLandingInfo.types"
|
||||
[year]="resultLandingInfo.date" [embargoEndDate]="resultLandingInfo.embargoEndDate">
|
||||
[year]="resultLandingInfo.date" [embargoEndDate]="resultLandingInfo.embargoEndDate"
|
||||
[publiclyFunded]="resultLandingInfo.publiclyFunded" [projects]="resultLandingInfo.fundedByProjects">
|
||||
</landing-header>
|
||||
<landing-header *ngIf="organizationInfo" [properties]="properties" [title]="title"
|
||||
[subTitle]="(organizationInfo.name && organizationInfo.title.name !== organizationInfo.name)?organizationInfo.name:null"
|
||||
|
|
|
@ -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"
|
||||
|
@ -33,14 +33,15 @@ import {RouterHelper} from "../../utils/routerHelper.class";
|
|||
</a>
|
||||
</div>
|
||||
|
||||
<div *ngIf="properties.environment != 'production' && isMobile && (usedBy == 'landing') && availableOn[0].fulltext" class="uk-width-1-1"><hr></div><div *ngIf="availableOn[0].downloadUrl" [ngClass]="isMobile ? 'uk-width-1-1' : ''">
|
||||
<div class="uk-flex uk-flex-middle" [ngClass]="isMobile ? ((usedBy == 'landing') ? 'uk-padding-small uk-padding-remove-horizontal' : '') : ''">
|
||||
<div *ngIf="isMobile && (usedBy == 'landing') && availableOn[0].fulltext" class="uk-width-1-1"><hr></div>
|
||||
<div *ngIf="availableOn[0].downloadUrl" [ngClass]="isMobile ? 'uk-width-1-1' : ''">
|
||||
<div class="uk-flex uk-flex-middle" [ngClass]="isMobile ? ((usedBy == 'landing') ? 'uk-padding-small uk-padding-remove-horizontal' : '') : ''">
|
||||
<span [class]="'uk-margin-xsmall-right ' + (availableOn[0].accessRightIcon == 'open_access' ? 'open-access' : 'closed-access')"
|
||||
uk-tooltip [title]="getAccessLabel(availableOn[0].accessRight)">
|
||||
<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>
|
||||
|
@ -93,10 +94,12 @@ import {RouterHelper} from "../../utils/routerHelper.class";
|
|||
{{instance.downloadNames.join("; ")}}
|
||||
</a>
|
||||
</span>
|
||||
<div *ngIf="instance.types?.length > 0 || instance.years?.length > 0" class="uk-text-meta">
|
||||
<div *ngIf="instance.types?.length > 0 || instance.years?.length > 0 || instance.peerReviewed" class="uk-text-meta">
|
||||
<span *ngIf="instance.types?.length > 0" class="uk-text-capitalize">{{instance.types.join(" . ")}}</span>
|
||||
<span *ngIf="instance.types?.length > 0 && instance.years?.length > 0"> . </span>
|
||||
<span *ngIf="instance.years?.length > 0">{{instance.years.join(" . ")}}</span>
|
||||
<span *ngIf="(instance.types?.length > 0 || instance.years?.length > 0) && instance.peerReviewed"> . </span>
|
||||
<span *ngIf="instance.peerReviewed">Peer-reviewed</span>
|
||||
</div>
|
||||
<div *ngIf="instance.license" class="uk-text-meta uk-text-truncate" uk-tooltip [title]="instance.license">
|
||||
License:
|
||||
|
@ -106,7 +109,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">
|
||||
|
|
|
@ -31,22 +31,20 @@ import {RouterHelper} from "../../utils/routerHelper.class";
|
|||
<!-- types -->
|
||||
<span *ngIf="entityType" class="uk-flex-inline uk-flex-middle uk-flex-wrap"
|
||||
[class.other-separator]="types && removeUnknown(types, true).length > 0">
|
||||
<span class="uk-margin-xsmall-right">
|
||||
<icon *ngIf="entityType.toLowerCase() == 'publication'" name="description" type="outlined"
|
||||
[flex]="true" [ratio]="0.8"></icon>
|
||||
<icon *ngIf="entityType.toLowerCase() == 'research data'" name="database" type="outlined"
|
||||
[flex]="true" [ratio]="0.8"></icon>
|
||||
<icon *ngIf="entityType.toLowerCase() == 'research software'" name="integration_instructions"
|
||||
type="outlined" [flex]="true" [ratio]="0.8"></icon>
|
||||
<icon *ngIf="entityType.toLowerCase() == 'other research product'" name="apps" type="outlined"
|
||||
[flex]="true" [ratio]="0.8"></icon>
|
||||
<icon *ngIf="entityType.toLowerCase() == 'project'" name="assignment_turned_in" type="outlined"
|
||||
[flex]="true" [ratio]="0.8"></icon>
|
||||
<icon *ngIf="entityType.toLowerCase() == 'data source'" name="note_add" type="outlined"
|
||||
[flex]="true" [ratio]="0.8"></icon>
|
||||
<icon *ngIf="entityType.toLowerCase() == 'organization'" name="corporate_fare" type="outlined"
|
||||
[flex]="true" [ratio]="0.8"></icon>
|
||||
</span>
|
||||
<icon *ngIf="entityType.toLowerCase() == 'publication'" name="description" type="outlined"
|
||||
[flex]="true" [ratio]="0.8" class="uk-margin-xsmall-right"></icon>
|
||||
<icon *ngIf="entityType.toLowerCase() == 'research data'" name="database" type="outlined"
|
||||
[flex]="true" [ratio]="0.8" class="uk-margin-xsmall-right"></icon>
|
||||
<icon *ngIf="entityType.toLowerCase() == 'research software'" name="integration_instructions"
|
||||
type="outlined" [flex]="true" [ratio]="0.8" class="uk-margin-xsmall-right"></icon>
|
||||
<icon *ngIf="entityType.toLowerCase() == 'other research product'" name="apps" type="outlined"
|
||||
[flex]="true" [ratio]="0.8" class="uk-margin-xsmall-right"></icon>
|
||||
<icon *ngIf="entityType.toLowerCase() == 'project'" name="assignment_turned_in" type="outlined"
|
||||
[flex]="true" [ratio]="0.8" class="uk-margin-xsmall-right"></icon>
|
||||
<icon *ngIf="entityType.toLowerCase() == 'data source'" name="note_add" type="outlined"
|
||||
[flex]="true" [ratio]="0.8" class="uk-margin-xsmall-right"></icon>
|
||||
<icon *ngIf="entityType.toLowerCase() == 'organization'" name="corporate_fare" type="outlined"
|
||||
[flex]="true" [ratio]="0.8" class="uk-margin-xsmall-right"></icon>
|
||||
<u class="uk-text-capitalize uk-text-bolder">{{entityType}}</u>
|
||||
<span *ngIf="types && removeUnknown(types, true).length > 0">
|
||||
<icon name="keyboard_double_arrow_right" [flex]="true" [ratio]="0.8"></icon>
|
||||
|
@ -91,7 +89,7 @@ import {RouterHelper} from "../../utils/routerHelper.class";
|
|||
</ng-container>
|
||||
</span>
|
||||
<ng-container *ngIf="status">
|
||||
<span>{{status}}</span>
|
||||
<span>{{status}} <ng-container *ngIf="currentDate <= endDate && currentDate >= startDate">(M{{calcCurrentMonth}})</ng-container></span>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="date">
|
||||
<span>{{date | date: 'dd MMM yyyy': 'UTC'}}</span>
|
||||
|
@ -120,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]">
|
||||
|
@ -139,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>
|
||||
|
@ -150,13 +150,16 @@ import {RouterHelper} from "../../utils/routerHelper.class";
|
|||
<ng-container *ngIf="thematic">
|
||||
<span>Thematic</span>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="publiclyFunded">
|
||||
<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
|
||||
+{{projects.length - projectsLimit | number}}{{projects.length == 1000 ? ' more' : ''}} projects
|
||||
</a>
|
||||
<a *ngIf="showInline && lessBtn" (click)="showInline = !showInline; lessBtn = false;"
|
||||
class="uk-background-muted custom-extra-entities">
|
||||
|
@ -165,12 +168,12 @@ 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
|
||||
+{{organizations.length - organizationsLimit | number}}{{organizations.length == 1000 ? ' more' : ''}} partners
|
||||
</a>
|
||||
<a *ngIf="showInline && lessBtn" (click)="showInline = !showInline; lessBtn = false;"
|
||||
class="uk-background-muted custom-extra-entities">
|
||||
|
@ -179,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>
|
||||
|
@ -193,6 +197,7 @@ import {RouterHelper} from "../../utils/routerHelper.class";
|
|||
|
||||
|
||||
<modal-alert *ngIf="!isMobile" #partnersModal>
|
||||
<div *ngIf="organizations?.length == 1000" class="uk-text-meta uk-margin-medium-bottom">Only 1000 Partners<span *ngIf="resultTitle"> of {{resultTitle}}</span> are shown here.</div>
|
||||
<div class="uk-text-small uk-text-emphasis uk-grid uk-grid-column-collapse uk-grid-row-small" uk-grid>
|
||||
<ng-container *ngFor="let item of organizations; let i = index">
|
||||
<div class="uk-margin-xsmall-right">
|
||||
|
@ -203,6 +208,7 @@ import {RouterHelper} from "../../utils/routerHelper.class";
|
|||
</modal-alert>
|
||||
|
||||
<modal-alert *ngIf="!isMobile" #projectsModal>
|
||||
<div *ngIf="projects?.length == 1000" class="uk-text-meta uk-margin-medium-bottom">Only 1000 {{openaireEntities.PROJECTS}}<span *ngIf="resultTitle"> of {{resultTitle}}</span> are shown here.</div>
|
||||
<div class="uk-text-small uk-text-emphasis uk-grid uk-grid-column-collapse uk-grid-row-small" uk-grid>
|
||||
<ng-container *ngFor="let item of projects; let i = index">
|
||||
<div class="uk-margin-xsmall-right">
|
||||
|
@ -219,6 +225,7 @@ import {RouterHelper} from "../../utils/routerHelper.class";
|
|||
styleUrls: ['entity-metadata.component.less']
|
||||
})
|
||||
export class EntityMetadataComponent {
|
||||
@Input() resultTitle: string = null;
|
||||
@Input() isMobile: boolean = false;
|
||||
@Input() entityType: string;
|
||||
@Input() types: string[];
|
||||
|
@ -246,6 +253,7 @@ export class EntityMetadataComponent {
|
|||
@Input() type; // data provider landing
|
||||
@Input() provenanceAction: string; // search result
|
||||
@Input() relationName: string; // search result
|
||||
@Input() publiclyFunded: boolean; // search result
|
||||
@Input() projects: Project[];
|
||||
@Input() organizations: Organization[];
|
||||
@Input() subjects: string[];
|
||||
|
@ -290,7 +298,7 @@ export class EntityMetadataComponent {
|
|||
return this.projects.map(project => {
|
||||
let value = project.funderShortname ? project.funderShortname : project.funderName;
|
||||
if (project.acronym || project.title) {
|
||||
value = value + ' | ' + (project.acronym ? project.acronym :
|
||||
value = (value ? value + ' | ' : '') + (project.acronym ? project.acronym :
|
||||
(project.title.length > 25 ? (project.title.slice(0, 25) + '...'): project.title));
|
||||
}
|
||||
// if(project.code) {
|
||||
|
@ -359,4 +367,18 @@ export class EntityMetadataComponent {
|
|||
this.projectsModal.open();
|
||||
}
|
||||
}
|
||||
|
||||
public get calcCurrentMonth() {
|
||||
let currentDate = new Date(this.currentDate);
|
||||
let startDate = new Date(this.startDate);
|
||||
|
||||
var months;
|
||||
months = (currentDate.getFullYear() - startDate.getFullYear()) * 12;
|
||||
months -= startDate.getMonth();
|
||||
months += currentDate.getMonth();
|
||||
if(startDate.getDate() > currentDate.getDate()) {
|
||||
months--;
|
||||
}
|
||||
return months <= 0 ? 0 : months+1;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
import {NgModule} from '@angular/core';
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {EntityMetadataComponent} from './entity-metadata.component';
|
||||
import {IconsModule} from '../../utils/icons/icons.module';
|
||||
import {AlertModalModule} from '../../utils/modal/alertModal.module';
|
||||
import {ShowPublisherModule} from "./showPublisher.module";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, IconsModule, AlertModalModule, ShowPublisherModule
|
||||
],
|
||||
declarations: [EntityMetadataComponent],
|
||||
providers:[],
|
||||
exports: [EntityMetadataComponent]
|
||||
})
|
||||
export class EntityMetadataModule { }
|
|
@ -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) {
|
||||
|
|
|
@ -21,7 +21,7 @@ import {AlertModal} from "../../../utils/modal/alert";
|
|||
[languages]="languages" [programmingLanguages]="programmingLanguages"
|
||||
[compatibility]="compatibility" [aggregationStatus]="aggregationStatus"
|
||||
[thematic]="thematic" [type]="type" [prevPath]="prevPath"
|
||||
[countries]="countries" [projects]="projects"
|
||||
[countries]="countries" [publiclyFunded]="publiclyFunded" [projects]="projects"
|
||||
></entity-metadata>
|
||||
</div>
|
||||
<div *ngIf="authors">
|
||||
|
@ -63,5 +63,6 @@ export class LandingHeaderComponent {
|
|||
@Input() type; // data provider landing
|
||||
@Input() prevPath: string = "";
|
||||
@Input() countries;
|
||||
@Input() publiclyFunded;
|
||||
@Input() projects;
|
||||
}
|
||||
|
|
|
@ -4,12 +4,12 @@ import {CommonModule} from "@angular/common";
|
|||
import {LandingModule} from "../landing.module";
|
||||
import {ShowAuthorsModule} from "../../../utils/authors/showAuthors.module";
|
||||
import {IconsModule} from "src/app/openaireLibrary/utils/icons/icons.module";
|
||||
import {ShowPublisherModule} from "../showPublisher.module";
|
||||
import {RouterModule} from "@angular/router";
|
||||
import {ResultLandingUtilsModule} from "../resultLandingUtils.module";
|
||||
import {EntityMetadataModule} from "../entity-metadata.module";
|
||||
|
||||
@NgModule({
|
||||
imports: [CommonModule, LandingModule, ShowAuthorsModule, IconsModule, ShowPublisherModule, RouterModule, ResultLandingUtilsModule],
|
||||
imports: [CommonModule, LandingModule, ShowAuthorsModule, IconsModule, RouterModule, ResultLandingUtilsModule, EntityMetadataModule],
|
||||
declarations: [LandingHeaderComponent],
|
||||
exports: [LandingHeaderComponent]
|
||||
})
|
||||
|
|
|
@ -5,24 +5,19 @@ import { CommonModule } from '@angular/common';
|
|||
import { FormsModule } from '@angular/forms';
|
||||
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
|
||||
ShowTitleComponent, AddThisComponent
|
||||
],
|
||||
providers:[
|
||||
PreviousRouteRecorder
|
||||
],
|
||||
providers:[],
|
||||
exports: [
|
||||
TabPagingComponent, ShowTitleComponent, AddThisComponent
|
||||
ShowTitleComponent, AddThisComponent
|
||||
]
|
||||
})
|
||||
export class LandingModule { }
|
||||
|
|
|
@ -39,10 +39,10 @@ export class ParsingFunctions {
|
|||
|
||||
let fundedByProject: Project = {
|
||||
"id": "", "acronym": "", "title": "",
|
||||
"funderShortname": "", "funderName": "",
|
||||
"funderShortname": "", "funderName": "", "funderJurisdiction": "",
|
||||
"funding": "", "code": "", "provenanceAction": "", "validated": false
|
||||
};
|
||||
|
||||
|
||||
if (relation.title != 'unidentified') {
|
||||
fundedByProject['id'] = relation['to'].content;
|
||||
fundedByProject['acronym'] = relation.acronym;
|
||||
|
@ -61,8 +61,7 @@ export class ParsingFunctions {
|
|||
}
|
||||
|
||||
if (relation.hasOwnProperty("funding")) {
|
||||
let funding: { "funderName": string, "funderShortname": string, "stream": string };
|
||||
funding = this.parseFundingTrees(relation.funding);
|
||||
let funding = this.parseFundingTrees(relation.funding);
|
||||
|
||||
if (funding.funderName) {
|
||||
fundedByProject['funderName'] = funding.funderName;
|
||||
|
@ -70,6 +69,9 @@ export class ParsingFunctions {
|
|||
if (funding.funderShortname) {
|
||||
fundedByProject['funderShortname'] = funding.funderShortname;
|
||||
}
|
||||
if(funding.funderJurisdiction) {
|
||||
fundedByProject['funderJurisdiction'] = funding.funderJurisdiction;
|
||||
}
|
||||
if (funding.stream) {
|
||||
fundedByProject['funding'] = funding.stream;
|
||||
}
|
||||
|
@ -79,10 +81,11 @@ export class ParsingFunctions {
|
|||
}
|
||||
|
||||
// publication & research data : for fundedByProjects | project landing : for funding
|
||||
public parseFundingTrees(fundingTree: any): { "funderName": string, "funderShortname": string, "stream": string } {
|
||||
let funding: { "funderName": string, "funderShortname": string, "stream": string } = {
|
||||
public parseFundingTrees(fundingTree: any): any {
|
||||
let funding: { "funderName": string, "funderShortname": string, "funderJurisdiction": string, "stream": string } = {
|
||||
"funderName": "",
|
||||
"funderShortname": "",
|
||||
"funderJurisdiction": "",
|
||||
"stream": ""
|
||||
};
|
||||
let length = Array.isArray(fundingTree) ? fundingTree.length : 1;
|
||||
|
@ -93,6 +96,7 @@ export class ParsingFunctions {
|
|||
if (fundingData.hasOwnProperty("funder")) {
|
||||
funding.funderShortname = fundingData['funder'].shortname;
|
||||
funding.funderName = fundingData['funder'].name;
|
||||
funding.funderJurisdiction = fundingData['funder'].jurisdiction;
|
||||
}
|
||||
|
||||
funding.stream = this.addFundingLevel0(fundingData, funding.stream);
|
||||
|
@ -265,7 +269,8 @@ export class ParsingFunctions {
|
|||
"types": [],
|
||||
"years": [],
|
||||
"license": "",
|
||||
"fulltext": ""
|
||||
"fulltext": "",
|
||||
"peerReviewed": null
|
||||
};
|
||||
|
||||
if (instance.hasOwnProperty("hostedby")) {
|
||||
|
@ -358,6 +363,10 @@ export class ParsingFunctions {
|
|||
if(instance.hasOwnProperty("fulltext")) {
|
||||
available.fulltext = instance['fulltext'];
|
||||
}
|
||||
|
||||
if(instance.hasOwnProperty("refereed") && instance.refereed.classname == "peerReviewed") {
|
||||
available.peerReviewed = true;
|
||||
}
|
||||
|
||||
hostedBy_collectedFrom.push(available);
|
||||
}
|
||||
|
@ -533,7 +542,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>());
|
||||
}
|
||||
|
@ -542,7 +552,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>());
|
||||
}
|
||||
|
@ -574,7 +585,7 @@ export class ParsingFunctions {
|
|||
|
||||
return eoscSubjectsFound;
|
||||
}
|
||||
|
||||
|
||||
// publication & dataset landing : for subjects and otherSubjects and classifiedSubjects
|
||||
parseAllSubjects(_subjects: any, vocabulary: any): [string[], Map<string, string[]>, Map<string, string[]>, string[], string[],] {
|
||||
// let eoscSubjectsFound = [];
|
||||
|
@ -583,12 +594,12 @@ export class ParsingFunctions {
|
|||
let classifiedSubjects: Map<string, string[]>;
|
||||
let fos: string[];
|
||||
let sdg: string[];
|
||||
|
||||
|
||||
let setOfEoscSubjects: Set<string> = new Set();
|
||||
|
||||
|
||||
let subject;
|
||||
let length = Array.isArray(_subjects) ? _subjects.length : 1;
|
||||
|
||||
|
||||
for (let i = 0; i < length; i++) {
|
||||
subject = Array.isArray(_subjects) ? _subjects[i] : _subjects;
|
||||
if (subject.classid != "") {
|
||||
|
@ -621,7 +632,7 @@ export class ParsingFunctions {
|
|||
if (classifiedSubjects == undefined) {
|
||||
classifiedSubjects = new Map<string, string[]>();
|
||||
}
|
||||
|
||||
|
||||
let content: string = subject.content + "";
|
||||
// let checkAndAddEoscSubjectResp = this.checkAndAddEoscSubject(setOfEoscSubjects, eoscSubjectsFound, subject, content);
|
||||
// let found: boolean = checkAndAddEoscSubjectResp["found"];
|
||||
|
@ -632,7 +643,11 @@ export class ParsingFunctions {
|
|||
if (!classifiedSubjects.has(subject.classname)) {
|
||||
classifiedSubjects.set(subject.classname, new Array<string>());
|
||||
}
|
||||
classifiedSubjects.get(subject.classname).push(content);
|
||||
if(properties.environment == "production") {
|
||||
classifiedSubjects.get(subject.classname).push(content);
|
||||
} else {
|
||||
classifiedSubjects.get(subject.classname).push(subject.classid + ": " + content);
|
||||
}
|
||||
// }
|
||||
}
|
||||
} else {
|
||||
|
@ -652,6 +667,17 @@ export class ParsingFunctions {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(properties.environment != "production" && classifiedSubjects != null) {
|
||||
if (subjects == undefined) {
|
||||
subjects = new Array<string>();
|
||||
}
|
||||
for (let classified of classifiedSubjects.keys()) {
|
||||
subjects = subjects.concat(classifiedSubjects.get(classified));
|
||||
}
|
||||
classifiedSubjects = null;
|
||||
}
|
||||
|
||||
return [subjects, otherSubjects, classifiedSubjects, fos, sdg];
|
||||
}
|
||||
|
||||
|
|
|
@ -116,7 +116,8 @@ export class ProjectsInModalComponent {
|
|||
}
|
||||
if (filterLimits.length > 0) {
|
||||
//this.filterQuery+=' and '+filter.filterId + ' exact '+ filterLimits + ' ';
|
||||
this.filterQuery += ' and ( ' + filterLimits + ' ) ';
|
||||
// this.filterQuery += ' and ( ' + filterLimits + ' ) ';
|
||||
this.filterQuery += '( ' + filterLimits + ' ) ';
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -9,7 +9,6 @@ import {ShowSubjectsComponent} from './showSubjects.component';
|
|||
import {FundedByComponent} from './fundedBy.component';
|
||||
import {AvailableOnComponent} from './availableOn.component';
|
||||
import {TabTableComponent} from './tabTable.component';
|
||||
import {ShowPublisherComponent} from "./showPublisher.component";
|
||||
import {ShowPublisherModule} from "./showPublisher.module";
|
||||
import {RelatedToComponent} from "./relatedTo.component";
|
||||
import {FosComponent} from "./fos.component";
|
||||
|
@ -17,13 +16,11 @@ import {SdgComponent} from "./sdg.component";
|
|||
import {IconsModule} from "../../utils/icons/icons.module";
|
||||
import {AlertModalModule} from "../../utils/modal/alertModal.module";
|
||||
import { SearchInputModule } from '../../sharedComponents/search-input/search-input.module';
|
||||
import {EntityMetadataComponent} from "./entity-metadata.component";
|
||||
import {IconsService} from "../../utils/icons/icons.service";
|
||||
import {book, closed_access, cog, database, earth, open_access, unknown_access} from "../../utils/icons/icons";
|
||||
import {FullScreenModalModule} from "../../utils/modal/full-screen-modal/full-screen-modal.module";
|
||||
import {MobileDropdownModule} from "../../utils/mobile-dropdown/mobile-dropdown.module";
|
||||
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule, RouterModule, PagingModule, ShowPublisherModule, IconsModule, AlertModalModule,
|
||||
|
@ -32,15 +29,14 @@ import {MobileDropdownModule} from "../../utils/mobile-dropdown/mobile-dropdown.
|
|||
declarations: [
|
||||
ShowIdentifiersComponent,ShowSubjectsComponent,
|
||||
FundedByComponent,AvailableOnComponent,TabTableComponent,
|
||||
RelatedToComponent, FosComponent, SdgComponent,
|
||||
EntityMetadataComponent
|
||||
RelatedToComponent, FosComponent, SdgComponent
|
||||
],
|
||||
providers:[
|
||||
],
|
||||
exports: [
|
||||
ShowIdentifiersComponent, ShowSubjectsComponent,
|
||||
FundedByComponent,AvailableOnComponent, TabTableComponent, ShowPublisherComponent,
|
||||
RelatedToComponent, FosComponent, SdgComponent, EntityMetadataComponent
|
||||
FundedByComponent,AvailableOnComponent, TabTableComponent,
|
||||
RelatedToComponent, FosComponent, SdgComponent
|
||||
]
|
||||
})
|
||||
export class ResultLandingUtilsModule {
|
||||
|
|
|
@ -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']">
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
import {Component, Input, Output, EventEmitter} from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'tabPaging',
|
||||
template: `
|
||||
<div class="uk-panel" *ngIf="!showAll && length > 10">
|
||||
<a (click)="changeShowAll.emit({value: true});">
|
||||
<div class="uk-float-right">view all {{length | number}}</div>
|
||||
</a>
|
||||
</div>
|
||||
`
|
||||
})
|
||||
|
||||
export class TabPagingComponent {
|
||||
@Input() showAll: boolean;
|
||||
@Input() length: number;
|
||||
@Output() changeShowAll: EventEmitter<any> = new EventEmitter();
|
||||
|
||||
constructor () {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
}
|
|
@ -18,7 +18,7 @@ import {ResultPreviewModule} from "../../../utils/result-preview/result-preview.
|
|||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule, ResultLandingUtilsModule,
|
||||
PagingModule, ErrorMessagesModule, ShowAuthorsModule, LandingModule, NoLoadPaging, ResultPreviewModule
|
||||
PagingModule, ErrorMessagesModule, ShowAuthorsModule, NoLoadPaging, ResultPreviewModule
|
||||
],
|
||||
declarations: [
|
||||
OrganizationsDeletedByInferenceComponent
|
||||
|
|
|
@ -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 { }
|
|
@ -3,7 +3,9 @@
|
|||
[URL]="properties.domain + properties.baseLink+this.properties.searchLinkToOrganization+organizationInfo.relcanId"
|
||||
type="organization">
|
||||
</schema2jsonld>
|
||||
|
||||
<div *ngIf="organizationInfo && !organizationInfo.belongsTo && !isBottomIntersecting" [innerHTML]="organizationInfo.message"
|
||||
class="uk-alert uk-alert-warning uk-position-fixed uk-position-bottom-center uk-text-small" style="z-index: 1000;">
|
||||
</div>
|
||||
<!-- Desktop view -->
|
||||
<div id="tm-main" class="uk-visible@m landing uk-section uk-padding-remove tm-middle">
|
||||
<div *ngIf="!isMobile" class="tm-main">
|
||||
|
@ -19,57 +21,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 +96,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 +119,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 +209,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 +220,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 +237,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 +373,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;
|
||||
|
@ -116,8 +115,6 @@ export class OrganizationComponent {
|
|||
public graph_height: number = 0;
|
||||
@ViewChild("graph_and_feedback") graph_and_feedback;
|
||||
|
||||
// public shouldSticky: boolean = true;
|
||||
|
||||
subscriptions = [];
|
||||
innerReportSubscriptions = [];
|
||||
properties: EnvProperties;
|
||||
|
@ -132,6 +129,7 @@ export class OrganizationComponent {
|
|||
public deleteByInferenceOpened: boolean = false;
|
||||
|
||||
public isMobile: boolean = false;
|
||||
public isBottomIntersecting: boolean = false;
|
||||
public mobileContent: "info" | "actions" = "info";
|
||||
public viewAllMobile: string = "";
|
||||
|
||||
|
@ -163,6 +161,11 @@ export class OrganizationComponent {
|
|||
ngOnInit() {
|
||||
this.subscriptions.push(this.layoutService.isMobile.subscribe(isMobile => {
|
||||
this.isMobile = isMobile;
|
||||
this.cdr.detectChanges();
|
||||
}));
|
||||
this.subscriptions.push(this.layoutService.isBottomIntersecting.subscribe(isBottomIntersecting => {
|
||||
this.isBottomIntersecting = isBottomIntersecting;
|
||||
this.cdr.detectChanges();
|
||||
}));
|
||||
this.properties = properties;
|
||||
if (typeof document !== 'undefined') {
|
||||
|
@ -172,8 +175,10 @@ export class OrganizationComponent {
|
|||
}
|
||||
}));
|
||||
}
|
||||
//this.getDivContents();
|
||||
this.getPageContents();
|
||||
if(properties.adminToolsPortalType !== "explore") {
|
||||
//this.getDivContents();
|
||||
this.getPageContents();
|
||||
}
|
||||
this.updateUrl(this.properties.domain + this.properties.baseLink + this._router.url);
|
||||
this.seoService.createLinkForCanonicalURL(this.properties.domain +this.properties.baseLink + this._router.url);
|
||||
|
||||
|
@ -217,16 +222,6 @@ export class OrganizationComponent {
|
|||
} else {
|
||||
this.offset = 0;
|
||||
}
|
||||
// let bottom = document.getElementById('bottom');
|
||||
// if(bottom) {
|
||||
// let observer = new IntersectionObserver(entries => {
|
||||
// entries.forEach(entry => {
|
||||
// this.shouldSticky = !entry.isIntersecting;
|
||||
// })
|
||||
// });
|
||||
// this.subscriptions.push(observer);
|
||||
// observer.observe(bottom);
|
||||
// }
|
||||
if(this.graph_and_feedback) {
|
||||
this.observeGraphAndFeedback();
|
||||
}
|
||||
|
@ -400,6 +395,7 @@ export class OrganizationComponent {
|
|||
} else {
|
||||
this.organizationInfo = data;
|
||||
this.organizationId = this.organizationInfo.objIdentifier; // reset in case the parameter was a canonical url. The related queries and reports should have the dedup id
|
||||
this.organizationInfo.setBelongsTo(this.organizationId);
|
||||
this.csvParamsTail = '" and relorganizationid exact "' + this.organizationId + '" ))';
|
||||
this.seoService.createLinkForCanonicalURL(this.properties.domain + this.properties.baseLink + this.properties.searchLinkToOrganization + this.organizationInfo.relcanId);
|
||||
this.updateTitle((this.organizationInfo.title.name?this.organizationInfo.title.name:(this.organizationInfo.name?this.organizationInfo.name:'No title available')));
|
||||
|
@ -487,7 +483,7 @@ export class OrganizationComponent {
|
|||
|
||||
let filename: string = 'funder-project-' + this.contentFileName + '-report';
|
||||
|
||||
this.subscriptions.push(this._searchProjectsService.getProjectsForOrganizations(this.organizationId, ' and (funder exact "' + this.encodeURI(this.funderId) + '" ) ', 1, this.funderCount, [], this.properties).subscribe(
|
||||
this.subscriptions.push(this._searchProjectsService.getProjectsForOrganizations(this.organizationId, '(funder exact "' + this.encodeURI(this.funderId) + '" ) ', 1, this.funderCount, [], this.properties).subscribe(
|
||||
data => {
|
||||
projects = data[1];
|
||||
for (let index = 0; index < projects.length; index++) {
|
||||
|
@ -715,13 +711,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 { }
|
|
@ -2,7 +2,9 @@
|
|||
<schema2jsonld *ngIf="projectInfo"
|
||||
[data]=projectInfo [URL]="properties.domain+properties.baseLink+properties.searchLinkToProject+projectId"
|
||||
type="project"></schema2jsonld>
|
||||
|
||||
<div *ngIf="projectInfo && !projectInfo.belongsTo && !isBottomIntersecting" [innerHTML]="projectInfo.message"
|
||||
class="uk-alert uk-alert-warning uk-position-fixed uk-position-bottom-center uk-text-small" style="z-index: 1000;">
|
||||
</div>
|
||||
<!-- Desktop view -->
|
||||
<div class=" uk-visible@m landing uk-section uk-padding-remove tm-middle">
|
||||
<div *ngIf="!isMobile" class="tm-main">
|
||||
|
|
|
@ -169,14 +169,13 @@ export class ProjectComponent {
|
|||
@ViewChild("descriptionDiv") descriptionDiv: ElementRef;
|
||||
@ViewChild('descriptionModal') descriptionModal;
|
||||
|
||||
// public shouldSticky: boolean = true;
|
||||
|
||||
subscriptions = [];
|
||||
private sub: Subscription;
|
||||
properties: EnvProperties;
|
||||
public openaireEntities = OpenaireEntities;
|
||||
|
||||
public isMobile: boolean = false;
|
||||
public isBottomIntersecting: boolean = false;
|
||||
public mobileContent: "info" | "metrics" | "actions" = "info";
|
||||
public tabMobile: string = "";
|
||||
public viewAllMobile: string = "";
|
||||
|
@ -209,6 +208,11 @@ export class ProjectComponent {
|
|||
ngOnInit() {
|
||||
this.subscriptions.push(this.layoutService.isMobile.subscribe(isMobile => {
|
||||
this.isMobile = isMobile;
|
||||
this.cdr.detectChanges();
|
||||
}));
|
||||
this.subscriptions.push(this.layoutService.isBottomIntersecting.subscribe(isBottomIntersecting => {
|
||||
this.isBottomIntersecting = isBottomIntersecting;
|
||||
this.cdr.detectChanges();
|
||||
}));
|
||||
this.properties = properties;
|
||||
if (typeof document !== 'undefined') {
|
||||
|
@ -218,8 +222,10 @@ export class ProjectComponent {
|
|||
}
|
||||
}));
|
||||
}
|
||||
//this.getDivContents();
|
||||
this.getPageContents();
|
||||
if(properties.adminToolsPortalType !== "explore") {
|
||||
//this.getDivContents();
|
||||
this.getPageContents();
|
||||
}
|
||||
this.updateUrl(this.properties.domain + this.properties.baseLink + this._router.url);
|
||||
this.seoService.createLinkForCanonicalURL(this.properties.domain +this.properties.baseLink + this._router.url);
|
||||
this.subscriptions.push(this.route.queryParams.subscribe(params => {
|
||||
|
@ -276,16 +282,6 @@ export class ProjectComponent {
|
|||
} else {
|
||||
this.offset = 0;
|
||||
}
|
||||
// let bottom = document.getElementById('bottom');
|
||||
// if(bottom) {
|
||||
// let observer = new IntersectionObserver(entries => {
|
||||
// entries.forEach(entry => {
|
||||
// this.shouldSticky = !entry.isIntersecting;
|
||||
// })
|
||||
// });
|
||||
// this.subscriptions.push(observer);
|
||||
// observer.observe(bottom);
|
||||
// }
|
||||
if(this.graph_and_feedback) {
|
||||
this.observeGraphAndFeedback();
|
||||
}
|
||||
|
@ -464,6 +460,7 @@ export class ProjectComponent {
|
|||
this.subscriptions.push(this._projectService.getProjectInfo(id, this.properties).subscribe(
|
||||
data => {
|
||||
this.projectInfo = data;
|
||||
this.projectInfo.setBelongsTo(id);
|
||||
this.projectInfo.id = this.projectId;
|
||||
|
||||
this.actionsAfterGettingProjectInfo();
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -4,254 +4,267 @@ import {throwError} from 'rxjs';
|
|||
import {ProjectInfo} from '../../utils/entities/projectInfo';
|
||||
|
||||
|
||||
import {EnvProperties} from '../../utils/properties/env-properties';
|
||||
|
||||
import{EnvProperties} from '../../utils/properties/env-properties';
|
||||
|
||||
import { ParsingFunctions } from '../landing-utils/parsingFunctions.class';
|
||||
import {ParsingFunctions} from '../landing-utils/parsingFunctions.class';
|
||||
import {map} from "rxjs/operators";
|
||||
import {StringUtils} from "../../utils/string-utils.class";
|
||||
|
||||
@Injectable()
|
||||
export class ProjectService {
|
||||
|
||||
constructor(private http: HttpClient ) {
|
||||
this.parsingFunctions = new ParsingFunctions();
|
||||
constructor(private http: HttpClient) {
|
||||
this.parsingFunctions = new ParsingFunctions();
|
||||
}
|
||||
|
||||
public parsingFunctions: ParsingFunctions;
|
||||
projectInfo: ProjectInfo;
|
||||
|
||||
getProjectInfo(id: string, properties: EnvProperties): any {
|
||||
|
||||
let url = properties.searchAPIURLLAst + 'projects/' + id + "?format=json";
|
||||
let key = url;
|
||||
|
||||
return this.http.get((properties.useCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url)
|
||||
//.map(res => <any> res.json())
|
||||
.pipe(map(res => res['result']['metadata']['oaf:entity']['oaf:project']))
|
||||
.pipe(map(res => [res,
|
||||
res['fundingtree'],
|
||||
res['rels']['rel']]))
|
||||
.pipe(map(res => this.parseProjectInfo(res, properties)));
|
||||
|
||||
}
|
||||
|
||||
getProjectInfoByGrantId(grant: string, funder: string, properties: EnvProperties): any {
|
||||
|
||||
let url = properties.searchAPIURLLAst + 'resources?query=(oaftype exact project)' +
|
||||
'and (projectcode_nt exact "' + grant + '" ) and (fundershortname exact ' + '"' + funder + '"' + ')' + "&format=json&size=1";
|
||||
|
||||
|
||||
let key = url;
|
||||
|
||||
return this.http.get((properties.useCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url)
|
||||
//.map(res => <any> res.json())
|
||||
.pipe(map(res => res['results'][0]))
|
||||
.pipe(map(res => [res['result']['metadata']['oaf:entity']['oaf:project'], res['result']['header']['dri:objIdentifier']]))
|
||||
.pipe(map(res => [res[0],
|
||||
res[0]['fundingtree'],
|
||||
res[0]['rels']['rel'], res[1]]))
|
||||
.pipe(map(res => this.parseProjectInfo(res, properties)));
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
get project strtDate and endDate
|
||||
*/
|
||||
getProjectDates(id: string, properties: EnvProperties): any {
|
||||
|
||||
let url = properties.searchAPIURLLAst + 'projects/' + id + "?format=json";
|
||||
let key = url + '_projectDates';
|
||||
|
||||
return this.http.get((properties.useCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url)
|
||||
//.map(res => <any> res.json())
|
||||
.pipe(map(res => res['result']['metadata']['oaf:entity']['oaf:project']))
|
||||
.pipe(map(res => [res,
|
||||
res['fundingtree'],
|
||||
res['rels']['rel']]))
|
||||
.pipe(map(res => this.parseProjectDates(id, res)))
|
||||
|
||||
}
|
||||
|
||||
getHTMLInfo(id: string, properties: EnvProperties): any {
|
||||
let url = properties.searchAPIURLLAst + 'projects/' + id + "?format=json";
|
||||
let key = url;
|
||||
|
||||
return this.http.get((properties.useCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url)
|
||||
//.map(res => <any> res.json())
|
||||
.pipe(map(res => res['result']['metadata']['oaf:entity']['oaf:project']))
|
||||
.pipe(map(res => this.parseHTMLInfo(res)));
|
||||
}
|
||||
|
||||
private handleError(error: HttpErrorResponse) {
|
||||
console.log(error);
|
||||
return throwError(error || 'Server error');
|
||||
}
|
||||
|
||||
parseHTMLInfo(data: any): any {
|
||||
let htmlInfo: { "title": string, "acronym": string, "callIdentifier": string };
|
||||
|
||||
if (data != null) {
|
||||
htmlInfo = {"title": data.title, "acronym": data.acronym, "callIdentifier": data.callidentifier};
|
||||
}
|
||||
return htmlInfo;
|
||||
}
|
||||
|
||||
parseProjectInfo(data: any, properties: EnvProperties): any {
|
||||
this.projectInfo = new ProjectInfo();
|
||||
this.projectInfo.funding = {
|
||||
funderName: "", funderShortName: "", funderJurisdiction: "", code: "", callIdentifier: "",
|
||||
fundingStream: "", budget: "", contribution: "", currency: ""
|
||||
};
|
||||
|
||||
// ['result']['header']['dri:objIdentifier']
|
||||
if (data[3] != null) {
|
||||
this.projectInfo.id = data[3];
|
||||
}
|
||||
|
||||
public parsingFunctions: ParsingFunctions;
|
||||
projectInfo: ProjectInfo;
|
||||
|
||||
getProjectInfo (id: string, properties:EnvProperties):any {
|
||||
|
||||
let url = properties.searchAPIURLLAst + 'projects/'+id+"?format=json";
|
||||
let key = url;
|
||||
|
||||
return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url)
|
||||
//.map(res => <any> res.json())
|
||||
.pipe(map(res => res['result']['metadata']['oaf:entity']['oaf:project']))
|
||||
.pipe(map(res => [res,
|
||||
res['fundingtree'],
|
||||
res['rels']['rel']]))
|
||||
.pipe(map(res => this.parseProjectInfo(res, properties)));
|
||||
|
||||
}
|
||||
|
||||
getProjectInfoByGrantId (grant: string, funder:string, properties:EnvProperties):any {
|
||||
|
||||
let url =properties.searchAPIURLLAst+ 'resources?query=(oaftype exact project)'+
|
||||
'and (projectcode_nt exact "'+grant+'" ) and (fundershortname exact '+'"'+funder+ '"'+')'+"&format=json&size=1";
|
||||
|
||||
|
||||
let key = url;
|
||||
|
||||
return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url)
|
||||
//.map(res => <any> res.json())
|
||||
.pipe(map(res => res['results'][0]))
|
||||
.pipe(map(res => [res['result']['metadata']['oaf:entity']['oaf:project'],res['result']['header']['dri:objIdentifier']]))
|
||||
.pipe(map(res => [res[0],
|
||||
res[0]['fundingtree'],
|
||||
res[0]['rels']['rel'],res[1]]))
|
||||
.pipe(map(res => this.parseProjectInfo(res, properties)));
|
||||
|
||||
}
|
||||
/*
|
||||
get project strtDate and endDate
|
||||
*/
|
||||
getProjectDates (id: string, properties:EnvProperties):any {
|
||||
|
||||
let url = properties.searchAPIURLLAst+'projects/'+id+"?format=json";
|
||||
let key = url+'_projectDates';
|
||||
|
||||
return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url)
|
||||
//.map(res => <any> res.json())
|
||||
.pipe(map(res => res['result']['metadata']['oaf:entity']['oaf:project']))
|
||||
.pipe(map(res => [res,
|
||||
res['fundingtree'],
|
||||
res['rels']['rel']]))
|
||||
.pipe(map(res => this.parseProjectDates(id,res)))
|
||||
|
||||
}
|
||||
|
||||
getHTMLInfo(id: string, properties:EnvProperties): any {
|
||||
let url = properties.searchAPIURLLAst + 'projects/'+id+"?format=json";
|
||||
let key = url;
|
||||
|
||||
return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url)
|
||||
//.map(res => <any> res.json())
|
||||
.pipe(map(res => res['result']['metadata']['oaf:entity']['oaf:project']))
|
||||
.pipe(map(res => this.parseHTMLInfo(res)));
|
||||
}
|
||||
|
||||
private handleError (error: HttpErrorResponse) {
|
||||
console.log(error);
|
||||
return throwError(error || 'Server error');
|
||||
}
|
||||
|
||||
parseHTMLInfo (data: any):any {
|
||||
let htmlInfo: {"title": string, "acronym": string, "callIdentifier": string};
|
||||
|
||||
if(data != null) {
|
||||
htmlInfo = {"title": data.title, "acronym": data.acronym, "callIdentifier": data.callidentifier};
|
||||
}
|
||||
return htmlInfo;
|
||||
}
|
||||
|
||||
parseProjectInfo (data: any, properties:EnvProperties):any {
|
||||
this.projectInfo = new ProjectInfo();
|
||||
this.projectInfo.funding = {funderName: "", funderShortName: "", code: "", callIdentifier: "",
|
||||
fundingStream: "", budget: "", contribution: "", currency: ""};
|
||||
|
||||
// ['result']['header']['dri:objIdentifier']
|
||||
if(data[3] != null) {
|
||||
this.projectInfo.id = data[3];
|
||||
}
|
||||
|
||||
// ['result']['metadata']['oaf:entity']['oaf:project']['fundingtree']
|
||||
if(data[1] != null) {
|
||||
let funding: {"funderName": string, "funderShortname": string, "stream": string};
|
||||
funding = this.parsingFunctions.parseFundingTrees(data[1]);
|
||||
if(funding.funderName) {
|
||||
this.projectInfo.funding.funderName = funding.funderName;
|
||||
}
|
||||
if(funding.funderShortname) {
|
||||
this.projectInfo.funding.funderShortName = funding.funderShortname;
|
||||
}
|
||||
if(funding.stream) {
|
||||
this.projectInfo.funding.fundingStream = funding.stream;
|
||||
}
|
||||
// ['result']['metadata']['oaf:entity']['oaf:project']['fundingtree']
|
||||
if (data[1] != null) {
|
||||
let funding: { "funderName": string, "funderShortname": string, "funderJurisdiction": string, "stream": string };
|
||||
funding = this.parsingFunctions.parseFundingTrees(data[1]);
|
||||
if (funding.funderName) {
|
||||
this.projectInfo.funding.funderName = funding.funderName;
|
||||
}
|
||||
|
||||
// ['result']['metadata']['oaf:entity']['oaf:project']
|
||||
if(data[0] != null) {
|
||||
this.projectInfo.acronym = data[0].acronym;
|
||||
if(data[0]['title']) {
|
||||
this.projectInfo.title = Array.isArray(data[0]['title']) ? StringUtils.HTMLToString(String(data[0].title[0])) : StringUtils.HTMLToString(String(data[0].title));
|
||||
} else {
|
||||
this.projectInfo.title = "";
|
||||
}
|
||||
this.projectInfo.funding.code = data[0].code;
|
||||
if(data[0].startdate) {
|
||||
let date: number = Date.parse(data[0].startdate);
|
||||
this.projectInfo.startDate = (date ? date : null);
|
||||
}
|
||||
if(data[0].enddate) {
|
||||
let date: number = Date.parse(data[0].enddate);
|
||||
this.projectInfo.endDate = (date ? date : null);
|
||||
}
|
||||
if(this.projectInfo.endDate || this.projectInfo.startDate) {
|
||||
let todayDate = Date.parse(new Date().toString());
|
||||
this.projectInfo.currentDate = todayDate;
|
||||
if(this.projectInfo.startDate) {
|
||||
let startDate = +(this.projectInfo.startDate);
|
||||
if (todayDate < startDate) {
|
||||
this.projectInfo.status = "Not started";
|
||||
}
|
||||
}
|
||||
if(this.projectInfo.endDate && !this.projectInfo.status) {
|
||||
let endDate = +(this.projectInfo.endDate);
|
||||
if (todayDate <= endDate) {
|
||||
this.projectInfo.status = "On going";
|
||||
} else {
|
||||
this.projectInfo.status = "Closed";
|
||||
}
|
||||
}
|
||||
}
|
||||
if(this.projectInfo.funding) {
|
||||
if(this.projectInfo.funding.funderShortName == "EC") {
|
||||
this.projectInfo.openAccessMandatePublications = data[0].oamandatepublications;
|
||||
// this.projectInfo.specialClause39 = data[0].ecsc39;
|
||||
if(data[0].hasOwnProperty("projectoamandatedata")) {
|
||||
this.projectInfo.openAccessMandateDatasets = data[0].projectoamandatedata;
|
||||
} else if(data[0].hasOwnProperty("ecarticle29_3")) {
|
||||
this.projectInfo.openAccessMandateDatasets = data[0].ecarticle29_3;
|
||||
}
|
||||
this.projectInfo.funding.callIdentifier = data[0].callidentifier;
|
||||
}
|
||||
this.projectInfo.funding.budget = data[0].totalcost;//"10000";
|
||||
this.projectInfo.funding.contribution = data[0].fundedamount;//"200100";
|
||||
this.projectInfo.funding.currency = data[0].currency;//"EUR";
|
||||
}
|
||||
// if(!Array.isArray(data[0]['summary'])) {
|
||||
// this.projectInfo.description = (data[0]['summary']) ? String(data[0]['summary']) : "";
|
||||
// } else {
|
||||
// this.projectInfo.description = (data[0]['summary'][0]) ? String(data[0]['summary'][0]) : "";
|
||||
// }
|
||||
this.projectInfo.description = this.parsingFunctions.parseDescription(data[0] && data[0].summary?data[0].summary:[]);
|
||||
if (funding.funderShortname) {
|
||||
this.projectInfo.funding.funderShortName = funding.funderShortname;
|
||||
}
|
||||
if (funding.funderJurisdiction) {
|
||||
this.projectInfo.funding.funderJurisdiction = funding.funderJurisdiction;
|
||||
}
|
||||
if (funding.stream) {
|
||||
this.projectInfo.funding.fundingStream = funding.stream;
|
||||
}
|
||||
}
|
||||
|
||||
// ['result']['metadata']['oaf:entity']['oaf:project']['rels']['rel']
|
||||
if(data[2] != null) {
|
||||
this.projectInfo.organizations = [];//new Map<string, string>();
|
||||
// ['result']['metadata']['oaf:entity']['oaf:project']
|
||||
if (data[0] != null) {
|
||||
this.projectInfo.acronym = data[0].acronym;
|
||||
if (data[0]['title']) {
|
||||
this.projectInfo.title = Array.isArray(data[0]['title']) ? StringUtils.HTMLToString(String(data[0].title[0])) : StringUtils.HTMLToString(String(data[0].title));
|
||||
} else {
|
||||
this.projectInfo.title = "";
|
||||
}
|
||||
this.projectInfo.funding.code = data[0].code;
|
||||
if (data[0].startdate) {
|
||||
let date: number = Date.parse(data[0].startdate);
|
||||
this.projectInfo.startDate = (date ? date : null);
|
||||
}
|
||||
if (data[0].enddate) {
|
||||
let date: number = Date.parse(data[0].enddate);
|
||||
this.projectInfo.endDate = (date ? date : null);
|
||||
}
|
||||
if (this.projectInfo.endDate || this.projectInfo.startDate) {
|
||||
let todayDate = Date.parse(new Date().toString());
|
||||
this.projectInfo.currentDate = todayDate;
|
||||
if (this.projectInfo.startDate) {
|
||||
let startDate = +(this.projectInfo.startDate);
|
||||
if (todayDate < startDate) {
|
||||
this.projectInfo.status = "Not started";
|
||||
}
|
||||
}
|
||||
if (this.projectInfo.endDate && !this.projectInfo.status) {
|
||||
let endDate = +(this.projectInfo.endDate);
|
||||
if (todayDate <= endDate) {
|
||||
this.projectInfo.status = "On going";
|
||||
} else {
|
||||
this.projectInfo.status = "Closed";
|
||||
}
|
||||
}
|
||||
}
|
||||
if (this.projectInfo.funding) {
|
||||
if (this.projectInfo.funding.funderShortName == "EC") {
|
||||
this.projectInfo.openAccessMandatePublications = data[0].oamandatepublications;
|
||||
// this.projectInfo.specialClause39 = data[0].ecsc39;
|
||||
if (data[0].hasOwnProperty("projectoamandatedata")) {
|
||||
this.projectInfo.openAccessMandateDatasets = data[0].projectoamandatedata;
|
||||
} else if (data[0].hasOwnProperty("ecarticle29_3")) {
|
||||
this.projectInfo.openAccessMandateDatasets = data[0].ecarticle29_3;
|
||||
}
|
||||
this.projectInfo.funding.callIdentifier = data[0].callidentifier;
|
||||
}
|
||||
this.projectInfo.funding.budget = data[0].totalcost;//"10000";
|
||||
this.projectInfo.funding.contribution = data[0].fundedamount;//"200100";
|
||||
this.projectInfo.funding.currency = data[0].currency;//"EUR";
|
||||
}
|
||||
// if(!Array.isArray(data[0]['summary'])) {
|
||||
// this.projectInfo.description = (data[0]['summary']) ? String(data[0]['summary']) : "";
|
||||
// } else {
|
||||
// this.projectInfo.description = (data[0]['summary'][0]) ? String(data[0]['summary'][0]) : "";
|
||||
// }
|
||||
this.projectInfo.description = this.parsingFunctions.parseDescription(data[0] && data[0].summary ? data[0].summary : []);
|
||||
}
|
||||
|
||||
if(!Array.isArray(data[2])) {
|
||||
if(data[2].hasOwnProperty("to") && data[2]['to'].class && data[2]['to'].class.toLowerCase() == "hasparticipant") {
|
||||
let acronym: string = "";
|
||||
let name: string = "";
|
||||
let id: string = "";
|
||||
if (data[2].hasOwnProperty("legalshortname")) {
|
||||
acronym = data[2].legalshortname;
|
||||
}
|
||||
if (data[2].hasOwnProperty("legalname")) {
|
||||
name = data[2].legalname;
|
||||
}
|
||||
if (!acronym && !name) {
|
||||
// acronym is displayed with link and name only in tooltip
|
||||
acronym = "[no title available]";
|
||||
}
|
||||
// ['result']['metadata']['oaf:entity']['oaf:project']['rels']['rel']
|
||||
if (data[2] != null) {
|
||||
this.projectInfo.organizations = [];
|
||||
|
||||
if (data[2].hasOwnProperty("to")) {
|
||||
id = data[2]['to'].content;
|
||||
}
|
||||
if (!Array.isArray(data[2])) {
|
||||
if (data[2].hasOwnProperty("to") && data[2]['to'].class && data[2]['to'].class.toLowerCase() == "hasparticipant") {
|
||||
let country: string = "";
|
||||
let acronym: string = "";
|
||||
let name: string = "";
|
||||
let id: string = "";
|
||||
if(data[2].hasOwnProperty("country")) {
|
||||
country = data[2].country.classname;
|
||||
}
|
||||
if (data[2].hasOwnProperty("legalshortname")) {
|
||||
acronym = data[2].legalshortname;
|
||||
}
|
||||
if (data[2].hasOwnProperty("legalname")) {
|
||||
name = data[2].legalname;
|
||||
}
|
||||
if (!acronym && !name) {
|
||||
// acronym is displayed with link and name only in tooltip
|
||||
acronym = "[no title available]";
|
||||
}
|
||||
|
||||
this.projectInfo.organizations.push({"acronym": acronym, "name": name, "id": id});
|
||||
}
|
||||
} else {
|
||||
for(let i=0; i<data[2].length; i++) {
|
||||
let acronym: string = "";
|
||||
let name: string = "";
|
||||
let id: string = "";
|
||||
if(data[2][i].hasOwnProperty("to") && data[2][i]['to'].class && data[2][i]['to'].class.toLowerCase() == "hasparticipant") {
|
||||
if(data[2][i].hasOwnProperty("legalshortname")) {
|
||||
acronym = data[2][i].legalshortname;
|
||||
}
|
||||
if(data[2][i].hasOwnProperty("legalname")) {
|
||||
name = data[2][i].legalname;
|
||||
}
|
||||
if(!acronym && !name){
|
||||
acronym = "[no title available]";
|
||||
}
|
||||
if (data[2].hasOwnProperty("to")) {
|
||||
id = data[2]['to'].content;
|
||||
}
|
||||
|
||||
if(data[2][i].hasOwnProperty("to")) {
|
||||
id = data[2][i]['to'].content;
|
||||
}
|
||||
|
||||
this.projectInfo.organizations.push({"acronym": acronym, "name": name, "id": id});
|
||||
}
|
||||
}
|
||||
this.projectInfo.organizations.push({"country": country, "acronym": acronym, "name": name, "id": id});
|
||||
}
|
||||
} else {
|
||||
for (let i = 0; i < data[2].length; i++) {
|
||||
let country: string = "";
|
||||
let acronym: string = "";
|
||||
let name: string = "";
|
||||
let id: string = "";
|
||||
if (data[2][i].hasOwnProperty("to") && data[2][i]['to'].class && data[2][i]['to'].class.toLowerCase() == "hasparticipant") {
|
||||
if(data[2][i].hasOwnProperty("country")) {
|
||||
country = data[2][i].country.classname;
|
||||
}
|
||||
if (data[2][i].hasOwnProperty("legalshortname")) {
|
||||
acronym = data[2][i].legalshortname;
|
||||
}
|
||||
if (data[2][i].hasOwnProperty("legalname")) {
|
||||
name = data[2][i].legalname;
|
||||
}
|
||||
if (!acronym && !name) {
|
||||
acronym = "[no title available]";
|
||||
}
|
||||
|
||||
if (data[2][i].hasOwnProperty("to")) {
|
||||
id = data[2][i]['to'].content;
|
||||
}
|
||||
|
||||
this.projectInfo.organizations.push({"country": country, "acronym": acronym, "name": name, "id": id});
|
||||
}
|
||||
}
|
||||
|
||||
if(this.projectInfo.funding && this.projectInfo.funding.funderShortName == "EC") {
|
||||
this.projectInfo.url = properties.cordisURL+this.projectInfo.funding.code;
|
||||
this.projectInfo.urlInfo = "Detailed project information (CORDIS)";
|
||||
}
|
||||
|
||||
if (data[0]?.measure) {
|
||||
this.projectInfo.measure = this.parsingFunctions.parseMeasures(data[0].measure);
|
||||
}
|
||||
|
||||
return this.projectInfo;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
parseProjectDates (id: string, data: any):any {
|
||||
let project = { id: id, startDate: "", endDate: ""};
|
||||
if(data[0] != null) {
|
||||
project.startDate = data[0].startdate;
|
||||
project.endDate = data[0].enddate;
|
||||
}
|
||||
return project;
|
||||
|
||||
if (this.projectInfo.funding && this.projectInfo.funding.funderShortName == "EC") {
|
||||
this.projectInfo.url = properties.cordisURL + this.projectInfo.funding.code;
|
||||
this.projectInfo.urlInfo = "Detailed project information (CORDIS)";
|
||||
}
|
||||
|
||||
if (data[0]?.measure) {
|
||||
this.projectInfo.measure = this.parsingFunctions.parseMeasures(data[0].measure);
|
||||
}
|
||||
|
||||
return this.projectInfo;
|
||||
|
||||
}
|
||||
|
||||
parseProjectDates(id: string, data: any): any {
|
||||
let project = {id: id, startDate: "", endDate: ""};
|
||||
if (data[0] != null) {
|
||||
project.startDate = data[0].startdate;
|
||||
project.endDate = data[0].enddate;
|
||||
}
|
||||
return project;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -27,8 +27,8 @@ import {HelperFunctions} from "../../../utils/HelperFunctions.class";
|
|||
<ul class="uk-list uk-margin">
|
||||
<li *ngFor="let result of results.slice((page-1)*pageSize, page*pageSize)">
|
||||
<result-preview [modal]="modal" [properties]="properties" [hasLink]="false" [result]="getResultPreview(result)"
|
||||
[showOrcid]="false" [isCard]="false" [prevPath]="prevPath" [showInline]="true"
|
||||
[isDeletedByInferenceModal]="true"></result-preview>
|
||||
[showOrcid]="false" [prevPath]="prevPath" [showInline]="true"
|
||||
[isDeletedByInferenceModal]="true" [isMobile]="isMobile"></result-preview>
|
||||
</li>
|
||||
</ul>
|
||||
<no-load-paging *ngIf="results.length > pageSize" [type]="type"
|
||||
|
@ -40,6 +40,7 @@ import {HelperFunctions} from "../../../utils/HelperFunctions.class";
|
|||
`
|
||||
})
|
||||
export class DeletedByInferenceComponent {
|
||||
@Input() isMobile: boolean = false;
|
||||
@Input() prevPath: string = "";
|
||||
public results: ResultLandingInfo[] = [];
|
||||
@Input() id: string;
|
||||
|
|
|
@ -145,8 +145,7 @@ export class DeletedByInferenceService {
|
|||
if(author.orcid_pending) {
|
||||
author.orcid_pending = author.orcid_pending.toUpperCase();
|
||||
}
|
||||
|
||||
if(result['authors'][author.rank] && results['authors'][author.rank].fullName == author.content) {
|
||||
if(result['authors'][author.rank] && result['authors'][author.rank].fullName == author.content) {
|
||||
if(!author.orcid && result['authors'][author.rank].orcid) {
|
||||
author.orcid = result['authors'][author.rank].orcid;
|
||||
} else if(!author.orcid_pending && result['authors'][author.rank].orcid_pending) {
|
||||
|
|
|
@ -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 { }
|
|
@ -2,10 +2,12 @@
|
|||
<schema2jsonld *ngIf="resultLandingInfo && resultLandingInfo.record"
|
||||
[data]=resultLandingInfo.record [URL]="canonicalUrl"
|
||||
[searchActionRoute]="properties.searchLinkToResults"></schema2jsonld>
|
||||
|
||||
<div *ngIf="resultLandingInfo && !resultLandingInfo.belongsTo && !isBottomIntersecting" [innerHTML]="resultLandingInfo.message"
|
||||
class="uk-alert uk-alert-warning uk-position-fixed uk-position-bottom-center uk-text-small" style="z-index: 1000;">
|
||||
</div>
|
||||
<!-- 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 +20,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">
|
||||
|
||||
|
@ -143,7 +81,8 @@
|
|||
[type]="resultLandingInfo.resultType"
|
||||
[result]="resultLandingInfo" [id]="resultLandingInfo.objIdentifier">
|
||||
<!-- ORCID -->
|
||||
<div *ngIf="properties.adminToolsPortalType == 'explore' || properties.adminToolsPortalType == 'community' || properties.adminToolsPortalType == 'aggregator'"
|
||||
<div *ngIf="properties.adminToolsPortalType == 'explore' || properties.adminToolsPortalType == 'community'
|
||||
|| properties.adminToolsPortalType == 'aggregator' || properties.dashboard == 'irish'"
|
||||
class="uk-margin-small-right">
|
||||
<orcid-work [resultId]="id" [resultTitle]="resultLandingInfo.title" [resultLandingInfo]="resultLandingInfo"
|
||||
[pids]="pidsArrayString" [pageType]="'landing'">
|
||||
|
@ -166,54 +105,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>
|
||||
|
||||
|
@ -229,50 +120,18 @@
|
|||
[publisher]="resultLandingInfo.publisher" [journal]="resultLandingInfo.journal"
|
||||
[languages]="resultLandingInfo.languages" [programmingLanguages]="resultLandingInfo.programmingLanguages"
|
||||
[prevPath]="prevPath" [countries]="resultLandingInfo.countries"
|
||||
[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"
|
||||
|
@ -281,7 +140,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"
|
||||
|
@ -361,26 +219,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"
|
||||
|
@ -454,6 +292,29 @@
|
|||
<!-- </div>-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngIf="resultLandingInfo && resultLandingInfo.oaRoutes && !viewAll"
|
||||
class="uk-margin-medium-top uk-padding uk-padding-remove-vertical">
|
||||
<div class="landing-oaroutes-card uk-text-small uk-flex uk-padding-small">
|
||||
<div>
|
||||
<div class="uk-flex uk-flex-top" uk-grid>
|
||||
<div *ngIf="resultLandingInfo.oaRoutes.green" class="uk-flex-nowrap uk-flex uk-flex-middle uk-margin-xsmall-bottom uk-margin-remove-top">
|
||||
<div class="dot green"></div>
|
||||
<div class="uk-text-capitalize">Green</div>
|
||||
</div>
|
||||
<div *ngIf="resultLandingInfo.oaRoutes.oaColor" class="uk-flex-nowrap uk-flex uk-flex-middle uk-margin-xsmall-bottom uk-margin-remove-top">
|
||||
<div class="dot" [ngClass]="resultLandingInfo.oaRoutes.oaColor"></div>
|
||||
<div class="uk-text-capitalize">{{resultLandingInfo.oaRoutes.oaColor}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="resultLandingInfo.oaRoutes.isInDiamondJournal" class="uk-flex-nowrap uk-flex uk-flex-middle uk-margin-xsmall-bottom uk-text-truncate">
|
||||
<div class="dot diamond"></div>
|
||||
<div>Published in a Diamond OA journal</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="uk-margin-medium-top uk-list uk-list-large uk-padding uk-padding-remove-vertical" [class.uk-list-divider]="!viewAll">
|
||||
<!-- EOSC Services-->
|
||||
<div *ngIf="resultLandingInfo.eoscSubjects?.length > 0 && properties.adminToolsPortalType == 'eosc'
|
||||
|
@ -485,11 +346,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 -->
|
||||
|
@ -523,6 +383,7 @@
|
|||
[date]="resultLandingInfo.dateofacceptance" [embargoEndDate]="resultLandingInfo.embargoEndDate"
|
||||
[publisher]="resultLandingInfo.publisher" [journal]="resultLandingInfo.journal"
|
||||
[languages]="resultLandingInfo.languages" [programmingLanguages]="resultLandingInfo.programmingLanguages"
|
||||
[publiclyFunded]="resultLandingInfo.publiclyFunded" [projects]="resultLandingInfo.fundedByProjects"
|
||||
[isMobile]="true" [prevPath]="prevPath">
|
||||
</landing-header>
|
||||
<div class="uk-text-small">
|
||||
|
@ -540,6 +401,31 @@
|
|||
<fos [subjects]="resultLandingInfo.fos" (suggestClicked)="suggestMobileClicked($event)"
|
||||
(viewAllClicked)="viewAllMobile=$event; openFsModal(fosFsModal, 'Fields of Science (FoS)')"></fos>
|
||||
</div>
|
||||
<!-- OA Routes -->
|
||||
<div *ngIf="resultLandingInfo.oaRoutes && !viewAllMobile" class="uk-margin-top uk-grid uk-grid-small uk-grid-divider" uk-grid>
|
||||
<div class="uk-width-auto uk-text-meta">
|
||||
Access Routes
|
||||
</div>
|
||||
<div class="uk-width-expand uk-flex">
|
||||
<div>
|
||||
<div class="uk-flex uk-flex-top" uk-grid>
|
||||
<div *ngIf="resultLandingInfo.oaRoutes.green" class="uk-flex-nowrap uk-flex uk-flex-middle uk-margin-xsmall-bottom uk-margin-remove-top">
|
||||
<div class="dot green"></div>
|
||||
<div class="uk-text-capitalize">Green</div>
|
||||
</div>
|
||||
<div *ngIf="resultLandingInfo.oaRoutes.oaColor" class="uk-flex-nowrap uk-flex uk-flex-middle uk-margin-xsmall-bottom uk-margin-remove-top">
|
||||
<div class="dot" [ngClass]="resultLandingInfo.oaRoutes.oaColor"></div>
|
||||
<div class="uk-text-capitalize">{{resultLandingInfo.oaRoutes.oaColor}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="resultLandingInfo.oaRoutes.isInDiamondJournal" class="uk-flex-nowrap uk-flex uk-flex-middle uk-margin-xsmall-bottom uk-text-truncate">
|
||||
<div class="dot diamond"></div>
|
||||
<div>Published in a Diamond OA journal</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="uk-section uk-margin-top uk-text-large uk-text-empashis uk-text-bold">
|
||||
<hr>
|
||||
|
@ -661,7 +547,8 @@
|
|||
</div>
|
||||
<hr class="uk-margin-remove">
|
||||
</ng-container>
|
||||
<ng-container *ngIf="properties.adminToolsPortalType == 'explore' || properties.adminToolsPortalType == 'community' || properties.adminToolsPortalType == 'aggregator'" >
|
||||
<ng-container *ngIf="properties.adminToolsPortalType == 'explore' || properties.adminToolsPortalType == 'community'
|
||||
|| properties.adminToolsPortalType == 'aggregator' || properties.dashboard == 'irish'" >
|
||||
<div class="uk-padding-small uk-padding-remove-horizontal ">
|
||||
<orcid-work [resultId]="id" [resultTitle]="resultLandingInfo?.title" [resultLandingInfo]="resultLandingInfo"
|
||||
[pids]="pidsArrayString" [pageType]="'landing'" [isMobile]="true"
|
||||
|
@ -836,16 +723,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"-->
|
||||
|
@ -1277,23 +1166,32 @@
|
|||
</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']"
|
||||
[ids]="resultLandingInfo.deletedByInferenceIds"
|
||||
[resultType]="type" [type]="openaireEntities.PUBLICATIONS"></deletedByInference>
|
||||
[resultType]="type" [type]="openaireEntities.PUBLICATIONS"
|
||||
[isMobile]="isMobile"
|
||||
[modal]="alertModalDeletedByInferenceFS"></deletedByInference>
|
||||
<deletedByInference *ngIf="type == 'dataset' && deleteByInferenceOpened"
|
||||
[id]="resultLandingInfo.record['result']['header']['dri:objIdentifier']"
|
||||
[ids]="resultLandingInfo.deletedByInferenceIds"
|
||||
[resultType]="'dataset'" [type]="openaireEntities.DATASETS"></deletedByInference>
|
||||
[resultType]="'dataset'" [type]="openaireEntities.DATASETS"
|
||||
[isMobile]="isMobile"
|
||||
[modal]="alertModalDeletedByInferenceFS"></deletedByInference>
|
||||
<deletedByInference *ngIf="type == 'software' && deleteByInferenceOpened"
|
||||
[id]="resultLandingInfo.record['result']['header']['dri:objIdentifier']"
|
||||
[ids]="resultLandingInfo.deletedByInferenceIds"
|
||||
[resultType]="type" [type]="openaireEntities.SOFTWARE"></deletedByInference>
|
||||
[resultType]="type" [type]="openaireEntities.SOFTWARE"
|
||||
[isMobile]="isMobile"
|
||||
[modal]="alertModalDeletedByInferenceFS"></deletedByInference>
|
||||
<deletedByInference *ngIf="type == 'orp' && deleteByInferenceOpened"
|
||||
[id]="resultLandingInfo.record['result']['header']['dri:objIdentifier']"
|
||||
[ids]="resultLandingInfo.deletedByInferenceIds"
|
||||
[resultType]="'other'" [type]="openaireEntities.OTHER"></deletedByInference>
|
||||
[resultType]="'other'" [type]="openaireEntities.OTHER"
|
||||
[isMobile]="isMobile"
|
||||
[modal]="alertModalDeletedByInferenceFS"></deletedByInference>
|
||||
</fs-modal>
|
||||
|
||||
<fs-modal *ngIf="resultLandingInfo" #citeFsModal classTitle="uk-tile-default uk-border-bottom">
|
||||
|
@ -1302,5 +1200,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>
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue