Project

General

Profile

« Previous | Next » 

Revision 58598

[Library | Trunk]: Add openaire metrics.

View differences:

resultLanding.component.html
195 195
              <b2note [id]="id" [properties]="properties"
196 196
                      [landingInfo]="resultLandingInfo"></b2note>
197 197
            </div>
198
            <!--<ul #accordions class="custom-accordion" uk-accordion>
199
              <li *ngIf="resultLandingInfo.references" (click)="activeTab='References'">
200
                <a class="uk-accordion-title" href="#">
201
                  References
202
                  ({{resultLandingInfo.references.length | number}})
203
                </a>
204
                <div class="uk-accordion-content">
205
                  <div>
206
                    <div *ngIf="resultLandingInfo.references.length > pageSize" class="uk-margin-bottom">
207
                      <span class="uk-h6">{{resultLandingInfo.references.length | number}}
208
                        references, page {{referencesPage | number}}
209
                        of {{totalPages(resultLandingInfo.references.length) | number}}</span>
210
                      <paging-no-load class="uk-float-right" [currentPage]="referencesPage"
211
                                      [totalResults]="resultLandingInfo.references.length" [size]="pageSize"
212
                                      (pageChange)="updateReferencesPage($event)"></paging-no-load>
213
                    </div>
214

  
215
                    <div
216
                        *ngFor="let item of resultLandingInfo.references.slice((referencesPage-1)*pageSize, referencesPage*pageSize)">
217
                      <p *ngIf=" item && item['url']"
218
                         class="custom-external custom-icon">
219
                        <a href="{{item['url']}}" target="_blank">
220
                          {{item['name']}}
221
                        </a>
222
                      </p>
223
                      <p *ngIf="!item['url']" class="pseudo-external custom-icon">
224
                        {{item['name']}}
225
                      </p>
226
                    </div>
227
                  </div>
228
                </div>
229
              </li>
230
              <li *ngIf="resultLandingInfo.similarResearchResults" (click)="activeTab='Similar Research Results'">
231
                <a class="uk-accordion-title" href="#">
232
                  Similar Research Results
233
                  ({{resultLandingInfo.similarResearchResults.length | number}})
234
                </a>
235
                <div class="uk-accordion-content">
236
                  <div>
237
                    <tabTable percentageName="similarity" [info]="resultLandingInfo.similarResearchResults"
238
                              [properties]=properties></tabTable>
239
                  </div>
240
                </div>
241
              </li>
242

  
243
              <li *ngIf="resultLandingInfo.supplementaryResearchResults"
244
                  (click)="activeTab='Supplementary Research Results'">
245
                <a class="uk-accordion-title" href="#">
246
                  Supplementary Research Results
247
                  ({{resultLandingInfo.supplementaryResearchResults.length | number}})
248
                </a>
249
                <div class="uk-accordion-content">
250
                  <div>
251
                    <tabTable percentageName="trust" [info]="resultLandingInfo.supplementaryResearchResults"
252
                              [properties]=properties></tabTable>
253
                  </div>
254
                </div>
255
              </li>
256

  
257
              <li *ngIf="resultLandingInfo.supplementedByResearchResults"
258
                  (click)="activeTab='Research Results supplemented by this product'">
259
                <a class="uk-accordion-title" href="#">
260
                  Research Results supplemented by this
261
                  <span *ngIf="type == 'publication' || type == 'software'">{{type}}</span>
262
                  <span *ngIf="type == 'dataset'">research data</span>
263
                  <span *ngIf="type == 'orp'">research product</span>
264
                  ({{resultLandingInfo.supplementedByResearchResults.length | number}})
265
                </a>
266
                <div class="uk-accordion-content">
267
                  <div>
268
                    <tabTable percentageName="trust" [info]="resultLandingInfo.supplementedByResearchResults"
269
                              [properties]=properties></tabTable>
270
                  </div>
271
                </div>
272
              </li>
273

  
274
              <li *ngIf="resultLandingInfo.organizations" (click)="activeTab='Related Organizations'">
275
                <a class="uk-accordion-title" href="#">
276
                  Related Organizations
277
                  ({{resultLandingInfo.organizations.length | number}})
278
                </a>
279
                <div class="uk-accordion-content">
280
                  <div>
281
                    <div *ngIf="resultLandingInfo.organizations.length > pageSize" class="uk-margin-bottom">
282
                      <span class="uk-text-bold">{{resultLandingInfo.organizations.length | number}}
283
                        organizations, page {{organizationsPage | number}}
284
                        of {{totalPages(resultLandingInfo.organizations.length) | number}}</span>
285
                      <paging-no-load class="uk-float-right" [currentPage]="organizationsPage"
286
                                      [totalResults]="resultLandingInfo.organizations.length" [size]="pageSize"
287
                                      (pageChange)="updateOrganizationsPage($event)"></paging-no-load>
288
                    </div>
289

  
290
                    <table class="uk-table uk-table-small uk-table-divider uk-table-middle ">
291
                      <tbody>
292
                      <tr
293
                          *ngFor="let organization of resultLandingInfo.organizations.slice((organizationsPage-1)*pageSize, organizationsPage*pageSize)">
294
                        <td>
295
                          <a *ngIf="(organization['id']) && ((organization['name']) || (organization['shortname']))"
296
                             [queryParams]="{organizationId: organization.id}" routerLinkActive="router-link-active"
297
                             routerLink="/search/organization">
298
                            {{organization['name']}}
299
                            <span *ngIf="organization.name && organization.shortname"> ( </span>
300
                            <span *ngIf="organization.shortname">{{organization.shortname}}</span>
301
                            <span *ngIf="organization.name && organization.shortname"> ) </span>
302
                          </a>
303
                          <p *ngIf="(!organization['id']) && ((organization['name']) || (organization['shortname']))">
304
                            {{organization['name']}}
305
                            <span *ngIf="organization.name && organization.shortname"> ( </span>
306
                            <span *ngIf="organization.shortname">{{organization.shortname}}</span>
307
                            <span *ngIf="organization.name && organization.shortname"> ) </span>
308
                          </p>
309
                          <div *ngIf="organization.country">{{organization.country}}</div>
310
                          <div *ngIf="organization.websiteUrl">Website url:
311
                            <a href="{{organization.websiteUrl}}" target="_blank">{{organization.websiteUrl}}</a>
312
                          </div>
313
                        </td>
314
                        <td>
315
                          <div *ngIf="organization['trust']" title="{{organization['trust']}}%">
316
                            <div class="uk-text-center">{{organization['trust']}}%</div>
317
                            <progress class="uk-progress uk-margin-remove" value="{{organization['trust']}}"
318
                                      max="100"></progress>
319
                          </div>
320
                          <div *ngIf="!organization['trust']">
321
                            <p>no trust available</p>
322
                          </div>
323
                        </td>
324
                      </tr>
325
                      </tbody>
326
                    </table>
327

  
328
                  </div>
329
                </div>
330
              </li>
331

  
332
              <li *ngIf="resultLandingInfo.bioentities" (click)="activeTab='Bioentities'">
333
                <a class="uk-accordion-title" href="#">
334
                  Bioentities
335
                  ({{bioentitiesNum | number}})
336
                </a>
337
                <div class="uk-accordion-content">
338
                  <div *ngIf="resultLandingInfo.bioentities && bioentitiesNum > pageSize" class="uk-margin-bottom">
339
                    <span class="uk-text-bold"> {{bioentitiesNum | number}}
340
                      bioentities, page {{bioentitiesPage | number}} of {{totalPages(bioentitiesNum) | number}}</span>
341
                    <paging-no-load class="uk-float-right" [currentPage]="bioentitiesPage"
342
                                    [totalResults]="bioentitiesNum" [size]="pageSize"
343
                                    (pageChange)="updateBioentitiesPage($event)"></paging-no-load>
344
                  </div>
345

  
346
                  <table id="bioentitiesTable" class="uk-table ">
347
                    <tbody>
348
                    <ng-container *ngFor="let key of getKeys(resultLandingInfo.bioentities) let i=index">
349
                      <tr
350
                          *ngFor="let keyIn of keysToArray(resultLandingInfo.bioentities.get(key)).slice((bioentitiesPage-1)*pageSize, bioentitiesPage*pageSize)">
351
                        <td class="uk-text-center" *ngIf="keyIn">
352
                                         <span class="custom-external custom-icon">
353
                                             <a href="{{resultLandingInfo.bioentities.get(key).get(keyIn)}}"
354
                                                target="_blank">
355
                                                 {{keyIn}}
356
                                             </a>
357
                                         </span>
358
                        </td>
359
                        <td class="uk-text-center">
360
                          {{key}}
361
                        </td>
362
                      </tr>
363
                    </ng-container>
364
                    </tbody>
365
                  </table>
366
                </div>
367
              </li>
368

  
369
              <li (click)="activeTab='Other Citations'"
370
                  *ngIf="resultLandingInfo.openCitations && resultLandingInfo.openCitations.length > 0">
371
                <a class="uk-accordion-title" href="#">
372
                  Open Citations
373
                  ({{resultLandingInfo.openCitations.length | number}})
374
                </a>
375
                <div class="uk-accordion-content">
376
                  <div *ngIf="resultLandingInfo.openCitations.length > pageSize" class="uk-margin-bottom">
377
                    <span class="uk-h6">{{resultLandingInfo.openCitations.length | number}}
378
                      open citations, page {{openCitationsPage | number}}
379
                      of {{totalPages(resultLandingInfo.openCitations.length) | number}}</span>
380
                    <paging-no-load class="uk-float-right" [currentPage]="openCitationsPage"
381
                                    [totalResults]="resultLandingInfo.openCitations.length" [size]="pageSize"
382
                                    (pageChange)="updateOpenCitationsPage($event)"></paging-no-load>
383
                  </div>
384

  
385
                  <ul class="uk-list uk-list-divider  uk-margin">
386
                    <li
387
                        *ngFor="let result of resultLandingInfo.openCitations.slice((openCitationsPage-1)*pageSize, openCitationsPage*pageSize)">
388
                      <h5 *ngIf="result.title">
389
                              <span *ngIf="result.url"
390
                                    class="custom-external">
391

  
392
                                  <a *ngIf="result.title" href="{{result.url}}" target="_blank"
393
                                     [innerHTML]="result.title">
394
                                  </a>
395
                                  <a *ngIf="!result.title" href="{{result.url}}" target="_blank">
396
                                      [no title available]
397
                                  </a>
398
                              </span>
399
                        <span *ngIf="result.title && !result.url" [innerHTML]="result.title"></span>
400
                        <span *ngIf="!result.title && !result.url">
401
                                  [no title available]
402
                              </span>
403
                      </h5>
404

  
405
                      <div>
406
                              <span *ngIf="result['authors']">
407
                                  <span *ngFor="let author of result['authors'].slice(0,15)">
408
                                      {{author}};
409
                                  </span>
410
                                  <span *ngIf="result['authors'].length > 15">...</span>
411
                              </span>
412
                        <span *ngIf="result.year">
413
                                  ({{result.year}})
414
                              </span>
415
                      </div>
416
                      <span *ngIf="result.doi">Identifier: <a *ngIf="result.doi" target="_blank"
417
                                                              class="custom-external custom-icon"
418
                                                              href="{{doiURL}}{{result.doi}}">doi: {{result.doi}}</a></span>
419
                    </li>
420
                  </ul>
421
                </div>
422
              </li>
423

  
198
          <!--  <ul #accordions class="custom-accordion" uk-accordion>
424 199
              <li (click)="metricsClicked=true; activeTab='Metrics'">
425 200
                <a class="uk-accordion-title" href="#">
426 201
                  Metrics
......
510 285
                             [availableOn]="resultLandingInfo.hostedBy_collectedFrom"></availableOn>
511 286
              </div>
512 287
              <!-- Metrics -->
513
              <div *ngIf="hasAltMetrics" class="uk-margin-top">
288
              <div *ngIf="hasAltMetrics || hasMetrics" class="uk-margin-top">
514 289
                <div class="sideInfoTitle uk-margin-small-bottom">Metrics</div>
515 290
                <div uk-grid class="uk-child-width-1-3 uk-text-center uk-flex uk-flex-middle">
516 291
                  <div></div><!-- Open Citations-->
517
                  <div>
292
                  <div *ngIf="hasAltMetrics">
518 293
                    <altmetrics *ngIf="hasAltMetrics" id="{{resultLandingInfo.identifiers.get('doi')[0]}}" type="doi">
519 294
                    </altmetrics>
520 295
                  </div>
521
                  <div></div><!-- OpenAIRE Metrics -->
296
                  <div *ngIf="hasMetrics">
297
                    <metrics [pageViews]="pageViews"
298
                             [id]="id" [entityType]="'results'" [entity]="title"
299
                             [viewsFrameUrl]="viewsFrameUrl" [downloadsFrameUrl]="downloadsFrameUrl"
300
                             (metricsResults)="metricsResults($event)" [properties]=properties>
301
                    </metrics>
302
                  </div>
522 303
                </div>
523 304
              </div>
524 305
              <div class="uk-margin-top">

Also available in: Unified diff