Rename stakeholders and organizations(UI only) and add explore links to homepage's numbers

This commit is contained in:
Alex Martzios 2021-10-19 16:22:35 +03:00
parent e83f5febf9
commit 7ab16878b0
2 changed files with 692 additions and 675 deletions

View File

@ -27,7 +27,8 @@
Get a complete picture Get a complete picture
</h5> </h5>
<div class="uk-text-muted"> <div class="uk-text-muted">
Track and discover your organizations research output. Use the OpenAIRE Research Graph to get a 360<span>&#176;</span> Track and discover your organizations research output. Use the OpenAIRE Research Graph to get a
360<span>&#176;</span>
view of your publications-data-code. view of your publications-data-code.
</div> </div>
</div> </div>
@ -137,31 +138,45 @@
<div class="uk-width-3-4@m uk-margin-large-top uk-grid uk-child-width-1-5@m uk-child-width-1-2"> <div class="uk-width-3-4@m uk-margin-large-top uk-grid uk-child-width-1-5@m uk-child-width-1-2">
<div *ngIf="publicationsSize" class="uk-margin-medium-bottom uk-text-center"> <div *ngIf="publicationsSize" class="uk-margin-medium-bottom uk-text-center">
<h3 class="uk-margin-remove portal-color"> <h3 class="uk-margin-remove portal-color">
<a class="uk-link-reset"
href="https://explore.openaire.eu/search/find/research-outcomes?type=publications" target=_blank>
<span class="uk-text-bold number">{{publicationsSize.number|number}}</span>{{publicationsSize.size}} <span class="uk-text-bold number">{{publicationsSize.number|number}}</span>{{publicationsSize.size}}
</a>
</h3> </h3>
<div class="uk-margin-small uk-text-large uk-text-uppercase">publications</div> <div class="uk-margin-small uk-text-large uk-text-uppercase">publications</div>
</div> </div>
<div *ngIf="datasetsSize" class="uk-margin-medium-bottom uk-text-center"> <div *ngIf="datasetsSize" class="uk-margin-medium-bottom uk-text-center">
<h3 class="uk-margin-remove portal-color"> <h3 class="uk-margin-remove portal-color">
<a class="uk-link-reset" href="https://explore.openaire.eu/search/find/research-outcomes?type=datasets"
target=_blank>
<span class="uk-text-bold number">{{datasetsSize.number|number}}</span>{{datasetsSize.size}} <span class="uk-text-bold number">{{datasetsSize.number|number}}</span>{{datasetsSize.size}}
</a>
</h3> </h3>
<div class="uk-margin-small uk-text-large uk-text-uppercase">datasets</div> <div class="uk-margin-small uk-text-large uk-text-uppercase">datasets</div>
</div> </div>
<div *ngIf="softwareSize" class="uk-margin-medium-bottom uk-text-center"> <div *ngIf="softwareSize" class="uk-margin-medium-bottom uk-text-center">
<h3 class="uk-margin-remove portal-color"> <h3 class="uk-margin-remove portal-color">
<a class="uk-link-reset" href="https://explore.openaire.eu/search/find/research-outcomes?type=software"
target="_blank">
<span class="uk-text-bold number">{{softwareSize.number|number}}</span>{{softwareSize.size}} <span class="uk-text-bold number">{{softwareSize.number|number}}</span>{{softwareSize.size}}
</a>
</h3> </h3>
<div class="uk-margin-small uk-text-large uk-text-uppercase">software</div> <div class="uk-margin-small uk-text-large uk-text-uppercase">software</div>
</div> </div>
<div *ngIf="otherSize" class="uk-margin-medium-bottom uk-text-center"> <div *ngIf="otherSize" class="uk-margin-medium-bottom uk-text-center">
<h3 class="uk-margin-remove portal-color"> <h3 class="uk-margin-remove portal-color">
<a class="uk-link-reset" href="https://explore.openaire.eu/search/find/research-outcomes?type=other"
target="_blank">
<span class="uk-text-bold number">{{otherSize.number|number}}</span>{{otherSize.size}} <span class="uk-text-bold number">{{otherSize.number|number}}</span>{{otherSize.size}}
</a>
</h3> </h3>
<div class="uk-margin-small uk-text-large uk-text-uppercase">other</div> <div class="uk-margin-small uk-text-large uk-text-uppercase">other</div>
</div> </div>
<div *ngIf="fundersSize" class="uk-margin-medium-bottom uk-text-center"> <div *ngIf="fundersSize" class="uk-margin-medium-bottom uk-text-center">
<h3 class="uk-margin-remove portal-color"> <h3 class="uk-margin-remove portal-color">
<a class="uk-link-reset" href="https://explore.openaire.eu/search/find/projects" target="_blank">
<span class="uk-text-bold number">{{fundersSize.number|number}}</span>{{fundersSize.size}} <span class="uk-text-bold number">{{fundersSize.number|number}}</span>{{fundersSize.size}}
</a>
</h3> </h3>
<div class="uk-margin-small uk-text-large uk-text-uppercase">Funders</div> <div class="uk-margin-small uk-text-large uk-text-uppercase">Funders</div>
</div> </div>
@ -181,9 +196,10 @@
<li uk-filter-control="[data-type='funder']"><a (click)="type = 'funder'">Funders</a></li> <li uk-filter-control="[data-type='funder']"><a (click)="type = 'funder'">Funders</a></li>
<li uk-filter-control="[data-type='ri']"><a (click)="type = 'ri'">Research Initiatives</a></li> <li uk-filter-control="[data-type='ri']"><a (click)="type = 'ri'">Research Initiatives</a></li>
<!--<li uk-filter-control="[data-type='project']"><a (click)="type = 'project'">Projects</a></li>--> <!--<li uk-filter-control="[data-type='project']"><a (click)="type = 'project'">Projects</a></li>-->
<li uk-filter-control="[data-type='organization']"><a (click)="type = 'organization'">Organizations</a></li> <li uk-filter-control="[data-type='organization']"><a (click)="type = 'organization'">Institutions</a></li>
</ul> </ul>
<div class="stakeholders uk-margin-large-top uk-child-width-1-1 uk-child-width-1-2@s uk-child-width-1-3@m uk-grid uk-flex-top uk-flex-wrap-top" <div
class="stakeholders uk-margin-large-top uk-child-width-1-1 uk-child-width-1-2@s uk-child-width-1-3@m uk-grid uk-flex-top uk-flex-wrap-top"
uk-grid="masonry: true" uk-height-match="target: .uk-card; row: false;"> uk-grid="masonry: true" uk-height-match="target: .uk-card; row: false;">
<div *ngFor="let stakeholder of stakeholders" [attr.data-type]="stakeholder.type"> <div *ngFor="let stakeholder of stakeholders" [attr.data-type]="stakeholder.type">
<a *ngIf="directLink && hasPermission(stakeholder)" [href]="getStakeholderPageUrl(stakeholder)" target="_blank"> <a *ngIf="directLink && hasPermission(stakeholder)" [href]="getStakeholderPageUrl(stakeholder)" target="_blank">
@ -236,7 +252,8 @@
</div> </div>
<img *ngIf="stakeholder.logoUrl && stakeholder.isUpload" class="uk-margin-auto" <img *ngIf="stakeholder.logoUrl && stakeholder.isUpload" class="uk-margin-auto"
[src]="properties.utilsService + '/download/' + stakeholder.logoUrl"> [src]="properties.utilsService + '/download/' + stakeholder.logoUrl">
<img *ngIf="stakeholder.logoUrl && !stakeholder.isUpload" class="uk-margin-auto" [src]="stakeholder.logoUrl | urlPrefix"> <img *ngIf="stakeholder.logoUrl && !stakeholder.isUpload" class="uk-margin-auto"
[src]="stakeholder.logoUrl | urlPrefix">
<div class="uk-text-light uk-margin-medium-top">{{stakeholder.name}}</div> <div class="uk-text-light uk-margin-medium-top">{{stakeholder.name}}</div>
</div> </div>
</ng-template> </ng-template>

View File

@ -1,19 +1,19 @@
import {Component, ViewChild} from "@angular/core"; import { Component, ViewChild } from "@angular/core";
import {SearchUtilsClass} from "../openaireLibrary/searchPages/searchUtils/searchUtils.class"; import { SearchUtilsClass } from "../openaireLibrary/searchPages/searchUtils/searchUtils.class";
import {ErrorMessagesComponent} from "../openaireLibrary/utils/errorMessages.component"; import { ErrorMessagesComponent } from "../openaireLibrary/utils/errorMessages.component";
import {ErrorCodes} from "../openaireLibrary/utils/properties/errorCodes"; import { ErrorCodes } from "../openaireLibrary/utils/properties/errorCodes";
import {EnvProperties} from "../openaireLibrary/utils/properties/env-properties"; import { EnvProperties } from "../openaireLibrary/utils/properties/env-properties";
import {ActivatedRoute} from "@angular/router"; import { ActivatedRoute } from "@angular/router";
import {AdvancedField, Filter, Value} from "../openaireLibrary/searchPages/searchUtils/searchHelperClasses.class"; import { AdvancedField, Filter, Value } from "../openaireLibrary/searchPages/searchUtils/searchHelperClasses.class";
import {SearchFields} from "../openaireLibrary/utils/properties/searchFields"; import { SearchFields } from "../openaireLibrary/utils/properties/searchFields";
import {Session, User} from "../openaireLibrary/login/utils/helper.class"; import { Session, User } from "../openaireLibrary/login/utils/helper.class";
import {StringUtils} from "../openaireLibrary/utils/string-utils.class"; import { StringUtils } from "../openaireLibrary/utils/string-utils.class";
import {UserManagementService} from "../openaireLibrary/services/user-management.service"; import { UserManagementService } from "../openaireLibrary/services/user-management.service";
import {StakeholderService} from "../openaireLibrary/monitor/services/stakeholder.service"; import { StakeholderService } from "../openaireLibrary/monitor/services/stakeholder.service";
import {NewSearchPageComponent} from "../openaireLibrary/searchPages/searchUtils/newSearchPage.component"; import { NewSearchPageComponent } from "../openaireLibrary/searchPages/searchUtils/newSearchPage.component";
import {StakeholderInfo} from "../openaireLibrary/monitor/entities/stakeholder"; import { StakeholderInfo } from "../openaireLibrary/monitor/entities/stakeholder";
import {properties} from "../../environments/environment"; import { properties } from "../../environments/environment";
import {Subscriber} from "rxjs"; import { Subscriber } from "rxjs";
@Component({ @Component({
selector: 'search-stakeholders', selector: 'search-stakeholders',
@ -21,7 +21,7 @@ import {Subscriber} from "rxjs";
<new-search-page pageTitle="OpenAIRE-Monitor | Browse" <new-search-page pageTitle="OpenAIRE-Monitor | Browse"
[hasPrefix]=false [piwikSiteId]="piwikSiteId" [hasPrefix]=false [piwikSiteId]="piwikSiteId"
[formPlaceholderText]="'Search profiles'" [formPlaceholderText]="'Search profiles'"
type="stakeholders" entityType="stakeholder" type="organizations" entityType="stakeholder"
[results]="results" [searchUtils]="searchUtils" [results]="results" [searchUtils]="searchUtils"
[showResultCount]=true [showResultCount]=true
[disableForms]="disableForms" [disableForms]="disableForms"
@ -60,7 +60,7 @@ export class SearchStakeholdersComponent {
public keyword = ""; public keyword = "";
public searchLink; public searchLink;
properties: EnvProperties = properties; properties: EnvProperties = properties;
@ViewChild(NewSearchPageComponent, {static: true}) searchPage: NewSearchPageComponent; @ViewChild(NewSearchPageComponent, { static: true }) searchPage: NewSearchPageComponent;
private user: User; private user: User;
constructor(private route: ActivatedRoute, constructor(private route: ActivatedRoute,
@ -430,11 +430,11 @@ export class SearchStakeholdersComponent {
let value_original_ids = []; let value_original_ids = [];
filter_names.push("Type"); filter_names.push("Type");
filter_ids.push("type"); filter_ids.push("type");
value_names.push(["Funders", "Research Initiatives", "Organizations"]); value_names.push(["Funders", "Research Initiatives", "Institutions"]);
value_original_ids.push(["funder", "ri", "organization"]); value_original_ids.push(["funder", "ri", "organization"]);
filter_names.push("Accessibility"); filter_names.push("Accessibility");
filter_ids.push("access"); filter_ids.push("access");
if(!this.user) { if (!this.user) {
value_names.push(["Public", "Restricted"]); value_names.push(["Public", "Restricted"]);
value_original_ids.push(["public", "restricted"]); value_original_ids.push(["public", "restricted"]);
} else { } else {
@ -449,7 +449,7 @@ export class SearchStakeholdersComponent {
for (let i = 0; i < filter_names.length; i++) { for (let i = 0; i < filter_names.length; i++) {
let values: Value[] = []; let values: Value[] = [];
for (let j = 0; j < value_names[i].length; j++) { for (let j = 0; j < value_names[i].length; j++) {
let value: Value = {name: value_names[i][j], id: value_original_ids[i][j], number: 0, selected: false}; let value: Value = { name: value_names[i][j], id: value_original_ids[i][j], number: 0, selected: false };
values.push(value); values.push(value);
} }
let filter: Filter = { let filter: Filter = {