Merge remote-tracking branch 'origin/angular-16' into angular-16-irish-monitor
This commit is contained in:
commit
c4ecc8fcae
|
@ -16,7 +16,8 @@ export class ZenodoCommunitiesService {
|
||||||
//.map(res => <any> res.json())
|
//.map(res => <any> res.json())
|
||||||
.pipe(map(res => [this.parseZenodoCommunities(res['hits'].hits),res['hits'].total]));
|
.pipe(map(res => [this.parseZenodoCommunities(res['hits'].hits),res['hits'].total]));
|
||||||
}
|
}
|
||||||
getZenodoCommunityById(properties:EnvProperties, url: string) {
|
getZenodoCommunityById(properties:EnvProperties, id: string) {
|
||||||
|
let url = properties.zenodoCommunities + "/" + id;
|
||||||
return this.http.get((properties.useLongCache)? (properties.cacheUrl+encodeURIComponent(url)) : url)
|
return this.http.get((properties.useLongCache)? (properties.cacheUrl+encodeURIComponent(url)) : url)
|
||||||
//.map(res => <any> res.json())
|
//.map(res => <any> res.json())
|
||||||
.pipe(map(res => {
|
.pipe(map(res => {
|
||||||
|
@ -39,14 +40,14 @@ export class ZenodoCommunitiesService {
|
||||||
|
|
||||||
parseZenodoCommunity(resData:any):ZenodoCommunityInfo {
|
parseZenodoCommunity(resData:any):ZenodoCommunityInfo {
|
||||||
var result: ZenodoCommunityInfo = new ZenodoCommunityInfo();
|
var result: ZenodoCommunityInfo = new ZenodoCommunityInfo();
|
||||||
|
let metadata = resData["metadata"];
|
||||||
result['title'] = resData.title;
|
result['title'] = metadata.title;
|
||||||
result['id'] = resData.id;
|
result['id'] = resData.id;
|
||||||
result['description'] = resData.description;
|
result['description'] = metadata.description;
|
||||||
result['link'] = resData.links.html;
|
result['link'] = resData.links.self_html;
|
||||||
result['logoUrl'] = resData.logo_url;
|
result['logoUrl'] = resData.links.logo;
|
||||||
result['date'] = resData.updated;
|
result['date'] = resData.updated;
|
||||||
result['page'] = resData.page;
|
result['page'] = metadata.page;
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,6 +25,10 @@ export class IndexInfoService {
|
||||||
let url = properties.indexInfoAPI;
|
let url = properties.indexInfoAPI;
|
||||||
return this.http.get((properties.useLongCache)? (properties.cacheUrl+encodeURIComponent(url)): url).pipe(map(res => res['orcid_update_date'])).pipe(catchError(err => {return of(null)}));
|
return this.http.get((properties.useLongCache)? (properties.cacheUrl+encodeURIComponent(url)): url).pipe(map(res => res['orcid_update_date'])).pipe(catchError(err => {return of(null)}));
|
||||||
}
|
}
|
||||||
|
getDBLoadLastDate(properties: EnvProperties): Observable<any> {
|
||||||
|
let url = properties.indexInfoAPI;
|
||||||
|
return this.http.get((properties.useLongCache)? (properties.cacheUrl+encodeURIComponent(url)): url).pipe(map(res => res['db_load_date'])).pipe(catchError(err => {return of(null)}));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
<div class="multi-line-ellipsis lines-3 uk-width-expand">
|
<div class="multi-line-ellipsis lines-3 uk-width-expand">
|
||||||
<h2 class="uk-margin-remove uk-text-break uk-inline-block uk-h6">
|
<h2 class="uk-margin-remove uk-text-break uk-inline-block uk-h6">
|
||||||
<a *ngIf="!externalUrl && result.id" (click)="onClick()" [queryParams]="addEoscPrevInParams(createParam())"
|
<a *ngIf="!externalUrl && result.id" (click)="onClick()" [queryParams]="addEoscPrevInParams(createParam())"
|
||||||
[routerLink]="url" class="uk-link uk-text-decoration-none uk-width-expand">
|
[routerLink]="url" class="uk-link uk-text-decoration-none uk-width-expand" [class.uk-disabled]="result.id == '-1'">
|
||||||
<div *ngIf="(result.title) || result.acronym">
|
<div *ngIf="(result.title) || result.acronym">
|
||||||
<span *ngIf="result.acronym">
|
<span *ngIf="result.acronym">
|
||||||
{{result.acronym}}
|
{{result.acronym}}
|
||||||
|
@ -180,7 +180,7 @@
|
||||||
<div *ngIf="result.hostedBy_collectedFrom?.length" class="uk-width-auto uk-visible@m">
|
<div *ngIf="result.hostedBy_collectedFrom?.length" class="uk-width-auto uk-visible@m">
|
||||||
<availableOn [availableOn]="result.hostedBy_collectedFrom"></availableOn>
|
<availableOn [availableOn]="result.hostedBy_collectedFrom"></availableOn>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="hasActions" class="uk-width-expand uk-visible@m">
|
<div *ngIf="hasActions && result.id" class="uk-width-expand uk-visible@m">
|
||||||
<entity-actions [cite]="cite" [share]="share" [linking]="linking"
|
<entity-actions [cite]="cite" [share]="share" [linking]="linking"
|
||||||
[deposit]="deposit" [embed]="embed"
|
[deposit]="deposit" [embed]="embed"
|
||||||
[type]="result.resultType"
|
[type]="result.resultType"
|
||||||
|
|
|
@ -79,6 +79,11 @@ export class ResultPreviewComponent implements OnInit, OnChanges {
|
||||||
this.urlParam = "grantId";
|
this.urlParam = "grantId";
|
||||||
}
|
}
|
||||||
this.url = properties.searchLinkToProject.split('?')[0];
|
this.url = properties.searchLinkToProject.split('?')[0];
|
||||||
|
if(this.result.id == "-1"){
|
||||||
|
//community projetcs - not yet loaded in the graph
|
||||||
|
this.url = null;
|
||||||
|
this.result.id = null;
|
||||||
|
}
|
||||||
this.projectActions();
|
this.projectActions();
|
||||||
} else if (this.result.resultType == "organization") {
|
} else if (this.result.resultType == "organization") {
|
||||||
this.urlParam = "organizationId";
|
this.urlParam = "organizationId";
|
||||||
|
|
Loading…
Reference in New Issue