Project

General

Profile

« Previous | Next » 

Revision 56950

[mergeResultLandingPages | Library]:
1. Delete "landingPages/dataset", "landingPages/orp", "landingPages/publication", "landingPages/software" folders.
2. app-routing.module & app.module: Delete references to the above folders and replace them with "ResultLandingModule" and "ResultLandingComponent".

View differences:

modules/uoa-services-library/branches/mergeResultLandingPages/ng-openaire-library/package.json
8 8
  ],
9 9
  "scripts": {
10 10
    "ng": "ng",
11
    "start": "ng serve --disable-host-check --host 0.0.0.0",
11
    "start": "ng serve --disable-host-check --host 0.0.0.0 --port 4300",
12 12
    "build": "ng build",
13 13
    "lint": "ng lint ng-openaire-library",
14 14
    "build:client-and-server-bundles": "ng build --prod && ng run ng-openaire-library:server:production",
modules/uoa-services-library/branches/mergeResultLandingPages/ng-openaire-library/src/app/app.module.ts
13 13
// import { ErrorModule } from './error/error.module';
14 14
import { ConfigurationService } from './utils/configuration/configuration.service';
15 15
import {MainSearchModule} from './searchPages/find/mainSearch.module';
16
import {PublicationModule} from './landingPages/publication/publication.module';
17
import {DatasetModule} from './landingPages/dataset/dataset.module';
18
import {SoftwareModule} from './landingPages/software/software.module';
19
import {OrpModule} from './landingPages/orp/orp.module';
16

  
17
import {ResultLandingModule} from "./landingPages/resultLanding.module";
20 18
import {DataProviderModule} from './landingPages/dataProvider/dataProvider.module';
21 19
import {ProjectModule} from './landingPages/project/project.module';
22 20
import {OrganizationModule} from './landingPages/organization/organization.module';
......
78 76
    DepositDatasetsModule,DepositDatasetsResultsModule, DepositBySubjectResultsModule,DepositPublicationsModule , DepositPublicationsResultsModule,
79 77
    SearchPublicationsModule,SearchDatasetsModule, SearchSoftwareModule, SearchOrpsModule, SearchDataProvidersModule, SearchProjectsModule, SearchOrganizationsModule,
80 78
    AdvancedSearchPublicationsModule,AdvancedSearchDatasetsModule, AdvancedSearchSoftwareModule, AdvancedSearchOrpsModule, AdvancedSearchDataProvidersModule, AdvancedSearchProjectsModule, AdvancedSearchOrganizationsModule,
81
    PublicationModule, DatasetModule, DataProviderModule, OrganizationModule, ProjectModule, SoftwareModule, OrpModule,
79
    ResultLandingModule, DataProviderModule, OrganizationModule, ProjectModule,
82 80
    EntityRegistriesModule, CompatibleDataProvidersModule, JournalsModule,
83 81
    JournalsTableModule, EntityRegistriesTableModule, CompatibleDataProvidersTableModule,
84 82
    ClaimsAdminModule, MyClaimsModule, ClaimsByTokenModule, LinkingGenericModule, DirectLinkingModule,
modules/uoa-services-library/branches/mergeResultLandingPages/ng-openaire-library/src/app/landingPages/orp/orp.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  orp">
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="orpInfo != null"  class="uk-grid">
15
          <div class="uk-width-2-3@m uk-width-1-1@s uk-margin-bottom">
16
            <schema2jsonld *ngIf="orpInfo.record" [data]=orpInfo.record
17
                           [URL]="properties.baseLink+'/search/orp?orpId='+orpId"></schema2jsonld>
18
            <showTitle [titleName]="orpInfo.title"></showTitle>
19
            <span *ngIf="orpInfo.types && orpInfo.types.length > 0" class="uk-label custom-label label-orp "
20
                  title="Type">{{orpInfo.types.join(", ")}}</span>{{" "}}
21
            <span *ngIf="orpInfo.languages && orpInfo.languages.length > 0"
22
                  class="uk-label custom-label  label-language "
23
                  title="Language">{{orpInfo.languages.join(", ")}}</span>{{" "}}
24
            <span *ngIf="orpInfo.countries && orpInfo.countries.length > 0"
25
                  class="uk-label custom-label  label-country "
26
                  title="Country">{{orpInfo.countries.join(", ")}}</span>{{" "}}
27
            <span *ngIf="orpInfo.accessMode" [class]="'uk-label custom-label   label-'+ orpInfo.accessMode "
28
                  title="Access Mode">{{orpInfo.accessMode}}</span>{{" "}}
29
            <span *ngIf="orpInfo.underCurationMessage" class="uk-label custom-label label-underCuration">
30
              <span uk-tooltip="pos:right; delay:10"
31
                    title="{{buildCurationTooltip()}}">
32
                  <i>Record in preview</i>
33
                  <i class="uk-icon-info-circle"></i>
34
              </span>
35
            </span>{{" "}}
36

  
37
            <div class=" uk-margin-top">
38
              <showAuthors [authors]="orpInfo.authors"></showAuthors>
39
              <span *ngIf="orpInfo.date != ''">({{orpInfo.date}})</span>
40
            </div>
41

  
42
            <ul class="uk-list">
43
              <showPublisher [publisher]="orpInfo.publisher"
44
                             [journal]="orpInfo.journal" [properties]="properties"></showPublisher>
45
              <li *ngIf="orpInfo.embargoEndDate"><span
46
                class="uk-text-bold">Embargo end date:</span> {{orpInfo.embargoEndDate}}</li>
47
              <li *ngIf="orpInfo.identifiers && orpInfo.identifiers.size > 0">
48
                <showIdentifiers [identifiers]="orpInfo.identifiers"></showIdentifiers>
49
              </li>
50
              <li *ngIf="orpInfo.subjects ||orpInfo.otherSubjects ||  orpInfo.classifiedSubjects">
51
                <showSubjects [subjects]="orpInfo.subjects"
52
                              [otherSubjects]="orpInfo.otherSubjects"
53
                              [classifiedSubjects]="orpInfo.classifiedSubjects">
54
                </showSubjects>
55
              </li>
56
            </ul>
57
            <hr *ngIf="orpInfo.description">
58
            <div *ngIf="orpInfo.description"
59
                 class="uk-text-justify descriptionText uk-height-max-medium uk-overflow-auto">
60
              <span>{{orpInfo.description.substring(0, showNumDescription)}}</span
61
              ><span
62
              *ngIf="showNumDescription == thresholdDescription && orpInfo.description.length > thresholdDescription">...</span
63
            ><span
64
              *ngIf="showNumDescription == thresholdDescription && orpInfo.description.length > thresholdDescription"
65
              class="uk-text-right">
66
                <a (click)="showNumDescription = orpInfo.description.length;">
67
                  View more
68
                </a>
69
              </span>
70
            </div>
71
            <div *ngIf="orpInfo.description && showNumDescription > thresholdDescription"
72
                 class="uk-width-1-1 uk-text-right">
73
              <a (click)="showNumDescription = thresholdDescription;">
74
                View less
75
              </a>
76
            </div>
77

  
78
            <ul class="custom-accordion" uk-accordion>
79
              <li *ngIf="orpInfo.references" (click)="activeTab='References'">
80
                <a class="uk-accordion-title" href="#">
81
                  References ({{orpInfo.references.length | number}})
82
                </a>
83
                <div class="uk-accordion-content">
84
                  <div>
85
                    <div *ngIf="orpInfo.references.length > pageSize" class="uk-margin-bottom">
86
                      <span class="uk-h6">{{orpInfo.references.length | number}}
87
                        references, page {{referencesPage | number}}
88
                        of {{totalPages(orpInfo.references.length) | number}}</span>
89
                      <paging-no-load class="uk-float-right" [currentPage]="referencesPage"
90
                                      [totalResults]="orpInfo.references.length" [size]="pageSize"
91
                                      (pageChange)="updateReferencesPage($event)"></paging-no-load>
92
                    </div>
93

  
94
                    <div
95
                      *ngFor="let item of orpInfo.references.slice((referencesPage-1)*pageSize, referencesPage*pageSize)">
96
                      <p *ngIf=" item && item['url']"
97
                         class="custom-external custom-icon">
98
                        <a href="{{item['url']}}" target="_blank">
99
                          {{item['name']}}
100
                        </a>
101
                      </p>
102
                      <p *ngIf="!item['url']" class="pseudo-external custom-icon">
103
                        {{item['name']}}
104
                      </p>
105
                    </div>
106
                  </div>
107
                </div>
108
              </li>
109

  
110
              <li *ngIf="orpInfo.relatedResearchResults" (click)="activeTab='Related Research Results'">
111
                <a class="uk-accordion-title" href="#">
112
                  Related Research Results
113
                  <!-- <span class="uk-badge uk-badge-notification"> -->
114
                  ({{relatedResearchResultsNum | number}})
115
                  <!-- </span> -->
116
                </a>
117
                <div class="uk-accordion-content">
118
                  <div>
119
                    <div *ngFor="let provenanceaction of getKeys(orpInfo.relatedResearchResults)">
120
                      <div class="uk-text-large">{{provenanceaction}}</div>
121
                      <tabTable percentageName="trust" [info]="orpInfo.relatedResearchResults.get(provenanceaction)"
122
                                [properties]=properties></tabTable>
123
                    </div>
124
                  </div>
125
                </div>
126
              </li>
127

  
128
              <li *ngIf="orpInfo.similarResearchResults" (click)="activeTab='Similar Research Results'">
129
                <a class="uk-accordion-title" href="#">
130
                  Similar Research Results
131
                  <!-- <span class="uk-badge uk-badge-notification"> -->
132
                  ({{orpInfo.similarResearchResults.length | number}})
133
                  <!-- </span> -->
134
                </a>
135
                <div class="uk-accordion-content">
136
                  <div>
137
                    <tabTable percentageName="similarity" [info]="orpInfo.similarResearchResults"
138
                              [properties]=properties></tabTable>
139
                  </div>
140
                </div>
141
              </li>
142

  
143
              <li (click)="metricsClicked=true; activeTab='Metrics'">
144
                <a class="uk-accordion-title" href="#">
145
                  Metrics
146
                </a>
147
                <div class="uk-accordion-content">
148
                  <metrics [pageViews]="pageViews"
149
                           [id]="orpId" [entityType]="'results'" [entity]="'Other Research Product'"
150
                           (metricsResults)="metricsResults($event)" [properties]=properties>
151
                  </metrics>
152
                  <i-frame *ngIf="metricsClicked && totalViews > 0"
153
                           [url]=viewsFrameUrl width="100%" height="250">
154
                  </i-frame>
155
                  <i-frame *ngIf="metricsClicked && totalDownloads > 0"
156
                           [url]=downloadsFrameUrl width="100%" height="250">
157
                  </i-frame>
158
                </div>
159
              </li>
160
              <li (click)="activeTab='Other Versions'"
161
                  *ngIf="properties.environment != 'production' && orpInfo.deletedByInferenceIds">
162
                <a class="uk-accordion-title" href="#">
163
                  Other Versions
164
                  ({{orpInfo.deletedByInferenceIds.length | number}})
165
                </a>
166
                <div *ngIf="activeTab=='Other Versions'" class="uk-accordion-content">
167
                  <deletedByInference [id]="orpId" [ids]="orpInfo.deletedByInferenceIds"
168
                                      [type]="'other research products'"></deletedByInference>
169
                </div>
170
              </li>
171
            </ul>
172
          </div>
173

  
174
          <div class="uk-width-1-3@m uk-width-1-1@s">
175
            <div class="  uk-padding-small">
176
              <button *ngIf="isRouteAvailable('participate/direct-claim') "  class="   uk-button portal-button uk-width-1-1  ">
177
              <span class="uk-icon">
178
                <svg icon="link" ratio="1" xmlns="http://www.w3.org/2000/svg" width="25" viewBox="0 0 20 20" height="25"><path 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" fill="none" stroke="#000" stroke-width="1.1"></path><path 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" fill="none" stroke="#000"  stroke-width="1.1"></path><path d="M7.925,11.875 L11.925,7.975" fill="none" stroke="#000" stroke-width="1.1"></path></svg>
179
              </span> Link this product to...
180
              </button>
181
              <div *ngIf="isRouteAvailable('participate/direct-claim') " class="  uk-text-center uk-margin-expand uk-padding-small    uk-margin-auto  default-dropdown "
182
                    uk-dropdown="mode:click" >
183
                <div   class="uk-grid    uk-child-width-1-3  uk-width-large ">
184
                  <div><a
185
                    [queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[orpId,'orp','project'])"   routerLinkActive="router-link-active" routerLink="/participate/direct-claim"
186
                  >
187
                    <button class="uk-icon-button portal-button">
188
                   <span class="uk-icon">
189
                        <svg height="20" icon="album" ratio="1" viewBox="0 0 20 20" width="20"
190
                             xmlns="http://www.w3.org/2000/svg"><rect height="1" width="10" x="5" y="2"></rect><rect
191
                          height="1" width="14" x="3" y="4"></rect><rect fill="none" height="11" stroke="#000"
192
                                                                         width="17" x="1.5" y="6.5"></rect></svg></span>
193
                    </button>
194
                    <div>Projects</div>
195
                  </a></div>
196
                  <div><a
197
                    [queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[orpId,'orp','result'])"   routerLinkActive="router-link-active" routerLink="/participate/direct-claim" >
198
                    <button class="uk-icon-button portal-button">
199
                      <span class="uk-icon">
200
                           <svg height="20" icon="copy" ratio="1" viewBox="0 0 20 20" width="20"
201
                                xmlns="http://www.w3.org/2000/svg"><rect fill="none" height="16" stroke="#000"
202
                                                                         width="12" x="3.5" y="2.5"></rect><polyline
203
                             fill="none" points="5 0.5 17.5 0.5 17.5 17" stroke="#000"></polyline></svg></span>
204
                    </button>
205
                    <div>Research results</div>
206
                  </a></div>
207
                  <div> <a  [queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[orpId,'orp','context'])"   routerLinkActive="router-link-active" routerLink="/participate/direct-claim" >
208
                    <button class="uk-icon-button portal-button">
209
                <span class="uk-icon">
210
                           <svg height="20" icon="users" ratio="1" viewBox="0 0 20 20" width="20"
211
                                xmlns="http://www.w3.org/2000/svg"><circle cx="7.7" cy="8.6" fill="none" r="3.5"
212
                                                                           stroke="#000" stroke-width="1.1"></circle><path
213
                             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"
214
                             stroke="#000" stroke-width="1.1"></path><path
215
                             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"
216
                             fill="none" stroke="#000" stroke-width="1.1"></path></svg></span>
217
                    </button>
218
                    <div>Communities</div>
219
                  </a></div>
220
                </div>
221

  
222
              </div>
223
              <div>
224
                <div class="sideInfoTitle uk-margin-small-bottom">Share - Bookmark</div>
225
                <addThis></addThis>
226
              </div>
227
              <altmetrics *ngIf="orpInfo.identifiers && orpInfo.identifiers.get('doi')"
228
                          id="{{orpInfo.identifiers.get('doi')[0]}}" type="doi">
229
              </altmetrics>
230
              <ul class="uk-list">
231
                <li *ngIf="orpInfo.hostedBy_collectedFrom && orpInfo.hostedBy_collectedFrom.length > 0">
232
                  <availableOn [availableOn]="orpInfo.hostedBy_collectedFrom"></availableOn>
233
                </li>
234
                <li *ngIf="orpInfo.fundedByProjects != undefined && orpInfo.fundedByProjects.length > 0">
235
                  <fundedBy [fundedByProjects]="orpInfo.fundedByProjects"></fundedBy>
236
                </li>
237
                <li *ngIf="orpInfo.contexts && orpInfo.contexts.length >0 ">
238
                  <dl class="uk-description-list-line">
239
                    <dt class="sideInfoTitle">Related to</dt>
240
                    <dd class="line" *ngFor="let item of orpInfo.contexts">
241
                        <span *ngIf="!item['inline']">
242
                          <span>{{item['labelContext']}}</span>
243
                          <span *ngIf="item['labelCategory']">-> {{item['labelCategory']}}</span>
244
                          <span *ngIf="item['labelConcept']">: {{item['labelConcept']}}</span>
245
                        </span>
246
                      <mark *ngIf="item['inline']">
247
                        <span>{{item['labelContext']}}</span>
248
                        <span *ngIf="item['labelCategory']">-> {{item['labelCategory']}}</span>
249
                        <span *ngIf="item['labelConcept']">: {{item['labelConcept']}}</span>
250
                      </mark>
251
                    </dd>
252
                  </dl>
253
                </li>
254
                <li>
255

  
256
                  <div class="sideInfoTitle  cite-this-button uk-width-1-1" type="button">
257
                    Cite this research product
258
                  </div>
259
                  <div class="">
260
                    <citeThis [result]="orpInfo" [id]="orpId" type="other research product"></citeThis>
261
                  </div>
262

  
263
              </li>
264
            </ul>
265
            </div>
266

  
267
           </div>
268
         </div>
269
        <helper *ngIf="pageContents && pageContents['bottom'] && pageContents['bottom'].length > 0"
270
                [texts]="pageContents['bottom']"></helper>
271

  
272
        </div>
273

  
274
      </div>
275
     </div>
276
   </div>
277

  
278

  
modules/uoa-services-library/branches/mergeResultLandingPages/ng-openaire-library/src/app/landingPages/orp/orp.service.ts
1
import {Injectable} from '@angular/core';
2
import {HttpClient, HttpErrorResponse} from "@angular/common/http";
3
import {throwError} from 'rxjs';
4
import {OrpInfo} from '../../utils/entities/orpInfo';
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 OrpService {
11

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

  
16
  public parsingFunctions: ParsingFunctions;
17
  orpInfo: OrpInfo;
18

  
19
  getOrpInfo (id: string, properties:EnvProperties):any {
20

  
21
    let url = properties.searchAPIURLLAst+'other/'+id+"?format=json";
22
    let key = url;
23

  
24
    return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url)
25
                    //.map(res => <any> res.json())
26
                    .pipe(map(res => [res['result']['header']['dri:status'], res['result']['metadata']['oaf:entity'],res]))
27
                    .pipe(map(res => [res[1]['oaf:result'],  //0
28
                                 res[1]['oaf:result']['title'],   //1
29
                                 res[1]['oaf:result']['rels']['rel'], //2
30
                                 res[1]['oaf:result']['children'],  //3
31
                                 res[1]['oaf:result']['pid'], //4
32
                                 res[1]['oaf:result']['subject'], //5
33
                                 res[1]['oaf:result']['bestaccessright'], //6
34
                                 res[1]['oaf:result']['collectedfrom'], //7
35
                                 res[1]['oaf:result']['context'], //8
36
                                 res[0],  //9
37
                                 res[1]['oaf:result']['creator'], //10
38
                                 res[1]['oaf:result']['language'],  //11
39
                                 res[1]['oaf:result']['country'], //12
40
                                 res[2],  //13
41
                                 (res[1]['extraInfo']!= undefined && res[1]['extraInfo']['citations']!= undefined)? res[1]['extraInfo']['citations']['citation']:null, //14
42
                                  res[1]['oaf:result']['journal'] //15
43
                    ]))
44
                    .pipe(map(res => this.parseOrpInfo(res, properties)));
45
  }
46

  
47
  private handleError (error: HttpErrorResponse) {
48
  // in a real world app, we may send the error to some remote logging infrastructure
49
  // instead of just logging it to the console
50
    console.log(error);
51
    return throwError(error  || 'Server error');
52
  }
53

  
54
  parseOrpInfo (data: any, properties: EnvProperties):any {
55
    this.orpInfo = new OrpInfo();
56
    this.orpInfo.record = data[13];
57
    if(data[0] != null) {
58
      var date:string = (data[0].dateofacceptance)+""; // transform to string in case it is an integer
59
      this.orpInfo.date  = (date && (date).indexOf('-') !== -1)?date.split('-')[0]:date;
60
      this.orpInfo.dateofacceptance = data[0].dateofacceptance;
61
      this.orpInfo.publisher = data[0].publisher;
62
      if(!Array.isArray(data[0].description)) {
63
        this.orpInfo.description = String(data[0].description);
64
      } else {
65
        this.orpInfo.description = String(data[0].description[0]);
66
      }
67
      this.orpInfo.embargoEndDate = data[0].embargoenddate;
68
    }
69

  
70
    if(data[0]['bestaccessright'] && data[0]['bestaccessright'].hasOwnProperty("classid")) {
71
      this.orpInfo.accessMode = data[0]['bestaccessright'].classid;
72
    }
73
    if(data[1] != null) {
74
      if(Array.isArray(data[1])) {
75
        this.orpInfo.title = String(data[1][0].content);
76
      } else {
77
        this.orpInfo.title = String(data[1].content);
78
      }
79
    }
80

  
81
    if(data[2] != null) {
82
      let relation;
83
      let length = data[2].length!=undefined ? data[2].length : 1;
84

  
85
      for(let i=0; i<length; i++) {
86
        relation = data[2].length!=undefined ? data[2][i] : data[2];
87
        if(relation.hasOwnProperty("to")) {
88
          if(relation['to'].class == "isProducedBy") {
89
            this.orpInfo.fundedByProjects = this.parsingFunctions.parseFundingByProjects(this.orpInfo.fundedByProjects, relation, this.orpInfo.projectsProvenanceVocabulary);
90
          } else if(relation['to'].class == "isRelatedTo") {
91
            let provenanceAction: string;
92
            if(relation.provenanceaction in this.orpInfo.researchResultsProvenanceVocabulary) {
93
              provenanceAction = this.orpInfo.researchResultsProvenanceVocabulary[relation.provenanceaction];
94
            } else {
95
              provenanceAction = "Other"
96
            }
97

  
98
            this.orpInfo.relatedResearchResults = this.parsingFunctions.parseRelatedResearchResults(this.orpInfo.relatedResearchResults, relation, provenanceAction);
99

  
100
          } else if(relation['to'].class == "hasAmongTopNSimilarDocuments") {
101
            this.orpInfo.similarResearchResults = this.parsingFunctions.parseSimilarResearchResults(this.orpInfo.similarResearchResults, relation);
102
          }
103
        }
104
      }
105
    }
106

  
107
    if(data[3] != null) {
108
      if(data[3].hasOwnProperty("result")) {
109
        this.orpInfo.deletedByInferenceIds = [];
110
        let length = Array.isArray(data[3]['result']) ? data[3]['result'].length : 1;
111

  
112
        for(let i=0; i<length; i++) {
113
          let result = Array.isArray(data[3]['result']) ? data[3]['result'][i] : data[3]['result'];
114
          this.orpInfo.deletedByInferenceIds.push(result.objidentifier);
115
        }
116
      }
117

  
118
      if(data[3].hasOwnProperty("instance")) {
119
        this.orpInfo.hostedBy_collectedFrom = new Array<{ "downloadName": string, "downloadUrl": string[],
120
                                                              "collectedName": string, "collectedId": string,
121
                                                              "accessMode": string[], "bestAccessMode": string,
122
                                                              "type": string, "year":string}>();
123

  
124
        this.orpInfo.types = new Array<string>();
125
        let types = new Set<string>();
126

  
127
        let counter = 0;
128
        let instance;
129

  
130
        let length = data[3]['instance'].length!=undefined ? data[3]['instance'].length : 1;
131

  
132
        for(let i=0; i<length; i++) {
133
          instance = data[3]['instance'].length!=undefined ? data[3]['instance'][i] : data[3]['instance'];
134

  
135
          this.parsingFunctions.parseTypes(this.orpInfo.types, types, instance);
136

  
137
          if(instance.hasOwnProperty("webresource")) {
138
            let url;
139
            if(instance['webresource'].length == undefined) {
140
              url = instance['webresource'].url;
141
            } else{
142
              url = instance['webresource'][0].url;
143
            }
144

  
145
            if(instance.hasOwnProperty("hostedby")) {
146
              counter = this.parsingFunctions.parseHostedBy_collectedFrom(this.orpInfo.hostedBy_collectedFrom, instance, data[0], url, counter/*, this.orpInfo.title*/, this.orpInfo.accessMode);
147
            }
148
          }
149
        }
150
      }
151
    }
152

  
153
    if(data[4] != null) {
154
      this.orpInfo.identifiers = this.parsingFunctions.parseIdentifiers(data[4]);
155
    }
156

  
157
    if(data[5] != null) {
158
      let subjectResults: [string[], Map<string, string[]>, Map<string, string[]>] = this.parsingFunctions.parseAllSubjects(data[5]);
159
      this.orpInfo.subjects = subjectResults[0];
160
      this.orpInfo.otherSubjects = subjectResults[1];
161
      this.orpInfo.classifiedSubjects = subjectResults[2];
162
    }
163

  
164
    this.orpInfo.hostedBy_collectedFrom = this.parsingFunctions.addPublisherToHostedBy_collectedFrom(
165
                this.orpInfo.hostedBy_collectedFrom, this.orpInfo.publisher,
166
                null, this.orpInfo.identifiers/*, this.orpInfo.title*/);
167

  
168
    if(data[8] != null) {
169
      this.orpInfo.contexts = this.parsingFunctions.parseContexts(data[8]);
170
    }
171

  
172
    if(data[9] != null && data[9] == "under curation") {
173
      this.orpInfo.underCurationMessage = true;
174
    } else {
175
      this.orpInfo.underCurationMessage = false;
176
    }
177

  
178
    if(data[10] != null) {
179
      if(this.orpInfo.authors == undefined) {
180
        this.orpInfo.authors = new Array<{"fullName": string, "orcid": string}>();
181
      }
182

  
183
      let authors = data[10];
184
      let length = Array.isArray(authors) ? authors.length : 1;
185

  
186
      for(let i=0; i<length; i++) {
187
        let author = Array.isArray(authors) ? authors[i] : authors;
188
        if(author) {
189
          /*if (author.ORCID && author.ORCID.indexOf(properties.orcidURL) != -1) {
190
            author.ORCID = author.ORCID.substr(properties.orcidURL.length);
191
          }*/
192
          this.orpInfo['authors'][author.rank] = {"fullName": author.content, "orcid": author.ORCID};
193
        }
194
      }
195
      this.orpInfo.authors = this.orpInfo.authors.filter(function (item) {
196
        return (item != undefined && item.fullName != undefined);
197
      });
198
    }
199

  
200
    if(data[11] != null) {
201
      this.orpInfo.languages = this.parsingFunctions.parseLanguages(data[11]);
202
    }
203
    if(data[12] != null) {
204
      this.orpInfo.countries = this.parsingFunctions.parseCountries(data[12]);
205
    }
206

  
207
    if(data[14] != null) {
208
      this.orpInfo.references = this.parsingFunctions.parseReferences(data[14]);
209
    }
210

  
211
    if(this.orpInfo.relatedResearchResults) {
212
      let self = this;
213
      this.orpInfo.relatedResearchResults.forEach(function (value, key, map) {
214
        self.orpInfo.relatedResearchResults.set(key, self.parsingFunctions.sortByPercentage(value));
215
      });
216
    }
217
    this.orpInfo.similarResearchResults = this.parsingFunctions.sortByPercentage(this.orpInfo.similarResearchResults);
218
    if(data[15] != null) {
219
      this.orpInfo.journal = {"journal": "", "issn": "", "lissn": "", "eissn": "", "issue": "", "volume": "", "start_page": "", "end_page": ""}
220

  
221
      this.orpInfo.journal['journal'] = data[15].content;
222
      this.orpInfo.journal['issn'] = data[15].issn;
223
      this.orpInfo.journal['lissn'] = data[15].lissn;
224
      this.orpInfo.journal['eissn'] = data[15].eissn;
225
      this.orpInfo.journal['issue'] = data[15].iss;
226
      this.orpInfo.journal['volume'] = data[15].vol;
227
      this.orpInfo.journal['start_page'] = data[15].sp;
228
      this.orpInfo.journal['end_page'] = data[15].ep;
229
    }
230

  
231
    return this.orpInfo;
232
  }
233
}
modules/uoa-services-library/branches/mergeResultLandingPages/ng-openaire-library/src/app/landingPages/orp/orp.component.ts
1
import {Component, Input} from '@angular/core';
2

  
3
@Component({
4
  selector: 'orp',
5
  template: `
6
    <result-landing type="orp" [piwikSiteId]="piwikSiteId" [communityId]="communityId" [activeTab]="'References'"></result-landing>
7
  `})
8

  
9
export class OrpComponent {
10
  @Input() piwikSiteId = null;
11
  @Input() communityId = null;
12

  
13
  constructor() {}
14

  
15
  ngOnInit() {}
16
}
modules/uoa-services-library/branches/mergeResultLandingPages/ng-openaire-library/src/app/landingPages/orp/orp.module.ts
1
import {NgModule} from '@angular/core';
2
import {FreeGuard} from '../../login/freeGuard.guard';
3
import {IsRouteEnabled} from "../../error/isRouteEnabled.guard";
4
import {SharedModule} from "../../shared/shared.module";
5
import {LandingModule} from '../landing-utils/landing.module';
6
import {ResultLandingModule} from '../resultLanding.module';
7
import {OrpComponent} from './orp.component';
8

  
9
@NgModule({
10
  imports: [
11
    SharedModule, LandingModule,  ResultLandingModule
12
  ],
13
  declarations: [
14
    OrpComponent
15
  ],
16
  providers: [
17
    FreeGuard, IsRouteEnabled
18
  ],
19
  exports: [
20
    OrpComponent
21
  ]
22
})
23

  
24
export class OrpModule {
25
}
modules/uoa-services-library/branches/mergeResultLandingPages/ng-openaire-library/src/app/landingPages/dataset/dataset.module.ts
1
import {NgModule} from '@angular/core';
2
import {FreeGuard} from '../../login/freeGuard.guard';
3
import {IsRouteEnabled} from "../../error/isRouteEnabled.guard";
4
import {SharedModule} from "../../shared/shared.module";
5
import {LandingModule} from '../landing-utils/landing.module';
6
import {ResultLandingModule} from '../resultLanding.module';
7
import {DatasetComponent} from './dataset.component';
8

  
9
@NgModule({
10
  imports: [
11
    SharedModule, LandingModule, ResultLandingModule
12
  ],
13
  declarations: [
14
    DatasetComponent
15
  ],
16
  providers:[
17
    FreeGuard, IsRouteEnabled
18
  ],
19
  exports: [
20
    DatasetComponent
21
  ]
22
})
23

  
24
export class DatasetModule { }
modules/uoa-services-library/branches/mergeResultLandingPages/ng-openaire-library/src/app/landingPages/dataset/dataset-routing.module.ts
1
// import { NgModule } from '@angular/core';
2
// import { RouterModule } from '@angular/router';
3
//
4
// import { DatasetComponent } from './dataset.component';
5
// import {FreeGuard} from'../../login/freeGuard.guard';
6
// import {PreviousRouteRecorder} from'../../utils/piwik/previousRouteRecorder.guard';
7
// import {IsRouteEnabled} from '../../error/isRouteEnabled.guard';
8
//
9
// @NgModule({
10
//  imports: [
11
//   RouterModule.forChild([
12
//     { path: '', component: DatasetComponent, canActivate: [FreeGuard, IsRouteEnabled], data: {
13
//         redirect: '/error'
14
//       },canDeactivate: [PreviousRouteRecorder] }
15
//   ])
16
// ]
17
// })
18
// export class DatasetRoutingModule { }
modules/uoa-services-library/branches/mergeResultLandingPages/ng-openaire-library/src/app/landingPages/dataset/dataset.component.html
1
<div id="tm-main" class=" uk-section uk-padding-remove-top uk-margin-small-top tm-middle">
2

  
3
  <div uk-grid>
4
    <div class="tm-main uk-width-1-1@s uk-width-1-1@m  uk-width-1-1@l uk-row-first ">
5
      <div class="uk-container dataset">
6
        <div *ngIf="warningMessage.length > 0" class="uk-alert uk-alert-warning  uk-margin-large-top"
7
             role="alert">{{warningMessage}}</div>
8
        <div *ngIf="errorMessage.length > 0" class="uk-alert uk-alert-danger  uk-margin-large-top"
9
             role="alert">{{errorMessage}}</div>
10
        <div [style.display]="showLoading ? 'inline' : 'none'"
11
             class="uk-animation-fade uk-margin-large-top  uk-width-1-1" role="alert"><span
12
          class="loading-gif  uk-align-center"></span></div>
13
        <helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0"
14
                [texts]="pageContents['top']"></helper>
15
        <div *ngIf="datasetInfo != null" class="uk-grid">
16

  
17

  
18
          <div class="uk-width-2-3@m uk-width-1-1@s uk-margin-bottom">
19
            <schema2jsonld *ngIf="datasetInfo.record" [data]=datasetInfo.record
20
                           [URL]="properties.baseLink+'/search/dataset?datasetId='+datasetId"></schema2jsonld>
21
            <showTitle [titleName]="datasetInfo.title"></showTitle>
22
            <p class="uk-text-large" *ngIf="datasetInfo.subtitle">
23
              <span [innerHTML]="datasetInfo.subtitle"></span>
24
            </p>
25
            <span *ngIf="datasetInfo.types && datasetInfo.types.length > 0" class="uk-label custom-label label-dataset "
26
                  title="Type">{{datasetInfo.types.join(", ")}}</span>{{" "}}
27
            <span *ngIf="datasetInfo.languages && datasetInfo.languages.length > 0"
28
                  class="uk-label custom-label  label-language "
29
                  title="Language">{{datasetInfo.languages.join(", ")}}</span>{{" "}}
30
            <span *ngIf="datasetInfo.countries && datasetInfo.countries.length > 0"
31
                  class="uk-label custom-label  label-country "
32
                  title="Country">{{datasetInfo.countries.join(", ")}}</span>{{" "}}
33

  
34
            <!-- <span *ngIf="datasetInfo.title && datasetInfo.title.accessMode" [class]="'uk-label custom-label   label-'+ datasetInfo.title.accessMode " title="Access Mode">{{datasetInfo.title.accessMode}}</span> -->
35
            <span *ngIf="datasetInfo.accessMode" [class]="'uk-label custom-label   label-'+ datasetInfo.accessMode "
36
                  title="Access Mode">{{datasetInfo.accessMode}}</span>{{" "}}
37
            <span *ngIf="datasetInfo.underCurationMessage" class="uk-label custom-label label-underCuration ">{{" "}}
38
              <span uk-tooltip="pos:right; delay:10"
39
                    title="{{buildCurationTooltip()}}">
40
              <i>Record in preview</i>
41
              <i class="uk-icon-info-circle"></i>
42
            </span></span>
43
            <!--div *ngIf="datasetInfo.underCurationMessage">
44
              <span uk-tooltip="pos:right; delay:10"
45
                    title="{{buildCurationTooltip()}}">
46
                <i>Record in preview</i>
47
                <i class="uk-icon-info-circle"></i>
48
              </span>
49
            </div-->
50

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

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

  
92
            <ul class="custom-accordion" uk-accordion>
93
              <li *ngIf="datasetInfo.references" (click)="activeTab='References'">
94
                <a class="uk-accordion-title" href="#">
95
                  References ({{datasetInfo.references.length | number}})
96
                </a>
97
                <div class="uk-accordion-content">
98
                  <div>
99
                    <div *ngIf="datasetInfo.references.length > pageSize" class="uk-margin-bottom">
100
                      <span class="uk-h6">{{datasetInfo.references.length | number}}
101
                        references, page {{referencesPage | number}}
102
                        of {{totalPages(datasetInfo.references.length) | number}}</span>
103
                      <paging-no-load class="uk-float-right" [currentPage]="referencesPage"
104
                                      [totalResults]="datasetInfo.references.length" [size]="pageSize"
105
                                      (pageChange)="updateReferencesPage($event)"></paging-no-load>
106
                    </div>
107

  
108
                    <div
109
                      *ngFor="let item of datasetInfo.references.slice((referencesPage-1)*pageSize, referencesPage*pageSize)">
110
                      <p *ngIf=" item && item['url']"
111
                         class="custom-external custom-icon">
112
                        <a href="{{item['url']}}" target="_blank">
113
                          {{item['name']}}
114
                        </a>
115
                      </p>
116
                      <p *ngIf="!item['url']" class="pseudo-external custom-icon">
117
                        {{item['name']}}
118
                      </p>
119
                    </div>
120
                  </div>
121
                </div>
122
              </li>
123

  
124
              <li *ngIf="datasetInfo.relatedResearchResults" (click)="activeTab='Related Research Results'">
125
                <a class="uk-accordion-title" href="#">
126
                  Related Research Results
127
                  <!-- <span *ngIf="!datasetInfo.relatedResearchResults" class="uk-badge uk-badge-notification">0</span>
128
                  <span *ngIf="datasetInfo.relatedResearchResults" class="uk-badge uk-badge-notification">
129
                      {{relatedResearchResultsNum | number}}
130
                  </span> -->
131
                  <!-- <span class="uk-badge uk-badge-notification"> -->
132
                  ({{relatedResearchResultsNum | number}})
133
                  <!-- </span> -->
134
                </a>
135
                <div class="uk-accordion-content">
136
                  <!-- <div *ngIf="!datasetInfo.relatedResearchResults" class = "uk-alert  uk-alert-primary">
137
                      No related research results available
138
                  </div>
139
                  <div *ngIf="datasetInfo.relatedResearchResults"> -->
140
                  <div>
141
                    <div *ngFor="let provenanceaction of getKeys(datasetInfo.relatedResearchResults)">
142
                      <div class="uk-text-large">{{provenanceaction}}</div>
143

  
144
                      <tabTable percentageName="trust"
145
                                [info]="datasetInfo.relatedResearchResults.get(provenanceaction)"
146
                                [properties]=properties></tabTable>
147
                    </div>
148
                  </div>
149
                </div>
150
              </li>
151

  
152
              <li *ngIf="datasetInfo.similarResearchResults" (click)="activeTab='Similar Research Results'">
153
                <a class="uk-accordion-title" href="#">
154
                  Similar Research Results
155
                  <!-- <span *ngIf="!datasetInfo.similarResearchResults" class="uk-badge uk-badge-notification">0</span>
156
                  <span *ngIf="datasetInfo.similarResearchResults" class="uk-badge uk-badge-notification">
157
                      {{datasetInfo.similarResearchResults.length | number}}
158
                  </span> -->
159
                  <!-- <span class="uk-badge uk-badge-notification"> -->
160
                  ({{datasetInfo.similarResearchResults.length | number}})
161
                  <!-- </span> -->
162
                </a>
163
                <div class="uk-accordion-content">
164
                  <!-- <div *ngIf="!datasetInfo.similarResearchResults" class = "uk-alert  uk-alert-primary" >
165
                      No similar research results available
166
                  </div>
167

  
168
                  <div *ngIf="datasetInfo.similarResearchResults"> -->
169
                  <div>
170
                    <tabTable percentageName="similarity" [info]="datasetInfo.similarResearchResults"
171
                              [properties]=properties></tabTable>
172
                  </div>
173
                </div>
174
              </li>
175

  
176
              <li (click)="metricsClicked=true; activeTab='Metrics'">
177
                <a class="uk-accordion-title" href="#">
178
                  Metrics
179
                </a>
180
                <div class="uk-accordion-content">
181
                  <metrics [pageViews]="pageViews"
182
                           [id]="datasetId" [entityType]="'results'" [entity]="'Research Data'"
183
                           (metricsResults)="metricsResults($event)" [properties]=properties>
184
                  </metrics>
185
                  <i-frame *ngIf="metricsClicked && totalViews > 0"
186
                           [url]=viewsFrameUrl width="100%" height="250">
187
                  </i-frame>
188
                  <i-frame *ngIf="metricsClicked && totalDownloads > 0"
189
                           [url]=downloadsFrameUrl width="100%" height="250">
190
                  </i-frame>
191
                </div>
192
              </li>
193

  
194
              <li (click)="activeTab='Other Versions'"
195
                  *ngIf="properties.environment != 'production' && datasetInfo.deletedByInferenceIds">
196
                <a class="uk-accordion-title" href="#">
197
                  Other Versions
198
                  ({{datasetInfo.deletedByInferenceIds.length | number}})
199
                </a>
200
                <div *ngIf="activeTab=='Other Versions'" class="uk-accordion-content">
201
                  <deletedByInference [id]="datasetId" [ids]="datasetInfo.deletedByInferenceIds"
202
                                      [type]="'research data'"></deletedByInference>
203
                </div>
204
              </li>
205
            </ul>
206

  
207
          </div>
208

  
209
          <div class="uk-width-1-3@m uk-width-1-1@s">
210
            <div class="  uk-padding-small" *ngIf="isRouteAvailable('participate/direct-claim') ">
211
              <button class="   uk-button portal-button   uk-width-1-1 ">
212
              <span class="uk-icon">
213
                   <svg icon="link" ratio="1" xmlns="http://www.w3.org/2000/svg" width="25" viewBox="0 0 20 20"
214
                        height="25"><path
215
                     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"
216
                     fill="none" stroke="#000" stroke-width="1.1"></path><path
217
                     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"
218
                     fill="none" stroke="#000" stroke-width="1.1"></path><path d="M7.925,11.875 L11.925,7.975"
219
                                                                               fill="none" stroke="#000"
220
                                                                               stroke-width="1.1"></path></svg>
221
                 </span> Link this dataset to...
222
              </button>
223
              <div class="  uk-text-center uk-margin-expand uk-padding-small    uk-margin-auto  default-dropdown "
224
                   uk-dropdown="mode:click">
225
                <div class="uk-grid    uk-child-width-1-3  uk-width-large ">
226
                  <div><a
227
                    [queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[datasetId,'dataset','project'])"
228
                    routerLinkActive="router-link-active" routerLink="/participate/direct-claim"
229
                  >
230
                    <button class="uk-icon-button portal-button">
231
                   <span class="uk-icon">
232
                        <svg height="20" icon="album" ratio="1" viewBox="0 0 20 20" width="20"
233
                             xmlns="http://www.w3.org/2000/svg"><rect height="1" width="10" x="5" y="2"></rect><rect
234
                          height="1" width="14" x="3" y="4"></rect><rect fill="none" height="11" stroke="#000"
235
                                                                         width="17" x="1.5" y="6.5"></rect></svg></span>
236
                    </button>
237
                    <div>Projects</div>
238
                  </a></div>
239
                  <div><a
240
                    [queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[datasetId,'dataset','result'])"
241
                    routerLinkActive="router-link-active" routerLink="/participate/direct-claim">
242
                    <button class="uk-icon-button portal-button">
243
                      <span class="uk-icon">
244
                           <svg height="20" icon="copy" ratio="1" viewBox="0 0 20 20" width="20"
245
                                xmlns="http://www.w3.org/2000/svg"><rect fill="none" height="16" stroke="#000"
246
                                                                         width="12" x="3.5" y="2.5"></rect><polyline
247
                             fill="none" points="5 0.5 17.5 0.5 17.5 17" stroke="#000"></polyline></svg></span>
248
                    </button>
249
                    <div>Research results</div>
250
                  </a></div>
251
                  <div><a
252
                    [queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[datasetId,'dataset','context'])"
253
                    routerLinkActive="router-link-active" routerLink="/participate/direct-claim">
254
                    <button class="uk-icon-button portal-button">
255
                <span class="uk-icon">
256
                           <svg height="20" icon="users" ratio="1" viewBox="0 0 20 20" width="20"
257
                                xmlns="http://www.w3.org/2000/svg"><circle cx="7.7" cy="8.6" fill="none" r="3.5"
258
                                                                           stroke="#000" stroke-width="1.1"></circle><path
259
                             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"
260
                             stroke="#000" stroke-width="1.1"></path><path
261
                             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"
262
                             fill="none" stroke="#000" stroke-width="1.1"></path></svg></span>
263
                    </button>
264
                    <div>Communities</div>
265
                  </a></div>
266
                </div>
267
              </div>
268
            </div>
269
              <div>
270
                <div class="sideInfoTitle uk-margin-small-bottom uk-margin-small-top">Share - Bookmark</div>
271
                <addThis></addThis>
272

  
273
              </div>
274

  
275

  
276

  
277
                  <altmetrics *ngIf="datasetInfo.identifiers && datasetInfo.identifiers.get('doi')"
278
                              id="{{datasetInfo.identifiers.get('doi')[0]}}" type="doi">
279
                  </altmetrics>
280
                  <ul class="uk-list uk-margin-remove-bottom ">
281

  
282
                    <li *ngIf="datasetInfo.hostedBy_collectedFrom && datasetInfo.hostedBy_collectedFrom.length > 0">
283
                      <availableOn [availableOn]="datasetInfo.hostedBy_collectedFrom"></availableOn>
284
                    </li>
285
                    <li *ngIf="datasetInfo.fundedByProjects != undefined && datasetInfo.fundedByProjects.length > 0">
286
                      <fundedBy [fundedByProjects]="datasetInfo.fundedByProjects"></fundedBy>
287
                    </li>
288

  
289
                    <li *ngIf="datasetInfo.contexts && datasetInfo.contexts.length >0 ">
290
                      <dl class="uk-description-list-line">
291
                        <dt class="sideInfoTitle">Related to</dt>
292
                        <dd class="line" *ngFor="let item of datasetInfo.contexts">
293
                          <span *ngIf="!item['inline']">
294
                            <span>{{item['labelContext']}}</span>
295
                            <span *ngIf="item['labelCategory']">-> {{item['labelCategory']}}</span>
296
                            <span *ngIf="item['labelConcept']">: {{item['labelConcept']}}</span>
297
                          </span>
298
                          <mark *ngIf="item['inline']">
299
                            <span>{{item['labelContext']}}</span>
300
                            <span *ngIf="item['labelCategory']">-> {{item['labelCategory']}}</span>
301
                            <span *ngIf="item['labelConcept']">: {{item['labelConcept']}}</span>
302
                          </mark>
303
                        </dd>
304

  
305
                      </dl>
306

  
307
                    </li>
308

  
309
                    <!--li>
310
                      <metrics [pageViews]="pageViews" shortView=true
311
                          [id]="datasetId" [entityType]="'results'" [entity]="'Research Data'"
312
                          (metricsResults)="metricsResults($event)" [(properties)] = properties>
313
                      </metrics>
314
                    </li-->
315

  
316
                    <li>
317

  
318
                      <div class="sideInfoTitle   cite-this-button uk-width-1-1" type="button">
319
                        Cite this research data
320
                      </div>
321
                      <div class=" ">
322
                        <citeThis [result]="datasetInfo" [id]="datasetId" type="research data"></citeThis>
323
                      </div>
324

  
325
                    </li>
326

  
327
                  </ul>
328

  
329

  
330

  
331

  
332
                </div>
333
              </div>
334
            </div>
335
          </div>
336
          <helper *ngIf="pageContents && pageContents['bottom'] && pageContents['bottom'].length > 0"
337
                  [texts]="pageContents['bottom']" styleName="uk-width-1-1"></helper>
338
        </div>
339

  
340
        <helper *ngIf="pageContents && pageContents['bottom'] && pageContents['bottom'].length > 0"
341
                [texts]="pageContents['bottom']"></helper>
342
      </div>
modules/uoa-services-library/branches/mergeResultLandingPages/ng-openaire-library/src/app/landingPages/dataset/dataset.service.ts
1
import {Injectable} from '@angular/core';
2
import {Http, Response} from '@angular/http';
3
import {HttpClient, HttpErrorResponse} from "@angular/common/http";
4
import {Observable, throwError} from 'rxjs';
5
import {DatasetInfo} from '../../utils/entities/datasetInfo';
6

  
7

  
8

  
9
import{EnvProperties} from '../../utils/properties/env-properties';
10

  
11
import { ParsingFunctions } from '../landing-utils/parsingFunctions.class';
12
import {map} from "rxjs/operators";
13

  
14
@Injectable()
15
export class DatasetService {
16

  
17
  constructor(private http: HttpClient ) {
18
    this.parsingFunctions = new ParsingFunctions();
19
  }
20

  
21
  public parsingFunctions: ParsingFunctions;
22
  datasetInfo: DatasetInfo;
23

  
24
  getDatasetInfo (id: string, properties:EnvProperties):any {
25

  
26
    let url = properties.searchAPIURLLAst+'datasets/'+id+"?format=json";
27
    let key = url;
28

  
29

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

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

  
61
  parseDatasetInfo (data: any, properties: EnvProperties):any {
62
    this.datasetInfo = new DatasetInfo();
63
    this.datasetInfo.record = data[13];
64
    // ['result']['metadata']['oaf:entity']['oaf:result']
65
    if(data[0] != null) {
66
      var date:string = (data[0].dateofacceptance)+""; // transform to string in case it is an integer
67
      this.datasetInfo.date  = (date && (date).indexOf('-') !== -1)?date.split('-')[0]:date;
68
      this.datasetInfo.dateofacceptance = data[0].dateofacceptance;
69
      this.datasetInfo.publisher = data[0].publisher;
70
      if(!Array.isArray(data[0].description)) {
71
        this.datasetInfo.description = String(data[0].description);
72
      } else {
73
        this.datasetInfo.description = String(data[0].description[0]);
74
      }
75
      this.datasetInfo.embargoEndDate = data[0].embargoenddate;
76
    }
77
    /*this.datasetInfo.title = {"name": "", "url": "", "accessMode": ""};
78
    if(data[0]['bestaccessright'] && data[0]['bestaccessright'].hasOwnProperty("classid")) {
79
      this.datasetInfo.title.accessMode = data[0]['bestaccessright'].classid;
80
    }
81
    if(data[1] != null) {
82
      if(Array.isArray(data[1])) {
83
        this.datasetInfo.title['name'] = data[1][0].content;
84
      } else {
85
        this.datasetInfo.title['name'] = data[1].content;
86
      }
87
    }*/
88
    if(data[0]['bestaccessright'] && data[0]['bestaccessright'].hasOwnProperty("classid")) {
89
      this.datasetInfo.accessMode = data[0]['bestaccessright'].classid;
90
    }
91
    // ['result']['metadata']['oaf:entity']['oaf:result']['title']
92
    if(data[1] != null) {
93
      if(Array.isArray(data[1])) {
94
        this.datasetInfo.title = String(data[1][0].content);
95
        if(data[1][1].classid == "subtitle") {
96
          this.datasetInfo.subtitle = String(data[1][1].content);
97
        }
98
      } else {
99
        this.datasetInfo.title = String(data[1].content);
100
      }
101
    }
102

  
103
    // ['result']['metadata']['oaf:entity']['oaf:result']['rels']['rel']
104
    if(data[2] != null) {
105
      let relation;
106
      let length = data[2].length!=undefined ? data[2].length : 1;
107

  
108
      for(let i=0; i<length; i++) {
109
        relation = data[2].length!=undefined ? data[2][i] : data[2];
110
        if(relation.hasOwnProperty("to")) {
111
          if(relation['to'].class == "isProducedBy") {
112
            this.datasetInfo.fundedByProjects = this.parsingFunctions.parseFundingByProjects(this.datasetInfo.fundedByProjects, relation, this.datasetInfo.projectsProvenanceVocabulary);
113
          } else if(relation['to'].class == "isRelatedTo") {
114
            let provenanceAction: string;
115
            if(relation.provenanceaction in this.datasetInfo.researchResultsProvenanceVocabulary) {
116
              provenanceAction = this.datasetInfo.researchResultsProvenanceVocabulary[relation.provenanceaction];
117
            } else {
118
              provenanceAction = "Other"
119
            }
120

  
121
            this.datasetInfo.relatedResearchResults = this.parsingFunctions.parseRelatedResearchResults(this.datasetInfo.relatedResearchResults, relation, provenanceAction);
122

  
123
          } else if(relation['to'].class == "hasAmongTopNSimilarDocuments") {
124
            this.datasetInfo.similarResearchResults = this.parsingFunctions.parseSimilarResearchResults(this.datasetInfo.similarResearchResults, relation);
125
          }
126
        }
127
      }
128
    }
129

  
130
    // ['result']['metadata']['oaf:entity']['oaf:result']['children']
131
    if(data[3] != null) {
132
      if(data[3].hasOwnProperty("result")) {
133
        this.datasetInfo.deletedByInferenceIds = [];
134
        let length = Array.isArray(data[3]['result']) ? data[3]['result'].length : 1;
135

  
136
        for(let i=0; i<length; i++) {
137
          let result = Array.isArray(data[3]['result']) ? data[3]['result'][i] : data[3]['result'];
138
          this.datasetInfo.deletedByInferenceIds.push(result.objidentifier);
139
        }
140
      }
141

  
142
      if(data[3].hasOwnProperty("instance")) {
143
        this.datasetInfo.hostedBy_collectedFrom = new Array<{ "downloadName": string, "downloadUrl": string[],
144
                                                              "collectedName": string, "collectedId": string,
145
                                                              "accessMode": string[], "bestAccessMode": string,
146
                                                              "type": string, "year":string}>();
147

  
148
        this.datasetInfo.types = new Array<string>();
149
        let types = new Set<string>();
150

  
151
        let counter = 0;
152
        let instance;
153

  
154
        let length = data[3]['instance'].length!=undefined ? data[3]['instance'].length : 1;
155

  
156
        for(let i=0; i<length; i++) {
157
          instance = data[3]['instance'].length!=undefined ? data[3]['instance'][i] : data[3]['instance'];
158

  
159
          this.parsingFunctions.parseTypes(this.datasetInfo.types, types, instance);
160

  
161
          if(instance.hasOwnProperty("webresource")) {
162
            let url;
163
            if(instance['webresource'].length == undefined) {
164
              url = instance['webresource'].url;
165
            } else{
166
              url = instance['webresource'][0].url;
167
            }
168

  
169
            if(instance.hasOwnProperty("hostedby")) {
170
              counter = this.parsingFunctions.parseHostedBy_collectedFrom(this.datasetInfo.hostedBy_collectedFrom, instance, data[0], url, counter/*, this.datasetInfo.title*/, this.datasetInfo.accessMode);
171
            }
172
          }
173
        }
174
      }
175
    }
176

  
177
    // ['result']['metadata']['oaf:entity']['oaf:result']['pid']
178
    if(data[4] != null) {
179
      this.datasetInfo.identifiers = this.parsingFunctions.parseIdentifiers(data[4]);
180
    }
181

  
182
    // ['result']['metadata']['oaf:entity']['oaf:result']['subject']
183
    if(data[5] != null) {
184
      let subjectResults: [string[], Map<string, string[]>, Map<string, string[]>] = this.parsingFunctions.parseAllSubjects(data[5]);
185
      this.datasetInfo.subjects = subjectResults[0];
186
      this.datasetInfo.otherSubjects = subjectResults[1];
187
      this.datasetInfo.classifiedSubjects = subjectResults[2];
188
    }
189

  
190
    this.datasetInfo.hostedBy_collectedFrom = this.parsingFunctions.addPublisherToHostedBy_collectedFrom(
191
                this.datasetInfo.hostedBy_collectedFrom, this.datasetInfo.publisher,
192
                null, this.datasetInfo.identifiers/*, this.datasetInfo.title*/);
193

  
194
    // ['result']['metadata']['oaf:entity']['oaf:result']['context']
195
    if(data[8] != null) {
196
      this.datasetInfo.contexts = this.parsingFunctions.parseContexts(data[8]);
197
    }
198

  
199
    // if(data[9] != null && this.datasetInfo.type == undefined) {
200
    //   if(data[9].hasOwnProperty('classname')) {
201
    //     this.datasetInfo.type = data[9].classname;
202
    //   }
203
    // }
204

  
205
    // ['result']['header']['dri:status']
206
    if(data[9] != null && data[9] == "under curation") {
207
      this.datasetInfo.underCurationMessage = true;
208
    } else {
209
      this.datasetInfo.underCurationMessage = false;
210
    }
211

  
212
    // ['result']['metadata']['oaf:entity']['oaf:result']['creator']
213
    if(data[10] != null) {
214
      if(this.datasetInfo.authors == undefined) {
215
        this.datasetInfo.authors = new Array<{"fullName": string, "orcid": string}>();
216
      }
217

  
218
      let authors = data[10];
219
      let length = Array.isArray(authors) ? authors.length : 1;
220

  
221
      for(let i=0; i<length; i++) {
222
        let author = Array.isArray(authors) ? authors[i] : authors;
223
        if(author) {
224
          /*if (author.ORCID && author.ORCID.indexOf(properties.orcidURL) != -1) {
225
            author.ORCID = author.ORCID.substr(properties.orcidURL.length);
226
          }*/
227
          this.datasetInfo['authors'][author.rank] = {"fullName": author.content, "orcid": author.ORCID};
228
        }
229
      }
230
      this.datasetInfo.authors = this.datasetInfo.authors.filter(function (item) {
231
        return (item != undefined && item.fullName != undefined);
232
      });
233
    }
234

  
235
    // ['result']['metadata']['oaf:entity']['oaf:result']['language']
236
    if(data[11] != null) {
237
      this.datasetInfo.languages = this.parsingFunctions.parseLanguages(data[11]);
238
    }
239
    // ['result']['metadata']['oaf:entity']['oaf:result']['country']
240
    if(data[12] != null) {
241
      this.datasetInfo.countries = this.parsingFunctions.parseCountries(data[12]);
242
    }
243

  
244
    // ['result']['metadata']['oaf:entity']['oaf:result']['extraInfo']['citations']['citation']
245
    if(data[14] != null) {
246
      this.datasetInfo.references = this.parsingFunctions.parseReferences(data[14]);
247
    }
248

  
249
    if(this.datasetInfo.relatedResearchResults) {
250
      let self = this;
251
      this.datasetInfo.relatedResearchResults.forEach(function (value, key, map) {
252
        self.datasetInfo.relatedResearchResults.set(key, self.parsingFunctions.sortByPercentage(value));
253
      });
254
    }
255
    this.datasetInfo.similarResearchResults = this.parsingFunctions.sortByPercentage(this.datasetInfo.similarResearchResults);
256
    if(data[15] != null) {
257
      this.datasetInfo.journal = {"journal": "", "issn": "", "lissn": "", "eissn": "", "issue": "", "volume": "", "start_page": "", "end_page": ""}
258

  
259
      this.datasetInfo.journal['journal'] = data[15].content;
260
      this.datasetInfo.journal['issn'] = data[15].issn;
261
      this.datasetInfo.journal['lissn'] = data[15].lissn;
262
      this.datasetInfo.journal['eissn'] = data[15].eissn;
263
      this.datasetInfo.journal['issue'] = data[15].iss;
264
      this.datasetInfo.journal['volume'] = data[15].vol;
265
      this.datasetInfo.journal['start_page'] = data[15].sp;
266
      this.datasetInfo.journal['end_page'] = data[15].ep;
267
    }
268

  
269
    return this.datasetInfo;
270
  }
271
}
modules/uoa-services-library/branches/mergeResultLandingPages/ng-openaire-library/src/app/landingPages/dataset/dataset.component.ts
1
import {Component, Input} from '@angular/core';
2

  
3
@Component({
4
  selector: 'dataset',
5
  template: `
6
    <result-landing type="dataset" [piwikSiteId]="piwikSiteId" [communityId]="communityId" [activeTab]="'References'"></result-landing>
7
  `})
8

  
9
export class DatasetComponent {
10
  @Input() piwikSiteId = null;
11
  @Input() communityId = null;
12

  
13
  constructor() {}
14

  
15
  ngOnInit() {}
16
}
modules/uoa-services-library/branches/mergeResultLandingPages/ng-openaire-library/src/app/landingPages/publication/publication-routing.module.ts
1
// import { NgModule } from '@angular/core';
2
// import { RouterModule } from '@angular/router';
3
//
4
// import { PublicationComponent } from './publication.component';
5
// import {FreeGuard} from'../../login/freeGuard.guard';
6
// import {PreviousRouteRecorder} from'../../utils/piwik/previousRouteRecorder.guard';
7
// import {IsRouteEnabled} from '../../error/isRouteEnabled.guard';
8
//
9
// @NgModule({
10
//  imports: [
11
//   RouterModule.forChild([
12
//     { path: '', component: PublicationComponent, canActivate: [FreeGuard, IsRouteEnabled], data: {
13
//         redirect: '/error'
14
//       },canDeactivate: [PreviousRouteRecorder]  }
15
//   ])
16
// ]
17
// })
18
// export class PublicationRoutingModule { }
modules/uoa-services-library/branches/mergeResultLandingPages/ng-openaire-library/src/app/landingPages/publication/publication.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

  
5
      <div class="uk-container publication">
6
        <div *ngIf="warningMessage.length > 0" class="uk-alert uk-alert-warning  uk-margin-large-top"
7
             role="alert">{{warningMessage}}</div>
8
        <div *ngIf="errorMessage.length > 0" class="uk-alert uk-alert-danger  uk-margin-large-top"
9
             role="alert">{{errorMessage}}</div>
10
        <div [style.display]="showLoading ? 'inline' : 'none'"
11
             class="uk-animation-fade uk-margin-large-top  uk-width-1-1" role="alert"><span
12
          class="loading-gif  uk-align-center"></span></div>
13
        <helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0"
14
                [texts]="pageContents['top']"></helper>
15
        <div *ngIf="publicationInfo != null"  class="uk-grid">
16

  
17
          <div class="uk-width-2-3@m uk-width-1-1@s  uk-margin-bottom">
18
            <schema2jsonld *ngIf="publicationInfo.record" [data]=publicationInfo.record
19
                           [URL]="properties.baseLink+'/search/publication?articleId='+articleId"></schema2jsonld>
20
            <showTitle [titleName]="publicationInfo.title"></showTitle>
21
            <span *ngIf="publicationInfo.types && publicationInfo.types.length > 0"
22
                  class="uk-label custom-label label-blue label-publication"
23
                  title="Type">{{publicationInfo.types.join(", ")}}</span>{{" "}}
24
            <span *ngIf="publicationInfo.languages && publicationInfo.languages.length > 0"
25
                  class="uk-label custom-label  label-language "
26
                  title="Language">{{publicationInfo.languages.join(", ")}}</span>{{" "}}
27
            <span *ngIf="publicationInfo.countries && publicationInfo.countries.length > 0"
28
                  class="uk-label custom-label  label-country "
29
                  title="Country">{{publicationInfo.countries.join(", ")}}</span>{{" "}}
30
            <!-- <span *ngIf="publicationInfo.title && publicationInfo.title.accessMode" [class]="'uk-label custom-label  label-'+ publicationInfo.title.accessMode ">{{publicationInfo.title.accessMode}}</span> -->
31
            <span *ngIf="publicationInfo.accessMode"
32
                  [class]="'uk-label custom-label  label-'+ publicationInfo.accessMode "
33
                  title="Access Mode">{{publicationInfo.accessMode}}</span>{{" "}}
34

  
35
            <span *ngIf="publicationInfo.underCurationMessage" class="uk-label custom-label label-underCuration">
36
              <span uk-tooltip="pos:right; delay:10"
37
                    title="{{buildCurationTooltip()}}">
38
              <i>Record in preview</i>
39
              <i class="uk-icon-info-circle"></i>
40
            </span></span>{{" "}}
41

  
42

  
43
            <div class=" uk-margin-top">
44
              <showAuthors [authors]="publicationInfo.authors"></showAuthors>
45
              <span *ngIf="publicationInfo.date != ''">({{publicationInfo.date}})</span>
46
            </div>
47

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

  
91

  
92
            <ul class="custom-accordion" uk-accordion>
93

  
94
              <li *ngIf="publicationInfo.references" (click)="activeTab='References'">
95
                <a class="uk-accordion-title" href="#">
96
                  References
97
                  <!-- <span *ngIf="!publicationInfo.references" class="uk-badge uk-badge-notification">0</span>
98
                  <span *ngIf="publicationInfo.references" class="uk-badge uk-badge-notification">
99
                      {{publicationInfo.references.length | number}}
100
                  </span> -->
101
                  <!-- <span class="uk-badge uk-badge-notification"> -->
102
                  ({{publicationInfo.references.length | number}})
103
                  <!-- </span> -->
104
                </a>
105
                <div class="uk-accordion-content">
106
                  <!-- <div *ngIf="!publicationInfo.references" class = "uk-alert  uk-alert-primary" >
107
                      No references available
108
                  </div>
109

  
110
                  <div *ngIf="publicationInfo.references"> -->
111
                  <div>
112
                    <div *ngIf="publicationInfo.references.length > pageSize" class="uk-margin-bottom">
113
                      <span class="uk-h6">{{publicationInfo.references.length | number}}
114
                        references, page {{referencesPage | number}}
115
                        of {{totalPages(publicationInfo.references.length) | number}}</span>
116
                      <paging-no-load class="uk-float-right" [currentPage]="referencesPage"
117
                                      [totalResults]="publicationInfo.references.length" [size]="pageSize"
118
                                      (pageChange)="updateReferencesPage($event)"></paging-no-load>
119
                    </div>
120

  
121
                    <div
122
                      *ngFor="let item of publicationInfo.references.slice((referencesPage-1)*pageSize, referencesPage*pageSize)">
123
                      <p *ngIf=" item && item['url']"
124
                         class="custom-external custom-icon">
125
                        <a href="{{item['url']}}" target="_blank">
126
                          {{item['name']}}
127
                        </a>
128
                      </p>
129
                      <p *ngIf="!item['url']" class="pseudo-external custom-icon">
130
                        {{item['name']}}
131
                      </p>
132
                    </div>
133
                  </div>
134
                </div>
135
              </li>
136

  
137
              <li *ngIf="publicationInfo.relatedResearchResults" (click)="activeTab='Related Research Results'">
138
                <a class="uk-accordion-title" href="#">
139
                  Related Research Results
140
                  <!-- <span *ngIf="!publicationInfo.relatedResearchResults" class="uk-badge uk-badge-notification">0</span>
141
                  <span *ngIf="publicationInfo.relatedResearchResults" class="uk-badge uk-badge-notification">
142
                      {{relatedResearchResultsNum | number}}
143
                  </span> -->
144
                  <!-- <span class="uk-badge uk-badge-notification"> -->
145
                  ({{relatedResearchResultsNum | number}})
146
                  <!-- </span> -->
147
                </a>
148
                <div class="uk-accordion-content">
149
                  <!-- <div *ngIf="!publicationInfo.relatedResearchResults" class = "uk-alert  uk-alert-primary">
150
                      No related research results available
151
                  </div>
152
                  <div *ngIf="publicationInfo.relatedResearchResults"> -->
153
                  <div>
154
                    <div *ngFor="let provenanceaction of getKeys(publicationInfo.relatedResearchResults)">
155
                      <div class="uk-text-large">{{provenanceaction}}</div>
156

  
157
                      <tabTable percentageName="trust"
158
                                [info]="publicationInfo.relatedResearchResults.get(provenanceaction)"
159
                                [properties]=properties></tabTable>
160
                    </div>
161
                  </div>
162
                </div>
163
              </li>
164

  
165
              <li *ngIf="publicationInfo.similarResearchResults" (click)="activeTab='Similar Research Results'">
166
                <a class="uk-accordion-title" href="#">
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff