Project

General

Profile

« Previous | Next » 

Revision 58284

[Trunk | Library]
1. result-preview.component.html: [Bug fix] fixes in spaces between comma separated values.
2. dataProviderInfo.ts & dataProvider.service.ts: Add and parse also acronym for "organizations".
3. searchProjects.service.ts & searchDataproviders.service.ts: If organization has no name, add "[no title available]".
4. dataProvider.component.ts: initialize "showNumOrganizations" to 20 | [Bug fix] Initialize and count all tabs no matter what the type is.
5. dataProvider.component.html:
a. Show acronym for organizations and name in tooltip |
b. [Bug fix] date for "Last update of records in OpenAIRE" under the card in right column of page.
c. [Bug fix] In statisticsTab pass inputs for fetchSoftware and fetchOther.
6. statisticsTab.component.ts: [Bug fix] New inputs for fetchSoftware and fetchOther - pass their status in errorMessages | no checks for showing charts (needs more investigation).
7. project.component.html:
a. [Bug fix] date for "Last update of records in OpenAIRE" under the card in right column of page.
b. [Bug fix] For statistics check also fetchSoftware and fetchOther.

View differences:

modules/uoa-services-library/trunk/ng-openaire-library/src/app/services/searchDataproviders.service.ts
401 401
                            } else {
402 402
                              item['name'] = relation.legalname;
403 403
                            }
404
                            if(!item['name']) {
405
                              item['name'] = "[no title available]";
406
                            }
404 407
                            item['id'] = /*OpenaireProperties.getsearchLinkToOrganization()+*/relation['to'].content;
405 408
                            organizations.push(item);
406 409
                        }
modules/uoa-services-library/trunk/ng-openaire-library/src/app/services/searchProjects.service.ts
190 190
                            } else {
191 191
                              result['organizations'][countOrganizations]['name'] = relation.legalname;
192 192
                            }
193
                            if(!result['organizations'][countOrganizations]['name']) {
194
                              result['organizations'][countOrganizations]['name'] = "[no title available]";
195
                            }
193 196
                        }
194 197
                    }
195 198
                }
modules/uoa-services-library/trunk/ng-openaire-library/src/app/landingPages/dataProvider/statisticsTab.component.ts
7 7
@Component({
8 8
    selector: 'statisticsTab',
9 9
    template: `
10
      <errorMessages [status]="[fetchPublications.searchUtils.status, fetchDatasets.searchUtils.status]" [type]="'statistics'" tab_error_class=true></errorMessages>
10
      <errorMessages [status]="[fetchPublications.searchUtils.status, fetchDatasets.searchUtils.status,
11
                                fetchSoftware.searchUtils.status, fetchOther.searchUtils.status]" 
12
                     [type]="'statistics'" tab_error_class=true></errorMessages>
11 13

  
12
      <ng-container *ngIf="(fetchPublications.searchUtils.status == errorCodes.DONE || fetchDatasets.searchUtils.status == errorCodes.DONE)">
14
<!--      <ng-container *ngIf="(fetchPublications.searchUtils.status == errorCodes.DONE -->
15
<!--                            || fetchDatasets.searchUtils.status == errorCodes.DONE-->
16
<!--                            || fetchSoftware.searchUtils.status == errorCodes.DONE-->
17
<!--                            || fetchOther.searchUtils.status == errorCodes.DONE)">-->
13 18
        <div class="uk-padding uk-padding-remove-top">
14 19
          <span class="uk-text-bold uk-text-small">Research Results Timeline</span>
15 20
          <i-frame  [url]=docsTimelineUrl ></i-frame>
......
18 23
          <span class="uk-text-bold uk-text-small">Research Results Types</span>
19 24
          <i-frame [url]=docsTypesUrl ></i-frame>
20 25
        </div>
21
      </ng-container>
26
<!--      </ng-container>-->
22 27

  
23
      <div *ngIf="fetchPublications.searchUtils.totalResults > 0 || (fetchDatasets.searchUtils.totalResults > 0)"
28
<!--      <div *ngIf="fetchPublications.searchUtils.totalResults > 0 || (fetchDatasets.searchUtils.totalResults > 0-->
29
<!--                  || fetchSoftware.searchUtils.totalResults > 0 || fetchOther.searchUtils.totalResults > 0)"-->
30
      <div
24 31
            class="uk-padding uk-padding-remove-top">
25 32
        <span class="uk-text-bold uk-text-small">Funders in Research Results of content provider</span>
26 33
        <i-frame  [url]=docsFunderUrl ></i-frame>
27 34
      </div>
28 35

  
29
      <div *ngIf="fetchPublications.searchUtils.totalResults > 0 "
36
<!--      <div *ngIf="fetchPublications.searchUtils.totalResults > 0 "-->
37
      <div
30 38
            class="uk-padding uk-padding-remove-top">
31 39
        <span class="uk-text-bold uk-text-small">Projects with most Publications</span>
32 40
        <i-frame [url]=pubsProjectsUrl ></i-frame>
33 41
      </div>
34 42

  
35
      <div *ngIf="(fetchDatasets.searchUtils.totalResults > 0)"
43
<!--      <div *ngIf="(fetchDatasets.searchUtils.totalResults > 0)"-->
44
      <div
36 45
            class="uk-padding uk-padding-remove-top">
37 46
        <span class="uk-text-bold uk-text-small">Projects with most Research Data</span>
38 47
        <i-frame  [url]=dataProjectsUrl></i-frame>
......
44 53
    @Input() datasourceId;
45 54
    @Input() fetchPublications : FetchResearchResults;
46 55
    @Input() fetchDatasets : FetchResearchResults;
56
    @Input() fetchSoftware: FetchResearchResults;
57
    @Input() fetchOther: FetchResearchResults;
47 58

  
48 59
    private docsTimelineUrl: string;
49 60
    private docsTypesUrl:string;
modules/uoa-services-library/trunk/ng-openaire-library/src/app/landingPages/dataProvider/dataProvider.component.html
122 122
                </span>
123 123
              </li>
124 124
              <!-- Organizations -->
125
              <li *ngIf="dataProviderInfo.organizations && dataProviderInfo.organizations.length > 0" class="uk-margin-small-bottom">
125
<!--              <li *ngIf="dataProviderInfo.organizations && dataProviderInfo.organizations.length > 0" class="uk-margin-small-bottom">-->
126
<!--                <div class="uk-height-max-medium uk-overflow-auto">-->
127
<!--                  <span class="uk-text-muted">Organizations: </span>-->
128
<!--                  <span *ngFor="let organization of dataProviderInfo.organizations.slice(0, showNumOrganizations) let i=index">-->
129
<!--                    <a *ngIf="organization.id"-->
130
<!--                       [queryParams]="{organizationId: organization.id}" routerLinkActive="router-link-active"-->
131
<!--                       routerLink="/search/organization">-->
132
<!--                      <u>{{organization.name}}</u>-->
133
<!--                    </a>-->
134
<!--                    <span *ngIf="!organization.id">-->
135
<!--                      <span>{{organization.name}}</span>-->
136
<!--                      <span *ngIf="(i < dataProviderInfo.organizations.length-1)">,</span>-->
137
<!--                    </span>-->
138
<!--                    <span *ngIf="(i < dataProviderInfo.organizations.length-1)">, </span>-->
139
<!--                  </span>-->
140
<!--                  <span *ngIf="showNumOrganizations == thresholdOrganizations &&  dataProviderInfo.organizations.length > thresholdOrganizations">	... </span>-->
141
<!--                </div>-->
142
<!--                <div *ngIf="showNumOrganizations == thresholdOrganizations && dataProviderInfo.organizations.length > thresholdOrganizations"-->
143
<!--                     class="uk-width-1-1 uk-text-right">-->
144
<!--                  <a (click)="showNumOrganizations = dataProviderInfo.organizations.length;">-->
145
<!--                    View all {{dataProviderInfo.organizations.length | number}} organizations-->
146
<!--                  </a>-->
147
<!--                </div>-->
148
<!--                <div *ngIf="showNumOrganizations > thresholdOrganizations" class="uk-width-1-1 uk-text-right">-->
149
<!--                  <a (click)="showNumOrganizations = thresholdOrganizations;">View less organizations</a>-->
150
<!--                </div>-->
151
<!--              </li>-->
152
              <li *ngIf="dataProviderInfo.organizations && dataProviderInfo.organizations.length > 0" class="uk-margin-bottom">
126 153
                <div class="uk-height-max-medium uk-overflow-auto">
127 154
                  <span class="uk-text-muted">Organizations: </span>
128
                  <span *ngFor="let organization of dataProviderInfo.organizations.slice(0, showNumOrganizations) let i=index">
155
                  <span *ngFor="let organization of dataProviderInfo.organizations.slice(0, showNumOrganizations) let i=index"
156
                        [attr.uk-tooltip]="organization.acronym && organization.name ? 'pos:right; delay:10' : 'cls: uk-invisible'"
157
                        [title]="organization.name">
129 158
                    <a *ngIf="organization.id"
130 159
                       [queryParams]="{organizationId: organization.id}" routerLinkActive="router-link-active"
131 160
                       routerLink="/search/organization">
132
                      <u>{{organization.name}}</u>
161
                      <u>{{(organization.acronym) ? organization.acronym : ''}}</u>
162
                      <u>{{(!organization.acronym && organization.name) ? organization.name : ''}}</u>
133 163
                    </a>
134 164
                    <span *ngIf="!organization.id">
135
                      <span>{{organization.name}}</span>
165
                      <span *ngIf="organization.acronym">{{organization.acronym}}</span>
166
                      <span *ngIf="!organization.acronym && organization.name">{{organization.name}}</span>
136 167
                      <span *ngIf="(i < dataProviderInfo.organizations.length-1)">,</span>
137 168
                    </span>
138 169
                    <span *ngIf="(i < dataProviderInfo.organizations.length-1)">, </span>
......
559 590
<!--                  <div></div>&lt;!&ndash; OpenAIRE Metrics &ndash;&gt;-->
560 591
<!--                </div>-->
561 592
<!--              </div>-->
562
              <div class="uk-margin-small-top uk-text-muted uk-text-small uk-text-right">
563
                Last update of records in OpenAIRE: {{indexUpdateDate | date: 'MMM dd, yyyy'}}
564
              </div>
565 593
            </div>
594
            <div class="uk-margin-small-top uk-text-muted uk-text-small uk-text-right">
595
              Last update of records in OpenAIRE: {{indexUpdateDate | date: 'MMM dd, yyyy'}}
596
            </div>
566 597
          </div>
567 598
        </div>
568 599
        <helper *ngIf="pageContents && pageContents['bottom'] && pageContents['bottom'].length > 0"
......
574 605
            [properties]="properties" [entityType]="'content provider'" [fields]="feedbackFields"
575 606
            [showForm]="showFeedback" (show)="showFeedback = $event"></feedback>
576 607
  <!-- Statistics -->
577
  <modal-alert *ngIf="dataProviderInfo && dataProviderInfo.tabs2 && dataProviderInfo.tabs2.indexOf('Statistics') != -1"
608
<!--   && dataProviderInfo.tabs2 && dataProviderInfo.tabs2.indexOf('Statistics') != -1-->
609
  <modal-alert *ngIf="dataProviderInfo"
578 610
               classBody="uk-width-xxlarge uk-padding-remove-right" #statisticsModal>
579 611
    <landing-header [properties]="properties" [title]="dataProviderInfo.title.name"
580 612
                    [subTitle]="(dataProviderInfo.officialName
......
584 616
    </landing-header>
585 617
    <div *ngIf="statsClicked" class="uk-margin-medium-top uk-margin-medium-right">
586 618
      <statisticsTab [fetchPublications]="fetchPublications" [fetchDatasets]="fetchDatasets"
619
                     [fetchSoftware]="fetchSoftware" [fetchOther]="fetchOrps"
587 620
                     [datasourceId]="datasourceId"></statisticsTab>
588 621
    </div>
589 622
  </modal-alert>
modules/uoa-services-library/trunk/ng-openaire-library/src/app/landingPages/dataProvider/dataProvider.service.ts
231 231
                            countriesSet = new Set<string>();
232 232
                        }
233 233

  
234
                        this.dataProviderInfo.organizations[counter] = {"name": "", "id": ""};
235
                        this.dataProviderInfo.organizations[counter]['name'] = (mydata.legalname ? mydata.legalname : "[no title available");
234
                        this.dataProviderInfo.organizations[counter] = {"acronym": "", "name": "", "id": ""};
235
                        //this.dataProviderInfo.organizations[counter]['name'] = (mydata.legalname ? mydata.legalname : "[no title available");
236 236
                        this.dataProviderInfo.organizations[counter]['id'] = mydata['to'].content;
237 237

  
238
                        if(mydata.hasOwnProperty("legalshortname")) {
239
                          this.dataProviderInfo.organizations[counter]['acronym'] = mydata.legalshortname;
240
                        }
241
                        if(mydata.hasOwnProperty("legalname")) {
242
                          this.dataProviderInfo.organizations[counter]['name'] = mydata.legalname;
243
                        }
244
                        if(!this.dataProviderInfo.organizations[counter]['acronym'] && !this.dataProviderInfo.organizations[counter]['name']){
245
                          // acronym is displayed with link and name only in tooltip
246
                          this.dataProviderInfo.organizations[counter]['acronym'] = "[no title available]";
247
                        }
248

  
238 249
                        if(mydata.country != '' && mydata['country'].classname != '') {
239 250
                            if(!countriesSet.has(mydata['country'].classname)) {
240 251
                                this.dataProviderInfo.countries.push(mydata['country'].classname);
modules/uoa-services-library/trunk/ng-openaire-library/src/app/landingPages/dataProvider/dataProvider.component.ts
96 96
  private reloadRelatedDatasources: boolean = true;
97 97

  
98 98
  // Organizations variables for view more/less functionality
99
  public thresholdOrganizations: number = 10;
100
  public showNumOrganizations: number = 10;
99
  public thresholdOrganizations: number = 20;
100
  public showNumOrganizations: number = 20;
101 101

  
102 102
  // Subjects variables for view more/less functionality
103 103
  public thresholdSubjects: number = 20;
......
273 273

  
274 274
  private initTabs() {
275 275

  
276
    if (this.dataProviderInfo.tabs != undefined && this.dataProviderInfo.tabs.length > 0) {
276
    //if (this.dataProviderInfo.tabs != undefined && this.dataProviderInfo.tabs.length > 0) {
277 277
      this.reloadPublications = true;
278 278
      this.reloadDatasets = true;
279 279
      this.reloadSoftware = true;
......
317 317
      // this.fetchAggregatorsSoftware = new FetchResearchResults(this._searchResearchResultsService);
318 318
      // this.fetchAggregatorsOrps = new FetchResearchResults(this._searchResearchResultsService);
319 319
      this.fetchAggregatorsResults = new FetchResearchResults(this._searchResearchResultsService);
320
    }
320
    //}
321 321
    // if (this.dataProviderInfo.resultsBy == "collectedFrom") {
322 322
    //   //this.paramsForSearchLink = "?collectedFrom="+this.datasourceId+"&co=and";
323 323
    //   this.paramsForSearchLink = this.routerHelper.createQueryParams(['f0', 'fv0'], ["collectedfromdatasourceid", this.datasourceId]);
......
346 346
  }
347 347

  
348 348
  private count(page: number, size: number) {
349
    for (let i = 0; i < this.dataProviderInfo.tabs.length; i++) {
350
      let content: string = this.dataProviderInfo.tabs[i].content;
349
    //for (let i = 0; i < this.dataProviderInfo.tabs.length; i++) {
350
      //let content: string = this.dataProviderInfo.tabs[i].content;
351 351

  
352
      if (content == 'publicationsTab') {
352
      //if (content == 'publicationsTab') {
353 353
        this.countPublications(page, size);
354
      } else if (content == 'datasetsTab') {
354
      //} else if (content == 'datasetsTab') {
355 355
        this.countDatasets(page, size);
356
      } else if (content == 'softwareTab') {
356
      //} else if (content == 'softwareTab') {
357 357
        this.countSoftware(page, size);
358
      } else if (content == 'orpsTab') {
358
      //} else if (content == 'orpsTab') {
359 359
        this.countOrps(page, size);
360
      } else if (content == 'projectsTab') {
360
      //} else if (content == 'projectsTab') {
361 361
        this.countProjects(page, size);
362
      } else if (content == 'datasourcesTab') {
362
      //} else if (content == 'datasourcesTab') {
363 363
        this.countDatasources(page, size);
364
      }// else if(content=='relatedDatasourcesTab') {
364
      //}// else if(content=='relatedDatasourcesTab') {
365 365
      //    this.countRelatedDatasources(page, size);
366 366
      //}
367
    }
367
    //}
368 368
  }
369 369

  
370 370
  public search(content: string, page: number, size: number) {
modules/uoa-services-library/trunk/ng-openaire-library/src/app/landingPages/project/project.component.html
264 264
              </div>
265 265
            </div>
266 266

  
267
            <div class="uk-margin-medium-top">
267
            <div *ngIf="(fetchPublications.searchUtils.totalResults > 0 || fetchDatasets.searchUtils.totalResults > 0
268
                       || fetchSoftware.searchUtils.totalResults > 0 || fetchOrps.searchUtils.totalResults > 0)"
269
              class="uk-margin-medium-top">
268 270
              <div class="uk-margin-top simple-buttons uk-flex uk-flex-middle">
269 271
                <div (click)="openStatistics()" class="clickable uk-margin-right">
270 272
                  <svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24">
......
275 277
                </div>
276 278
              </div>
277 279

  
278
              <div *ngIf="fetchPublications.searchUtils.totalResults > 0 || fetchDatasets.searchUtils.totalResults > 0
279
                       || fetchSoftware.searchUtils.totalResults > 0 || fetchOrps.searchUtils.totalResults > 0"
280
                   class="uk-margin-top advanced-buttons uk-grid-small uk-child-width-1-4@s uk-child-width-1-2"
280
              <div class="uk-margin-top advanced-buttons uk-grid-small uk-child-width-1-4@s uk-child-width-1-2"
281 281
                   uk-height-match="target: .target; row: false"
282 282
                   uk-grid>
283 283
                <ng-container *ngTemplateOutlet="search_box;
......
552 552
<!--                    <option value="software">Software</option>-->
553 553
<!--                    <option value="other">Other research products</option>-->
554 554
<!--                  </select>-->
555

  
556 555
                  <div class="uk-padding-small uk-padding-remove-vertical">
557 556
                    <mat-select [(value)]="share_research_results_type"
558 557
                                [disableOptionCentering]="true"
......
663 662
<!--              </div>-->
664 663
<!--            </div>-->
665 664
            </div>
666
            <div class="uk-margin-small-top uk-text-muted uk-text-small uk-text-right">
667
              Last update of records in OpenAIRE: {{indexUpdateDate | date: 'MMM dd, yyyy'}}
668
            </div>
669 665
          </div>
666
          <div class="uk-margin-small-top uk-text-muted uk-text-small uk-text-right">
667
            Last update of records in OpenAIRE: {{indexUpdateDate | date: 'MMM dd, yyyy'}}
668
          </div>
670 669
          <modal-loading></modal-loading>
671 670
          <modal-alert #AlertModalCsvError></modal-alert>
672 671

  
......
687 686
                      [status]="projectInfo.status">
688 687
      </landing-header>
689 688
      <div class="uk-margin-medium-top uk-margin-medium-right">
690
        <errorMessages [status]="[fetchPublications.searchUtils.status, fetchDatasets.searchUtils.status]"
689
        <errorMessages [status]="[fetchPublications.searchUtils.status, fetchDatasets.searchUtils.status,
690
                                  fetchSoftware.searchUtils.status, fetchOrps.searchUtils.status]"
691 691
                       [type]="'statistics'" tab_error_class=true></errorMessages>
692 692

  
693 693
        <div
694
          *ngIf="statsClicked && (fetchPublications.searchUtils.status == errorCodes.DONE || fetchDatasets.searchUtils.status == errorCodes.DONE)">
694
          *ngIf="statsClicked &&
695
          (fetchPublications.searchUtils.status == errorCodes.DONE || fetchDatasets.searchUtils.status == errorCodes.DONE
696
          || fetchSoftware.searchUtils.status == errorCodes.DONE || fetchOrps.searchUtils.status == errorCodes.DONE)">
695 697
          <div class="uk-padding uk-padding-remove-top">
696 698
            <span class="uk-text-bold uk-text-small">Produced research results per year</span>
697 699
            <i-frame [url]=chartScientificResultsUrl></i-frame>
modules/uoa-services-library/trunk/ng-openaire-library/src/app/utils/entities/dataProviderInfo.ts
163 163
                        ])
164 164
    };
165 165

  
166
    organizations: {"name": string, "id": string}[] = [];
166
    organizations: {"acronym": string, "name": string, "id": string}[] = [];
167 167
    //publications: any;
168 168
    //datasets: any;
169 169
    statistics: any;
modules/uoa-services-library/trunk/ng-openaire-library/src/app/utils/result-preview/result-preview.component.html
217 217
      <span class="uk-text-muted">Organization: </span>
218 218
      <span *ngFor="let organization of result.organizations.slice(0,10) let i=index">
219 219
    <span>{{organization.name}}</span>
220
    <span *ngIf="(i < result.organizations.length-1) && (i < 9)">,</span>
220
    <span *ngIf="(i < result.organizations.length-1) && (i < 9)">, </span>
221 221
  </span>
222 222
      <span *ngIf="result.organizations.length > 10">...</span>
223 223
    </div>
......
243 243
    <div *ngIf="showSubjects && result.subjects && result.subjects.length > 0"
244 244
         class="uk-text-small uk-margin-small-bottom">
245 245
      <span class="uk-text-muted">Subject: </span>
246
      <span *ngFor="let subject of  result.subjects.slice(0,10) let i = index">{{subject}}
247
        {{(i < (result.subjects.slice(0, 10).length - 1)) ? ", " : ""}}
248
        {{(i == result.subjects.slice(0, 10).length - 1 && result.subjects.length > 10) ? "..." : ""}}
246
      <span *ngFor="let subject of  result.subjects.slice(0,10) let i = index">
247
        <span>{{subject}}</span>
248
        <span>{{(i < (result.subjects.slice(0, 10).length - 1)) ? ", " : ""}}</span>
249
        <span>{{(i == result.subjects.slice(0, 10).length - 1 && result.subjects.length > 10) ? "..." : ""}}</span>
249 250
  </span>
250 251
    </div>
251 252
  </div>

Also available in: Unified diff