Project

General

Profile

« Previous | Next » 

Revision 56958

[mergeResultLandingPages | Library]:
1. deletedByInference.component: 5 instead of 10 results per page.
2. Move "resultLanding" files inside "landingPages/result" folder.

View differences:

modules/uoa-services-library/branches/mergeResultLandingPages/ng-openaire-library/src/app/app.module.ts
14 14
import { ConfigurationService } from './utils/configuration/configuration.service';
15 15
import {MainSearchModule} from './searchPages/find/mainSearch.module';
16 16

  
17
import {ResultLandingModule} from "./landingPages/resultLanding.module";
17
import {ResultLandingModule} from "./landingPages/result/resultLanding.module";
18 18
import {DataProviderModule} from './landingPages/dataProvider/dataProvider.module';
19 19
import {ProjectModule} from './landingPages/project/project.module';
20 20
import {OrganizationModule} from './landingPages/organization/organization.module';
modules/uoa-services-library/branches/mergeResultLandingPages/ng-openaire-library/src/app/landingPages/resultLanding.component.html
1
<div id="tm-main" class=" uk-section uk-padding-remove-top uk-margin-small-top tm-middle">
2
  <div uk-grid >
3
    <div class="tm-main uk-width-1-1@s uk-width-1-1@m  uk-width-1-1@l uk-row-first ">
4
      <div class="uk-container publication">
5
        <div *ngIf="warningMessage.length > 0" class="uk-alert uk-alert-warning  uk-margin-large-top"
6
             role="alert">{{warningMessage}}</div>
7
        <div *ngIf="errorMessage.length > 0" class="uk-alert uk-alert-danger  uk-margin-large-top"
8
             role="alert">{{errorMessage}}</div>
9
        <div [style.display]="showLoading ? 'inline' : 'none'"
10
             class="uk-animation-fade uk-margin-large-top  uk-width-1-1" role="alert"><span
11
          class="loading-gif  uk-align-center"></span></div>
12
        <helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0"
13
                [texts]="pageContents['top']"></helper>
14
        <div *ngIf="resultLandingInfo != null"  class="uk-grid">
15

  
16
          <div class="uk-width-2-3@m uk-width-1-1@s  uk-margin-bottom">
17
            <schema2jsonld *ngIf="resultLandingInfo.record" [data]=resultLandingInfo.record
18
                           [URL]="properties.baseLink+linkToLandingPage+id"></schema2jsonld>
19
            <showTitle [titleName]="resultLandingInfo.title" [classNames]="(properties.environment != 'production' && resultLandingInfo.deletedByInferenceIds) ? 'uk-margin-remove-bottom' : ''"></showTitle>
20
            <div *ngIf="properties.environment != 'production' && resultLandingInfo.deletedByInferenceIds"
21
                 class="uk-text-muted uk-text-small uk-margin-bottom" (click)="openDeletedByInference()">
22
              The following information is result of merging
23
              <a>Original sources ({{resultLandingInfo.deletedByInferenceIds.length}})</a>
24
            </div>
25
            <p class="uk-text-large" *ngIf="resultLandingInfo.subtitle">
26
              <span [innerHTML]="resultLandingInfo.subtitle"></span>
27
            </p>
28
            <span *ngIf="resultLandingInfo.types && resultLandingInfo.types.length > 0"
29
                  class="uk-label custom-label label-blue label-publication"
30
                  title="Type">{{resultLandingInfo.types.join(", ")}}</span>{{" "}}
31
            <span *ngIf="resultLandingInfo.programmingLanguages && resultLandingInfo.programmingLanguages.length > 0"
32
                  class="uk-label custom-label  label-progrLanguage "
33
                  title="Programming Language">{{resultLandingInfo.programmingLanguages.join(", ")}}</span>{{" "}}
34
            <span *ngIf="resultLandingInfo.languages && resultLandingInfo.languages.length > 0"
35
                  class="uk-label custom-label  label-language "
36
                  title="Language">{{resultLandingInfo.languages.join(", ")}}</span>{{" "}}
37
            <span *ngIf="resultLandingInfo.countries && resultLandingInfo.countries.length > 0"
38
                  class="uk-label custom-label  label-country "
39
                  title="Country">{{resultLandingInfo.countries.join(", ")}}</span>{{" "}}
40
            <!-- <span *ngIf="resultLandingInfo.title && resultLandingInfo.title.accessMode" [class]="'uk-label custom-label  label-'+ resultLandingInfo.title.accessMode ">{{resultLandingInfo.title.accessMode}}</span> -->
41
            <span *ngIf="resultLandingInfo.accessMode"
42
                  [class]="'uk-label custom-label  label-'+ resultLandingInfo.accessMode "
43
                  title="Access Mode">{{resultLandingInfo.accessMode}}</span>{{" "}}
44

  
45
            <span *ngIf="resultLandingInfo.underCurationMessage" class="uk-label custom-label label-underCuration">
46
              <span uk-tooltip="pos:right; delay:10"
47
                    title="{{buildCurationTooltip()}}">
48
              <i>Record in preview</i>
49
              <i class="uk-icon-info-circle"></i>
50
            </span></span>{{" "}}
51

  
52

  
53
            <div class=" uk-margin-top">
54
              <showAuthors [authors]="resultLandingInfo.authors"></showAuthors>
55
              <span *ngIf="resultLandingInfo.date != ''">({{resultLandingInfo.date}})</span>
56
            </div>
57

  
58
            <ul class="uk-list">
59
              <showPublisher [publisher]="resultLandingInfo.publisher"
60
                             [journal]="resultLandingInfo.journal" [properties]="properties"></showPublisher>
61
              <li *ngIf="resultLandingInfo.embargoEndDate"><span
62
                class="uk-text-bold">Embargo end date:</span> {{resultLandingInfo.embargoEndDate}}</li>
63
              <li *ngIf="resultLandingInfo.identifiers && resultLandingInfo.identifiers.size > 0">
64
                <showIdentifiers [identifiers]="resultLandingInfo.identifiers"></showIdentifiers>
65
              </li>
66
              <li
67
                *ngIf="resultLandingInfo">
68
                <showSubjects [subjects]="resultLandingInfo.subjects"
69
                              [otherSubjects]="resultLandingInfo.otherSubjects"
70
                              [classifiedSubjects]="resultLandingInfo.classifiedSubjects">
71
                </showSubjects>
72
              </li>
73
            </ul>
74
            <hr *ngIf="resultLandingInfo.description">
75
            <div *ngIf="resultLandingInfo.description"
76
                 class="uk-text-justify descriptionText uk-height-max-medium uk-overflow-auto">
77
                <span>{{resultLandingInfo.description.substring(0, showNumDescription)}}</span
78
                ><span
79
              *ngIf="showNumDescription == thresholdDescription && resultLandingInfo.description.length > thresholdDescription">...</span
80
            ><span
81
              *ngIf="showNumDescription == thresholdDescription && resultLandingInfo.description.length > thresholdDescription"
82
              class="uk-text-right">
83
                  <a (click)="showNumDescription = resultLandingInfo.description.length;">
84
                    View more
85
                  </a>
86
                </span>
87
            </div>
88
            <div *ngIf="resultLandingInfo.description && showNumDescription > thresholdDescription"
89
                 class="uk-width-1-1 uk-text-right">
90
              <!-- scroll() -->
91
              <a (click)="showNumDescription = thresholdDescription;">
92
                View less
93
              </a>
94
            </div>
95

  
96

  
97
            <ul class="custom-accordion" uk-accordion>
98

  
99
              <li *ngIf="resultLandingInfo.references" (click)="activeTab='References'">
100
                <a class="uk-accordion-title" href="#">
101
                  References
102
                  ({{resultLandingInfo.references.length | number}})
103
                </a>
104
                <div class="uk-accordion-content">
105
                  <div>
106
                    <div *ngIf="resultLandingInfo.references.length > pageSize" class="uk-margin-bottom">
107
                      <span class="uk-h6">{{resultLandingInfo.references.length | number}}
108
                        references, page {{referencesPage | number}}
109
                        of {{totalPages(resultLandingInfo.references.length) | number}}</span>
110
                      <paging-no-load class="uk-float-right" [currentPage]="referencesPage"
111
                                      [totalResults]="resultLandingInfo.references.length" [size]="pageSize"
112
                                      (pageChange)="updateReferencesPage($event)"></paging-no-load>
113
                    </div>
114

  
115
                    <div
116
                      *ngFor="let item of resultLandingInfo.references.slice((referencesPage-1)*pageSize, referencesPage*pageSize)">
117
                      <p *ngIf=" item && item['url']"
118
                         class="custom-external custom-icon">
119
                        <a href="{{item['url']}}" target="_blank">
120
                          {{item['name']}}
121
                        </a>
122
                      </p>
123
                      <p *ngIf="!item['url']" class="pseudo-external custom-icon">
124
                        {{item['name']}}
125
                      </p>
126
                    </div>
127
                  </div>
128
                </div>
129
              </li>
130

  
131
              <li *ngIf="resultLandingInfo.relatedResearchResults" (click)="activeTab='Related Research Results'">
132
                <a class="uk-accordion-title" href="#">
133
                  Related Research Results
134
                  ({{relatedResearchResultsNum | number}})
135
                </a>
136
                <div class="uk-accordion-content">
137
                  <div>
138
                    <div *ngFor="let provenanceaction of getKeys(resultLandingInfo.relatedResearchResults)">
139
                      <div class="uk-text-large">{{provenanceaction}}</div>
140

  
141
                      <tabTable percentageName="trust"
142
                                [info]="resultLandingInfo.relatedResearchResults.get(provenanceaction)"
143
                                [properties]=properties></tabTable>
144
                    </div>
145
                  </div>
146
                </div>
147
              </li>
148

  
149
              <li *ngIf="resultLandingInfo.similarResearchResults" (click)="activeTab='Similar Research Results'">
150
                <a class="uk-accordion-title" href="#">
151
                  Similar Research Results
152
                  ({{resultLandingInfo.similarResearchResults.length | number}})
153
                </a>
154
                <div class="uk-accordion-content">
155
                  <div>
156
                    <tabTable percentageName="similarity" [info]="resultLandingInfo.similarResearchResults"
157
                              [properties]=properties></tabTable>
158
                  </div>
159
                </div>
160
              </li>
161

  
162
              <li *ngIf="resultLandingInfo.organizations" (click)="activeTab='Related Organizations'">
163
                <a class="uk-accordion-title" href="#">
164
                  Related Organizations
165
                  ({{resultLandingInfo.organizations.length | number}})
166
                </a>
167
                <div class="uk-accordion-content">
168
                  <div>
169
                    <div *ngIf="resultLandingInfo.organizations.length > pageSize" class="uk-margin-bottom">
170
                      <span class="uk-text-bold">{{resultLandingInfo.organizations.length | number}}
171
                        organizations, page {{organizationsPage | number}}
172
                        of {{totalPages(resultLandingInfo.organizations.length) | number}}</span>
173
                      <paging-no-load class="uk-float-right" [currentPage]="organizationsPage"
174
                                      [totalResults]="resultLandingInfo.organizations.length" [size]="pageSize"
175
                                      (pageChange)="updateOrganizationsPage($event)"></paging-no-load>
176
                    </div>
177

  
178
                    <table class="uk-table uk-table-small uk-table-divider uk-table-middle ">
179
                      <tbody>
180
                      <tr
181
                        *ngFor="let organization of resultLandingInfo.organizations.slice((organizationsPage-1)*pageSize, organizationsPage*pageSize)">
182
                        <td>
183
                          <a *ngIf="(organization['id']) && ((organization['name']) || (organization['shortname']))"
184
                             [queryParams]="{organizationId: organization.id}" routerLinkActive="router-link-active"
185
                             routerLink="/search/organization">
186
                            {{organization['name']}}
187
                            <span *ngIf="organization.name && organization.shortname"> ( </span>
188
                            <span *ngIf="organization.shortname">{{organization.shortname}}</span>
189
                            <span *ngIf="organization.name && organization.shortname"> ) </span>
190
                          </a>
191
                          <p *ngIf="(!organization['id']) && ((organization['name']) || (organization['shortname']))">
192
                            {{organization['name']}}
193
                            <span *ngIf="organization.name && organization.shortname"> ( </span>
194
                            <span *ngIf="organization.shortname">{{organization.shortname}}</span>
195
                            <span *ngIf="organization.name && organization.shortname"> ) </span>
196
                          </p>
197
                          <div *ngIf="organization.country">{{organization.country}}</div>
198
                          <div *ngIf="organization.websiteUrl">Website url:
199
                            <a href="{{organization.websiteUrl}}" target="_blank">{{organization.websiteUrl}}</a>
200
                          </div>
201
                        </td>
202
                        <td>
203
                          <div *ngIf="organization['trust']" title="{{organization['trust']}}%">
204
                            <div class="uk-text-center">{{organization['trust']}}%</div>
205
                            <progress class="uk-progress uk-margin-remove" value="{{organization['trust']}}"
206
                                      max="100"></progress>
207
                          </div>
208
                          <div *ngIf="!organization['trust']">
209
                            <p>no trust available</p>
210
                          </div>
211
                        </td>
212
                      </tr>
213
                      </tbody>
214
                    </table>
215

  
216
                  </div>
217
                </div>
218
              </li>
219

  
220
              <li *ngIf="resultLandingInfo.bioentities" (click)="activeTab='Bioentities'">
221
                <a class="uk-accordion-title" href="#">
222
                  Bioentities
223
                  ({{bioentitiesNum | number}})
224
                </a>
225
                <div class="uk-accordion-content">
226
                  <div *ngIf="resultLandingInfo.bioentities && bioentitiesNum > pageSize" class="uk-margin-bottom">
227
                    <span class="uk-text-bold"> {{bioentitiesNum | number}}
228
                      bioentities, page {{bioentitiesPage | number}} of {{totalPages(bioentitiesNum) | number}}</span>
229
                    <paging-no-load class="uk-float-right" [currentPage]="bioentitiesPage"
230
                                    [totalResults]="bioentitiesNum" [size]="pageSize"
231
                                    (pageChange)="updateBioentitiesPage($event)"></paging-no-load>
232
                  </div>
233

  
234
                  <table id="bioentitiesTable" class="uk-table ">
235
                    <tbody>
236
                    <ng-container *ngFor="let key of getKeys(resultLandingInfo.bioentities) let i=index">
237
                      <tr
238
                        *ngFor="let keyIn of keysToArray(resultLandingInfo.bioentities.get(key)).slice((bioentitiesPage-1)*pageSize, bioentitiesPage*pageSize)">
239
                        <td class="uk-text-center" *ngIf="keyIn">
240
                                         <span class="custom-external custom-icon">
241
                                             <a href="{{resultLandingInfo.bioentities.get(key).get(keyIn)}}"
242
                                                target="_blank">
243
                                                 {{keyIn}}
244
                                             </a>
245
                                         </span>
246
                        </td>
247
                        <td class="uk-text-center">
248
                          {{key}}
249
                        </td>
250
                      </tr>
251
                    </ng-container>
252
                    </tbody>
253
                  </table>
254
                </div>
255
              </li>
256

  
257
              <li *ngIf="resultLandingInfo.software" (click)="activeTab='Software'">
258
                <a class="uk-accordion-title" href="#">
259
                  Software
260
                  ({{resultLandingInfo.software.length | number}})
261
                </a>
262
                <div class="uk-accordion-content">
263
                  <div *ngIf="resultLandingInfo.software && resultLandingInfo.software.length > pageSize"
264
                       class="uk-margin-bottom">
265
                    <span class="uk-text-bold">{{resultLandingInfo.software.length | number}}
266
                      software results, page {{softwarePage | number}}
267
                      of {{totalPages(resultLandingInfo.software.length) | number}}</span>
268
                    <paging-no-load class="uk-float-right" [currentPage]="softwarePage"
269
                                    [totalResults]="resultLandingInfo.software.length" [size]="pageSize"
270
                                    (pageChange)="updateSoftwarePage($event)"></paging-no-load>
271
                  </div>
272

  
273
                  <table id="softwareTable" class="uk-table ">
274
                    <tbody>
275
                    <tr
276
                      *ngFor="let item of resultLandingInfo.software.slice((softwarePage-1)*pageSize, softwarePage*pageSize)"
277
                      class="uk-text-center">
278
                      <td>
279
                                        <span class="custom-external custom-icon">
280
                                            <a href="{{item.url}}" target="_blank">
281
                                                {{item.name}}
282
                                            </a>
283
                                        </span>
284
                      </td>
285
                    </tr>
286
                    </tbody>
287
                  </table>
288
                </div>
289
              </li>
290

  
291
              <li (click)="activeTab='Other Citations'"
292
                  *ngIf="resultLandingInfo.openCitations && resultLandingInfo.openCitations.length > 0">
293
                <a class="uk-accordion-title" href="#">
294
                  Open Citations
295
                  ({{resultLandingInfo.openCitations.length | number}})
296
                </a>
297
                <div class="uk-accordion-content">
298
                  <div *ngIf="resultLandingInfo.openCitations.length > pageSize" class="uk-margin-bottom">
299
                    <span class="uk-h6">{{resultLandingInfo.openCitations.length | number}}
300
                      open citations, page {{openCitationsPage | number}}
301
                      of {{totalPages(resultLandingInfo.openCitations.length) | number}}</span>
302
                    <paging-no-load class="uk-float-right" [currentPage]="openCitationsPage"
303
                                    [totalResults]="resultLandingInfo.openCitations.length" [size]="pageSize"
304
                                    (pageChange)="updateOpenCitationsPage($event)"></paging-no-load>
305
                  </div>
306

  
307
                  <ul class="uk-list uk-list-divider  uk-margin">
308
                    <li
309
                      *ngFor="let result of resultLandingInfo.openCitations.slice((openCitationsPage-1)*pageSize, openCitationsPage*pageSize)">
310
                      <h5 *ngIf="result.title">
311
                              <span *ngIf="result.url"
312
                                    class="custom-external">
313

  
314
                                  <a *ngIf="result.title" href="{{result.url}}" target="_blank"
315
                                     [innerHTML]="result.title">
316
                                  </a>
317
                                  <a *ngIf="!result.title" href="{{result.url}}" target="_blank">
318
                                      [no title available]
319
                                  </a>
320
                              </span>
321
                        <span *ngIf="result.title && !result.url" [innerHTML]="result.title"></span>
322
                        <span *ngIf="!result.title && !result.url">
323
                                  [no title available]
324
                              </span>
325
                      </h5>
326

  
327
                      <div>
328
                              <span *ngIf="result['authors']">
329
                                  <span *ngFor="let author of result['authors'].slice(0,15)">
330
                                      {{author}};
331
                                  </span>
332
                                  <span *ngIf="result['authors'].length > 15">...</span>
333
                              </span>
334
                        <span *ngIf="result.year">
335
                                  ({{result.year}})
336
                              </span>
337
                      </div>
338
                      <span *ngIf="result.doi">Identifier: <a *ngIf="result.doi" target="_blank"
339
                                                              class="custom-external custom-icon"
340
                                                              href="{{doiURL}}{{result.doi}}">doi: {{result.doi}}</a></span>
341
                    </li>
342
                  </ul>
343
                </div>
344
              </li>
345

  
346
              <li (click)="metricsClicked=true; activeTab='Metrics'">
347
                <a class="uk-accordion-title" href="#">
348
                  Metrics
349
                </a>
350
                <div class="uk-accordion-content">
351
                  <metrics *ngIf="metricsClicked" [pageViews]="pageViews"
352
                           [id]="id" [entityType]="'results'" [entity]="title"
353
                           (metricsResults)="metricsResults($event)" [properties]=properties>
354
                  </metrics>
355
                  <i-frame *ngIf="metricsClicked && totalViews>0"
356
                           [url]=viewsFrameUrl width="100%" height="250">
357
                  </i-frame>
358
                  <i-frame *ngIf="metricsClicked && totalDownloads>0"
359
                           [url]=downloadsFrameUrl width="100%" height="250">
360
                  </i-frame>
361
                </div>
362
              </li>
363
            </ul>
364

  
365
          </div>
366

  
367
          <div class="uk-width-1-3@m uk-width-1-1@s">
368
            <div *ngIf="isRouteAvailable('participate/direct-claim') " class=" uk-padding-small">
369
              <button class="  uk-button portal-button   uk-width-1-1 ">
370
               <span class="uk-icon">
371
                    <svg icon="link" ratio="1" xmlns="http://www.w3.org/2000/svg" width="25" viewBox="0 0 20 20"
372
                         height="25"><path
373
                      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"
374
                      fill="none" stroke="#000" stroke-width="1.1"></path><path
375
                      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"
376
                      fill="none" stroke="#000" stroke-width="1.1"></path><path d="M7.925,11.875 L11.925,7.975"
377
                                                                                fill="none" stroke="#000"
378
                                                                                stroke-width="1.1"></path></svg>
379
               </span>
380
                Link this <span *ngIf="type != 'orp'">{{title.toLowerCase()}}</span><span *ngIf="type == 'orp'">product</span> to...
381
              </button>
382

  
383
              <div class="  uk-text-center uk-margin-expand uk-padding-small    uk-margin-auto  default-dropdown "
384
                   uk-dropdown="mode:click">
385
                <div class="uk-grid    uk-child-width-1-3  uk-width-large ">
386
                  <div><a
387
                    [queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[id,type,'project'])"
388
                    routerLinkActive="router-link-active" routerLink="/participate/direct-claim"
389
                  >
390
                    <button class="uk-icon-button portal-button">
391
                   <span class="uk-icon">
392
                        <svg height="20" icon="album" ratio="1" viewBox="0 0 20 20" width="20"
393
                             xmlns="http://www.w3.org/2000/svg"><rect height="1" width="10" x="5" y="2"></rect><rect
394
                          height="1" width="14" x="3" y="4"></rect><rect fill="none" height="11" stroke="#000"
395
                                                                         width="17" x="1.5" y="6.5"></rect></svg></span>
396
                    </button>
397
                    <div>Projects</div>
398
                  </a></div>
399
                  <div><a
400
                    [queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[id,type,'result'])"
401
                    routerLinkActive="router-link-active" routerLink="/participate/direct-claim">
402
                    <button class="uk-icon-button portal-button">
403
                      <span class="uk-icon">
404
                           <svg height="20" icon="copy" ratio="1" viewBox="0 0 20 20" width="20"
405
                                xmlns="http://www.w3.org/2000/svg"><rect fill="none" height="16" stroke="#000"
406
                                                                         width="12" x="3.5" y="2.5"></rect><polyline
407
                             fill="none" points="5 0.5 17.5 0.5 17.5 17" stroke="#000"></polyline></svg></span>
408
                    </button>
409
                    <div>Research results</div>
410
                  </a></div>
411
                  <div><a
412
                    [queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[id,type,'context'])"
413
                    routerLinkActive="router-link-active" routerLink="/participate/direct-claim">
414
                    <button class="uk-icon-button portal-button">
415
                <span class="uk-icon">
416
                           <svg height="20" icon="users" ratio="1" viewBox="0 0 20 20" width="20"
417
                                xmlns="http://www.w3.org/2000/svg"><circle cx="7.7" cy="8.6" fill="none" r="3.5"
418
                                                                           stroke="#000" stroke-width="1.1"></circle><path
419
                             d="M1,18.1 C1.7,14.6 4.4,12.1 7.6,12.1 C10.9,12.1 13.7,14.8 14.3,18.3" fill="none"
420
                             stroke="#000" stroke-width="1.1"></path><path
421
                             d="M11.4,4 C12.8,2.4 15.4,2.8 16.3,4.7 C17.2,6.6 15.7,8.9 13.6,8.9 C16.5,8.9 18.8,11.3 19.2,14.1"
422
                             fill="none" stroke="#000" stroke-width="1.1"></path></svg></span>
423
                    </button>
424
                    <div>Communities</div>
425
                  </a></div>
426
                </div>
427
              </div>
428
            </div>
429
            <div>
430
              <div class="sideInfoTitle uk-margin-small-bottom uk-margin-small-top">Share - Bookmark</div>
431
              <addThis></addThis>
432
            </div>
433
            <altmetrics *ngIf="resultLandingInfo.identifiers && resultLandingInfo.identifiers.get('doi')"
434
                        id="{{resultLandingInfo.identifiers.get('doi')[0]}}" type="doi">
435
            </altmetrics>
436
            <ul class="uk-list uk-margin-remove-bottom">
437

  
438
              <li *ngIf="resultLandingInfo.hostedBy_collectedFrom && resultLandingInfo.hostedBy_collectedFrom.length > 0">
439
                <availableOn [availableOn]="resultLandingInfo.hostedBy_collectedFrom"></availableOn>
440
              </li>
441
              <li
442
                *ngIf="resultLandingInfo.fundedByProjects != undefined && resultLandingInfo.fundedByProjects.length > 0">
443
                <fundedBy [fundedByProjects]="resultLandingInfo.fundedByProjects"></fundedBy>
444
              </li>
445

  
446
              <li *ngIf="resultLandingInfo.contexts && resultLandingInfo.contexts.length >0 ">
447
                <dl class="uk-description-list-line">
448
                  <dt class="sideInfoTitle">Related to</dt>
449
                  <dd class="line" *ngFor="let item of resultLandingInfo.contexts">
450
                          <span *ngIf="!item['inline']">
451
                            <span>{{item['labelContext']}}</span>
452
                            <span *ngIf="item['labelCategory']">-> {{item['labelCategory']}}</span>
453
                            <span *ngIf="item['labelConcept']">: {{item['labelConcept']}}</span>
454
                          </span>
455
                    <mark *ngIf="item['inline']">
456
                      <span>{{item['labelContext']}}</span>
457
                      <span *ngIf="item['labelCategory']">-> {{item['labelCategory']}}</span>
458
                      <span *ngIf="item['labelConcept']">: {{item['labelConcept']}}</span>
459
                    </mark>
460
                  </dd>
461
                </dl>
462

  
463
              </li>
464
<!--              <li>-->
465
<!--                <metrics [pageViews]="pageViews" shortView=true-->
466
<!--                    [id]="id" [entityType]="'results'" [entity]="'Publication'"-->
467
<!--                    (metricsResults)="metricsResults($event)" [(properties)] = properties>-->
468
<!--                </metrics>-->
469
<!--              </li>-->
470
              <li>
471
                <div class=" sideInfoTitle  cite-this-button uk-width-1-1" type="button">
472
                  Cite this <span *ngIf="type != 'orp'">{{title.toLowerCase()}}</span><span *ngIf="type == 'orp'">research product</span>
473
                </div>
474
                <div class=" ">
475
                  <citeThis [result]="resultLandingInfo" [id]="id" [type]="title.toLowerCase()"></citeThis>
476
                </div>
477
              </li>
478
            </ul>
479
          </div>
480
          <modal-alert *ngIf="resultLandingInfo.deletedByInferenceIds"
481
                       #AlertModalDeletedByInference classBody="uk-width-xxlarge">
482
            <deletedByInference *ngIf="type == 'publication'"
483
                                [id]="id" [ids]="resultLandingInfo.deletedByInferenceIds" [type]="'publications'"></deletedByInference>
484
            <deletedByInference *ngIf="type == 'dataset'"
485
                                [id]="id" [ids]="resultLandingInfo.deletedByInferenceIds" [type]="'research data'"></deletedByInference>
486
            <deletedByInference *ngIf="type == 'software'"
487
                                [id]="id" [ids]="resultLandingInfo.deletedByInferenceIds" [type]="'software'"></deletedByInference>
488
            <deletedByInference *ngIf="type == 'orp'"
489
                                [id]="id" [ids]="resultLandingInfo.deletedByInferenceIds" [type]="'other research products'"></deletedByInference>
490
          </modal-alert>
491
        </div>
492
        <helper *ngIf="pageContents && pageContents['bottom'] && pageContents['bottom'].length > 0"
493
                [texts]="pageContents['bottom']"></helper>
494
      </div>
495

  
496
    </div>
497

  
498
  </div>
499
</div>
500

  
501

  
modules/uoa-services-library/branches/mergeResultLandingPages/ng-openaire-library/src/app/landingPages/resultLanding.service.ts
1
import {Injectable} from '@angular/core';
2
import {HttpClient, HttpErrorResponse} from "@angular/common/http";
3
import {throwError} from 'rxjs';
4
import {ResultLandingInfo} from '../utils/entities/resultLandingInfo';
5
import {EnvProperties} from '../utils/properties/env-properties';
6
import {ParsingFunctions} from './landing-utils/parsingFunctions.class';
7
import {map} from "rxjs/operators";
8

  
9
@Injectable()
10
export class ResultLandingService {
11

  
12
  constructor(private http: HttpClient ) {
13
    this.parsingFunctions = new ParsingFunctions();
14
  }
15

  
16
  public parsingFunctions: ParsingFunctions;
17
  resultLandingInfo: ResultLandingInfo;
18

  
19
  getResultLandingInfo (id: string, type: string, properties: EnvProperties): any {
20
    let url = properties.searchAPIURLLAst;
21
    if (type === 'publication') {
22
      url += 'publications/';
23
    } else if (type === 'dataset') {
24
      url += 'datasets/';
25
    } else if (type === 'software') {
26
      url += 'software/';
27
    } else if (type === 'orp') {
28
      url += 'other/';
29
    }
30
    url += id + '?format=json';
31

  
32
    return this.http.get((properties.useCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url)
33
      .pipe(map(res => [res['result']['header']['dri:status'], res['result']['metadata']['oaf:entity'], res]))
34
      .pipe(map(res => [
35
        res[1]['oaf:result'],                 // 0
36
        res[1]['oaf:result']['title'],        // 1
37
        res[1]['oaf:result']['rels']['rel'],  // 2
38
        res[1]['oaf:result']['children'],     // 3
39
        res[1]['oaf:result']['pid'],          // 4
40
        res[1]['oaf:result']['journal'],      // 5
41
        res[1]['oaf:result']['language'],     // 6
42
        res[1]['oaf:result']['subject'],      // 7
43
        res[1]['oaf:result']['context'],      // 8
44
        res[1]['oaf:result']['creator'],      // 9
45
        res[1]['oaf:result']['country'] ,     // 10
46
        res[1]['oaf:result']['programmingLanguage'],              // 11 - software
47
        //res[1]['oaf:result']['resulttype'],
48
        (res[1]['extraInfo'] !== undefined && res[1]['extraInfo']['citations'] !== undefined)
49
          ? res[1]['extraInfo']['citations']['citation'] : null,  // 12
50
        res[0],                               // 13
51
        res[2]                                // 14
52
      ]))
53
      .pipe(map(res => this.parseResultLandingInfo(res, properties)));
54
  }
55

  
56
  private handleError (error: HttpErrorResponse) {
57
    // in a real world app, we may send the error to some remote logging infrastructure
58
    // instead of just logging it to the console
59
    console.log(error);
60
    return throwError(error  || 'Server error');
61
  }
62

  
63
  parseResultLandingInfo (data: any, properties: EnvProperties): any {
64
    this.resultLandingInfo = new ResultLandingInfo();
65

  
66
    // res
67
    this.resultLandingInfo.record = data[14];
68

  
69
    // res['result']['metadata']['oaf:entity']['oaf:result']
70
    if (data[0] != null) {
71
      let date: string = (data[0].dateofacceptance) + ''; // transform to string in case it is an integer
72
      this.resultLandingInfo.date  = (date && (date).indexOf('-') !== -1) ? date.split('-')[0] : date;
73
      this.resultLandingInfo.dateofacceptance = data[0].dateofacceptance;
74
      this.resultLandingInfo.publisher = data[0].publisher;
75
      if(!Array.isArray(data[0].description)) {
76
        this.resultLandingInfo.description = String(data[0].description);
77
      } else {
78
        this.resultLandingInfo.description = String(data[0].description[0]);
79
      }
80
      this.resultLandingInfo.embargoEndDate = data[0].embargoenddate;
81
    }
82

  
83
    if(data[0]['bestaccessright'] && data[0]['bestaccessright'].hasOwnProperty("classid")) {
84
      this.resultLandingInfo.accessMode = data[0]['bestaccessright'].classid;
85
    }
86

  
87
    // res['result']['metadata']['oaf:entity']['oaf:result']['title']
88
    if(data[1] != null) {
89
      if(Array.isArray(data[1])) {
90
        this.resultLandingInfo.title = String(data[1][0].content);
91
        if(data[1][1].classid === 'subtitle') {
92
          this.resultLandingInfo.subtitle = String(data[1][1].content);
93
        }
94
      } else {
95
        this.resultLandingInfo.title = String(data[1].content);
96
      }
97
    }
98

  
99
    // res['result']['metadata']['oaf:entity']['oaf:result']['rels']['rel']
100
    if(data[2] != null) {
101
      let relation;
102
      let length = Array.isArray(data[2]) ? data[2].length : 1;
103

  
104
      for(let i=0; i<length; i++) {
105
        relation = Array.isArray(data[2]) ? data[2][i] : data[2];
106
        if(relation.hasOwnProperty("to")) {
107
          if(relation['to'].class == "isProducedBy") {
108
            this.resultLandingInfo.fundedByProjects = this.parsingFunctions.parseFundingByProjects(this.resultLandingInfo.fundedByProjects, relation, this.resultLandingInfo.projectsProvenanceVocabulary);
109
          } else if(relation['to'].class == "isRelatedTo") {
110
            let provenanceAction: string;
111
            if(relation.provenanceaction in this.resultLandingInfo.researchResultsProvenanceVocabulary) {
112
              provenanceAction = this.resultLandingInfo.researchResultsProvenanceVocabulary[relation.provenanceaction];
113
            } else {
114
              provenanceAction = "Other";
115
            }
116

  
117
            this.resultLandingInfo.relatedResearchResults = this.parsingFunctions.parseRelatedResearchResults(this.resultLandingInfo.relatedResearchResults, relation, provenanceAction);
118
          } else if(relation['to'].class == "hasAmongTopNSimilarDocuments") {
119
            this.resultLandingInfo.similarResearchResults = this.parsingFunctions.parseSimilarResearchResults(this.resultLandingInfo.similarResearchResults, relation);
120
          } else if(relation['to'].class == "hasAuthorInstitution") {
121
            this.resultLandingInfo.organizations = this.parseRelatedOrganizations(this.resultLandingInfo.organizations, relation);
122
          }
123
        }
124
      }
125
    }
126

  
127
    // res['result']['metadata']['oaf:entity']['oaf:result']['children']
128
    if(data[3] != null) {
129
      if(data[3].hasOwnProperty("result")) {
130
        this.resultLandingInfo.deletedByInferenceIds = [];
131
        let length = Array.isArray(data[3]['result']) ? data[3]['result'].length : 1;
132

  
133
        for(let i=0; i<length; i++) {
134
          let result = Array.isArray(data[3]['result']) ? data[3]['result'][i] : data[3]['result'];
135
          this.resultLandingInfo.deletedByInferenceIds.push(result.objidentifier);
136
        }
137

  
138
      }
139

  
140
      if(data[3].hasOwnProperty("instance")) {
141
        this.resultLandingInfo.hostedBy_collectedFrom = new Array<{"downloadName": string, "downloadUrl": string[], "collectedName": string, "collectedId": string, "accessMode": string[], "bestAccessMode": string, "type": string, "year":string}>();
142

  
143

  
144
        this.resultLandingInfo.types = new Array<string>();
145
        let types = new Set<string>();
146

  
147
        let counter = 0;
148
        let instance;
149

  
150
        let length = Array.isArray(data[3]['instance']) ? data[3]['instance'].length : 1;
151

  
152
        for(let i=0; i<length; i++) {
153
          instance = Array.isArray(data[3]['instance']) ? data[3]['instance'][i] : data[3]['instance'];
154

  
155
          this.parsingFunctions.parseTypes(this.resultLandingInfo.types, types, instance);
156

  
157
          if(instance.hasOwnProperty("webresource")) {
158
            let url;
159
            if(!Array.isArray(instance['webresource'])) {
160
              url = instance['webresource'].url;
161
            } else{
162
              url = instance['webresource'][0].url;
163
            }
164

  
165
            /**********************************************************/
166
            if(instance.hasOwnProperty("hostedby")) {
167
              counter = this.parsingFunctions.parseHostedBy_collectedFrom(this.resultLandingInfo.hostedBy_collectedFrom, instance, data[0], url, counter/*, this.resultLandingInfo.title*/, this.resultLandingInfo.accessMode);
168
            }
169
            /**********************************************************/
170
          }
171
        }
172
      }
173

  
174
      if(data[3].hasOwnProperty("externalreference")) {
175
        let externalResults: [Map<string, Map<string, string>>, { "name": string, "url": string}[]] = this.parseBioentitiesAndSoftware(data[3]);
176
        this.resultLandingInfo.bioentities = externalResults[0];
177
        this.resultLandingInfo.software = externalResults[1];
178
      }
179
    }
180

  
181
    // res['result']['metadata']['oaf:entity']['oaf:result']['pid']
182
    if(data[4] != null) {
183
      this.resultLandingInfo.identifiers = this.parsingFunctions.parseIdentifiers(data[4]);
184
    }
185

  
186
    // res['result']['metadata']['oaf:entity']['oaf:result']['journal']
187
    if(data[5] != null) {
188
      this.resultLandingInfo.journal = {"journal": "", "issn": "", "lissn": "", "eissn": "", "issue": "", "volume": "", "start_page": "", "end_page": ""}
189

  
190
      this.resultLandingInfo.journal['journal'] = data[5].content;
191
      this.resultLandingInfo.journal['issn'] = data[5].issn;
192
      this.resultLandingInfo.journal['lissn'] = data[5].lissn;
193
      this.resultLandingInfo.journal['eissn'] = data[5].eissn;
194
      this.resultLandingInfo.journal['issue'] = data[5].iss;
195
      this.resultLandingInfo.journal['volume'] = data[5].vol;
196
      this.resultLandingInfo.journal['start_page'] = data[5].sp;
197
      this.resultLandingInfo.journal['end_page'] = data[5].ep;
198
    }
199

  
200
    // res['result']['metadata']['oaf:entity']['oaf:result']['language']
201
    if(data[6] != null) {
202
      this.resultLandingInfo.languages = this.parsingFunctions.parseLanguages(data[6]);
203
    }
204

  
205
    // res['result']['metadata']['oaf:entity']['oaf:result']['country']
206
    if(data[10] != null) {
207
      this.resultLandingInfo.countries = this.parsingFunctions.parseCountries(data[10]);
208
    }
209

  
210
    // res['result']['metadata']['oaf:entity']['oaf:result']['subject']
211
    if(data[7] != null) {
212
      let subjectResults: [string[], Map<string, string[]>, Map<string, string[]>] = this.parsingFunctions.parseAllSubjects(data[7]);
213
      this.resultLandingInfo.subjects = subjectResults[0];
214
      this.resultLandingInfo.otherSubjects = subjectResults[1];
215
      this.resultLandingInfo.classifiedSubjects = subjectResults[2];
216
    }
217

  
218
    this.resultLandingInfo.hostedBy_collectedFrom = this.parsingFunctions.addPublisherToHostedBy_collectedFrom(
219
      this.resultLandingInfo.hostedBy_collectedFrom, this.resultLandingInfo.publisher,
220
      this.resultLandingInfo.journal, this.resultLandingInfo.identifiers);
221

  
222
    // res['result']['metadata']['oaf:entity']['oaf:result']['programmingLanguage']
223
    if(data[11] != null) {
224
      this.resultLandingInfo.programmingLanguages = this.parsingFunctions.parseProgrammingLanguages(data[11]);
225
    }
226

  
227
    // res['result']['metadata']['oaf:entity']['extraInfo']['citations']['citation']
228
    if(data[12] != null) {
229
      this.resultLandingInfo.references = this.parsingFunctions.parseReferences(data[12]);
230
    }
231

  
232
    // res['result']['metadata']['oaf:entity']['oaf:result']['context']
233
    if(data[8] != null) {
234
      this.resultLandingInfo.contexts = this.parsingFunctions.parseContexts(data[8]);
235
    }
236

  
237
    // res['result']['header']['dri:status']
238
    if(data[13] != null && data[13] == "under curation") {
239
      this.resultLandingInfo.underCurationMessage = true;
240
    } else {
241
      this.resultLandingInfo.underCurationMessage = false;
242
    }
243

  
244
    // res['result']['metadata']['oaf:entity']['oaf:result']['creator']
245
    if(data[9] != null) {
246
      if(this.resultLandingInfo.authors == undefined) {
247
        this.resultLandingInfo.authors = new Array<{"fullName": string, "orcid": string}>();
248
      }
249

  
250
      let authors = data[9];
251
      let length = Array.isArray(authors) ? authors.length : 1;
252

  
253
      for(let i=0; i<length; i++) {
254
        let author = Array.isArray(authors) ? authors[i] : authors;
255
        if(author) {
256
          this.resultLandingInfo['authors'][author.rank] = {"fullName": author.content, "orcid": author.ORCID};
257
        }
258
      }
259
      this.resultLandingInfo.authors = this.resultLandingInfo.authors.filter(function (item) {
260
        return (item != undefined && item.fullName != undefined);
261
      });
262
    }
263

  
264
    if(this.resultLandingInfo.relatedResearchResults) {
265
      let self = this;
266
      this.resultLandingInfo.relatedResearchResults.forEach(function (value, key, map) {
267
        self.resultLandingInfo.relatedResearchResults.set(key, self.parsingFunctions.sortByPercentage(value));
268
      });
269
    }
270
    this.resultLandingInfo.similarResearchResults = this.parsingFunctions.sortByPercentage(this.resultLandingInfo.similarResearchResults);
271

  
272
    return this.resultLandingInfo;
273
  }
274

  
275
  parseRelatedOrganizations(organizations: {"name": string, "shortname":string, "id": string, "websiteUrl": string, "country": string, "trust": number}[], relation: any):
276
    {"name": string, "shortname":string, "id": string, "websiteUrl": string, "country": string, "trust": number}[] {
277
    if(organizations == undefined) {
278
      organizations = new Array<{
279
        "name": string, "shortname": string,
280
        "id": string, "websiteUrl": string,
281
        "country": string, "trust": number}>();
282
    }
283

  
284
    let organization: { "name": string, "shortname": string,
285
      "id": string, "websiteUrl": string,
286
      "country": string, "trust": number
287
    } = {
288
      "name": "", "shortname": "",
289
      "id": "", "websiteUrl": "",
290
      "country": "", "trust": null
291
    };
292

  
293
    organization.id = relation['to'].content;
294
    organization.name = relation.legalname;
295
    organization.shortname = relation.legalshortname;
296
    organization.websiteUrl = relation.websiteurl;
297
    if(relation.country) {
298
      organization.country = relation.country.classname;
299
    }
300
    if(relation.trust) {
301
      organization.trust = Math.round(relation.trust*100);
302
    }
303

  
304
    organizations.push(organization);
305
    return organizations;
306
  }
307

  
308
  parseBioentitiesAndSoftware(children: any) : [Map<string, Map<string, string>>, { "name": string, "url": string}[]] {
309
    let bioentities: Map<string, Map<string, string>>;
310
    let software: {"name": string, "url": string}[];
311

  
312
    let length = Array.isArray(children['externalreference']) ? children['externalreference'].length : 1;
313

  
314
    let externalreference;
315
    for(let i=0; i<length; i++) {
316
      externalreference = Array.isArray(children['externalreference']) ? children['externalreference'][i] : children['externalreference'];
317

  
318
      if(externalreference.hasOwnProperty("qualifier")) {
319
        if(externalreference['qualifier'].classid == "accessionNumber") {
320

  
321
          if(bioentities == undefined) {
322
            bioentities = new Map<string, Map<string, string>>();
323
          }
324

  
325
          if(!bioentities.has(externalreference.sitename)) {
326
            bioentities.set(externalreference.sitename, new Map<string, string>());
327
          }
328
          bioentities.get(externalreference.sitename).set(externalreference.refidentifier, externalreference.url);
329

  
330
        } else if(externalreference['qualifier'].classid == "software") {
331

  
332
          if(software == undefined) {
333
            software = new Array<{"name": string, "url": string}>();
334
          }
335

  
336
          software.push({"name": externalreference.sitename, "url": externalreference.url});
337
        }
338
      }
339
    }
340

  
341
    return [bioentities, software];
342
  }
343

  
344
  getOpenCitations(id: string, properties:EnvProperties) {
345
    //https://services.openaire.eu/opencitations/getCitations?id=doajarticles::2634200c24772ee8f10232d3e184ec65
346
    let url = properties.openCitationsAPIURL+id;// "https://services.openaire.eu/opencitations/getCitations?id=" + id;
347
    let key = url;
348

  
349
    //return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url)
350
    return this.http.get(url)
351
      .pipe(map(res => [res['total'], this.parseOpenCitations(res['results'])]));
352
  }
353

  
354
  parseOpenCitations(openCitations: any): {"url": string, "title": string, "year": string, "doi": string, "authors": string[]}[] {
355
    //title, doi, authors
356
    let citations = new Array<{"url": string, "title": string, "year": string, "doi": string, "authors": string[]}>();
357

  
358
    let openCitation;
359

  
360
    let length = Array.isArray(openCitations) ? openCitations.length : 1;
361
    for(let i=0; i<length; i++) {
362
      openCitation = Array.isArray(openCitations) ? openCitations[i] : openCitations;
363

  
364
      let citation: {"url": string, "title": string,  "year": string, "doi": string, "authors": string[]} = {"url": "", "title": "", "year": "", "doi": "", "authors": []};
365

  
366
      if(openCitation && openCitation.id) {
367
        citation.url = openCitation.id;
368
        citation.title = openCitation.title;
369
        //citation.type = openCitation.type;
370
        citation.year = (openCitation.pubDate && (openCitation.pubDate).indexOf('-') !== -1)?openCitation.pubDate.split('-')[0]:openCitation.pubDate;
371
        citation.doi = openCitation.doi;
372

  
373
        let authorsLength = Array.isArray(openCitation.authors) ? openCitation.authors.length : 1;
374
        for(let i=0; i<authorsLength; i++) {
375
          let author = Array.isArray(openCitation.authors) ? openCitation.authors[i] : openCitation.authors;
376

  
377
          if(author) {
378
            let lastFirstName: string = "";
379
            if(author.lastName) {
380
              lastFirstName = author.lastName;
381
            }
382
            if(author.lastName && author.firstName) {
383
              lastFirstName += ", ";
384
            }
385
            if(author.firstName) {
386
              lastFirstName += author.firstName;
387
            }
388

  
389
            if(lastFirstName) {
390
              citation.authors.push(lastFirstName);
391
            }
392
          }
393
        }
394
        citations.push(citation);
395
      }
396
    }
397
    return citations;
398
  }
399
}
modules/uoa-services-library/branches/mergeResultLandingPages/ng-openaire-library/src/app/landingPages/resultLanding.component.ts
1
import {Component, Input, ViewChild} from '@angular/core';
2
import {ActivatedRoute, Router} from '@angular/router';
3
import {Meta, Title} from '@angular/platform-browser';
4

  
5
import {EnvProperties} from '../utils/properties/env-properties';
6
import {ResultLandingInfo} from '../utils/entities/resultLandingInfo';
7
import {RouterHelper} from '../utils/routerHelper.class';
8

  
9
import {PiwikService} from '../utils/piwik/piwik.service';
10
import {ResultLandingService} from './resultLanding.service';
11
import {SEOService} from '../sharedComponents/SEO/SEO.service';
12
import {HelperFunctions} from '../utils/HelperFunctions.class';
13
import {HelperService} from '../utils/helper/helper.service';
14

  
15

  
16
@Component({
17
  selector: 'result-landing',
18
  templateUrl: 'resultLanding.component.html',
19

  
20
})
21

  
22
export class ResultLandingComponent {
23
  @Input() type: string = "publication";
24
  @Input() piwikSiteId = null;
25
  @Input() communityId = null;
26

  
27
  // Active tab variable for responsiveness
28
  @Input() activeTab: string = "References";
29

  
30
  @ViewChild('AlertModalDeletedByInference') alertModalDeletedByInference;
31

  
32
  public resultLandingInfo: ResultLandingInfo;
33
  public id: string;
34
  public title: string;
35

  
36
  // Links for SEO
37
  public linkToLandingPage: string = null;
38
  public linkToSearchPage: string = null;
39

  
40
  // APP BOX variables
41
  public showAllCollectedFrom: boolean = false;
42
  public showAllDownloadFrom: boolean = false;
43

  
44
  public thresholdDescription: number = 270;
45
  public showNumDescription: number = 270;
46

  
47
  // Metrics tab variables
48
  public metricsClicked: boolean;
49
  public viewsFrameUrl: string;
50
  public downloadsFrameUrl: string;
51
  public totalViews: number;
52
  public totalDownloads: number;
53
  public pageViews: number;
54

  
55
  // Custom tab paging variables
56
  public referencesPage: number = 1;
57
  public organizationsPage: number = 1;
58
  public softwarePage: number = 1;
59
  public bioentitiesPage: number = 1;
60
  public openCitationsPage: number = 1;
61
  public pageSize: number = 10;
62

  
63
  // Map counting variables
64
  public bioentitiesNum: number = 0;
65
  public relatedResearchResultsNum: number = 0;
66

  
67
  // Message variables
68
  public warningMessage = "";
69
  public errorMessage = "";
70
  public showLoading: boolean = true;
71

  
72
  public routerHelper: RouterHelper = new RouterHelper();
73

  
74
  private doi: string;
75
  public doiURL: string;
76
  private result;
77
  sub: any;
78
  piwiksub: any;
79
  infoSub: any;
80
  properties: EnvProperties;
81
  public pageContents = null;
82
  public divContents = null;
83

  
84
  constructor(private _resultLaningService: ResultLandingService,
85
              private _piwikService: PiwikService,
86
              private route: ActivatedRoute,
87
              private router: Router,
88
              private _meta: Meta,
89
              private _title: Title,
90
              private _router: Router,
91
              private helper: HelperService,
92
              private seoService: SEOService) {
93
  }
94

  
95
  ngOnInit() {
96
    this.route.data
97
      .subscribe((data: { envSpecific: EnvProperties }) => {
98
        this.properties = data.envSpecific;
99
        //this.getDivContents();
100
        this.getPageContents();
101
        this.doiURL = this.properties.doiURL;
102
        this.updateUrl(data.envSpecific.baseLink + this._router.url);
103

  
104
        this.sub = this.route.queryParams.subscribe(data => {
105
          this.resultLandingInfo = null;
106
          if(this.type == "publication") {
107
            this.updateTitle("Publication");
108
            this.linkToLandingPage = this.properties.searchLinkToPublication;
109
            this.linkToSearchPage = this.properties.searchLinkToPublications;
110
            this.id = data['articleId'];
111
            this.title = "Publication";
112
          } else if(this.type == "dataset") {
113
            this.updateTitle("Dataset");
114
            this.linkToLandingPage = this.properties.searchLinkToDataset;
115
            this.linkToSearchPage = this.properties.searchLinkToDatasets;
116
            this.id = data['datasetId'];
117
            this.title = "Research Data";
118
          } else if(this.type == "software") {
119
            this.updateTitle("Software");
120
            this.linkToLandingPage = this.properties.searchLinkToSoftware;
121
            this.linkToSearchPage = this.properties.searchLinkToSoftwareLanding;
122
            this.id = data['softwareId'];
123
            this.title = "Software";
124
          } else if(this.type == "orp") {
125
            this.updateTitle("Other Research Product");
126
            this.linkToLandingPage = this.properties.searchLinkToOrp;
127
            this.linkToSearchPage = this.properties.searchLinkToOrps;
128
            this.id = data['orpId'];
129
            this.title = "Other Research Product";
130
          }
131
          this.updateDescription("");
132

  
133
          this.metricsClicked = false;
134

  
135
          if (this.id) {
136
            this.getResultLandingInfo(this.id);
137
          } else {
138
            this.showLoading = false;
139

  
140
            this.warningMessage = "No valid ";
141
            if(this.type == "publication" || this.type == "software") {
142
              this.warningMessage += this.type + " ";
143
            } else if(this.type == "dataset") {
144
              this.warningMessage += "research data ";
145
            } else if(this.type == "orp") {
146
              this.warningMessage += "other research product ";
147
            }
148
            this.warningMessage += "id";
149
          }
150

  
151
          this.viewsFrameUrl = this.properties.framesAPIURL + 'merge.php?com=query&data=[{"query":"resRepoViews", "resTitle":"' + this.id + '", "table":"","fields":[{"fld":"sum","agg":"sum","type":"column","yaxis":1,"c":false}],"xaxis":{"name":"month","agg":"sum"},"group":" ","color":"","type":"chart","size":30,"sort":"xaxis","xStyle":{"r":-30,"s":"0","l":"-","ft":"-","wt":"-"},"title":"","subtitle":"","xaxistitle":"Repository","yaxisheaders":["Monthly views"],"generalxaxis":"","theme":0,"in":[],"filters":[{"name":"","values":[""],"to":"-1"}]}]&info_types=["column"]&stacking=normal&steps=false&fontFamily=Courier&spacing=[5,0,0,0]&style=[{"color":"rgba(0, 0, 0, 1)","size":"18"},{"color":"rgba(0, 0, 0, 1)","size":"18"},{"color":"000000","size":""},{"color":"000000","size":""}]&backgroundColor=rgba(255,255,255,1)&colors[]=rgba(67, 67, 72, 1)&colors[]=rgba(144, 237, 125, 1)&colors[]=rgba(247, 163, 92, 1)&colors[]=rgba(128, 133, 233, 1)&colors[]=rgba(241, 92, 128, 1)&colors[]=rgba(228, 211, 84, 1)&colors[]=rgba(43, 144, 143, 1)&colors[]=rgba(244, 91, 91, 1)&colors[]=rgba(145, 232, 225, 1)&xlinew=0&ylinew=1&legends=true&tooltips=true&persistent=false';
152
          this.downloadsFrameUrl = this.properties.framesAPIURL + 'merge.php?com=query&data=[{"query":"resRepoDownloads", "resTitle":"' + this.id + '", "table":"","fields":[{"fld":"sum","agg":"sum","type":"column","yaxis":1,"c":false}],"xaxis":{"name":"month","agg":"sum"},"group":" ","color":"","type":"chart","size":30,"sort":"xaxis","xStyle":{"r":-30,"s":"0","l":"-","ft":"-","wt":"-"},"title":"","subtitle":"","xaxistitle":"Repository","yaxisheaders":["Monthly downloads"],"generalxaxis":"","theme":0,"in":[],"filters":[{"name":"","values":[""],"to":"-1"}]}]&info_types=["column"]&stacking=normal&steps=false&fontFamily=Courier&spacing=[5,0,0,0]&style=[{"color":"rgba(0, 0, 0, 1)","size":"18"},{"color":"rgba(0, 0, 0, 1)","size":"18"},{"color":"000000","size":""},{"color":"000000","size":""}]&backgroundColor=rgba(255,255,255,1)&colors[]=rgba(67, 67, 72, 1)&colors[]=rgba(144, 237, 125, 1)&colors[]=rgba(247, 163, 92, 1)&colors[]=rgba(128, 133, 233, 1)&colors[]=rgba(241, 92, 128, 1)&colors[]=rgba(228, 211, 84, 1)&colors[]=rgba(43, 144, 143, 1)&colors[]=rgba(244, 91, 91, 1)&colors[]=rgba(145, 232, 225, 1)&xlinew=0&ylinew=1&legends=true&tooltips=true&persistent=false';
153

  
154
          this.scroll();
155
        });
156
      });
157
  }
158

  
159
  private getPageContents() {
160
    this.helper.getPageHelpContents(this._router.url, this.properties, this.communityId).subscribe(contents => {
161
      this.pageContents = contents;
162
    });
163
  }
164

  
165
  private getDivContents() {
166
    this.helper.getDivHelpContents(this._router.url, this.properties, this.communityId).subscribe(contents => {
167
      this.divContents = contents;
168
    });
169
  }
170

  
171
  ngOnDestroy() {
172
    if (this.sub) {
173
      this.sub.unsubscribe();
174
    }
175
    if (this.piwiksub) {
176
      this.piwiksub.unsubscribe();
177
    }
178
    if (this.infoSub) {
179
      this.infoSub.unsubscribe();
180
    }
181
  }
182

  
183
  private getOpenCitations(id: string) {
184
    this._resultLaningService.getOpenCitations(this.id, this.properties).subscribe(
185
      data => {
186
        this.resultLandingInfo.openCitations = data[1];
187
      },
188
      err => {
189
        this.handleError("Error getting open citation for "+this.type+" with id: " + this.id, err);
190
      }
191
    );
192
  }
193

  
194
  private getResultLandingInfo(id: string) {
195
    this.warningMessage = '';
196
    this.errorMessage = '';
197
    this.showLoading = true;
198

  
199
    this.resultLandingInfo = null;
200

  
201
    this.infoSub = this._resultLaningService.getResultLandingInfo(this.id, this.type, this.properties).subscribe(
202
      data => {
203
        this.resultLandingInfo = data;
204
        this.seoService.createLinkForCanonicalURL(this.properties.baseLink + this.linkToLandingPage + this.resultLandingInfo.record["result"]["header"]["dri:objIdentifier"]);
205
        if ((this.type == "publication") && (this.properties.environment == "beta" || this.properties.environment == "development") && (typeof document !== 'undefined')) {
206
          this.getOpenCitations(this.id);
207
        }
208

  
209
        if (this.resultLandingInfo.title) {
210
          this.updateTitle(this.resultLandingInfo.title);
211
          this.updateDescription((this.resultLandingInfo.description ? (this.resultLandingInfo.description) : ("," + this.resultLandingInfo.title)));
212
        }
213
        if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
214
          this.piwiksub = this._piwikService.trackView(this.properties, this.resultLandingInfo.title/*.name*/, this.piwikSiteId).subscribe();
215
        }
216

  
217
        let bioentitiesNum = 0;
218
        if (this.resultLandingInfo.bioentities != undefined) {
219
          this.resultLandingInfo.bioentities.forEach(function (value, key, map) {
220
            bioentitiesNum += value.size;
221
          });
222
        }
223
        this.bioentitiesNum = bioentitiesNum;
224

  
225
        let relatedResearchResultsNum = 0;
226
        if (this.resultLandingInfo.relatedResearchResults != undefined) {
227
          this.resultLandingInfo.relatedResearchResults.forEach(function (value, key, map) {
228
            relatedResearchResultsNum += value.length;
229
          });
230
        }
231
        this.relatedResearchResultsNum = relatedResearchResultsNum;
232

  
233
        this.result = {
234
          id: this.id,
235
          type: this.type,
236
          source: "openaire",
237
          title: this.resultLandingInfo.title,
238
          url: '',
239
          result: '',
240
          accessRights: this.resultLandingInfo.accessMode,
241
          embargoEndDate: ''
242
        };
243

  
244
        if (this.resultLandingInfo.identifiers != undefined && this.resultLandingInfo.identifiers.has('doi')) {
245
          this.doi = this.resultLandingInfo.identifiers.get('doi')[0];
246
        }
247

  
248
        this.showLoading = false;
249

  
250
        if (this.resultLandingInfo.references) {
251
          this.activeTab = "References";
252
        } else if (this.resultLandingInfo.relatedResearchResults) {
253
          this.activeTab = "Related Research Results";
254
        } else if (this.resultLandingInfo.similarResearchResults) {
255
          this.activeTab = "Similar Research Results";
256
        } else if (this.resultLandingInfo.organizations) {
257
          this.activeTab = "Related Organizations";
258
        } else if (this.resultLandingInfo.bioentities) {
259
          this.activeTab = "Bioentities";
260
        } else if (this.resultLandingInfo.software) {
261
          this.activeTab = "Software";
262
        } else {
263
          this.activeTab = "Metrics";
264
          //this.metricsClicked = true;
265
        }
266
      },
267
      err => {
268
        this.handleError("Error getting "+this.type+" for id: " + this.id, err);
269

  
270
        if(this.type == "publication" || this.type == "software") {
271
          this.errorMessage = 'No '+this.type+' found';
272
        } else if(this.type == "dataset") {
273
          this.errorMessage += "No research data found";
274
        } else if(this.type == "orp") {
275
          this.errorMessage += "No research product found";
276
        }
277
        this.showLoading = false;
278
        this.seoService.createLinkForCanonicalURL(this.properties.baseLink + this.linkToSearchPage);
279
      }
280
    );
281
  }
282

  
283
  public metricsResults($event) {
284
    this.totalViews = $event.totalViews;
285
    this.totalDownloads = $event.totalDownloads;
286
    this.pageViews = $event.pageViews;
287
  }
288

  
289
  public buildCurationTooltip(): string {
290
    let tooltipContent: string = "<div class='uk-margin uk-padding-small'>";
291

  
292
    tooltipContent += "<h4>Record in preview</h4>";
293
    tooltipContent += "<p>Bibliographic record accepted by the system, but not yet processed by <br> OpenAIRE tools for information quality improvement and de-duplication</p>";
294

  
295
    tooltipContent += "</div>";
296
    return tooltipContent;
297
  }
298

  
299
  private updateDescription(description: string) {
300
    this._meta.updateTag({content: description}, "name='description'");
301
    this._meta.updateTag({content: description}, "property='og:description'");
302
  }
303

  
304
  private updateTitle(title: string) {
305
    var _prefix = "";
306
    if(!this.communityId) {
307
      _prefix = "OpenAIRE | ";
308
    }
309
    var _title = _prefix + ((title.length > 50) ? title.substring(0, 50) : title);
310
    this._title.setTitle(_title);
311
    this._meta.updateTag({content: _title}, "property='og:title'");
312
  }
313

  
314
  private updateUrl(url: string) {
315
    this._meta.updateTag({content: url}, "property='og:url'");
316
  }
317

  
318
  public totalPages(totalResults: number): number {
319
    let totalPages: any = totalResults / this.pageSize;
320
    if (!(Number.isInteger(totalPages))) {
321
      totalPages = (parseInt(totalPages, this.pageSize) + 1);
322
    }
323
    return totalPages;
324
  }
325

  
326
  public updateReferencesPage($event) {
327
    this.referencesPage = $event.value;
328
  }
329

  
330
  public updateOrganizationsPage($event) {
331
    this.organizationsPage = $event.value;
332
  }
333

  
334
  public updateSoftwarePage($event) {
335
    this.softwarePage = $event.value;
336
  }
337

  
338
  public updateBioentitiesPage($event) {
339
    this.bioentitiesPage = $event.value;
340
  }
341

  
342
  public updateOpenCitationsPage($event) {
343
    this.openCitationsPage = $event.value;
344
  }
345

  
346
  public keysToArray(bioentities: Map<string, string>): string[] {
347
    let keys: string[] = [];
348
    bioentities.forEach(function (value, key, map) {
349
      keys.push(key);
350
    });
351
    return keys;
352
  }
353

  
354
  public getKeys(map) {
355
    return Array.from(map.keys());
356
  }
357

  
358
  public scroll() {
359
    HelperFunctions.scroll();
360
  }
361

  
362
  private handleError(message: string, error) {
363
    if(this.type == "publication") {
364
      console.error("Publication Landing Page: " + message, error);
365
    } else if(this.type == "dataset") {
366
      console.error("Research Data Landing Page: " + message, error);
367
    } else if(this.type == "software") {
368
      console.error("Software Landing Page: " + message, error);
369
    } else if(this.type == "orp") {
370
      console.error("Other Research Product Landing Page: " + message, error);
371
    } else {
372
      console.error("Landing Page: " + message, error);
373
    }
374
  }
375

  
376
  isRouteAvailable(routeToCheck: string) {
377
    for (let i = 0; i < this.router.config.length; i++) {
378
      let routePath: string = this.router.config[i].path;
379
      if (routePath == routeToCheck) {
380
        return true;
381
      }
382
    }
383
    return false;
384
  }
385

  
386
  openDeletedByInference() {
387
    this.alertModalDeletedByInference.cancelButton = false;
388
    this.alertModalDeletedByInference.okButton = false;
389
    this.alertModalDeletedByInference.alertTitle = "Original sources";
390
    //this.alertModalDeletedByInference.message = "There was an error in csv downloading. Please try again later.";
391
    //this.alertModalDeletedByInference.okButtonText = "OK";
392
    this.alertModalDeletedByInference.open();
393
  }
394
}
modules/uoa-services-library/branches/mergeResultLandingPages/ng-openaire-library/src/app/landingPages/resultLanding.module.ts
1
import {NgModule}                     from '@angular/core';
2
import {CommonModule}                 from '@angular/common';
3
import {FormsModule}                  from '@angular/forms';
4
import {RouterModule}                 from '@angular/router';
5

  
6
import {SharedModule}                 from '../shared/shared.module';
7
import {MetricsModule}                from './landing-utils/metrics.module';
8
import {LandingModule}                from './landing-utils/landing.module';
9
import {CiteThisModule}               from './landing-utils/citeThis/citeThis.module';
10
import {IFrameModule}                 from './../utils/iframe.module';
11
import {AltMetricsModule}             from './../utils/altmetrics.module';
12
import {PagingModule}                 from './../utils/paging.module';
13
import {ConfigurationServiceModule}   from '../utils/configuration/configurationService.module';
14

  
15
import {FreeGuard}                    from'../login/freeGuard.guard';
16
import {IsRouteEnabled}               from '../error/isRouteEnabled.guard';
17
import {ResultLandingService}           from './resultLanding.service';
18
import {ResultLandingComponent}         from './resultLanding.component';
19
import {Schema2jsonldModule} from '../sharedComponents/schema2jsonld/schema2jsonld.module';
20
import { SEOServiceModule } from '../sharedComponents/SEO/SEOService.module';
21

  
22
import {DeletedByInferenceModule} from './landing-utils/deletedByInference/deletedByInference.module';
23
import {ShowAuthorsModule}        from "../utils/authors/showAuthors.module";
24
import {HelperModule} from "../utils/helper/helper.module";
25
import {ResultLandingUtilsModule} from "./landing-utils/resultLandingUtils.module";
26
import {AlertModalModule} from "../utils/modal/alertModal.module";
27

  
28
@NgModule({
29
  imports: [
30
    CommonModule, FormsModule, LandingModule, SharedModule, RouterModule,
31
    CiteThisModule, PagingModule, IFrameModule,
32
    MetricsModule, AltMetricsModule, ConfigurationServiceModule, Schema2jsonldModule, SEOServiceModule,
33
    DeletedByInferenceModule, ShowAuthorsModule, HelperModule, ResultLandingUtilsModule, AlertModalModule
34
  ],
35
  declarations: [
36
    ResultLandingComponent
37
  ],
38
  providers: [
39
    ResultLandingService, FreeGuard, IsRouteEnabled
40
  ],
41
  exports: [
42
    ResultLandingComponent
43
  ]
44
})
45
export class ResultLandingModule { }
modules/uoa-services-library/branches/mergeResultLandingPages/ng-openaire-library/src/app/landingPages/landing-utils/deletedByInference/deletedByInference.component.ts
107 107

  
108 108
  // Custom tab paging variables
109 109
  public page: number = 1;
110
  public pageSize: number = 10;
110
  public pageSize: number = 5;
111 111

  
112 112
  public status: number;
113 113
  public routerHelper:RouterHelper = new RouterHelper();
modules/uoa-services-library/branches/mergeResultLandingPages/ng-openaire-library/src/app/landingPages/result/resultLanding.component.html
1
<div id="tm-main" class=" uk-section uk-padding-remove-top uk-margin-small-top tm-middle">
2
  <div uk-grid >
3
    <div class="tm-main uk-width-1-1@s uk-width-1-1@m  uk-width-1-1@l uk-row-first ">
4
      <div class="uk-container publication">
5
        <div *ngIf="warningMessage.length > 0" class="uk-alert uk-alert-warning  uk-margin-large-top"
6
             role="alert">{{warningMessage}}</div>
7
        <div *ngIf="errorMessage.length > 0" class="uk-alert uk-alert-danger  uk-margin-large-top"
8
             role="alert">{{errorMessage}}</div>
9
        <div [style.display]="showLoading ? 'inline' : 'none'"
10
             class="uk-animation-fade uk-margin-large-top  uk-width-1-1" role="alert"><span
11
          class="loading-gif  uk-align-center"></span></div>
12
        <helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0"
13
                [texts]="pageContents['top']"></helper>
14
        <div *ngIf="resultLandingInfo != null"  class="uk-grid">
15

  
16
          <div class="uk-width-2-3@m uk-width-1-1@s  uk-margin-bottom">
17
            <schema2jsonld *ngIf="resultLandingInfo.record" [data]=resultLandingInfo.record
18
                           [URL]="properties.baseLink+linkToLandingPage+id"></schema2jsonld>
19
            <showTitle [titleName]="resultLandingInfo.title" [classNames]="(properties.environment != 'production' && resultLandingInfo.deletedByInferenceIds) ? 'uk-margin-remove-bottom' : ''"></showTitle>
20
            <div *ngIf="properties.environment != 'production' && resultLandingInfo.deletedByInferenceIds"
21
                 class="uk-text-muted uk-text-small uk-margin-bottom" (click)="openDeletedByInference()">
22
              The following information is result of merging
23
              <a>Original sources ({{resultLandingInfo.deletedByInferenceIds.length}})</a>
24
            </div>
25
            <p class="uk-text-large" *ngIf="resultLandingInfo.subtitle">
26
              <span [innerHTML]="resultLandingInfo.subtitle"></span>
27
            </p>
28
            <span *ngIf="resultLandingInfo.types && resultLandingInfo.types.length > 0"
29
                  class="uk-label custom-label label-blue label-publication"
30
                  title="Type">{{resultLandingInfo.types.join(", ")}}</span>{{" "}}
31
            <span *ngIf="resultLandingInfo.programmingLanguages && resultLandingInfo.programmingLanguages.length > 0"
32
                  class="uk-label custom-label  label-progrLanguage "
33
                  title="Programming Language">{{resultLandingInfo.programmingLanguages.join(", ")}}</span>{{" "}}
34
            <span *ngIf="resultLandingInfo.languages && resultLandingInfo.languages.length > 0"
35
                  class="uk-label custom-label  label-language "
36
                  title="Language">{{resultLandingInfo.languages.join(", ")}}</span>{{" "}}
37
            <span *ngIf="resultLandingInfo.countries && resultLandingInfo.countries.length > 0"
38
                  class="uk-label custom-label  label-country "
39
                  title="Country">{{resultLandingInfo.countries.join(", ")}}</span>{{" "}}
40
            <!-- <span *ngIf="resultLandingInfo.title && resultLandingInfo.title.accessMode" [class]="'uk-label custom-label  label-'+ resultLandingInfo.title.accessMode ">{{resultLandingInfo.title.accessMode}}</span> -->
41
            <span *ngIf="resultLandingInfo.accessMode"
42
                  [class]="'uk-label custom-label  label-'+ resultLandingInfo.accessMode "
43
                  title="Access Mode">{{resultLandingInfo.accessMode}}</span>{{" "}}
44

  
45
            <span *ngIf="resultLandingInfo.underCurationMessage" class="uk-label custom-label label-underCuration">
46
              <span uk-tooltip="pos:right; delay:10"
47
                    title="{{buildCurationTooltip()}}">
48
              <i>Record in preview</i>
49
              <i class="uk-icon-info-circle"></i>
50
            </span></span>{{" "}}
51

  
52

  
53
            <div class=" uk-margin-top">
54
              <showAuthors [authors]="resultLandingInfo.authors"></showAuthors>
55
              <span *ngIf="resultLandingInfo.date != ''">({{resultLandingInfo.date}})</span>
56
            </div>
57

  
58
            <ul class="uk-list">
59
              <showPublisher [publisher]="resultLandingInfo.publisher"
60
                             [journal]="resultLandingInfo.journal" [properties]="properties"></showPublisher>
61
              <li *ngIf="resultLandingInfo.embargoEndDate"><span
62
                class="uk-text-bold">Embargo end date:</span> {{resultLandingInfo.embargoEndDate}}</li>
63
              <li *ngIf="resultLandingInfo.identifiers && resultLandingInfo.identifiers.size > 0">
64
                <showIdentifiers [identifiers]="resultLandingInfo.identifiers"></showIdentifiers>
65
              </li>
66
              <li
67
                *ngIf="resultLandingInfo">
68
                <showSubjects [subjects]="resultLandingInfo.subjects"
69
                              [otherSubjects]="resultLandingInfo.otherSubjects"
70
                              [classifiedSubjects]="resultLandingInfo.classifiedSubjects">
71
                </showSubjects>
72
              </li>
73
            </ul>
74
            <hr *ngIf="resultLandingInfo.description">
75
            <div *ngIf="resultLandingInfo.description"
76
                 class="uk-text-justify descriptionText uk-height-max-medium uk-overflow-auto">
77
                <span>{{resultLandingInfo.description.substring(0, showNumDescription)}}</span
78
                ><span
79
              *ngIf="showNumDescription == thresholdDescription && resultLandingInfo.description.length > thresholdDescription">...</span
80
            ><span
81
              *ngIf="showNumDescription == thresholdDescription && resultLandingInfo.description.length > thresholdDescription"
82
              class="uk-text-right">
83
                  <a (click)="showNumDescription = resultLandingInfo.description.length;">
84
                    View more
85
                  </a>
86
                </span>
87
            </div>
88
            <div *ngIf="resultLandingInfo.description && showNumDescription > thresholdDescription"
89
                 class="uk-width-1-1 uk-text-right">
90
              <!-- scroll() -->
91
              <a (click)="showNumDescription = thresholdDescription;">
92
                View less
93
              </a>
94
            </div>
95

  
96

  
97
            <ul class="custom-accordion" uk-accordion>
98

  
99
              <li *ngIf="resultLandingInfo.references" (click)="activeTab='References'">
100
                <a class="uk-accordion-title" href="#">
101
                  References
102
                  ({{resultLandingInfo.references.length | number}})
103
                </a>
104
                <div class="uk-accordion-content">
105
                  <div>
106
                    <div *ngIf="resultLandingInfo.references.length > pageSize" class="uk-margin-bottom">
107
                      <span class="uk-h6">{{resultLandingInfo.references.length | number}}
108
                        references, page {{referencesPage | number}}
109
                        of {{totalPages(resultLandingInfo.references.length) | number}}</span>
110
                      <paging-no-load class="uk-float-right" [currentPage]="referencesPage"
111
                                      [totalResults]="resultLandingInfo.references.length" [size]="pageSize"
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff