Revision 46377
Added by Konstantina Galouni about 7 years ago
publication.component.ts | ||
---|---|---|
16 | 16 |
}) |
17 | 17 |
|
18 | 18 |
export class PublicationComponent { |
19 |
|
|
19 | 20 |
public showAllCollectedFrom: boolean = false; |
20 | 21 |
public showAllDownloadFrom: boolean = false; |
21 | 22 |
public showAllFundedBy: boolean = false; |
... | ... | |
84 | 85 |
this._publicationService.getPublicationInfo(this.articleId).subscribe( |
85 | 86 |
data => { |
86 | 87 |
this.publicationInfo = data; |
88 |
|
|
89 |
|
|
87 | 90 |
// this.result = [] |
88 | 91 |
// this.result = {id: id, type :"dataset", source : "openaire", title: this.publicationInfo.title,url: '', result: '', accessRights: this.publicationInfo.bestlicense, embargoEndDate: ''}; |
89 | 92 |
|
... | ... | |
132 | 135 |
this.totalViews = $event.totalViews; |
133 | 136 |
this.totalDownloads = $event.totalDownloads; |
134 | 137 |
} |
138 |
|
|
139 |
public buildTooltip(item: { "id": string, "acronym": string, "title": string, |
|
140 |
"funderShortname": string, "funderName": string, |
|
141 |
"funding": string, "code": string, inline: boolean}) { |
|
142 |
let tooltipContent: string = ""; |
|
143 |
|
|
144 |
if(item.title) { |
|
145 |
tooltipContent += "<h4>"+item.title+"</h4>"; |
|
146 |
} |
|
147 |
if(item.code && item.code != "unidentified") { |
|
148 |
tooltipContent += "Project Code: "+item.code; |
|
149 |
} |
|
150 |
if(item.funderName || item.funderShortname) { |
|
151 |
tooltipContent += "<div>Funder: "; |
|
152 |
if(item.funderName && item.funderShortname) { |
|
153 |
tooltipContent += item.funderName + " ("+ item.funderShortname +")"; |
|
154 |
} else if(item.funderName) { |
|
155 |
tooltipContent += item.funderName; |
|
156 |
} else { |
|
157 |
tooltipContent += item.funderShortname; |
|
158 |
} |
|
159 |
|
|
160 |
tooltipContent += "</div>"; |
|
161 |
} |
|
162 |
|
|
163 |
if(item.funding) { |
|
164 |
tooltipContent += "<div>Funding: "+ item.funding + "</div>"; |
|
165 |
} |
|
166 |
|
|
167 |
if(tooltipContent != "") { |
|
168 |
tooltipContent = "<div>" + tooltipContent + "</div>"; |
|
169 |
} |
|
170 |
|
|
171 |
return tooltipContent; |
|
172 |
/*<div> |
|
173 |
<h4>{{item['title']}}</h4> |
|
174 |
Project Code: {{item['code']}} |
|
175 |
<div> |
|
176 |
Funder: {{item['funderName']}} ({{item['funderShortname']}}) |
|
177 |
</div> |
|
178 |
<div> |
|
179 |
Funding: {{item['funding']}} |
|
180 |
</div> |
|
181 |
</div>*/ |
|
182 |
} |
|
135 | 183 |
} |
Also available in: Unified diff
custom-icon class added in tags with uk-icon-external link class to fix line-height | custom-tab-content class added in tab contents of landing pages to fix min-height | Publication landing page: Funded By section: tooltip fixed (if no info for something do not show it) & special case: unidentified projects | Publication landing page: Related Organizations Tab added