openaire-library/landingPages/organization/organization.component.html

269 lines
17 KiB
HTML

<div id="tm-main" class=" uk-section uk-margin-small-top tm-middle" >
<div uk-grid uk-grid>
<div class="tm-main uk-width-1-1@s uk-width-1-1@m uk-width-1-1@l uk-row-first ">
<div class="uk-container uk-margin-top organization">
<div *ngIf="warningMessage.length > 0" class="uk-alert uk-alert-warning uk-margin-large-top" role="alert">{{warningMessage}}</div>
<div *ngIf="errorMessage.length > 0" class="uk-alert uk-alert-danger uk-margin-large-top" role="alert">{{errorMessage}}</div>
<div [style.display]="showLoading ? 'inline' : 'none'"class="uk-animation-fade uk-margin-large-top uk-width-1-1" role="alert"><img class="loading-gif uk-align-center" ></div>
<div *ngIf="organizationInfo != null" uk-grid class="uk-grid-large">
<div class="uk-width-expand@m uk-width-1-1@s">
<showTitle [title]="organizationInfo.title"></showTitle>
<div class="uk-text-large " *ngIf="organizationInfo.title.name && organizationInfo.title.name != organizationInfo.name ">{{organizationInfo.name}}</div>
<span class="uk-label custom-label label-blue label-organization" title="Type">Organization</span>
<span *ngIf="organizationInfo.country" class="uk-label custom-label label-country " title="Country">{{organizationInfo.country}}</span>
<ul class="custom-accordion" uk-accordion>
<li (click)="activeTab='Publications'; searchPublicationsInit()">
<a class="uk-accordion-title" href="#">
Publications
<span class="uk-badge uk-badge-notification">
{{fetchPublications.searchUtils.totalResults | number}}
</span>
</a>
<div class="uk-accordion-content">
<errorMessages [status]="[fetchPublications.searchUtils.status]" [type]="'publications'" tab_error_class=true></errorMessages>
<div *ngIf="fetchPublications.searchUtils.status == errorCodes.DONE">
<div class = "uk-text-right" *ngIf = "fetchPublications.searchUtils.totalResults > 10">
<a [queryParams]="routerHelper.createQueryParams(['organization', 'og'], [organizationId, 'and'])"
routerLinkActive="router-link-active" [routerLink]="linkToSearchPublications" class="uk-button uk-button-text">
View all {{fetchPublications.searchUtils.totalResults | number}} results
</a>
</div>
<tab-result [(results)]="fetchPublications.results"
[(status)]= "fetchPublications.status"
type="publication" urlParam="articleId">
</tab-result>
</div>
</div>
</li>
<!-- <li (click)="activeTab='Research Data'; searchDatasetsInit()">
<a class="uk-accordion-title" href="#">
Research Data
<span class="uk-badge uk-badge-notification">
{{fetchDatasets.searchUtils.totalResults | number}}
</span>
</a>
<div class="uk-accordion-content">
<errorMessages [status]="[fetchDatasets.searchUtils.status]" [type]="'publications'" tab_error_class=true></errorMessages>
<div *ngIf="fetchDatasets.searchUtils.status == errorCodes.DONE">
<div class = "uk-text-right" *ngIf = "fetchDatasets.searchUtils.totalResults > 10">
<a [queryParams]="routerHelper.createQueryParams(['organization', 'og'], [organizationId, 'and'])"
routerLinkActive="router-link-active" [routerLink]="linkToSearchDatasets" class="uk-button uk-button-text">
View all {{fetchDatasets.searchUtils.totalResults | number}} results
</a>
</div>
<tab-result [(results)]="fetchDatasets.results"
[(status)]= "fetchDatasets.status"
type="dataset" urlParam="datasetId">
</tab-result>
</div>
</div>
</li> -->
<li (click)="activeTab='Projects'; projectsClicked=true;">
<a class="uk-accordion-title" href="#">
Projects
<span class="uk-badge uk-badge-notification">
{{fetchProjects.searchUtils.totalResultsNoFilters | number}}
</span>
</a>
<div class="uk-accordion-content">
<searchingProjectsTab *ngIf="projectsClicked" [(fetchProjects)]="fetchProjects" [organizationId]="organizationId" [(properties)]=properties></searchingProjectsTab>
</div>
</li>
<li (click)="activeTab='Content Providers'; searchDataprovidersInit()">
<a class="uk-accordion-title" href="#">
Content Providers
<span class="uk-badge uk-badge-notification">
{{fetchDataproviders.searchUtils.totalResults | number}}
</span>
</a>
<div class="uk-accordion-content">
<errorMessages [status]="[fetchDataproviders.searchUtils.status]" [type]="'content providers'" tab_error_class=true></errorMessages>
<div *ngIf="fetchDataproviders.searchUtils.status == errorCodes.DONE">
<div class = "uk-text-right" *ngIf = "fetchDataproviders.searchUtils.totalResults > 10">
<a [queryParams]="routerHelper.createQueryParams(['organization', 'og'], [organizationId, 'and'])"
routerLinkActive="router-link-active" [routerLink]="linkToSearchDataproviders" class="uk-button uk-button-text">
View all {{fetchDataproviders.searchUtils.totalResults | number}} results
</a>
</div>
<tab-result [(results)]="fetchDataproviders.results"
[(status)]= "fetchDataproviders.status"
type="dataprovider" urlParam="datasourceId">
</tab-result>
</div>
</div>
</li>
</ul>
<!--
<ul class="uk-tab uk-visible@m" uk-tab="connect: #tab-content">
<li (click)="activeTab='Publications'" [class]="activeTab == 'Publications'?'uk-active':''">
<a>
Publications
<span class="uk-badge uk-badge-notification">
{{fetchPublications.searchUtils.totalResults | number}}
</span>
</a>
</li>
<li (click)="activeTab='Projects'; projectsClicked=true;"
[class]="activeTab == 'Projects'?'uk-active':''">
<a>
Projects
<span class="uk-badge uk-badge-notification">
{{fetchProjects.searchUtils.totalResultsNoFilters | number}}
</span>
</a>
</li>
<li (click)="activeTab='Content Providers'; searchDataprovidersInit()"
[class]="activeTab == 'Content Providers'?'uk-active':''">
<a>
Content Providers
<span class="uk-badge uk-badge-notification">
{{fetchDataproviders.searchUtils.totalResults | number}}
</span>
</a>
</li>
</ul> -->
<!-- <div class="uk-hidden@m uk-margin-top">
<button class="uk-button uk-button-default" type="button">
<span uk-navbar-toggle-icon></span> <span class="uk-margin-small-left">{{activeTab}}</span>
</button>
</div>
<ul id="toggle-small-tabs" class="uk-subnav uk-subnav-pill uk-dropdown uk-hidden@m" uk-switcher="connect: #tab-content" uk-dropdown="mode: click" uk-toggle="target: #toggle-small-tabs">
<li (click)="activeTab='Publications'" [class]="activeTab == 'Publications'?'uk-active':''">
<a>
Publications
<span class="uk-badge uk-badge-notification">
{{fetchPublications.searchUtils.totalResults | number}}
</span>
</a>
</li>
<li (click)="activeTab='Projects'; projectsClicked=true;"
[class]="activeTab == 'Projects'?'uk-active':''">
<a>
Projects
<span class="uk-badge uk-badge-notification">
{{fetchProjects.searchUtils.totalResultsNoFilters | number}}
</span>
</a>
</li>
<li (click)="activeTab='Content Providers'; searchDataprovidersInit()"
[class]="activeTab == 'Content Providers'?'uk-active':''">
<a>
Content Providers
<span class="uk-badge uk-badge-notification">
{{fetchDataproviders.searchUtils.totalResults | number}}
</span>
</a>
</li>
</ul> -->
<!-- <div class="uk-margin custom-tab-content">
<div *ngIf="activeTab=='Publications'" class="uk-animation-fade">
<errorMessages [status]="[fetchPublications.searchUtils.status]" [type]="'publications'"></errorMessages>
<div *ngIf="fetchPublications.searchUtils.totalResults > 0">
<div class = "uk-text-right" *ngIf = "fetchPublications.searchUtils.totalResults > 10">
<a [queryParams]="routerHelper.createQueryParams(['organization', 'og'], [organizationId, 'and'])"
routerLinkActive="router-link-active" [routerLink]="linkToSearchPublications" class="uk-button uk-button-text">
View all {{fetchPublications.searchUtils.totalResults | number}} results
</a>
</div>
<tab-result [(results)]="fetchPublications.results"
[(status)]= "fetchPublications.status"
type="publication" urlParam="articleId">
</tab-result>
</div>
</div>
<div *ngIf="activeTab=='Projects'" class="uk-animation-fade">
<searchingProjectsTab *ngIf="projectsClicked" [(fetchProjects)]="fetchProjects" [organizationId]="organizationId" [(properties)]=properties></searchingProjectsTab>
</div>
<div *ngIf="activeTab=='Content Providers'" class="uk-animation-fade">
<errorMessages [status]="[fetchDataproviders.searchUtils.status]" [type]="'content providers'"></errorMessages>
<div *ngIf="fetchDataproviders.searchUtils.totalResults > 0">
<div class = "uk-text-right" *ngIf = "fetchDataproviders.searchUtils.totalResults > 10">
<a [queryParams]="routerHelper.createQueryParams(['organization', 'og'], [organizationId, 'and'])"
routerLinkActive="router-link-active" [routerLink]="linkToSearchDataproviders" class="uk-button uk-button-text">
View all {{fetchDataproviders.searchUtils.totalResults | number}} results
</a>
</div>
<tab-result [(results)]="fetchDataproviders.results"
[(status)]= "fetchDataproviders.status"
type="dataprovider" urlParam="datasourceId">
</tab-result>
</div>
</div>
</div> -->
</div>
<div class="uk-width-large@m uk-width-1-1@s">
<div class="uk-card uk-card-default uk-padding-small">
<div>
Share - Bookmark<addThis ></addThis>
</div>
<div class="uk-margin-medium-top uk-margin-medium-bottom">
<div class="uk-text-center uk-text-large">
Application Box
</div>
<div class="app-box app-box uk-padding-small" >
<ul class="uk-list">
<ng-container *ngIf="fetchProjects && fetchProjects.funders.length > 0">
<li *ngFor="let funder of fetchProjects.funders">
<!--a href="{{downloadURLAPI}}resources?size={{organizationInfo.projects.get(key).length}}&{{csvProjectParamsHead}}{{organizationInfo.projects.get(key)[0]['funderId']}}{{csvParamsTail}}">
Download projects report (CSV) for {{key}}
</a-->
<a class="clickable" (click)="downloadFile(downloadURLAPI+'?'+csvProjectParamsHead+encodeURI(funder.id)+csvParamsTail)">
<!--span class="clickable" (click)="downloadProjectsFile(downloadURLAPI+'organizations/'+organizationId+'/projects?fq=(funderid exact '+funder.id+')&size='+funder.number)"-->
<span class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="download" ratio="1"><polyline fill="none" stroke="#000" points="14,10 9.5,14.5 5,10"></polyline><rect x="3" y="17" width="13" height="1"></rect><line fill="none" stroke="#000" x1="9.5" y1="13.91" x2="9.5" y2="3"></line></svg></span>
<span class="uk-icon-download"> Project list for {{funder.name}} (CSV)</span>
</a>
</li>
<li *ngFor="let funder of fetchProjects.funders">
<a class="clickable" (click)="confirmOpenApplyAll(funder.name,encodeURI(funder.id), funder.number)">
<span class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="download" ratio="1"><polyline fill="none" stroke="#000" points="14,10 9.5,14.5 5,10"></polyline><rect x="3" y="17" width="13" height="1"></rect><line fill="none" stroke="#000" x1="9.5" y1="13.91" x2="9.5" y2="3"></line></svg></span>
<span class="uk-icon-download"> Project Publications for {{funder.name}} (CSV)</span>
</a>
</li>
</ng-container>
<li>
<!-- url = this.downloadURLAPI+"format=csv-special&type=publications&fq=(((oaftype exact result) and (resulttypeid exact publication)) and (relprojectid exact '"+projects[index].id+"'))"-->
<!-- <a class="clickable" (click)="downloadFile(downloadURLAPI+'/organizations/'+organizationId+'?type=publications&format=csv')"> -->
<a class="clickable" (click)="downloadFile(downloadURLAPI+'?format=csv&type=publications&fq=(((oaftype exact result) and (resulttypeid exact publication)) and (relorganizationid exact '+organizationId+'))')">
<span class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="download" ratio="1"><polyline fill="none" stroke="#000" points="14,10 9.5,14.5 5,10"></polyline><rect x="3" y="17" width="13" height="1"></rect><line fill="none" stroke="#000" x1="9.5" y1="13.91" x2="9.5" y2="3"></line></svg></span>
<span class="uk-icon-download"> Publications of organization (CSV) - based on the affiliation information.</span>
</a>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<modal-loading></modal-loading>
<modal-alert #AlertModalApplyAll (alertOutput)="confirmCloseApplyAll($event)"></modal-alert>
<modal-alert #AlertModalCsvError></modal-alert>
</div>
</div>
</div>
</div>