Revision 58748
Added by Konstantinos Triantafyllou over 4 years ago
modules/uoa-services-library/trunk/ng-openaire-library/src/app/landingPages/landing-utils/showPublisher.component.ts | ||
---|---|---|
50 | 50 |
<img src="assets/common-assets/common/SHERPA-RoMEO-short-logo.gif" width=16 height=16 alt=""> |
51 | 51 |
issn: {{journal['issn']}}<span class="custom-external custom-icon space"></span> |
52 | 52 |
</a> |
53 |
<span *ngIf="journal['eissn'] || journal['lissn'] || !publisher">, </span>
|
|
53 |
<span *ngIf="journal['eissn'] || journal['lissn']">, </span> |
|
54 | 54 |
</ng-container> |
55 | 55 |
<ng-container *ngIf="journal['eissn']"> |
56 |
<span class="uk-display-inline-block">eissn: {{journal['eissn']}}</span> |
|
57 |
<span *ngIf="journal['lissn'] || !publisher">, </span> |
|
56 |
<a *ngIf="!journal.issn" target="_blank" class="uk-display-inline-block" [href]="properties.sherpaURL+journal['eissn'] + properties.sherpaURLSuffix"> |
|
57 |
<img src="assets/common-assets/common/SHERPA-RoMEO-short-logo.gif" width=16 height=16 alt=""> |
|
58 |
eissn: {{journal['eissn']}}<span class="custom-external custom-icon space"></span> |
|
59 |
</a> |
|
60 |
<span *ngIf="journal.issn" class="uk-display-inline-block">eissn: {{journal['eissn']}}</span> |
|
61 |
<span *ngIf="journal['lissn']">, </span> |
|
58 | 62 |
</ng-container> |
59 | 63 |
<span *ngIf="journal['lissn']" class="uk-display-inline-block"> |
60 |
<span class="uk-display-inline-block">lissn: {{journal['lissn']}}</span> |
|
61 |
<span *ngIf="!publisher">, </span> |
|
64 |
<a *ngIf="!journal.issn && !journal.eissn" target="_blank" class="uk-display-inline-block" [href]="properties.sherpaURL+journal['eissn'] + properties.sherpaURLSuffix"> |
|
65 |
<img src="assets/common-assets/common/SHERPA-RoMEO-short-logo.gif" width=16 height=16 alt=""> |
|
66 |
lissn: {{journal['lissn']}}<span class="custom-external custom-icon space"></span> |
|
67 |
</a> |
|
68 |
<span *ngIf="journal.issn || journal.eissn" class="uk-display-inline-block">lissn: {{journal['lissn']}}</span> |
|
62 | 69 |
</span> |
63 | 70 |
<span *ngIf=" journal['journal'] && (journal['issn'] || journal['eissn'] || journal['lissn'])">)</span> |
64 | 71 |
</span> |
modules/uoa-services-library/trunk/ng-openaire-library/src/app/landingPages/landing-utils/fundedBy.component.ts | ||
---|---|---|
5 | 5 |
@Component({ |
6 | 6 |
selector: 'fundedBy', |
7 | 7 |
template: ` |
8 |
<div class="uk-text-small"> |
|
8 | 9 |
<div class="uk-text-muted">Funded by</div> |
9 | 10 |
<span *ngFor="let item of fundedByProjects.slice(0, showNum) let i=index"> |
10 | 11 |
<a> |
... | ... | |
59 | 60 |
</div> |
60 | 61 |
<span *ngIf="i < (fundedByProjects.slice(0, showNum).length - 1)">, </span> |
61 | 62 |
</span> |
63 |
</div> |
|
62 | 64 |
<div *ngIf="showNum > threshold" class="uk-text-right uk-margin-bottom"> |
63 | 65 |
<a (click)="showNum = threshold; scroll()"> |
64 | 66 |
View less |
modules/uoa-services-library/trunk/ng-openaire-library/src/app/landingPages/landing-utils/availableOn.component.ts | ||
---|---|---|
5 | 5 |
@Component({ |
6 | 6 |
selector: 'availableOn', |
7 | 7 |
template: ` |
8 |
<div class="download-from uk-height-max-large uk-overflow-auto"> |
|
8 |
<div class="download-from uk-height-max-large uk-overflow-auto uk-margin-small-bottom">
|
|
9 | 9 |
<div *ngFor="let available of availableOn.slice(0, showNum) let i=index" |
10 | 10 |
class="uk-flex uk-flex-top" |
11 | 11 |
[title]="available.bestAccessMode ? available.bestAccessMode : 'Not available'"> |
modules/uoa-services-library/trunk/ng-openaire-library/src/app/landingPages/landing-utils/relatedTo.component.ts | ||
---|---|---|
4 | 4 |
@Component({ |
5 | 5 |
selector: 'relatedTo', |
6 | 6 |
template: ` |
7 |
<div> |
|
7 |
<div class="uk-text-small">
|
|
8 | 8 |
<div class="uk-text-muted">Communities</div> |
9 | 9 |
<div class="uk-margin-small-left" *ngFor="let item of contexts.slice(0, showNum); let i=index"> |
10 | 10 |
<span *ngIf="!item['inline']"> |
modules/uoa-services-library/trunk/ng-openaire-library/src/app/landingPages/landing-utils/showSubjects.component.ts | ||
---|---|---|
3 | 3 |
@Component({ |
4 | 4 |
selector: 'showSubjects', |
5 | 5 |
template: ` |
6 |
<div *ngIf="classifiedSubjects && classifiedSubjects.size > 0" class="uk-text-small">
|
|
7 |
<div class="uk-text-muted">
|
|
8 |
Subjects
|
|
9 |
</div>
|
|
6 |
<div class="uk-text-muted">
|
|
7 |
Subjects
|
|
8 |
</div>
|
|
9 |
<div *ngIf="classifiedSubjects && classifiedSubjects.size > 0" class="uk-text-small uk-text-small">
|
|
10 | 10 |
<div class="uk-margin-small-top"> |
11 | 11 |
<div *ngFor="let key of getKeys(classifiedSubjects)" style="line-height: 20px"> |
12 | 12 |
<span uk-icon="tag"></span> |
modules/uoa-services-library/trunk/ng-openaire-library/src/app/landingPages/landing-utils/citeThis/citeThis.component.ts | ||
---|---|---|
2 | 2 |
import {ActivatedRoute} from '@angular/router'; |
3 | 3 |
import {Citation, CitationData} from './citation.class'; |
4 | 4 |
import {ResultLandingInfo} from "../../../utils/entities/resultLandingInfo"; |
5 |
declare var CSL:any; |
|
6 |
declare var Sys:any; |
|
5 |
|
|
6 |
declare var CSL: any; |
|
7 |
declare var Sys: any; |
|
7 | 8 |
declare var UIkit: any; |
9 |
|
|
8 | 10 |
//<addThis ></addThis> |
9 | 11 |
@Component({ |
10 | 12 |
selector: 'citeThis', |
11 | 13 |
template: ` |
12 |
<div class="uk-padding"> |
|
13 |
<mat-select #matSelect class="matSelection" id="citations" name="citeselect" [(ngModel)]="selectedStyle" (ngModelChange)="styleChanged()" |
|
14 |
[disableOptionCentering]="true" modal-select [matSelect]="matSelect" |
|
15 |
panelClass="matSelectionPanel"> |
|
16 |
<mat-option value="0">select a citation style</mat-option> |
|
17 |
<mat-option *ngFor=" let style of this.citation.templates let i = index" [value]="style">{{style}}</mat-option> |
|
18 |
</mat-select> |
|
19 |
<div *ngIf="selectedStyle!='0'"> |
|
20 |
<div id="citation" class="box-content uk-margin-small-top uk-overflow-auto" [innerHTML]=citationText></div> |
|
21 |
<button class="clipboard_btn uk-button uk-button-small uk-button-secondary uk-margin-small-top uk-icon uk-float-right" data-clipboard-target="#citation" title="Copy to clipboard"> |
|
22 |
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="copy" ratio="1"> |
|
23 |
<rect fill="none" stroke="#000" x="3.5" y="2.5" width="12" height="16"></rect> |
|
24 |
<polyline fill="none" stroke="#000" points="5 0.5 17.5 0.5 17.5 17"></polyline> |
|
25 |
</svg> |
|
26 |
<span class="uk-margin-small-left">COPY</span> |
|
27 |
</button> |
|
14 |
<div class="uk-padding"> |
|
15 |
<mat-form-field class="matSelectionFormField uk-width-1-1"> |
|
16 |
<mat-label>Select a citation style</mat-label> |
|
17 |
<mat-select #matSelect class="matSelection" id="citations" name="citeselect" [(ngModel)]="selectedStyle" |
|
18 |
(ngModelChange)="styleChanged()" |
|
19 |
[disableOptionCentering]="true" modal-select [matSelect]="matSelect" |
|
20 |
panelClass="matSelectionPanel"> |
|
21 |
<mat-option *ngFor=" let style of this.citation.templates let i = index" |
|
22 |
[value]="style">{{style}}</mat-option> |
|
23 |
</mat-select> |
|
24 |
</mat-form-field> |
|
25 |
<div *ngIf="selectedStyle!='0'"> |
|
26 |
<div id="citation" class="box-content uk-margin-small-top uk-overflow-auto" [innerHTML]=citationText></div> |
|
27 |
<button |
|
28 |
class="clipboard_btn uk-button uk-button-small uk-button-secondary uk-margin-small-top uk-icon uk-float-right" |
|
29 |
data-clipboard-target="#citation" title="Copy to clipboard"> |
|
30 |
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="copy" ratio="1"> |
|
31 |
<rect fill="none" stroke="#000" x="3.5" y="2.5" width="12" height="16"></rect> |
|
32 |
<polyline fill="none" stroke="#000" points="5 0.5 17.5 0.5 17.5 17"></polyline> |
|
33 |
</svg> |
|
34 |
<span class="uk-margin-small-left">COPY</span> |
|
35 |
</button> |
|
36 |
</div> |
|
28 | 37 |
</div> |
29 |
</div> |
|
30 | 38 |
` |
31 | 39 |
}) |
32 |
export class CiteThisComponent implements OnInit, OnDestroy{ |
|
33 |
private sub:any; |
|
34 |
public selectedStyle:string="0";
|
|
35 |
public citationText:string; |
|
36 |
public citation:Citation = new Citation(); |
|
40 |
export class CiteThisComponent implements OnInit, OnDestroy {
|
|
41 |
private sub: any;
|
|
42 |
public selectedStyle: string = "0";
|
|
43 |
public citationText: string;
|
|
44 |
public citation: Citation = new Citation();
|
|
37 | 45 |
// public cite: any; |
38 | 46 |
@Input() result: ResultLandingInfo; |
39 | 47 |
@Input() id: string; |
40 |
@Input() type: string="article";
|
|
48 |
@Input() type: string = "article";
|
|
41 | 49 |
public citeproc; |
42 | 50 |
public data; |
43 | 51 |
public clipboard; |
44 | 52 |
|
45 | 53 |
ngOnInit() { |
46 |
if(typeof window !== 'undefined') { |
|
54 |
if (typeof window !== 'undefined') {
|
|
47 | 55 |
// this.citeproc = require('./citeproc.js'); |
48 | 56 |
// console.log(this.citeproc); |
49 | 57 |
this.parseData(); |
... | ... | |
65 | 73 |
} |
66 | 74 |
} |
67 | 75 |
|
68 |
parseData(){ |
|
69 |
var citationData:CitationData = new CitationData(); |
|
70 |
|
|
71 |
if(this.result.identifiers && Array.from(this.result.identifiers.keys()).length > 0){ |
|
72 |
var keys = Array.from(this.result.identifiers.keys()); |
|
73 |
for (var i=0; i<keys.length;i++){ |
|
74 |
if(keys[i]=="doi"){ |
|
75 |
var ids = this.result.identifiers.get(keys[i]); |
|
76 |
for (var j=0; j<ids.length;j++){ |
|
77 |
citationData.DOI = ids[j]; |
|
78 |
break; |
|
79 |
} |
|
80 |
} |
|
76 |
parseData() { |
|
77 |
var citationData: CitationData = new CitationData(); |
|
78 |
|
|
79 |
if (this.result.identifiers && Array.from(this.result.identifiers.keys()).length > 0) { |
|
80 |
var keys = Array.from(this.result.identifiers.keys()); |
|
81 |
for (var i = 0; i < keys.length; i++) { |
|
82 |
if (keys[i] == "doi") { |
|
83 |
var ids = this.result.identifiers.get(keys[i]); |
|
84 |
for (var j = 0; j < ids.length; j++) { |
|
85 |
citationData.DOI = ids[j]; |
|
86 |
break; |
|
81 | 87 |
} |
82 | 88 |
} |
83 |
citationData.id = this.id; |
|
84 |
if(this.result.types != undefined && this.result.types.length > 0 && this.result.types[0]){ |
|
85 |
citationData.type = this.result.types[0].toLowerCase(); |
|
89 |
} |
|
90 |
} |
|
91 |
citationData.id = this.id; |
|
92 |
if (this.result.types != undefined && this.result.types.length > 0 && this.result.types[0]) { |
|
93 |
citationData.type = this.result.types[0].toLowerCase(); |
|
94 |
} |
|
95 |
if (this.result.title) { |
|
96 |
citationData.title = this.result.title; |
|
97 |
} |
|
98 |
if (this.result.publisher) { |
|
99 |
citationData.publisher = this.result.publisher; |
|
100 |
} |
|
101 |
if (this.result.authors) { |
|
102 |
citationData.author = []; |
|
103 |
var max_length = (this.result.authors.length > 10) ? 10 : this.result.authors.length; |
|
104 |
for (var i = 0; i < max_length; i++) { |
|
105 |
if (this.result.authors[i] && this.result.authors[i].fullName && this.result.authors[i].fullName.indexOf(", ") !== -1) { |
|
106 |
citationData.author.push({ |
|
107 |
given: this.result.authors[i].fullName.split(", ")[1], |
|
108 |
family: this.result.authors[i].fullName.split(", ")[0], |
|
109 |
'parse-names': true |
|
110 |
}); |
|
111 |
} else { |
|
112 |
citationData.author.push({given: "", family: this.result.authors[i].fullName, 'parse-names': true}); |
|
86 | 113 |
} |
87 |
if(this.result.title){ |
|
88 |
citationData.title = this.result.title; |
|
114 |
// citationData.authors.push(this.result.authors[i]); |
|
115 |
} |
|
116 |
} |
|
117 |
if (this.result.dateofacceptance != undefined) { |
|
118 |
citationData.issued = {}; |
|
119 |
var date: string = (this.result.dateofacceptance.getFullYear()) + ""; // transform to string in case it is an integer |
|
120 |
var dateArray: string[] = (date && (date).indexOf('-') !== -1) ? [date.split('-')[0]] : [date]; |
|
121 |
if (dateArray.length < 3) { |
|
122 |
// dateArray.push[1]; |
|
123 |
// dateArray.push[1]; |
|
124 |
} |
|
125 |
citationData.issued = {"date-parts": [["" + dateArray[0]]]}; |
|
126 |
if (this.result.date) { |
|
127 |
citationData.date = this.result.date; |
|
128 |
} |
|
129 |
if (this.result.journal) { |
|
130 |
if (this.result.journal.journal) { |
|
131 |
citationData["container-title"] = this.result.journal.journal; |
|
89 | 132 |
} |
90 |
if(this.result.publisher){
|
|
91 |
citationData.publisher = this.result.publisher;
|
|
133 |
if (this.result.journal.issn) {
|
|
134 |
citationData.ISSN = this.result.journal.issn;
|
|
92 | 135 |
} |
93 |
if( this.result.authors){ |
|
94 |
citationData.author = []; |
|
95 |
var max_length = (this.result.authors.length > 10)?10:this.result.authors.length; |
|
96 |
for (var i =0 ;i < max_length; i++){ |
|
97 |
if(this.result.authors[i] && this.result.authors[i].fullName && this.result.authors[i].fullName.indexOf(", ") !== -1){ |
|
98 |
citationData.author.push({given:this.result.authors[i].fullName.split(", ")[1], family:this.result.authors[i].fullName.split(", ")[0], 'parse-names':true}); |
|
99 |
}else{ |
|
100 |
citationData.author.push({given:"", family:this.result.authors[i].fullName, 'parse-names':true}); |
|
101 |
} |
|
102 |
// citationData.authors.push(this.result.authors[i]); |
|
103 |
} |
|
136 |
if (this.result.journal.issue) { |
|
137 |
citationData.issue = this.result.journal.issue; |
|
104 | 138 |
} |
105 |
if(this.result.dateofacceptance != undefined){ |
|
106 |
citationData.issued = {}; |
|
107 |
var date:string = (this.result.dateofacceptance.getFullYear())+""; // transform to string in case it is an integer |
|
108 |
var dateArray:string[] = (date && (date).indexOf('-') !== -1)?[date.split('-')[0]]:[date]; |
|
109 |
if(dateArray.length < 3){ |
|
110 |
// dateArray.push[1]; |
|
111 |
// dateArray.push[1]; |
|
112 |
} |
|
113 |
citationData.issued={"date-parts":[[""+dateArray[0]]]}; |
|
114 |
if(this.result.date ){ |
|
115 |
citationData.date = this.result.date ; |
|
116 |
} |
|
117 |
if(this.result.journal ){ |
|
118 |
if(this.result.journal.journal){ |
|
119 |
citationData["container-title"] = this.result.journal.journal; |
|
120 |
} |
|
121 |
if(this.result.journal.issn){ |
|
122 |
citationData.ISSN = this.result.journal.issn; |
|
123 |
} |
|
124 |
if(this.result.journal.issue){ |
|
125 |
citationData.issue = this.result.journal.issue; |
|
126 |
} |
|
127 |
citationData.type = "article-journal"; // in case of APA volume and pages appear only in specific types not just article |
|
128 |
if(this.result.journal.volume){ |
|
129 |
citationData.volume = this.result.journal.volume ; |
|
130 |
} |
|
131 |
if(this.result.journal["start_page"] && this.result.journal["end_page"]){ |
|
132 |
citationData.page = this.result.journal["start_page"] +"-" +this.result.journal["end_page"] ; |
|
133 |
} |
|
134 |
} |
|
139 |
citationData.type = "article-journal"; // in case of APA volume and pages appear only in specific types not just article |
|
140 |
if (this.result.journal.volume) { |
|
141 |
citationData.volume = this.result.journal.volume; |
|
142 |
} |
|
143 |
if (this.result.journal["start_page"] && this.result.journal["end_page"]) { |
|
144 |
citationData.page = this.result.journal["start_page"] + "-" + this.result.journal["end_page"]; |
|
145 |
} |
|
135 | 146 |
} |
136 |
|
|
137 |
|
|
147 |
} |
|
148 |
|
|
149 |
|
|
138 | 150 |
this.data = citationData; |
139 | 151 |
// console.log(this.data); |
140 |
|
|
152 |
|
|
141 | 153 |
} |
142 |
styleChanged(){ |
|
154 |
|
|
155 |
styleChanged() { |
|
143 | 156 |
this.updateCitation(); |
144 |
|
|
157 |
|
|
145 | 158 |
} |
146 |
updateCitation(){ |
|
159 |
|
|
160 |
updateCitation() { |
|
147 | 161 |
var Sys = |
148 |
function Sys(lang, data){ |
|
149 |
this.lang = lang; |
|
150 |
this.data = data; |
|
151 |
this.changeName = function (name) { |
|
152 |
this.lastName = name;
|
|
153 |
}; |
|
154 |
this.retrieveLocale= function (lang){
|
|
155 |
|
|
156 |
return this.lang; |
|
157 |
} |
|
158 |
this.retrieveItem= function(id){
|
|
159 |
return this.data; |
|
160 |
} |
|
161 |
}; |
|
162 |
|
|
163 |
var citeproc = new CSL.Engine(new Sys(this.citation.locale, this.data ), this.citation[(this.selectedStyle == "0")?this.citation.templates[0]:this.selectedStyle]);
|
|
162 |
function Sys(lang, data) {
|
|
163 |
this.lang = lang;
|
|
164 |
this.data = data;
|
|
165 |
this.changeName = function (name) {
|
|
166 |
this.lastName = name; |
|
167 |
};
|
|
168 |
this.retrieveLocale = function (lang) {
|
|
169 |
|
|
170 |
return this.lang;
|
|
171 |
}
|
|
172 |
this.retrieveItem = function (id) {
|
|
173 |
return this.data;
|
|
174 |
}
|
|
175 |
};
|
|
176 |
|
|
177 |
var citeproc = new CSL.Engine(new Sys(this.citation.locale, this.data), this.citation[(this.selectedStyle == "0") ? this.citation.templates[0] : this.selectedStyle]);
|
|
164 | 178 |
citeproc.updateItems([this.data.id]); |
165 | 179 |
this.citationText = citeproc.makeBibliography(); |
166 | 180 |
this.citationText = ((this.citationText != null) && (this.citationText.length > 1) && (this.citationText[1].length > 0)) ? this.citationText[1][0] : ''; |
167 |
|
|
181 |
|
|
168 | 182 |
} |
169 |
|
|
183 |
|
|
170 | 184 |
} |
modules/uoa-services-library/trunk/ng-openaire-library/src/app/landingPages/result/resultLanding.component.html | ||
---|---|---|
59 | 59 |
{{resultLandingInfo.countries.join(", ")}} |
60 | 60 |
</li> |
61 | 61 |
</ul> |
62 |
<div> |
|
63 |
<div *ngIf="resultLandingInfo.relatedResearchResults || resultLandingInfo.similarResearchResults || |
|
64 |
resultLandingInfo.supplementaryResearchResults || resultLandingInfo.supplementedByResearchResults || |
|
65 |
resultLandingInfo.organizations" |
|
66 |
class="uk-margin-top advanced-buttons uk-grid-small uk-child-width-1-4@s uk-child-width-1-2" |
|
67 |
uk-height-match="target: .target; row: false" |
|
68 |
uk-grid> |
|
69 |
<div *ngIf="resultLandingInfo.relatedResearchResults"> |
|
70 |
<div class="clickable" (click)="openRelationResults('Related research results of', |
|
71 |
resultLandingInfo.relatedResearchResults)"> |
|
72 |
<div class="header target uk-text-bold">Related Research Results</div> |
|
73 |
<div class="footer target uk-position-relative"> |
|
74 |
<span |
|
75 |
class="uk-text-bold uk-position-center">{{resultLandingInfo.relatedResearchResults.length | number}}</span> |
|
76 |
</div> |
|
77 |
</div> |
|
78 |
</div> |
|
79 |
<div *ngIf="resultLandingInfo.similarResearchResults"> |
|
80 |
<div class="clickable" (click)="openRelationResults('Similar research results of', |
|
81 |
resultLandingInfo.similarResearchResults, 'similarity')"> |
|
82 |
<div class="header target uk-text-bold">Similar Research Results</div> |
|
83 |
<div class="footer target uk-position-relative"> |
|
84 |
<span |
|
85 |
class="uk-text-bold uk-position-center">{{resultLandingInfo.similarResearchResults.length | number}}</span> |
|
86 |
</div> |
|
87 |
</div> |
|
88 |
</div> |
|
89 |
<div *ngIf="resultLandingInfo.supplementaryResearchResults"> |
|
90 |
<div class="clickable" (click)="openRelationResults('Supplementary research results of', |
|
91 |
resultLandingInfo.supplementaryResearchResults)"> |
|
92 |
<div class="header target uk-text-bold">Supplementary Research Results</div> |
|
93 |
<div class="footer target uk-position-relative"> |
|
94 |
<span |
|
95 |
class="uk-text-bold uk-position-center">{{resultLandingInfo.supplementaryResearchResults.length | number}}</span> |
|
96 |
</div> |
|
97 |
</div> |
|
98 |
</div> |
|
99 |
<div *ngIf="resultLandingInfo.supplementedByResearchResults"> |
|
100 |
<div class="clickable" (click)="openRelationResults('Research results supplemented by', |
|
101 |
resultLandingInfo.supplementedByResearchResults)"> |
|
102 |
<div class="header target uk-text-bold">Research Results supplemented by |
|
103 |
this {{getTypeName()}}</div> |
|
104 |
<div class="footer target uk-position-relative"> |
|
105 |
<span |
|
106 |
class="uk-text-bold uk-position-center">{{resultLandingInfo.supplementedByResearchResults.length | number}}</span> |
|
107 |
</div> |
|
108 |
</div> |
|
109 |
</div> |
|
110 |
<div *ngIf="resultLandingInfo.organizations"> |
|
111 |
<div class="clickable" (click)="openOrganizations()"> |
|
112 |
<div class="header target uk-text-bold">Related Organizations</div> |
|
113 |
<div class="footer target uk-position-relative"> |
|
114 |
<span |
|
115 |
class="uk-text-bold uk-position-center">{{resultLandingInfo.organizations.length | number}}</span> |
|
116 |
</div> |
|
117 |
</div> |
|
118 |
</div> |
|
119 |
</div> |
|
120 |
</div> |
|
121 | 62 |
</div> |
122 | 63 |
<div class="uk-width-1-3@m uk-width-1-1@s uk-padding-remove"> |
123 | 64 |
<ul class="user-actions uk-list uk-card uk-card-default uk-padding"> |
... | ... | |
141 | 82 |
</li> |
142 | 83 |
<!-- Metrics --> |
143 | 84 |
<li *ngIf="hasAltMetrics || hasMetrics" class="uk-margin-medium-top"> |
144 |
<div uk-grid class="uk-child-width-1-3 uk-text-center uk-flex uk-flex-middle uk-flex-center uk-padding-remove-left"> |
|
85 |
<div uk-grid |
|
86 |
class="uk-child-width-1-3 uk-text-center uk-flex uk-flex-middle uk-flex-center uk-padding-remove-left"> |
|
145 | 87 |
<div *ngIf="hasMetrics"> |
146 | 88 |
<metrics [pageViews]="pageViews" |
147 | 89 |
[id]="id" [entityType]="'results'" [entity]="title" |
... | ... | |
200 | 142 |
[classifiedSubjects]="resultLandingInfo.classifiedSubjects"> |
201 | 143 |
</showSubjects> |
202 | 144 |
</div> |
145 |
<!-- Related Organizations--> |
|
146 |
<div *ngIf="resultLandingInfo.organizations && resultLandingInfo.organizations.length > 0" class="uk-margin-medium-bottom uk-width-2-3@m"> |
|
147 |
<div class="uk-text-muted uk-text-small">Related Organizations</div> |
|
148 |
<ul class="uk-list organizations uk-margin-remove-top"> |
|
149 |
<li *ngFor="let organization of resultLandingInfo.organizations"> |
|
150 |
<div class="title" *ngIf="!organization.websiteUrl"> |
|
151 |
{{(organization.name?organization.name:organization.shortname)}} |
|
152 |
<span *ngIf="organization.shortname">({{organization.shortname}})</span> |
|
153 |
</div> |
|
154 |
<a class="title" *ngIf="organization.websiteUrl" [href]="organization.websiteUrl" target="_blank"> |
|
155 |
{{(organization.name?organization.name:organization.shortname)}} |
|
156 |
<span *ngIf="organization.shortname">({{organization.shortname}})</span> |
|
157 |
<span class="custom-external custom-icon space"></span> |
|
158 |
</a> |
|
159 |
<div *ngIf="organization.country">{{organization.country}}</div> |
|
160 |
</li> |
|
161 |
</ul> |
|
162 |
</div> |
|
203 | 163 |
</div> |
204 | 164 |
<div *ngIf="hasSecondaryInfo" |
205 | 165 |
[class]="hasPrimaryInfo?'uk-width-1-3 right-column uk-padding-remove':'uk-padding-remove uk-width-expand'"> |
... | ... | |
218 | 178 |
</div> |
219 | 179 |
</div> |
220 | 180 |
<!-- Download From --> |
221 |
<div |
|
222 |
*ngIf="resultLandingInfo.hostedBy_collectedFrom && resultLandingInfo.hostedBy_collectedFrom.length > 0" |
|
181 |
<div *ngIf="resultLandingInfo.hostedBy_collectedFrom && resultLandingInfo.hostedBy_collectedFrom.length > 0" |
|
223 | 182 |
class="uk-margin-medium-bottom"> |
224 | 183 |
<div class="sideInfoTitle uk-margin-small-bottom uk-flex"> |
225 | 184 |
<span class="uk-width-1-2">Download from</span> |
... | ... | |
268 | 227 |
</no-load-paging> |
269 | 228 |
</div> |
270 | 229 |
</div> |
271 |
<div class="uk-width-1-3 right-column uk-padding-remove"></div>
|
|
230 |
<!--<div class="uk-width-1-3 right-column uk-padding-remove"></div>-->
|
|
272 | 231 |
</div> |
273 | 232 |
</my-tab> |
233 |
<my-tab *ngIf="(resultLandingInfo.supplementaryResearchResults && resultLandingInfo.supplementaryResearchResults.length > 0) || |
|
234 |
(resultLandingInfo.supplementedByResearchResults && resultLandingInfo.supplementedByResearchResults.length > 0)" |
|
235 |
[tabTitle]="'Supplementary outcomes'" [tabId]="'supplementary'" |
|
236 |
[tabNumber]="supplementaryResults"> |
|
237 |
<div class="uk-grid uk-margin-remove"> |
|
238 |
<div class="uk-width-expand uk-padding"> |
|
239 |
<div *ngIf="resultLandingInfo.supplementaryResearchResults && resultLandingInfo.supplementaryResearchResults.length > 0" class="uk-margin-bottom"> |
|
240 |
<h5>Supplementary Outcomes</h5> |
|
241 |
<no-load-paging *ngIf="resultLandingInfo.supplementaryResearchResults.length > pageSize" [type]="'research outcomes'" |
|
242 |
(pageChange)="updateSupplementaryPage($event)" |
|
243 |
[page]="supplementaryPage" [pageSize]="pageSize" |
|
244 |
[totalResults]="resultLandingInfo.supplementaryResearchResults.length"> |
|
245 |
</no-load-paging> |
|
246 |
<ul class="uk-list uk-list-divider uk-margin"> |
|
247 |
<li *ngFor="let item of resultLandingInfo.supplementaryResearchResults.slice((supplementaryPage-1)*pageSize, supplementaryPage*pageSize)"> |
|
248 |
<result-preview [modal]="relationModal" [properties]="properties" |
|
249 |
[result]="getResultPreview(item)"></result-preview> |
|
250 |
</li> |
|
251 |
</ul> |
|
252 |
<no-load-paging *ngIf="resultLandingInfo.supplementaryResearchResults.length > pageSize" [type]="'research outcomes'" |
|
253 |
(pageChange)="updateSupplementaryPage($event)" |
|
254 |
[page]="supplementaryPage" [pageSize]="pageSize" |
|
255 |
[totalResults]="resultLandingInfo.supplementaryResearchResults.length"> |
|
256 |
</no-load-paging> |
|
257 |
</div> |
|
258 |
<div *ngIf="resultLandingInfo.supplementedByResearchResults && resultLandingInfo.supplementedByResearchResults.length > 0"> |
|
259 |
<h5>Outcomes Supplemented by this {{getTypeName()}}</h5> |
|
260 |
<no-load-paging *ngIf="resultLandingInfo.supplementedByResearchResults.length > pageSize" [type]="'research outcomes'" |
|
261 |
(pageChange)="updateSupplementedByPage($event)" |
|
262 |
[page]="supplementedByPage" [pageSize]="pageSize" |
|
263 |
[totalResults]="resultLandingInfo.supplementedByResearchResults.length"> |
|
264 |
</no-load-paging> |
|
265 |
<ul class="uk-list uk-list-divider uk-margin"> |
|
266 |
<li *ngFor="let item of resultLandingInfo.supplementedByResearchResults.slice((supplementedByPage-1)*pageSize, supplementedByPage*pageSize)"> |
|
267 |
<result-preview [modal]="relationModal" [properties]="properties" |
|
268 |
[result]="getResultPreview(item)"></result-preview> |
|
269 |
</li> |
|
270 |
</ul> |
|
271 |
<no-load-paging *ngIf="resultLandingInfo.supplementedByResearchResults.length > pageSize" [type]="'research outcomes'" |
|
272 |
(pageChange)="updateSupplementedByPage($event)" |
|
273 |
[page]="supplementedByPage" [pageSize]="pageSize" |
|
274 |
[totalResults]="resultLandingInfo.supplementedByResearchResults.length"> |
|
275 |
</no-load-paging> |
|
276 |
</div> |
|
277 |
<!--<div *ngIf="supplementaryResults"> |
|
278 |
<div *ngIf="supplementaryFilter" class="uk-margin-bottom" [formGroup]="supplementaryFilter"> |
|
279 |
<span> |
|
280 |
<input formControlName="supplementary" type="checkbox"/> |
|
281 |
<span class="space uk-text-bold">Ingoing</span> |
|
282 |
</span> |
|
283 |
<span class="uk-margin-small-left"> |
|
284 |
<input formControlName="supplementedBy" type="checkbox"/> |
|
285 |
<span class="space uk-text-bold">Outgoing</span> |
|
286 |
</span> |
|
287 |
</div> |
|
288 |
<no-load-paging *ngIf="supplementaryResults.length > pageSize" [type]="'research results'" |
|
289 |
(pageChange)="updateSupplementaryPage($event)" |
|
290 |
[page]="supplementaryPage" [pageSize]="pageSize" |
|
291 |
[totalResults]="supplementaryResults.length"> |
|
292 |
</no-load-paging> |
|
293 |
<ul class="uk-list uk-list-divider uk-margin"> |
|
294 |
<li *ngFor="let item of supplementaryResults.slice((supplementaryPage-1)*pageSize, supplementaryPage*pageSize)"> |
|
295 |
<result-preview [modal]="relationModal" [properties]="properties" |
|
296 |
[result]="getResultPreview(item)"></result-preview> |
|
297 |
</li> |
|
298 |
</ul> |
|
299 |
<no-load-paging *ngIf="supplementaryResults.length > pageSize" [type]="'research results'" |
|
300 |
(pageChange)="updateSupplementaryPage($event)" |
|
301 |
[page]="supplementaryPage" [pageSize]="pageSize" |
|
302 |
[totalResults]="supplementaryResults.length"> |
|
303 |
</no-load-paging> |
|
304 |
<div *ngIf="supplementaryResults.length === 0"> |
|
305 |
No results has been found |
|
306 |
</div> |
|
307 |
</div>--> |
|
308 |
</div> |
|
309 |
<!--<div class="uk-width-1-3 right-column uk-padding-remove"></div>--> |
|
310 |
</div> |
|
311 |
</my-tab> |
|
312 |
<my-tab *ngIf="(resultLandingInfo.relatedResearchResults && resultLandingInfo.relatedResearchResults.length > 0) || |
|
313 |
(resultLandingInfo.similarResearchResults && resultLandingInfo.similarResearchResults.length > 0)" |
|
314 |
[tabTitle]="'Related outcomes'" [tabId]="'related'" |
|
315 |
[tabNumber]="relatedResultsNum"> |
|
316 |
<div class="uk-grid uk-margin-remove"> |
|
317 |
<div class="uk-width-expand uk-padding"> |
|
318 |
<div *ngIf="resultLandingInfo.relatedResearchResults && resultLandingInfo.relatedResearchResults.length > 0" class="uk-margin-bottom"> |
|
319 |
<h5>Related Outcomes</h5> |
|
320 |
<no-load-paging *ngIf="resultLandingInfo.relatedResearchResults.length > pageSize" [type]="'research outcomes'" |
|
321 |
(pageChange)="updateRelatedPage($event)" |
|
322 |
[page]="relatedPage" [pageSize]="pageSize" |
|
323 |
[totalResults]="resultLandingInfo.relatedResearchResults.length"> |
|
324 |
</no-load-paging> |
|
325 |
<ul class="uk-list uk-list-divider uk-margin"> |
|
326 |
<li *ngFor="let item of resultLandingInfo.relatedResearchResults.slice((relatedPage-1)*pageSize, relatedPage*pageSize)"> |
|
327 |
<result-preview [modal]="relationModal" [properties]="properties" |
|
328 |
[result]="getResultPreview(item)"></result-preview> |
|
329 |
</li> |
|
330 |
</ul> |
|
331 |
<no-load-paging *ngIf="resultLandingInfo.relatedResearchResults.length > pageSize" [type]="'research outcomes'" |
|
332 |
(pageChange)="updateRelatedPage($event)" |
|
333 |
[page]="relatedPage" [pageSize]="pageSize" |
|
334 |
[totalResults]="resultLandingInfo.relatedResearchResults.length"> |
|
335 |
</no-load-paging> |
|
336 |
</div> |
|
337 |
<div *ngIf="resultLandingInfo.similarResearchResults && resultLandingInfo.similarResearchResults.length > 0"> |
|
338 |
<h5>Similar Outcomes</h5> |
|
339 |
<no-load-paging *ngIf="resultLandingInfo.similarResearchResults.length > pageSize" [type]="'research outcomes'" |
|
340 |
(pageChange)="updateSimilarPage($event)" |
|
341 |
[page]="similarPage" [pageSize]="pageSize" |
|
342 |
[totalResults]="resultLandingInfo.similarResearchResults.length"> |
|
343 |
</no-load-paging> |
|
344 |
<ul class="uk-list uk-list-divider uk-margin"> |
|
345 |
<li *ngFor="let item of resultLandingInfo.similarResearchResults.slice((similarPage-1)*pageSize, similarPage*pageSize)"> |
|
346 |
<result-preview [modal]="relationModal" [properties]="properties" |
|
347 |
[result]="getResultPreview(item)"></result-preview> |
|
348 |
</li> |
|
349 |
</ul> |
|
350 |
<no-load-paging *ngIf="resultLandingInfo.similarResearchResults.length > pageSize" [type]="'research outcomes'" |
|
351 |
(pageChange)="updateSimilarPage($event)" |
|
352 |
[page]="similarPage" [pageSize]="pageSize" |
|
353 |
[totalResults]="resultLandingInfo.similarResearchResults.length"> |
|
354 |
</no-load-paging> |
|
355 |
</div> |
|
356 |
<!--<div *ngIf="relatedResults"> |
|
357 |
<div *ngIf="relatedFilter" class="uk-margin-bottom" [formGroup]="relatedFilter"> |
|
358 |
<span> |
|
359 |
<input formControlName="related" type="checkbox"/> |
|
360 |
<span class="space uk-text-bold">Related</span> |
|
361 |
</span> |
|
362 |
<span class="uk-margin-small-left"> |
|
363 |
<input formControlName="similar" type="checkbox"/> |
|
364 |
<span class="space uk-text-bold">Similar</span> |
|
365 |
</span> |
|
366 |
</div> |
|
367 |
<no-load-paging *ngIf="relatedResults.length > pageSize" [type]="'research results'" |
|
368 |
(pageChange)="updateRelatedPage($event)" |
|
369 |
[page]="relatedPage" [pageSize]="pageSize" |
|
370 |
[totalResults]="relatedResults.length"> |
|
371 |
</no-load-paging> |
|
372 |
<ul class="uk-list uk-list-divider uk-margin"> |
|
373 |
<li *ngFor="let item of relatedResults.slice((relatedPage-1)*pageSize, relatedPage*pageSize)"> |
|
374 |
<result-preview [modal]="relationModal" [properties]="properties" |
|
375 |
[result]="getResultPreview(item)"></result-preview> |
|
376 |
</li> |
|
377 |
</ul> |
|
378 |
<no-load-paging *ngIf="relatedResults.length > pageSize" [type]="'research results'" |
|
379 |
(pageChange)="updateRelatedPage($event)" |
|
380 |
[page]="relatedPage" [pageSize]="pageSize" |
|
381 |
[totalResults]="relatedResults.length"> |
|
382 |
</no-load-paging> |
|
383 |
<div *ngIf="relatedResults.length === 0"> |
|
384 |
No results has been found |
|
385 |
</div> |
|
386 |
</div>--> |
|
387 |
</div> |
|
388 |
<!--<div class="uk-width-1-3 right-column uk-padding-remove"></div>--> |
|
389 |
</div> |
|
390 |
</my-tab> |
|
274 | 391 |
<my-tab *ngIf="resultLandingInfo.bioentities && bioentitiesNum> 0" |
275 | 392 |
[tabTitle]="'External Databases'" [tabId]="'bioentities'" [tabNumber]="bioentitiesNum"> |
276 | 393 |
<div class="uk-grid uk-margin-remove"> |
... | ... | |
305 | 422 |
</no-load-paging> |
306 | 423 |
</div> |
307 | 424 |
</div> |
308 |
<div class="uk-width-1-3 right-column uk-padding-remove"></div>
|
|
425 |
<!--<div class="uk-width-1-3 right-column uk-padding-remove"></div>-->
|
|
309 | 426 |
</div> |
310 | 427 |
</my-tab> |
311 | 428 |
</my-tabs> |
... | ... | |
373 | 490 |
[resultType]="'other'" [type]="'other research products'"></deletedByInference> |
374 | 491 |
</div> |
375 | 492 |
</modal-alert> |
376 |
<!-- Relation Results--> |
|
377 |
<modal-alert *ngIf="resultLandingInfo" classBody="uk-width-xxlarge uk-padding-remove-right" #relationModal> |
|
378 |
<landing-header [properties]="properties" [title]="resultLandingInfo.title" [modal]="relationModal" |
|
379 |
[subTitle]="resultLandingInfo.subtitle" [authorLimit]="10" [showAllAuthors]="false" |
|
380 |
[entityType]="getTypeName()" [authors]="resultLandingInfo.authors" [types]="resultLandingInfo.types" |
|
381 |
[year]="resultLandingInfo.date" [embargoEndDate]="resultLandingInfo.embargoEndDate"> |
|
382 |
</landing-header> |
|
383 |
<div *ngIf="relationResults" class="uk-margin-medium-top uk-margin-medium-right"> |
|
384 |
<no-load-paging *ngIf="relationResults.length > pageSize" [type]="'research results'" |
|
385 |
(pageChange)="updateRelationPage($event)" |
|
386 |
[page]="relationPage" [pageSize]="pageSize" |
|
387 |
[totalResults]="relationResults.length"> |
|
388 |
</no-load-paging> |
|
389 |
<ul class="uk-list uk-list-divider uk-margin"> |
|
390 |
<li *ngFor="let item of relationResults.slice((relationPage-1)*pageSize, relationPage*pageSize)"> |
|
391 |
<result-preview [modal]="relationModal" [properties]="properties" |
|
392 |
[result]="getResultPreview(item)"></result-preview> |
|
393 |
</li> |
|
394 |
</ul> |
|
395 |
<no-load-paging *ngIf="relationResults.length > pageSize" [type]="'research results'" |
|
396 |
(pageChange)="updateRelationPage($event)" |
|
397 |
[page]="relationPage" [pageSize]="pageSize" |
|
398 |
[totalResults]="relationResults.length"> |
|
399 |
</no-load-paging> |
|
400 |
</div> |
|
401 |
</modal-alert> |
|
402 | 493 |
<!-- Related Organizations--> |
403 | 494 |
<modal-alert *ngIf="resultLandingInfo && resultLandingInfo.organizations" |
404 | 495 |
classBody="uk-width-xxlarge uk-padding-remove-right" #organizationModal> |
... | ... | |
410 | 501 |
<div class="uk-margin-medium-top uk-margin-medium-right"> |
411 | 502 |
<no-load-paging *ngIf="resultLandingInfo.organizations.length > pageSize" [type]="'organizations'" |
412 | 503 |
(pageChange)="updateOrganizationsPage($event)" |
413 |
[page]="relationPage" [pageSize]="pageSize"
|
|
504 |
[page]="relatedPage" [pageSize]="pageSize"
|
|
414 | 505 |
[totalResults]="resultLandingInfo.organizations.length"> |
415 | 506 |
</no-load-paging> |
416 | 507 |
<ul class="uk-list uk-list-divider uk-margin"> |
417 |
<li *ngFor="let item of resultLandingInfo.organizations.slice((relationPage-1)*pageSize, relationPage*pageSize)">
|
|
508 |
<li *ngFor="let item of resultLandingInfo.organizations.slice((relatedPage-1)*pageSize, relatedPage*pageSize)">
|
|
418 | 509 |
<result-preview [modal]="organizationModal" [properties]="properties" |
419 | 510 |
[result]="getResultPreviewFromOrg(item)"></result-preview> |
420 | 511 |
</li> |
421 | 512 |
</ul> |
422 | 513 |
<no-load-paging *ngIf="resultLandingInfo.organizations.length > pageSize" [type]="'organizations'" |
423 | 514 |
(pageChange)="updateOrganizationsPage($event)" |
424 |
[page]="relationPage" [pageSize]="pageSize"
|
|
515 |
[page]="relatedPage" [pageSize]="pageSize"
|
|
425 | 516 |
[totalResults]="resultLandingInfo.organizations.length"> |
426 | 517 |
</no-load-paging> |
427 | 518 |
</div> |
... | ... | |
456 | 547 |
fill="none" points="5 0.5 17.5 0.5 17.5 17" stroke="#000"></polyline></svg> |
457 | 548 |
</span> |
458 | 549 |
</button> |
459 |
<div>Research results</div>
|
|
550 |
<div>Research outcomes</div>
|
|
460 | 551 |
</a></div> |
461 | 552 |
<div class="uk-text-center"> |
462 | 553 |
<a [queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[id,type,'context'])" |
modules/uoa-services-library/trunk/ng-openaire-library/src/app/landingPages/result/resultLanding.component.ts | ||
---|---|---|
15 | 15 |
import {MetricsService} from "../../services/metrics.service"; |
16 | 16 |
import {Organization, RelationResult, ResultPreview} from "../../utils/result-preview/result-preview"; |
17 | 17 |
import {IndexInfoService} from "../../utils/indexInfo.service"; |
18 |
import {FormArray, FormBuilder, FormControl, FormGroup} from "@angular/forms"; |
|
18 | 19 |
|
19 | 20 |
|
20 | 21 |
@Component({ |
... | ... | |
36 | 37 |
public deleteByInferenceOpened: boolean = false; |
37 | 38 |
|
38 | 39 |
public resultLandingInfo: ResultLandingInfo; |
39 |
public relationResults: RelationResult[]; |
|
40 |
public relatedResults: RelationResult[]; |
|
41 |
public supplementaryResults: RelationResult[]; |
|
40 | 42 |
public relation: string = 'trust'; |
41 | 43 |
public id: string; |
42 | 44 |
public title: string; |
... | ... | |
60 | 62 |
// Custom tab paging variables |
61 | 63 |
public referencesPage: number = 1; |
62 | 64 |
public bioentitiesPage: number = 1; |
63 |
public relationPage: number = 1; |
|
65 |
public relatedPage: number = 1; |
|
66 |
public similarPage: number = 1; |
|
67 |
public supplementaryPage: number = 1; |
|
68 |
public supplementedByPage: number = 1; |
|
64 | 69 |
public organizationsPage: number = 1; |
65 |
public softwarePage: number = 1; |
|
66 | 70 |
public openCitationsPage: number = 1; |
67 | 71 |
public pageSize: number = 10; |
68 | 72 |
|
73 |
// relation filters |
|
74 |
public relatedFilter: FormGroup; |
|
75 |
public supplementaryFilter: FormGroup; |
|
76 |
|
|
69 | 77 |
// Map counting variables |
70 | 78 |
public bioentitiesNum: number = 0; |
79 |
public relatedResultsNum: number = 0; |
|
80 |
public supplementaryResultsNum: number = 0; |
|
71 | 81 |
|
72 | 82 |
// Message variables |
73 | 83 |
public warningMessage = ""; |
... | ... | |
103 | 113 |
private metricsService: MetricsService, |
104 | 114 |
private cdr: ChangeDetectorRef, |
105 | 115 |
private _location: Location, |
106 |
private indexInfoService: IndexInfoService) { |
|
116 |
private indexInfoService: IndexInfoService, |
|
117 |
private fb: FormBuilder) { |
|
107 | 118 |
} |
108 | 119 |
|
109 | 120 |
ngOnInit() { |
... | ... | |
302 | 313 |
}); |
303 | 314 |
} |
304 | 315 |
this.showLoading = false; |
305 |
if (this.resultLandingInfo.references) { |
|
306 |
this.activeTab = "References"; |
|
307 |
} else if (this.resultLandingInfo.relatedResearchResults) { |
|
308 |
this.activeTab = "Related Research Results"; |
|
309 |
} else if (this.resultLandingInfo.similarResearchResults) { |
|
310 |
this.activeTab = "Similar Research Results"; |
|
311 |
} else if (this.resultLandingInfo.organizations) { |
|
312 |
this.activeTab = "Related Organizations"; |
|
313 |
} else if (this.resultLandingInfo.bioentities) { |
|
314 |
this.activeTab = "Bioentities"; |
|
315 |
} else { |
|
316 |
this.activeTab = "Metrics"; |
|
317 |
//this.metricsClicked = true; |
|
318 |
} |
|
316 |
this.initFilters(); |
|
319 | 317 |
}, |
320 | 318 |
err => { |
321 | 319 |
this.handleError("Error getting " + this.type + " for id: " + this.id, err); |
... | ... | |
337 | 335 |
); |
338 | 336 |
} |
339 | 337 |
|
338 |
public initFilters() { |
|
339 |
/*this.relatedFilter = this.fb.group({ |
|
340 |
related: this.fb.control(true), |
|
341 |
similar: this.fb.control(true), |
|
342 |
}); |
|
343 |
this.supplementaryFilter = this.fb.group({ |
|
344 |
supplementary: this.fb.control(true), |
|
345 |
supplementedBy: this.fb.control(true), |
|
346 |
});*/ |
|
347 |
this.filterRelatedResults(); |
|
348 |
this.filterSupplementaryResults(); |
|
349 |
/*this.relatedFilter.valueChanges.subscribe(value => { |
|
350 |
this.filterRelatedResults(value.related, value.similar); |
|
351 |
}); |
|
352 |
this.supplementaryFilter.valueChanges.subscribe(value => { |
|
353 |
this.filterSupplementaryResults(value.supplementary, value.supplementedBy); |
|
354 |
});*/ |
|
355 |
} |
|
356 |
|
|
357 |
public filterRelatedResults(related: boolean = true, similar: boolean = true) { |
|
358 |
this.relatedResults = []; |
|
359 |
this.relatedResultsNum = 0; |
|
360 |
if (this.resultLandingInfo.relatedResearchResults) { |
|
361 |
this.relatedResultsNum += this.resultLandingInfo.relatedResearchResults.length; |
|
362 |
/*if(related) { |
|
363 |
this.resultLandingInfo.relatedResearchResults.forEach(result => { |
|
364 |
this.relatedResults.push(result); |
|
365 |
}); |
|
366 |
}*/ |
|
367 |
} |
|
368 |
if (this.resultLandingInfo.similarResearchResults) { |
|
369 |
this.relatedResultsNum += this.resultLandingInfo.similarResearchResults.length; |
|
370 |
/*if(similar) { |
|
371 |
this.resultLandingInfo.similarResearchResults.forEach(result => { |
|
372 |
this.relatedResults.push(result); |
|
373 |
}); |
|
374 |
}*/ |
|
375 |
} |
|
376 |
} |
|
377 |
|
|
378 |
public filterSupplementaryResults(supplementary: boolean = true, supplementedBy: boolean = true) { |
|
379 |
this.supplementaryResults = []; |
|
380 |
this.supplementaryResultsNum = 0; |
|
381 |
if (this.resultLandingInfo.supplementaryResearchResults) { |
|
382 |
this.supplementaryResultsNum += this.resultLandingInfo.supplementaryResearchResults.length; |
|
383 |
/*if(supplementary) { |
|
384 |
this.resultLandingInfo.supplementaryResearchResults.forEach(result => { |
|
385 |
this.supplementaryResults.push(result); |
|
386 |
}); |
|
387 |
}*/ |
|
388 |
} |
|
389 |
if (this.resultLandingInfo.supplementedByResearchResults) { |
|
390 |
this.supplementaryResultsNum += this.resultLandingInfo.supplementedByResearchResults.length; |
|
391 |
/*if(supplementedBy) { |
|
392 |
this.resultLandingInfo.supplementedByResearchResults.forEach(result => { |
|
393 |
this.supplementaryResults.push(result); |
|
394 |
}); |
|
395 |
}*/ |
|
396 |
} |
|
397 |
} |
|
398 |
|
|
340 | 399 |
public metricsResults($event) { |
341 | 400 |
this.totalViews = $event.totalViews; |
342 | 401 |
this.totalDownloads = $event.totalDownloads; |
... | ... | |
357 | 416 |
return !(this.totalViews && this.totalDownloads && this.pageViews) || this.totalViews > 0 || this.totalDownloads > 0 || this.pageViews > 0; |
358 | 417 |
} |
359 | 418 |
|
360 |
public buildCurationTooltip(): string { |
|
361 |
let tooltipContent: string = "<div class='uk-margin uk-padding-small'>"; |
|
362 |
|
|
363 |
tooltipContent += "<h4>Record in preview</h4>"; |
|
364 |
tooltipContent += "<p>Bibliographic record accepted by the system, but not yet processed by <br> OpenAIRE tools for information quality improvement and de-duplication</p>"; |
|
365 |
|
|
366 |
tooltipContent += "</div>"; |
|
367 |
return tooltipContent; |
|
368 |
} |
|
369 |
|
|
370 | 419 |
private updateDescription(description: string) { |
371 | 420 |
this._meta.updateTag({content: description.substring(0, 160)}, "name='description'"); |
372 | 421 |
this._meta.updateTag({content: description.substring(0, 160)}, "property='og:description'"); |
... | ... | |
402 | 451 |
this.bioentitiesPage = $event.value; |
403 | 452 |
} |
404 | 453 |
|
405 |
public updateRelationPage($event) {
|
|
406 |
this.relationPage = $event.value;
|
|
454 |
public updateRelatedPage($event) {
|
|
455 |
this.relatedPage = $event.value;
|
|
407 | 456 |
} |
408 | 457 |
|
458 |
public updateSimilarPage($event) { |
|
459 |
this.similarPage = $event.value; |
|
460 |
} |
|
461 |
|
|
462 |
public updateSupplementaryPage($event) { |
|
463 |
this.supplementaryPage = $event.value; |
|
464 |
} |
|
465 |
|
|
466 |
public updateSupplementedByPage($event) { |
|
467 |
this.supplementedByPage = $event.value; |
|
468 |
} |
|
469 |
|
|
409 | 470 |
public updateOrganizationsPage($event) { |
410 | 471 |
this.organizationsPage = $event.value; |
411 | 472 |
} |
412 | 473 |
|
413 |
public updateSoftwarePage($event) { |
|
414 |
this.softwarePage = $event.value; |
|
415 |
} |
|
416 |
|
|
417 | 474 |
public updateOpenCitationsPage($event) { |
418 | 475 |
this.openCitationsPage = $event.value; |
419 | 476 |
} |
... | ... | |
475 | 532 |
this.alertModalDeletedByInference.alertTitle = "Other versions of"; |
476 | 533 |
this.alertModalDeletedByInference.open(); |
477 | 534 |
} |
478 |
|
|
479 |
openRelationResults(title: string, relationResults: RelationResult[], relation: string = 'trust') { |
|
480 |
this.relationResults = relationResults; |
|
481 |
this.relation = relation; |
|
482 |
this.relationModal.cancelButton = false; |
|
483 |
this.relationModal.okButton = false; |
|
484 |
this.relationModal.alertTitle = title; |
|
485 |
this.relationPage = 1; |
|
486 |
this.relationModal.open(); |
|
487 |
} |
|
488 | 535 |
|
489 | 536 |
openOrganizations() { |
490 | 537 |
this.relation = 'trust'; |
modules/uoa-services-library/trunk/ng-openaire-library/src/app/utils/result-preview/result-preview.component.html | ||
---|---|---|
1 | 1 |
<!-- Before title --> |
2 | 2 |
<div uk-grid> |
3 |
<div [class.uk-width-1-1]="!result.relation" [class.uk-width-1-2]="result.relation" |
|
4 |
[class.uk-width-3-4@s]="result.relation"> |
|
3 |
<div class="uk-width-1-1"> |
|
5 | 4 |
<!-- deposit website URL --> |
6 | 5 |
<span class="uk-width-expand uk-flex-right"> |
7 | 6 |
<a *ngIf="result.websiteURL && promoteWebsiteURL" href="{{result.websiteURL}}" target="_blank" type="submit" |
... | ... | |
20 | 19 |
<!-- Title --> |
21 | 20 |
<div class="uk-margin-small-bottom"> |
22 | 21 |
<div class="uk-h5 uk-margin-remove"> |
23 |
|
|
24 | 22 |
<a *ngIf="result.id && !(result.resultType == 'dataprovider' && result.compatibilityUNKNOWN) " |
25 | 23 |
(click)="onClick()" [queryParams]="routerHelper.createQueryParam(urlParam,result.id)" |
26 |
routerLink="/search/{{result.resultType}}" class="portal-link uk-width-expand">
|
|
24 |
routerLink="/search/{{(result.resultType?result.resultType:'result')}}" class="uk-link uk-width-expand">
|
|
27 | 25 |
<div *ngIf="(result.title) || result.acronym"> |
28 | 26 |
<span *ngIf="result.acronym"> |
29 | 27 |
{{result.acronym}} |
... | ... | |
201 | 199 |
</span> |
202 | 200 |
</div> |
203 | 201 |
</div> |
204 |
<div *ngIf="result.relation" class="uk-width-expand uk-padding-remove-left uk-text-small"> |
|
205 |
<div *ngIf="result.percentage" class="uk-flex uk-flex-middle"> |
|
206 |
<div class="uk-margin-small-right"> |
|
207 |
<span class="uk-text-capitalize uk-text-muted">{{result.relation}}: </span> |
|
208 |
<span class="portal-color uk-text-bold"> {{result.percentage}}%</span> |
|
209 |
</div> |
|
210 |
<progress class="uk-progress portal-progress uk-margin-remove uk-text-left uk-width-expand" |
|
211 |
[value]="result.percentage" max="100"></progress> |
|
212 |
</div> |
|
213 |
<div class="uk-text-capitalize uk-text-muted" *ngIf="result.provenanceAction"> |
|
214 |
{{result.provenanceAction}} |
|
215 |
</div> |
|
216 |
</div> |
|
217 | 202 |
</div> |
218 | 203 |
<!-- Description --> |
219 | 204 |
<div *ngIf="result.description" class="uk-margin-small-bottom multi-line-ellipsis lines-3"> |
modules/uoa-services-library/trunk/ng-openaire-library/src/app/utils/result-preview/result-preview.component.ts | ||
---|---|---|
34 | 34 |
this.urlParam = "organizationId"; |
35 | 35 |
} else if (this.result.resultType == "dataprovider") { |
36 | 36 |
this.urlParam = "datasourceId"; |
37 |
} else { |
|
38 |
this.urlParam = "id"; |
|
37 | 39 |
} |
38 | 40 |
this.initBeforeTitle(); |
39 | 41 |
} |
... | ... | |
53 | 55 |
if(this.result.startYear && this.result.endYear) { |
54 | 56 |
this.beforeTitle.push(this.result.startYear.toString() + ' - ' + this.result.endYear.toString()); |
55 | 57 |
} |
58 |
if(this.result.provenanceAction) { |
|
59 |
this.beforeTitle.push(this.result.provenanceAction); |
|
60 |
} |
|
56 | 61 |
} |
57 | 62 |
|
58 | 63 |
public getTypeName(type: string): string { |
Also available in: Unified diff
[Library | Trunk]: Finish result landing base on new mocks