[Library & common-assets | new-theme]: Updates for redesign.
1. availableOn.component.ts: Updated class of title to "uk-text-light-grey" and added custom-external icon to links and updated accessright icons. 2. citation.class.ts: Added fileFormatOptions: Option[] to use it in input options. 3. citeThis.component.ts: Updated select inputs using "input" from InputComponent | Updated copy to clipboard button to link. 4. citeThis.module.ts: Import InputModule. 5. fos.component.ts: Updated class of title to "uk-text-light-grey". 6. fundedBy.component.ts: Updated class of title to "uk-text-light-grey" and updated links with uk-text-emphasis class. 7. landing-header.component.ts: Increase authorsLimit to 7 | Changed class of "under curation" to uk-text-primary (used to be custom class). 8. metrics.component.ts: Updated in clickOutside event. parsingFunctions.class.ts: Updated open, closed and unknown with icon names instead of paths to svgs (download accessright icons). 9. relatedTo.component.ts: Updated class of title to "uk-text-light-grey" and added custom-external for links. 10. resultLandingUtils.module.ts: Inport AlertModalModule (to open modal). 11. sdg.component.ts: Updated class of titlte to "uk-text-light-grey". 12. showIdentifiers.component.ts: Added view more functionality. 13. showPublisher.component.ts: Updated custon-external class. 14. resultLanding.module.ts: registerIcon link. 15. resultLanding.component.html: Updated css for result landing and commented annotations (b2note). 16. orcid-work.component.ts: Updated orcid action button for landing page. 17. orcid.module.ts: registerIcons orcid_add and orcid_bin. 18. customOptions.class.ts: [Bug fix] [By Kostis] registryOptions() was not returning properly httpHeaders. 19. showAuthors.component.ts: Updated css 20. icons.ts: Export svgs orcid_add, orcid_bin, link. 21. alert.ts: Removed margin from title. 22. result-preview.component.html: Title of results set to <h2> and uk-h6 and when links to uk-link-heading | accessRightIcon for hostedBy_collectedFrom. 23. result-preview.module.ts: Imported IconsModule. 24. landing-utils.css: Updates in landing css & css of landing-action-button & added backdrop filter missing rules. 25. utils.css: Updated class orcid-clipboard-wrapper and renamed to clipboad-wrapper | Update class .custom-external to set in content with code instead of name and updated not to underline it on hover 26. library.css: Added class .default-dropdown with max-width: 500px;
This commit is contained in:
parent
8df2c1a2e1
commit
e28e06b239
|
@ -11,8 +11,7 @@ import {properties} from "../../../../environments/environment";
|
|||
{{title}}
|
||||
</span>
|
||||
<span *ngIf="!viewAll || lessBtn" class="uk-margin-small-bottom uk-flex uk-flex-middle">
|
||||
<span class="uk-text-meta uk-margin-small-right">Download from</span>
|
||||
<icon name="download" flex="true" class="uk-text-secondary"></icon>
|
||||
<span class="uk-text-light-grey uk-margin-small-right">Download from</span>
|
||||
</span>
|
||||
<a *ngIf="viewAll && lessBtn" (click)="viewAll = !viewAll; lessBtn=false;">View less</a>
|
||||
<a *ngIf="availableOn && availableOn.length > threshold && !viewAll"
|
||||
|
@ -21,17 +20,18 @@ import {properties} from "../../../../environments/environment";
|
|||
|
||||
<div *ngIf="availableOn" class="download-from uk-margin-small-bottom">
|
||||
<div *ngFor="let instance of availableOn.slice(0, viewAll?availableOn.length:threshold) let i=index"
|
||||
class="uk-flex uk-flex-top uk-padding-small"
|
||||
class="uk-flex uk-flex-top uk-padding-small uk-margin-small-bottom"
|
||||
[title]="instance.accessRight ? instance.accessRight : 'Not available'">
|
||||
<span class="uk-margin-small-right">
|
||||
<img [src]="instance.accessRightIcon" loading="lazy" [alt]="instance.accessRight" style="width:20px; height:20px">
|
||||
<span [class]="'uk-margin-small-right ' + (instance.accessRightIcon == 'lock_open' ? 'uk-text-success' : 'uk-text-meta')">
|
||||
<icon [name]="instance.accessRightIcon" flex="true" type="outlined"></icon>
|
||||
</span>
|
||||
<div class="uk-width-expand uk-padding-small uk-padding-remove-left uk-padding-remove-vertical">
|
||||
<a *ngIf="instance.downloadUrl" [href]="instance.downloadUrl" target="_blank"
|
||||
class="title uk-link-text uk-text-emphasis uk-text-bold">
|
||||
{{instance.downloadNames.join("; ")}}
|
||||
<span class="custom-external custom-icon space"></span>
|
||||
</a>
|
||||
<span class="uk-text-emphasis">
|
||||
<a *ngIf="instance.downloadUrl" [href]="instance.downloadUrl" target="_blank"
|
||||
class="title uk-link-text uk-text-bold custom-external uk-display-inline-block">
|
||||
{{instance.downloadNames.join("; ")}}
|
||||
</a>
|
||||
</span>
|
||||
<div *ngIf="instance.types?.length > 0 || instance.years?.length > 0" 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>
|
||||
|
@ -75,7 +75,7 @@ export class AvailableOnComponent {
|
|||
@Input() viewAll: boolean = false;
|
||||
@Output() viewAllClicked = new EventEmitter();
|
||||
public lessBtn: boolean = false;
|
||||
public threshold: number = 2;
|
||||
public threshold: number = 1;
|
||||
public dataProviderUrl = properties.searchLinkToDataProvider.split('?')[0];
|
||||
public title: string = "Download from";
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -20,38 +20,23 @@ declare var Cite: any;
|
|||
@Component({
|
||||
selector: 'citeThis',
|
||||
template: `
|
||||
<div class="uk-padding">
|
||||
<mat-form-field class="matSelectionFormField uk-width-1-1">
|
||||
<mat-label>Select a citation style</mat-label>
|
||||
<mat-select class="matSelection" id="citations" name="citeselect" [(ngModel)]="selectedStyle"
|
||||
(ngModelChange)="styleChanged()"
|
||||
[disableOptionCentering]="true"
|
||||
panelClass="matSelectionPanel">
|
||||
<mat-option *ngFor=" let style of this.citation.templates let i = index"
|
||||
[value]="style">{{style}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<div *ngIf="selectedStyle" class="box-content uk-grid uk-margin-auto ">
|
||||
<div id="citation" class=" uk-overflow-auto uk-padding-small" [innerHTML]=citationText></div>
|
||||
<div class="uk-width-1-1">
|
||||
<button class="clipboard_btn uk-button uk-button-primary uk-button-small copy uk-icon uk-float-right"
|
||||
data-clipboard-target="#citation" title="Copy to clipboard">
|
||||
<span class="custom-icon custom-copy-white"></span>
|
||||
<!-- <span class="uk-margin-small-left">COPY</span>-->
|
||||
</button>
|
||||
<div class="uk-padding uk-padding-remove-top uk-height-large uk-overflow-auto">
|
||||
<div input type="select" placeholder="Select a citation style" inputClass="flat x-small"
|
||||
[options]="citation.templates" [(value)]="selectedStyle"
|
||||
(valueChange)="styleChanged()"></div>
|
||||
<div *ngIf="selectedStyle" class="clipboard-wrapper box-content uk-grid uk-margin-auto uk-margin-small-top ">
|
||||
<div id="citation" class="uk-overflow-auto uk-padding-small uk-padding-remove-vertical uk-margin-top" [innerHTML]=citationText></div>
|
||||
<div class="uk-width-1-1 uk-padding-small uk-text-right">
|
||||
<a class="uk-link copy clipboard_btn" data-clipboard-target="#citation" title="Copy citation">
|
||||
COPY CITATION
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-margin-top">
|
||||
<mat-form-field class="matSelectionFormField uk-width-1-1">
|
||||
<mat-label>Or select file format to download</mat-label>
|
||||
<mat-select class="matSelection" id="fileformats" name="fileformatsSelect" [(ngModel)]="selectedFormat"
|
||||
(ngModelChange)="formatChanged()"
|
||||
[disableOptionCentering]="true"
|
||||
panelClass="matSelectionPanel">
|
||||
<mat-option *ngFor=" let format of citation.fileFormats let i = index"
|
||||
[value]="format">{{format + " (" +citation.fileSuffix[i] + ")"}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<div class="uk-margin-large-top">
|
||||
<div input type="select" placeholder="Select file format to download" inputClass="flat x-small"
|
||||
[options]="citation.fileFormatOptions" [(value)]="selectedFormat"
|
||||
(valueChange)="formatChanged()"></div>
|
||||
<button *ngIf="selectedFormat" class=" uk-button uk-button-primary uk-button-small uk-margin-small-top uk-icon uk-float-right"
|
||||
title="Copy to clipboard" [disabled]="!selectedFormat" (click)="downloadFile()">
|
||||
<span class="custom-icon " uk-icon="download"></span>
|
||||
|
|
|
@ -4,11 +4,12 @@ import {FormsModule} from '@angular/forms';
|
|||
|
||||
import {CiteThisComponent} from './citeThis.component';
|
||||
import { MatSelectModule } from "@angular/material/select";
|
||||
import {InputModule} from "../../../sharedComponents/input/input.module";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
|
||||
CommonModule, FormsModule, MatSelectModule
|
||||
|
||||
CommonModule, FormsModule, MatSelectModule, InputModule
|
||||
],
|
||||
declarations: [
|
||||
CiteThisComponent
|
||||
|
|
|
@ -10,7 +10,7 @@ import {properties} from "../../../../environments/environment";
|
|||
<icon class="uk-margin-small-right" name="arrow_back" flex="true" ratio="1.2"></icon>
|
||||
{{title}}
|
||||
</span>
|
||||
<span *ngIf="!viewAll || lessBtn" class="uk-text-meta">{{title}}</span>
|
||||
<span *ngIf="!viewAll || lessBtn" class="uk-text-light-grey">{{title}}</span>
|
||||
<a *ngIf="viewAll && lessBtn" (click)="viewAll = !viewAll; lessBtn=false;">View less</a>
|
||||
<a *ngIf="subjects && subjects.length > threshold && !viewAll"
|
||||
(click)="viewAllClick();">View more</a>
|
||||
|
|
|
@ -10,22 +10,22 @@ import {properties} from "../../../../environments/environment";
|
|||
<icon class="uk-margin-small-right" name="arrow_back" flex="true" ratio="1.2"></icon>
|
||||
{{title}}
|
||||
</span>
|
||||
<span *ngIf="!viewAll || lessBtn" class="uk-text-meta">{{title}}</span>
|
||||
<span *ngIf="!viewAll || lessBtn" class="uk-text-light-grey">{{title}}</span>
|
||||
<a *ngIf="viewAll && lessBtn" (click)="viewAll = !viewAll; lessBtn=false;">View less</a>
|
||||
<a *ngIf="fundedByProjects && fundedByProjects.length > threshold && !viewAll"
|
||||
(click)="viewAllClick();">View more</a>
|
||||
</div>
|
||||
<div>
|
||||
<span *ngFor="let item of fundedByProjects.slice(0, viewAll?fundedByProjects.length:threshold) let i=index">
|
||||
<a class="uk-link-text">
|
||||
<span>
|
||||
<span class="uk-text-emphasis">
|
||||
<a class="uk-link-text">
|
||||
<span
|
||||
*ngIf="item['funderShortname'] || item['funderName']">{{item['funderShortname'] ? item['funderShortname'] : item['funderName']}}</span>
|
||||
<span *ngIf="!item['funderShortname'] && !item['funderName']">[no funder available]</span>
|
||||
<span
|
||||
*ngIf="item['acronym'] || item['title']">| {{ item['acronym'] ? item['acronym'] : item['title']}}</span>
|
||||
</span>
|
||||
</a>
|
||||
</a>
|
||||
</span>
|
||||
<div class="default-dropdown uk-margin-remove-top uk-dropdown"
|
||||
uk-dropdown="pos: bottom-left; mode:click">
|
||||
<div class="uk-padding-small">
|
||||
|
|
|
@ -46,7 +46,7 @@ import {AlertModal} from "../../../utils/modal/alert";
|
|||
<span *ngIf="underCuration">
|
||||
. <span title="{{buildCurationTooltip()}}"
|
||||
uk-tooltip="pos:bottom-right; delay:10;"
|
||||
class="under-curation">Under curation</span>
|
||||
class="uk-text-primary">Under curation</span>
|
||||
</span>
|
||||
</div>
|
||||
<showTitle [titleName]="title" classNames="uk-margin-remove-bottom"></showTitle>
|
||||
|
@ -70,7 +70,7 @@ export class LandingHeaderComponent {
|
|||
@Input() title: string;
|
||||
@Input() subTitle: string;
|
||||
@Input() authors: Author[];
|
||||
@Input() authorLimit: number = 3;
|
||||
@Input() authorLimit: number = 7;
|
||||
@Input() showAllAuthors: boolean = true;
|
||||
@Input() underCuration: boolean = false;
|
||||
@Input() modal: AlertModal;
|
||||
|
|
|
@ -6,14 +6,14 @@ import {ErrorCodes} from '../../../utils/properties/errorCodes';
|
|||
import {Subscription, zip} from 'rxjs';
|
||||
import {EnvProperties} from '../../../utils/properties/env-properties';
|
||||
import {animate, state, style, transition, trigger} from "@angular/animations";
|
||||
import {ClickEvent} from "../../../utils/click/click-outside-or-esc.directive";
|
||||
|
||||
@Component({
|
||||
selector: 'metrics',
|
||||
styleUrls: ['metrics.component.css'],
|
||||
template: `
|
||||
<div *ngIf="metrics && (pageViews >0 || metrics.totalViews > 0|| metrics.totalDownloads >0)" class="metrics"
|
||||
click-outside-or-esc (clickOutside)="close($event)"
|
||||
id="metrics" targetId="metrics">
|
||||
click-outside-or-esc (clickOutside)="close($event)">
|
||||
<div class="m-badge clickable" (click)="toggle($event)">
|
||||
<img src="assets/common-assets/logo-small-usage-counts.png" loading="lazy" alt="usage counts">
|
||||
<div class="number">{{total | number}}</div>
|
||||
|
@ -309,8 +309,8 @@ export class MetricsComponent {
|
|||
);
|
||||
}
|
||||
|
||||
public close(event) {
|
||||
if(event.value && this.state !== -1) {
|
||||
public close(event: ClickEvent) {
|
||||
if(event.clicked && this.state !== -1) {
|
||||
this.timeouts.forEach(timeout => {
|
||||
clearTimeout(timeout);
|
||||
});
|
||||
|
|
|
@ -13,9 +13,13 @@ export class ParsingFunctions {
|
|||
private notebook_label: string = "EOSC";
|
||||
private notebook_value: string = "EOSC Jupyter Notebook";
|
||||
|
||||
public open = 'assets/common-assets/unlock.svg';
|
||||
public closed = 'assets/common-assets/lock.svg';
|
||||
public unknown = 'assets/common-assets/question.svg';
|
||||
// public open = 'assets/common-assets/unlock.svg';
|
||||
// public closed = 'assets/common-assets/lock.svg';
|
||||
// public unknown = 'assets/common-assets/question.svg';
|
||||
|
||||
public open = 'lock_open';
|
||||
public closed = 'lock';
|
||||
public unknown = 'question_mark';
|
||||
|
||||
private instanceWithDoiExists: boolean = false;
|
||||
|
||||
|
|
|
@ -18,16 +18,15 @@ import {OpenaireEntities} from "../../utils/properties/searchFields";
|
|||
<icon class="uk-margin-small-right" name="arrow_back" flex="true" ratio="1.2"></icon>
|
||||
{{title}}
|
||||
</span>
|
||||
<span *ngIf="!viewAll || lessBtn" class="uk-text-meta">{{title}}</span>
|
||||
<span *ngIf="!viewAll || lessBtn" class="uk-text-light-grey">{{title}}</span>
|
||||
<a *ngIf="viewAll && lessBtn" (click)="viewAll = !viewAll; lessBtn=false;">View less</a>
|
||||
<a *ngIf="communities && communities.length > threshold && !viewAll"
|
||||
(click)="viewAllClick();">View more</a>
|
||||
</div>
|
||||
<div *ngFor="let community of communities.slice(0, viewAll?communities.length:threshold)" class="uk-text-truncate">
|
||||
<!-- If there are any communities with dashboard -->
|
||||
<a *ngIf="community.link" href="{{community.link}}" target="_blank" [attr.uk-tooltip]="community.labelContext">
|
||||
<a *ngIf="community.link" href="{{community.link}}" target="_blank" [attr.uk-tooltip]="community.labelContext" class="custom-external">
|
||||
{{community.labelContext}}
|
||||
<span class="custom-external custom-icon space"></span>
|
||||
</a>
|
||||
<!-- Other communities (without dashboards) -->
|
||||
<ng-container *ngIf="!community.link">
|
||||
|
|
|
@ -15,11 +15,12 @@ import {RelatedToComponent} from "./relatedTo.component";
|
|||
import {FosComponent} from "./fos.component";
|
||||
import {SdgComponent} from "./sdg.component";
|
||||
import {IconsModule} from "../../utils/icons/icons.module";
|
||||
import {AlertModalModule} from "../../utils/modal/alertModal.module";
|
||||
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule, RouterModule, PagingModule, ShowPublisherModule, IconsModule
|
||||
CommonModule, FormsModule, RouterModule, PagingModule, ShowPublisherModule, IconsModule, AlertModalModule
|
||||
],
|
||||
declarations: [
|
||||
ShowIdentifiersComponent,ShowSubjectsComponent,
|
||||
|
|
|
@ -10,7 +10,7 @@ import {properties} from "../../../../environments/environment";
|
|||
<icon class="uk-margin-small-right" name="arrow_back" flex="true" ratio="1.2"></icon>
|
||||
{{title}}
|
||||
</span>
|
||||
<span *ngIf="!viewAll || lessBtn" class="uk-text-meta">{{title}}</span>
|
||||
<span *ngIf="!viewAll || lessBtn" class="uk-text-light-grey">{{title}}</span>
|
||||
<a *ngIf="viewAll && lessBtn" (click)="viewAll = !viewAll; lessBtn=false;">View less</a>
|
||||
<a *ngIf="subjects && subjects.length > threshold && !viewAll"
|
||||
(click)="viewAllClick();">View more</a>
|
||||
|
|
|
@ -5,7 +5,7 @@ import {
|
|||
ElementRef,
|
||||
HostListener,
|
||||
Input,
|
||||
QueryList,
|
||||
QueryList, ViewChild,
|
||||
ViewChildren
|
||||
} from '@angular/core';
|
||||
import {EnvProperties} from "../../utils/properties/env-properties";
|
||||
|
@ -15,47 +15,54 @@ import {properties} from "../../../../environments/environment";
|
|||
selector: 'showIdentifiers',
|
||||
template: `
|
||||
<!-- <div class="uk-text-muted">Persistent Identifiers</div> -->
|
||||
<div class="uk-height-max-medium uk-overflow-auto uk-text-small">
|
||||
<ng-template #identifiers_template let-modal="modal">
|
||||
<ng-container *ngFor="let key of keys let i=index">
|
||||
<!-- <div [class.multi-line-ellipsis]="large.get(key) && !showAll" [class.lines-2]="keys.length === 1" [class.line-1]="keys.length > 1"> -->
|
||||
<div *ngIf="!showAll" class="uk-flex-inline uk-flex-wrap uk-margin-medium-right">
|
||||
<p class="uk-margin-remove">
|
||||
<span #content [id]="key">
|
||||
<span class="uk-text-meta uk-text-uppercase">{{key}}: </span>
|
||||
<ng-container *ngFor="let item of identifiers.get(key) let j=index">
|
||||
<!-- TODO: custom external link icons -->
|
||||
<a *ngIf="key=='doi'" [href]="properties.doiURL + item" target="_blank" class="uk-display-inline">
|
||||
{{item}} <span class="custom-external custom-icon"></span>
|
||||
</a>
|
||||
<a *ngIf="key=='pmc'" [href]="properties.pmcURL + item" target="_blank">
|
||||
{{item}} <span class="custom-external custom-icon"></span>
|
||||
</a>
|
||||
<a *ngIf="key=='pmid'" [href]="properties.pmidURL + item" target="_blank">
|
||||
{{item}} <span class="custom-external custom-icon"></span>
|
||||
</a>
|
||||
<a *ngIf="key=='handle'" [href]="properties.handleURL + item" target="_blank">
|
||||
{{item}} <span class="custom-external custom-icon"></span>
|
||||
</a>
|
||||
<ng-container *ngIf="(j !== (identifiers.get(key).length - 1))">, </ng-container>
|
||||
</ng-container>
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
<!-- <div [class.uk-margin-bottom]="modal" [class.multi-line-ellipsis]="!modal" [class.lines-2]="keys.length === 1" [class.line-1]="keys.length > 1">-->
|
||||
<div class="uk-flex-inline uk-flex-wrap uk-margin-medium-right"
|
||||
[class.multi-line-ellipsis]="!modal" [class.lines-2]="keys.length === 1" [class.line-1]="keys.length > 1"
|
||||
[class.uk-margin-bottom]="modal">
|
||||
<p class="uk-margin-remove">
|
||||
<span #content [id]="key" [class.uk-flex]="modal">
|
||||
<span class="uk-text-meta uk-text-uppercase">{{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'"
|
||||
[href]="getUrl(key) + item" target="_blank" class="uk-display-inline-block custom-external">
|
||||
{{item}}
|
||||
</a>
|
||||
<ng-container *ngIf="(j !== (identifiers.get(key).length - 1))">, </ng-container>
|
||||
</ng-container>
|
||||
</span>
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
<!-- </div>-->
|
||||
</ng-container>
|
||||
</ng-template>
|
||||
|
||||
<div class="uk-height-max-medium uk-overflow-auto uk-text-small">
|
||||
<ng-container *ngTemplateOutlet="identifiers_template; context: { modal: false}"></ng-container>
|
||||
</div>
|
||||
<div *ngIf="isLarge && showViewAll" class="uk-text-right uk-margin-small-top">
|
||||
<a (click)="showAll = !showAll">View {{showAll?'less':'all'}}</a>
|
||||
<a (click)="openIdentifiersModal()">View all</a>
|
||||
</div>
|
||||
|
||||
<modal-alert #identifiersModal [classTitle]="'landing-modal-header'"
|
||||
[classBody]="'landing-modal uk-padding-remove'">
|
||||
<div class="uk-padding uk-padding-remove-top uk-text-small">
|
||||
<ng-container *ngTemplateOutlet="identifiers_template; context: { modal: true}"></ng-container>
|
||||
</div>
|
||||
</modal-alert>
|
||||
`
|
||||
})
|
||||
export class ShowIdentifiersComponent implements AfterViewInit {
|
||||
@Input() identifiers: Map<string, string[]>;
|
||||
@Input() showViewAll: boolean = false;
|
||||
large: Map<string, boolean> = new Map<string, boolean>();
|
||||
showAll: boolean = false;
|
||||
properties: EnvProperties = properties;
|
||||
@ViewChildren("content", { read: ElementRef }) types: QueryList<ElementRef>;
|
||||
|
||||
@ViewChild('identifiersModal') identifiersModal;
|
||||
|
||||
constructor(private cdr: ChangeDetectorRef) {
|
||||
}
|
||||
|
||||
|
@ -99,4 +106,23 @@ export class ShowIdentifiersComponent implements AfterViewInit {
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
public getUrl(key: string): string {
|
||||
if(key == "doi") {
|
||||
return properties.doiURL;
|
||||
} else if(key == "pmc") {
|
||||
return properties.pmcURL;
|
||||
} else if(key == "pmid") {
|
||||
return properties.pmidURL;
|
||||
} else if(key == "handle") {
|
||||
return properties.handleURL;
|
||||
}
|
||||
}
|
||||
|
||||
public openIdentifiersModal() {
|
||||
this.identifiersModal.cancelButton = false;
|
||||
this.identifiersModal.okButton = false;
|
||||
this.identifiersModal.alertTitle = "Persistent Identifiers";
|
||||
this.identifiersModal.open();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -58,11 +58,11 @@ import {EnvProperties} from "../../utils/properties/env-properties";
|
|||
<span>, </span>
|
||||
</span>
|
||||
<span *ngIf="journal && (journal['issn'] ||journal['lissn'] || journal['eissn'] )">
|
||||
<a target="_blank" class="uk-display-inline-block"
|
||||
<a target="_blank" class="uk-display-inline-block custom-external"
|
||||
[href]="properties.sherpaURL+(journal['issn']?journal['issn']:(journal['eissn']?journal['eissn']:journal['lissn'] ))+properties.sherpaURLSuffix"
|
||||
uk-tooltip="title: View information on Sherpa/RoMEO ">
|
||||
<img src="assets/common-assets/common/SHERPA-RoMEO-short-logo.gif" width=16 height=16 alt="" loading="lazy">
|
||||
Copyright policy<span class="custom-external custom-icon space"></span>
|
||||
Copyright policy
|
||||
</a>
|
||||
</span>
|
||||
<span *ngIf=" journal['journal'] && (journal['issn'] || journal['eissn'] || journal['lissn'])">)</span>
|
||||
|
|
|
@ -31,18 +31,11 @@
|
|||
<!-- Link to -->
|
||||
<li *ngIf="isRouteAvailable('participate/direct-claim')" class="uk-text-center"
|
||||
[title]="'Link this '+getTypeName()+' to...'"
|
||||
[attr.uk-tooltip]="'pos: right; cls: uk-active landing-action-tooltip landing-action-tooltip-portal'">
|
||||
[attr.uk-tooltip]="'pos: right; cls: uk-active landing-action-tooltip landing-action-tooltip-portal 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">
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" data-svg="link"><path
|
||||
fill="none" stroke="#000" stroke-width="1.1"
|
||||
d="M10.625,12.375 L7.525,15.475 C6.825,16.175 5.925,16.175 5.225,15.475 L4.525,14.775 C3.825,14.074 3.825,13.175 4.525,12.475 L7.625,9.375"></path><path
|
||||
fill="none" stroke="#000" stroke-width="1.1"
|
||||
d="M9.325,7.375 L12.425,4.275 C13.125,3.575 14.025,3.575 14.724,4.275 L15.425,4.975 C16.125,5.675 16.125,6.575 15.425,7.275 L12.325,10.375"></path><path
|
||||
fill="none" stroke="#000" stroke-width="1.1"
|
||||
d="M7.925,11.875 L11.925,7.975"></path>
|
||||
</svg>
|
||||
<icon name="link"></icon>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
|
@ -50,7 +43,7 @@
|
|||
<li class="uk-text-center">
|
||||
<a (click)="openCiteModal()"
|
||||
[title]="'Cite this '+getTypeName()"
|
||||
[attr.uk-tooltip]="'pos: right; cls: uk-active landing-action-tooltip landing-action-tooltip-portal'">
|
||||
[attr.uk-tooltip]="'pos: right; cls: uk-active landing-action-tooltip landing-action-tooltip-portal uk-text-small uk-padding-small'">
|
||||
<span class="uk-icon-button uk-icon landing-action-button landing-action-button-portal">
|
||||
<svg width="20"
|
||||
height="20"
|
||||
|
@ -69,22 +62,22 @@
|
|||
<orcid-work [resultId]="id" [resultTitle]="resultLandingInfo.title" [resultLandingInfo]="resultLandingInfo"
|
||||
[pids]="pidsArrayString" [pageType]="'landing'">
|
||||
</orcid-work>
|
||||
<li *ngIf="properties.b2noteAPIURL" class="uk-text-center" title="add annotation">
|
||||
<a *ngIf="isLoggedIn && pid" (click)="annotation.toggleAnnotation($event)">
|
||||
<span class="uk-icon-button uk-icon landing-action-button landing-action-button-primary">
|
||||
<img src="assets/common-assets/b2note.png" loading="lazy" alt="b2note" style="width:34px; height:21px">
|
||||
</span>
|
||||
</a>
|
||||
<span *ngIf="!pid || !isLoggedIn" class="uk-text-muted half-opacity"
|
||||
[title]="!pid?'Annotations are available only for resources with a PID (persistent identifier) like DOI, handle, PMID':
|
||||
'Annotations are available only for logged in users'"
|
||||
[attr.uk-tooltip]="'pos: right; cls: uk-active landing-action-tooltip landing-action-tooltip-primary'">
|
||||
<span class="uk-icon-button uk-icon landing-action-button landing-action-button-primary uk-disabled">
|
||||
<img src="assets/common-assets/b2note.png" loading="lazy" alt="b2note" style="width:34px;
|
||||
height:21px">
|
||||
</span>
|
||||
</span>
|
||||
</li>
|
||||
<!-- <li *ngIf="properties.b2noteAPIURL" class="uk-text-center" [attr.uk-tooltip]="'title: add annotation; pos: right; cls: uk-active landing-action-tooltip landing-action-tooltip-primary'">-->
|
||||
<!-- <a *ngIf="isLoggedIn && pid" (click)="annotation.toggleAnnotation($event)">-->
|
||||
<!-- <span class="uk-icon-button uk-icon landing-action-button landing-action-button-primary">-->
|
||||
<!-- <img src="assets/common-assets/b2note.png" loading="lazy" alt="b2note" style="width:34px; height:21px">-->
|
||||
<!-- </span>-->
|
||||
<!-- </a>-->
|
||||
<!-- <span *ngIf="!pid || !isLoggedIn" class="uk-text-muted half-opacity"-->
|
||||
<!-- [title]="!pid?'Annotations are available only for resources with a PID (persistent identifier) like DOI, handle, PMID':-->
|
||||
<!-- 'Annotations are available only for logged in users'"-->
|
||||
<!-- [attr.uk-tooltip]="'pos: right; cls: uk-active landing-action-tooltip landing-action-tooltip-primary'">-->
|
||||
<!-- <span class="uk-icon-button uk-icon landing-action-button landing-action-button-primary uk-disabled">-->
|
||||
<!-- <img src="assets/common-assets/b2note.png" loading="lazy" alt="b2note" style="width:34px;-->
|
||||
<!-- height:21px">-->
|
||||
<!-- </span>-->
|
||||
<!-- </span>-->
|
||||
<!-- </li>-->
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -92,6 +85,7 @@
|
|||
|
||||
<!-- center box-->
|
||||
<div *ngIf="resultLandingInfo" class="uk-width-expand uk-padding-remove landing-background-default-color">
|
||||
<!-- uk-sticky="bottom: true; offset: 90vh;"-->
|
||||
<div class="uk-padding-large uk-padding-remove-vertical uk-margin-medium-top">
|
||||
<!-- schema.org-->
|
||||
<schema2jsonld *ngIf="resultLandingInfo.record" [data]=resultLandingInfo.record
|
||||
|
@ -104,7 +98,7 @@
|
|||
</span>
|
||||
<landing-header [properties]="properties" [title]="resultLandingInfo.title"
|
||||
[subTitle]="resultLandingInfo.subtitle"
|
||||
[authors]="resultLandingInfo.authors" [authorLimit]="3"
|
||||
[authors]="resultLandingInfo.authors"
|
||||
[underCuration]="resultLandingInfo.underCurationMessage"
|
||||
[entityType]="getTypeName()" [types]="resultLandingInfo.types"
|
||||
[year]="resultLandingInfo.date" [embargoEndDate]="resultLandingInfo.embargoEndDate">
|
||||
|
@ -292,10 +286,9 @@
|
|||
<div [title]="key" *ngIf="keyIn && !resultLandingInfo.bioentities.get(key).get(keyIn)">
|
||||
{{keyIn}}
|
||||
</div>
|
||||
<a [href]="resultLandingInfo.bioentities.get(key).get(keyIn)" target="_blank"
|
||||
<a [href]="resultLandingInfo.bioentities.get(key).get(keyIn)" target="_blank" class="custom-external"
|
||||
[title]="key" *ngIf="keyIn && resultLandingInfo.bioentities.get(key).get(keyIn)">
|
||||
{{keyIn}}
|
||||
<span class="custom-external custom-icon space"></span>
|
||||
</a>
|
||||
</div>
|
||||
</ng-container>
|
||||
|
@ -316,9 +309,9 @@
|
|||
alt="Enermaps tool preview" loading="lazy">
|
||||
<div class="uk-overlay uk-overlay-default uk-position-bottom">
|
||||
<p>Visit <a
|
||||
class=" uk-margin-right uk-margin-small-top"
|
||||
class=" uk-margin-right uk-margin-small-top custom-external"
|
||||
[href]="properties.enermapsURL + '/?shared_id=' + enermapsId" target="_blank" >
|
||||
Enermaps tool <span class="custom-external custom-icon space"></span>
|
||||
Enermaps tool
|
||||
</a></p>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -361,9 +354,9 @@
|
|||
|
||||
<!-- right box-->
|
||||
<div *ngIf="resultLandingInfo"
|
||||
class="uk-width-1-3 uk-width-1-4@l uk-padding-remove uk-background-muted uk-text-small" [class.uk-animation-right]="viewAll">
|
||||
class="uk-width-1-3 uk-width-1-4@l uk-padding-remove landing-background-grey-color uk-text-small" [class.uk-animation-right]="viewAll">
|
||||
<div class="uk-sticky uk-overflow-auto landing-column-height" uk-sticky="bottom: true" [attr.offset]="offset">
|
||||
<div class="uk-margin-medium-top uk-list uk-list-large uk-padding-small uk-padding-remove-vertical" [class.uk-list-divider]="!viewAll">
|
||||
<div class="uk-margin-medium-top uk-list uk-list-large uk-padding uk-padding-remove-vertical" [class.uk-list-divider]="!viewAll">
|
||||
<!-- EGI Notebook-->
|
||||
<div *ngIf="resultLandingInfo.showEgiNotebookButton && properties.adminToolsPortalType == 'explore'
|
||||
&& (properties.environment == 'beta' || properties.environment == 'development') && (!viewAll || viewAll=='egiNotebook')">
|
||||
|
@ -434,12 +427,12 @@
|
|||
|
||||
</div>
|
||||
<!-- *ngIf="numberOfTabs > 0"-->
|
||||
<div class="uk-padding-remove-left uk-width-1-1 uk-margin-medium-top">
|
||||
<!-- B2 Note-->
|
||||
<div *ngIf="properties.b2noteAPIURL && resultLandingInfo" class="uk-margin-medium-top">
|
||||
<b2note #annotation [id]="id" [landingInfo]="resultLandingInfo" (pidEmitter)="pidInit($event)"></b2note>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="uk-padding-remove-left uk-width-1-1 uk-margin-medium-top">-->
|
||||
<!-- <!– B2 Note–>-->
|
||||
<!-- <div *ngIf="properties.b2noteAPIURL && resultLandingInfo" class="uk-margin-medium-top">-->
|
||||
<!-- <b2note #annotation [id]="id" [landingInfo]="resultLandingInfo" (pidEmitter)="pidInit($event)"></b2note>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<helper *ngIf="pageContents && pageContents['bottom'] && pageContents['bottom'].length > 0"
|
||||
[texts]="pageContents['bottom']"></helper>
|
||||
|
@ -462,7 +455,7 @@
|
|||
<!-- [year]="resultLandingInfo.date" [embargoEndDate]="resultLandingInfo.embargoEndDate"-->
|
||||
<!-- [isTitleH1]="false">-->
|
||||
<!-- </landing-header>-->
|
||||
<div class="uk-margin-medium-top uk-margin-medium-right uk-padding">
|
||||
<div class="uk-padding">
|
||||
<deletedByInference *ngIf="type == 'publication' && deleteByInferenceOpened"
|
||||
[id]="resultLandingInfo.record['result']['header']['dri:objIdentifier']"
|
||||
[ids]="resultLandingInfo.deletedByInferenceIds"
|
||||
|
@ -485,7 +478,7 @@
|
|||
[resultType]="'other'" [type]="'other research products'"></deletedByInference>
|
||||
</div>
|
||||
</modal-alert>
|
||||
<modal-alert #citeModal [classTitle]="'landing-modal-header uk-padding-small'"
|
||||
<modal-alert #citeModal [classTitle]="'landing-modal-header'"
|
||||
[classBody]="'uk-padding-remove landing-modal'">
|
||||
<citeThis *ngIf="resultLandingInfo && citeThisClicked" [result]="resultLandingInfo" [id]="id"
|
||||
[type]="title.toLowerCase()" [piwikSiteId]="piwikSiteId"></citeThis>
|
||||
|
|
|
@ -206,7 +206,7 @@ export class ResultLandingComponent {
|
|||
this.scroll();
|
||||
}));
|
||||
|
||||
this.offset = Number.parseInt(getComputedStyle(document.documentElement).getPropertyValue('--navbar-height'));
|
||||
this.offset = Number.parseInt(getComputedStyle(document.documentElement).getPropertyValue('--navbar-height'));
|
||||
}
|
||||
|
||||
private initMetaAndLinks(type: string) {
|
||||
|
|
|
@ -32,6 +32,8 @@ import {OrcidModule} from "../../orcid/orcid.module";
|
|||
import {MatFormFieldModule} from "@angular/material/form-field";
|
||||
import {MatSelectModule} from "@angular/material/select";
|
||||
import {IconsModule} from "../../utils/icons/icons.module";
|
||||
import {IconsService} from "../../utils/icons/icons.service";
|
||||
import {link, orcid_add, orcid_bin} from "../../utils/icons/icons";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
|
@ -52,4 +54,8 @@ import {IconsModule} from "../../utils/icons/icons.module";
|
|||
ResultLandingComponent
|
||||
]
|
||||
})
|
||||
export class ResultLandingModule { }
|
||||
export class ResultLandingModule {
|
||||
constructor(private iconsService: IconsService) {
|
||||
this.iconsService.registerIcons([link])
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ declare var UIkit: any;
|
|||
|
||||
@Component({
|
||||
styles: [
|
||||
'.loading-action-button { width: 36px; height: 36px; }'
|
||||
'.loading-action-button { width: 35px; height: 35px; }'
|
||||
],
|
||||
selector: 'orcid-work',
|
||||
template: `
|
||||
|
@ -56,31 +56,34 @@ declare var UIkit: any;
|
|||
|
||||
<ng-container *ngIf="pageType == 'landing'">
|
||||
<span *ngIf="!putCodes || putCodes.length == 0"
|
||||
[attr.uk-tooltip]="'pos: right; cls: uk-active landing-action-tooltip'"
|
||||
[title]="(!pids || !isLoggedIn) ? (!pids ? tooltipNoPid : tooltipNoLoggedInUser) : tooltipAdd"
|
||||
[class]="(!pids || !isLoggedIn) ? 'half-opacity' : ''">
|
||||
<a (click)="currentAction='add'; saveWorkPreparation();"
|
||||
[class]="(showLoading ? 'uk-disabled' : '') + (!isLoggedIn || !pids ? 'uk-disabled uk-text-muted' : '')">
|
||||
<span *ngIf="!showLoading" class="uk-icon-button uk-icon landing-action-button landing-action-button-orcid">
|
||||
<img src="assets/common-assets/common/orcid_add.svg" style="width: 22px; height: 22px" loading="lazy" alt="add orcid">
|
||||
</span>
|
||||
<span *ngIf="showLoading" class="uk-icon icon-button loading-action-button"><loading
|
||||
[top_margin]="false"></loading></span>
|
||||
[attr.uk-tooltip]="'pos: right; cls: uk-active landing-action-tooltip uk-text-small uk-padding-small'"
|
||||
[title]="(!pids || !isLoggedIn) ? (!pids ? tooltipNoPid : tooltipNoLoggedInUser) : tooltipAdd">
|
||||
<a *ngIf="!showLoading" (click)="currentAction='add'; saveWorkPreparation();"
|
||||
class="uk-icon-button uk-icon landing-action-button landing-action-button-orcid"
|
||||
[class.uk-disabled]="showLoading || !isLoggedIn || !pids"
|
||||
[class.uk-text-muted]="!isLoggedIn || !pids"
|
||||
(mouseover)="hoverEvent($event)" (mouseout)="hoverEvent($event)">
|
||||
<icon *ngIf="!hoverAdd" name="orcid_add" ratio="1.1"></icon>
|
||||
<icon *ngIf="hoverAdd" name="add"></icon>
|
||||
</a>
|
||||
<span *ngIf="showLoading" class="uk-icon icon-button loading-action-button"><loading
|
||||
[top_margin]="false"></loading></span>
|
||||
</span>
|
||||
|
||||
<span *ngIf="putCodes && putCodes.length > 0"
|
||||
[attr.uk-tooltip]="(!pids || !isLoggedIn) ? (!pids?tooltipNoPid : tooltipNoLoggedInUser) : tooltipDelete"
|
||||
[class]="(!pids || !isLoggedIn) ? 'half-opacity' : ''">
|
||||
<a (click)="currentAction='delete'; deleteWorks();"
|
||||
[class]="(showLoading ? 'uk-disabled' : '') + (!isLoggedIn || !pids ? 'uk-disabled uk-text-muted' : '')">
|
||||
<span *ngIf="!showLoading" class="uk-icon-button uk-icon landing-action-button landing-action-button-orcid">
|
||||
<img src="assets/common-assets/common/orcid_bin.svg" style="width: 42px; height: 42px" loading="lazy">
|
||||
</span>
|
||||
[attr.uk-tooltip]="'pos: right; cls: uk-active landing-action-tooltip uk-text-small uk-padding-small'"
|
||||
[title]="(!pids || !isLoggedIn) ? (!pids ? tooltipNoPid : tooltipNoLoggedInUser) : tooltipDelete">
|
||||
<a *ngIf="!showLoading" (click)="currentAction='delete'; deleteWorks();"
|
||||
class="uk-icon-button uk-icon landing-action-button landing-action-button-orcid"
|
||||
[class.uk-disabled]="showLoading || !isLoggedIn || !pids"
|
||||
[class.uk-text-muted]="!isLoggedIn || !pids"
|
||||
(mouseover)="hoverEvent($event, 'delete')" (mouseout)="hoverEvent($event, 'delete')">
|
||||
<icon *ngIf="!hoverDelete" name="orcid_bin" ratio="1.1"></icon>
|
||||
<icon *ngIf="hoverDelete" name="delete_outline" class="uk-text-danger"></icon>
|
||||
</a>
|
||||
<span *ngIf="showLoading" class="uk-icon icon-button loading-action-button"><loading
|
||||
[top_margin]="false"></loading></span>
|
||||
</a>
|
||||
</span>
|
||||
</span>
|
||||
</ng-container>
|
||||
|
||||
<modal-alert #grantModal [classTitle]="'landing-modal-header uk-padding-small'"
|
||||
|
@ -325,6 +328,9 @@ export class OrcidWorkComponent {
|
|||
|
||||
public currentAction: string = "";
|
||||
|
||||
public hoverAdd: boolean = false;
|
||||
public hoverDelete: boolean = false;
|
||||
|
||||
public properties: EnvProperties = properties;
|
||||
|
||||
constructor(private route: ActivatedRoute,
|
||||
|
@ -779,10 +785,20 @@ export class OrcidWorkComponent {
|
|||
}
|
||||
|
||||
get tooltipNoPid() {
|
||||
return "Only resources with a PID (persistent identifier) like DOI, handle, PMID can be added or deleted from your ORCID record";
|
||||
return "Only resources with a PID (persistent identifier) like DOI, handle, PMID can be added or deleted from your <span class=\"text-orcid\">ORCID</span> record";
|
||||
}
|
||||
|
||||
get tooltipNoLoggedInUser() {
|
||||
return "Only logged in users can add or delete a work from their ORCID record";
|
||||
return "Only logged in users can add or delete a work from their <span class=\"text-orcid\">ORCID</span> record";
|
||||
}
|
||||
|
||||
hoverEvent($event, action: string = "add") {
|
||||
if(action == "add") {
|
||||
this.hoverAdd = $event.type == "mouseover";
|
||||
this.hoverDelete = false;
|
||||
} else if(action == "delete") {
|
||||
this.hoverDelete = $event.type == "mouseover";
|
||||
this.hoverAdd = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,6 +13,8 @@ import {ResultLandingService} from '../landingPages/result/resultLanding.service
|
|||
import {LoadingModule} from '../utils/loading/loading.module';
|
||||
import {ResultLandingUtilsModule} from '../landingPages/landing-utils/resultLandingUtils.module';
|
||||
import {IconsModule} from '../utils/icons/icons.module';
|
||||
import {IconsService} from "../utils/icons/icons.service";
|
||||
import {orcid_add, orcid_bin} from "../utils/icons/icons";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
|
@ -35,5 +37,7 @@ import {IconsModule} from '../utils/icons/icons.module';
|
|||
|
||||
|
||||
export class OrcidModule{
|
||||
constructor() {}
|
||||
constructor(private iconsService: IconsService) {
|
||||
this.iconsService.registerIcons([orcid_add, orcid_bin])
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
import {COOKIE} from '../../login/utils/helper.class';
|
||||
import {HttpHeaders} from "@angular/common/http";
|
||||
|
||||
export type MediaType = 'application/json' | 'text/plain'
|
||||
|
||||
export class CustomOptions {
|
||||
|
||||
public static registryOptions(body = true): {} {
|
||||
let httpHeaders = new HttpHeaders();
|
||||
if(body) {
|
||||
httpHeaders.set('Content-Type', 'application/json');
|
||||
}
|
||||
return {headers: httpHeaders, withCredentials: true};
|
||||
}
|
||||
|
||||
public static registryOptions(mediaType: MediaType = 'application/json'): {} {
|
||||
let httpHeaders = new HttpHeaders({
|
||||
'Content-Type': mediaType,
|
||||
});
|
||||
return {headers: httpHeaders, withCredentials: true};
|
||||
}
|
||||
|
||||
public static getAuthOptionsWithBody():{} {
|
||||
return {
|
||||
|
@ -29,4 +29,4 @@ export class CustomOptions {
|
|||
};
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -11,7 +11,7 @@ import {properties} from "../../../../environments/environment";
|
|||
@Component({
|
||||
selector: 'showAuthors',
|
||||
template: `
|
||||
<ng-template #author_template let-author="author">
|
||||
<ng-template #author_template let-author="author" let-i="i">
|
||||
<span *ngIf="(!author.orcid && !author.orcid_pending) || !testBrowser">
|
||||
{{author.fullName + ";"}} 
|
||||
</span>
|
||||
|
@ -26,7 +26,7 @@ import {properties} from "../../../../environments/environment";
|
|||
</a>
|
||||
<div *ngIf="(author.orcid || author.orcid_pending) && testBrowser"
|
||||
class="default-dropdown uk-margin-remove-top uk-dropdown"
|
||||
uk-dropdown="mode:click" style="min-width: 465px !important;">
|
||||
uk-dropdown="mode:click; offset: 4" style="min-width: 465px !important;">
|
||||
<div class="uk-padding-small">
|
||||
<h6 class="uk-margin-remove">{{author.fullName}}</h6>
|
||||
<div>
|
||||
|
@ -39,13 +39,14 @@ import {properties} from "../../../../environments/environment";
|
|||
<i *ngIf="author.orcid">Harvested from ORCID Public Data File</i>
|
||||
<i *ngIf="!author.orcid && author.orcid_pending">Derived by OpenAIRE algorithms or harvested from 3d party repositories</i>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div class="orcid-clipboard-wrapper uk-display-inline-block uk-width-1-1 uk-text-center">
|
||||
<input #element class="uk-padding-small uk-padding-remove-vertical uk-disabled uk-text-emphasis"
|
||||
style="min-height: 38px; min-width: 280px;" name="code" [value]="properties.orcidURL+(author.orcid ? author.orcid : author.orcid_pending)">
|
||||
<a [class]="'uk-link copy orcid_clipboard_btn_auhtor_'+i"
|
||||
(click)="copyToClipboard(element)" title="Copy to clipboard">
|
||||
<div class="clipboard-wrapper uk-width-1-1 uk-flex uk-flex-middle uk-flex-center"
|
||||
style="min-height: 43px; min-width: 280px;">
|
||||
<span id="element" class="uk-padding-small uk-text-emphasis">
|
||||
{{properties.orcidURL+(author.orcid ? author.orcid : author.orcid_pending)}}
|
||||
</span>
|
||||
<a [class]="'uk-link copy orcid_clipboard_btn orcid_clipboard_btn_auhtor_'+i"
|
||||
data-clipboard-target="#element" title="Copy to clipboard">
|
||||
COPY
|
||||
</a>
|
||||
</div>
|
||||
|
@ -76,24 +77,24 @@ import {properties} from "../../../../environments/environment";
|
|||
|
||||
<div *ngIf="authors" class="uk-height-max-medium uk-overflow-auto uk-text-small uk-text-emphasis">
|
||||
<span *ngFor="let author of authors.slice(0, viewAll?authors.length:authorsLimit) let i=index">
|
||||
<ng-container *ngTemplateOutlet="author_template; context: { author: author}"></ng-container>
|
||||
<ng-container *ngTemplateOutlet="author_template; context: { author: author, i:i}"></ng-container>
|
||||
</span>
|
||||
<span *ngIf="showAll && authors && authors.length > authorsLimit && !viewAll" class="uk-text-small uk-link-text">
|
||||
<span *ngIf="showAll && authors && authors.length > authorsLimit && !viewAll">
|
||||
<a (click)="viewAllClick();">
|
||||
+{{authors.length-authorsLimit | number}} Authors
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
<div *ngIf="viewAll && lessBtn" (click)="viewAll = !viewAll; lessBtn=false;" class="uk-width-1-1 uk-text-right">
|
||||
<a (click)="numberOfAuthors = authorsLimit;">View less authors</a>
|
||||
<div *ngIf="viewAll && lessBtn" (click)="viewAll = !viewAll; lessBtn=false;" class="uk-width-1-1 uk-text-right uk-text-small">
|
||||
<a>View less authors</a>
|
||||
</div>
|
||||
|
||||
<modal-alert #authorsModal [classTitle]="'landing-modal-header'"
|
||||
[classBody]="'landing-modal uk-padding-remove'">
|
||||
<div class="uk-padding">
|
||||
<div class="uk-padding uk-padding-remove-top uk-overflow-auto">
|
||||
<span *ngFor="let author of authors; let i=index"
|
||||
class=" uk-text-small uk-text-emphasis">
|
||||
<ng-container *ngTemplateOutlet="author_template; context: { author: author}"></ng-container>
|
||||
<ng-container *ngTemplateOutlet="author_template; context: { author: author, i:i}"></ng-container>
|
||||
</span>
|
||||
</div>
|
||||
</modal-alert>
|
||||
|
@ -103,32 +104,25 @@ import {properties} from "../../../../environments/environment";
|
|||
|
||||
export class ShowAuthorsComponent {
|
||||
@Input() authors: Author[];
|
||||
@Input() authorsLimit: number = 3;
|
||||
@Input() authorsLimit: number = 7;
|
||||
@Input() showAll: boolean = true;
|
||||
@Input() modal: AlertModal;
|
||||
@Input() viewAll: boolean = false;
|
||||
public lessBtn: boolean = false;
|
||||
@ViewChild('authorsModal') authorsModal;
|
||||
|
||||
public numberOfAuthors: number;
|
||||
public properties: EnvProperties = properties;
|
||||
public routerHelper: RouterHelper = new RouterHelper();
|
||||
|
||||
testBrowser: boolean;
|
||||
|
||||
public clipboard;
|
||||
|
||||
constructor(private route: ActivatedRoute, @Inject(PLATFORM_ID) private platformId: string) {
|
||||
this.testBrowser = isPlatformBrowser(platformId);
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.numberOfAuthors = this.authorsLimit;
|
||||
}
|
||||
|
||||
copyToClipboard(element: HTMLInputElement) {
|
||||
element.select();
|
||||
if (typeof document !== 'undefined') {
|
||||
document.execCommand('copy');
|
||||
}
|
||||
this.createClipboard();
|
||||
}
|
||||
|
||||
public onClick() {
|
||||
|
@ -152,4 +146,13 @@ export class ShowAuthorsComponent {
|
|||
this.authorsModal.alertTitle = "Authors";
|
||||
this.authorsModal.open();
|
||||
}
|
||||
|
||||
private createClipboard() {
|
||||
if (typeof window !== 'undefined') {
|
||||
delete this.clipboard;
|
||||
let Clipboard;
|
||||
Clipboard = require('clipboard');
|
||||
this.clipboard = new Clipboard('.orcid_clipboard_btn');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -198,4 +198,26 @@ export const filters = {
|
|||
data: '<svg id="Group_13364" data-name="Group 13364" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="20" height="20" viewBox="0 0 24.648 21.128"><defs><linearGradient id="linear-gradient" x2="1" y2="0.961" gradientUnits="objectBoundingBox"><stop offset="0" /><stop offset="1" /></linearGradient><linearGradient id="linear-gradient-2" x1="-0.029" y1="0.037" x2="1" y2="0.928" xlink:href="#linear-gradient"/></defs><g id="Group_13361" data-name="Group 13361" transform="translate(0 10.564)"><line id="Line_420" data-name="Line 420" x2="24.648" transform="translate(0 5.774)" fill="none" stroke="#707070" stroke-width="1"/><g id="Ellipse_515" data-name="Ellipse 515" transform="translate(2.078)" stroke="#fafafa" stroke-width="0.6"><ellipse cx="5.282" cy="5.282" rx="5.282" ry="5.282" stroke="none"/><ellipse cx="5.282" cy="5.282" rx="4.982" ry="4.982" fill="none"/></g></g><g id="Group_13362" data-name="Group 13362"><line id="Line_418" data-name="Line 418" x2="24.648" transform="translate(0 5.388)" fill="none" stroke="#707070" stroke-width="1"/><g id="Path_104494" data-name="Path 104494" transform="translate(11.444)"><path d="M 5.281623840332031 10.26361751556396 C 2.534753799438477 10.26361751556396 0.3000038266181946 8.028787612915039 0.3000038266181946 5.281807899475098 C 0.3000038266181946 2.534827947616577 2.534753799438477 0.2999978959560394 5.281623840332031 0.2999978959560394 C 8.028493881225586 0.2999978959560394 10.26324367523193 2.534827947616577 10.26324367523193 5.281807899475098 C 10.26324367523193 8.028787612915039 8.028493881225586 10.26361751556396 5.281623840332031 10.26361751556396 Z" stroke="none"/><path d="M 5.281623840332031 0.5999975204467773 C 2.700173854827881 0.5999975204467773 0.6000041961669922 2.700247764587402 0.6000041961669922 5.281807899475098 C 0.6000041961669922 7.863368034362793 2.700173854827881 9.963618278503418 5.281623840332031 9.963618278503418 C 7.863073825836182 9.963618278503418 9.96324348449707 7.863368034362793 9.96324348449707 5.281807899475098 C 9.96324348449707 2.700247764587402 7.863073825836182 0.5999975204467773 5.281623840332031 0.5999975204467773 M 5.281623840332031 -1.9073486328125e-06 C 8.198583602905273 -1.9073486328125e-06 10.5632438659668 2.364748001098633 10.5632438659668 5.281807899475098 C 10.5632438659668 8.198867797851562 8.198583602905273 10.56361770629883 5.281623840332031 10.56361770629883 C 2.364664077758789 10.56361770629883 3.814697265625e-06 8.198867797851562 3.814697265625e-06 5.281807899475098 C 3.814697265625e-06 2.364748001098633 2.364664077758789 -1.9073486328125e-06 5.281623840332031 -1.9073486328125e-06 Z" stroke="none" fill="#fafafa"/></g></g></svg>'
|
||||
}
|
||||
|
||||
export const orcid_add = {
|
||||
name: 'orcid_add',
|
||||
data: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 42.13 40.77"><defs><style>.cls-1{}.cls-2{fill:#fff;}</style></defs><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><circle class="cls-1" cx="18.09" cy="18.09" r="18.09"/><rect class="cls-2" x="9.86" y="11.03" width="2.49" height="15.27"/><ellipse class="cls-2" cx="11.07" cy="8.16" rx="1.63" ry="1.6"/><path class="cls-2" d="M23.07,11.17A6.57,6.57,0,0,0,21.81,11H15.28V13.2h0V24.09h0v2.15h6.34a7.75,7.75,0,0,0,1.45-.14,7.61,7.61,0,0,0,0-14.93ZM25,23l-.26.19a4.3,4.3,0,0,1-.45.29,4.41,4.41,0,0,1-1.64.62H17.63V13.2h4.42a5.63,5.63,0,0,1,2.62.81,4.12,4.12,0,0,1,.47.38A5.74,5.74,0,0,1,25,23Z"/><path class="cls-1" d="M41.33,34.62H37.57V30.86a.79.79,0,0,0-.79-.79h0a.79.79,0,0,0-.8.78h0v3.76H32.22a.79.79,0,0,0-.79.79h0a.79.79,0,0,0,.79.79H36V40a.8.8,0,1,0,1.59,0h0V36.21h3.76a.79.79,0,0,0,.8-.78h0A.8.8,0,0,0,41.33,34.62Z"/></g></g></svg>'
|
||||
}
|
||||
|
||||
export const orcid_bin = {
|
||||
name: 'orcid_bin',
|
||||
data: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 41.58 41.07"><defs><style>.cls-1{fill:#666;}.cls-2{}.cls-3{fill:#fff;}</style></defs><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><g id="Layer_2-2" data-name="Layer 2"><g id="Layer_1-2-2" data-name="Layer 1-2"><path class="cls-1" d="M40.55,31.91v7.56A1.58,1.58,0,0,1,39,41.07H34.3a1.59,1.59,0,0,1-1.57-1.6V31.91H32a.25.25,0,0,1-.27-.23v0h0a.28.28,0,0,1,.27-.23h2.32v-1a.25.25,0,0,1,.22-.28h4.22a.3.3,0,0,1,.28.28v1h2.32c.15,0,.22.13.22.28h0c0,.14-.08.18-.22.19Zm-7.23,0v7.56a1,1,0,0,0,1,1H39a1,1,0,0,0,1-1V31.91Zm5.12-.5v-.74H34.82v.74Z"/><path class="cls-1" d="M34.74,33.79a.29.29,0,0,1,.28-.28.29.29,0,0,1,.27.28v4.85a.29.29,0,0,1-.27.28.29.29,0,0,1-.28-.28Z"/><path class="cls-1" d="M38,33.79a.29.29,0,0,1,.28-.28.29.29,0,0,1,.27.28v4.85a.29.29,0,0,1-.27.28.29.29,0,0,1-.28-.28Z"/><path class="cls-1" d="M36.34,33.79a.3.3,0,0,1,.28-.28.28.28,0,0,1,.27.28v4.85a.28.28,0,0,1-.27.28.3.3,0,0,1-.28-.28Z"/><circle class="cls-2" cx="18.09" cy="18.09" r="18.09"/><rect class="cls-3" x="9.86" y="11.03" width="2.49" height="15.27"/><ellipse class="cls-3" cx="11.07" cy="8.16" rx="1.63" ry="1.6"/><path class="cls-3" d="M23.07,11.17A6.7,6.7,0,0,0,21.81,11H15.28v2.2h0V24.09h0v2.15h6.34a7.83,7.83,0,0,0,1.45-.14,7.61,7.61,0,0,0,0-14.93ZM25,23l-.26.19a3.46,3.46,0,0,1-.45.29,4.42,4.42,0,0,1-1.64.62h-5V13.2h4.42a5.63,5.63,0,0,1,2.62.81,3.4,3.4,0,0,1,.47.38,5.75,5.75,0,0,1,.38,8.11A6.14,6.14,0,0,1,25,23Z"/></g></g></g></g></svg>'
|
||||
}
|
||||
|
||||
export const link = {
|
||||
name: 'link',
|
||||
data: '<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" data-svg="link"><path\n' +
|
||||
' fill="none" stroke="#000" stroke-width="1.1"\n' +
|
||||
' d="M10.625,12.375 L7.525,15.475 C6.825,16.175 5.925,16.175 5.225,15.475 L4.525,14.775 C3.825,14.074 3.825,13.175 4.525,12.475 L7.625,9.375"></path><path\n' +
|
||||
' fill="none" stroke="#000" stroke-width="1.1"\n' +
|
||||
' d="M9.325,7.375 L12.425,4.275 C13.125,3.575 14.025,3.575 14.724,4.275 L15.425,4.975 C16.125,5.675 16.125,6.575 15.425,7.275 L12.325,10.375"></path><path\n' +
|
||||
' fill="none" stroke="#000" stroke-width="1.1"\n' +
|
||||
' d="M7.925,11.875 L11.925,7.975"></path>\n' +
|
||||
' </svg>'
|
||||
}
|
||||
|
||||
/** Add new icon under this line to be sure that it will be added on preview */
|
||||
|
|
|
@ -13,7 +13,7 @@ declare var UIkit: any;
|
|||
<button class="uk-close uk-icon uk-modal-close-default uk-float-right" (click)='cancel()'>
|
||||
<icon name="close" ratio="1.5"></icon>
|
||||
</button>
|
||||
<h5>{{alertTitle}}</h5>
|
||||
<h5 class="uk-margin-remove">{{alertTitle}}</h5>
|
||||
</div>
|
||||
<div class="uk-margin">
|
||||
<div *ngIf="message" [hidden]=!alertMessage [innerHTML]="message | safeHtml"></div>
|
||||
|
|
|
@ -36,10 +36,10 @@
|
|||
</div>
|
||||
<!-- Title -->
|
||||
<div class="uk-margin-small-bottom">
|
||||
<h6 class="uk-margin-remove uk-text-break uk-inline-block">
|
||||
<h2 class="uk-margin-remove uk-text-break uk-inline-block uk-h6">
|
||||
<a *ngIf="!externalUrl && result.id && !(result.resultType == 'dataprovider' && result.compatibilityUNKNOWN) "
|
||||
(click)="onClick()" [queryParams]="createParam()"
|
||||
[routerLink]="url" class="uk-link uk-width-expand">
|
||||
[routerLink]="url" class="uk-link uk-link-heading uk-width-expand">
|
||||
<div *ngIf="(result.title) || result.acronym">
|
||||
<span *ngIf="result.acronym">
|
||||
{{result.acronym}}
|
||||
|
@ -55,7 +55,7 @@
|
|||
|
||||
<a *ngIf="externalUrl && result.id && !(result.resultType == 'dataprovider' && result.compatibilityUNKNOWN) "
|
||||
(click)="onClick()"
|
||||
target="_blank" [href]="externalUrl+result.id" class="custom-external uk-link uk-width-expand">
|
||||
target="_blank" [href]="externalUrl+result.id" class="custom-external uk-link uk-link-heading uk-width-expand">
|
||||
<span *ngIf="(result.title) || result.acronym">
|
||||
<span *ngIf="result.acronym">
|
||||
{{result.acronym}}
|
||||
|
@ -84,7 +84,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<hr *ngIf="result.websiteURL && promoteWebsiteURL">
|
||||
</h6>
|
||||
</h2>
|
||||
</div>
|
||||
<!-- Funder -->
|
||||
<div *ngIf="result.funderShortname || result.code" class="uk-margin-small-bottom">
|
||||
|
@ -259,10 +259,10 @@
|
|||
class="uk-margin-small-bottom">
|
||||
<div *ngFor="let from of result.hostedBy_collectedFrom"
|
||||
[title]="from.accessRight ? from.accessRight : 'Not available'"
|
||||
class="uk-flex">
|
||||
<span class="uk-margin-small-right">
|
||||
<img [src]="from.accessRightIcon" loading="lazy">
|
||||
</span>
|
||||
class="uk-flex uk-flex-middle">
|
||||
<span [class]="'uk-margin-small-right ' + (from.accessRightIcon == 'lock_open' ? 'uk-text-success' : 'uk-text-meta')">
|
||||
<icon [name]="from.accessRightIcon" flex="true" type="outlined"></icon>
|
||||
</span>
|
||||
<span class="uk-width-expand">
|
||||
<span class="uk-margin-right uk-display-inline-block">
|
||||
<span class="uk-text-meta">Download from: </span>
|
||||
|
|
|
@ -5,9 +5,10 @@ import {RouterModule} from "@angular/router";
|
|||
import {ShowAuthorsModule} from "../authors/showAuthors.module";
|
||||
import {ResultLandingUtilsModule} from "../../landingPages/landing-utils/resultLandingUtils.module";
|
||||
import {OrcidModule} from "../../orcid/orcid.module";
|
||||
import {IconsModule} from "../icons/icons.module";
|
||||
|
||||
@NgModule({
|
||||
imports: [CommonModule, RouterModule, ShowAuthorsModule, ResultLandingUtilsModule, OrcidModule],
|
||||
imports: [CommonModule, RouterModule, ShowAuthorsModule, ResultLandingUtilsModule, OrcidModule, IconsModule],
|
||||
declarations: [ResultPreviewComponent],
|
||||
exports: [ResultPreviewComponent]
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue