243 lines
7.4 KiB
HTML
243 lines
7.4 KiB
HTML
@if (this.isPending()) {
|
|
<app-loading
|
|
text="Das Netzwerk wird gebaut, kleinen Moment..."
|
|
[icon]="GRAPH_ICON"
|
|
[size]="150"
|
|
[diameter]="150" />
|
|
} @else if (this.isFailed()) {
|
|
<div class="error">
|
|
<mat-icon>{{ ERROR_ICON }}</mat-icon>
|
|
<span class="error-message">{{
|
|
this.collaborationGraphError()
|
|
? this.collaborationGraphError()
|
|
: 'Fehler beim Laden des Netzwerks. Bitte versuchen Sie es später erneut.'
|
|
}}</span>
|
|
|
|
<app-selected-filters [observers]="observers" />
|
|
<button matButton="outlined" type="button" (click)="openFilterDialog()">
|
|
<mat-icon>{{ FILTER_ICON }}</mat-icon>
|
|
Filter
|
|
</button>
|
|
</div>
|
|
} @else {
|
|
<div class="grid">
|
|
<div class="cell">
|
|
<mat-card appearance="outlined" style="height: 100%">
|
|
<mat-card-content class="graph-container">
|
|
<app-collaboration-graph
|
|
[collaborationGraph]="collaborationGraph()!"
|
|
(handleNodeClick)="handleNodeClick($event)" />
|
|
</mat-card-content>
|
|
</mat-card>
|
|
</div>
|
|
<div class="cell">
|
|
<div class="toggle-group">
|
|
<mat-button-toggle-group
|
|
class="mat-button-toggle-group"
|
|
aria-label="Select view"
|
|
(change)="onToggleChange($event)"
|
|
[value]="displayedTable()"
|
|
style="width: 100%">
|
|
<mat-button-toggle value="collaborator">
|
|
Kollaborierende
|
|
</mat-button-toggle>
|
|
<mat-button-toggle value="publication"
|
|
>Publikationen</mat-button-toggle
|
|
>
|
|
<mat-button-toggle value="institution">
|
|
Institutionen
|
|
</mat-button-toggle>
|
|
</mat-button-toggle-group>
|
|
<button
|
|
class="filter-button"
|
|
mat-stroked-button
|
|
type="button"
|
|
(click)="openFilterDialog()">
|
|
<mat-icon>{{ FILTER_ICON }}</mat-icon>
|
|
Filter
|
|
</button>
|
|
</div>
|
|
|
|
<app-query-param-input
|
|
style="width: 100%"
|
|
queryParamKey="search_term"
|
|
[label]="this.searchTermLabel()" />
|
|
|
|
<app-selected-filters [observers]="observers" />
|
|
|
|
<mat-card appearance="outlined">
|
|
<mat-card-content class="scroll-viewport-container">
|
|
@if (this.displayedTable() === 'collaborator') {
|
|
<app-data-table
|
|
[columns]="collaboratorsColumns"
|
|
[data]="collaboratorsData()"
|
|
[filterTerm]="searchTerm()"
|
|
[detailTemplate]="collaboratorsDetailRow"
|
|
[maxHeight]="'100%'" />
|
|
} @else if (this.displayedTable() === 'publication') {
|
|
<app-data-table
|
|
[columns]="publicationsColumns"
|
|
[data]="publicationsData()"
|
|
[filterTerm]="searchTerm()"
|
|
[detailTemplate]="publicationsDetailRow"
|
|
[maxHeight]="'100%'" />
|
|
} @else if (this.displayedTable() === 'institution') {
|
|
<app-data-table
|
|
[columns]="institutionsColumns"
|
|
[data]="institutionsData()"
|
|
[filterTerm]="searchTerm()"
|
|
[detailTemplate]="institutionsDetailRow"
|
|
[maxHeight]="'100%'" />
|
|
}
|
|
</mat-card-content>
|
|
</mat-card>
|
|
</div>
|
|
|
|
<div class="cell full-width">
|
|
<div class="summary-container">
|
|
@for (summary of this.summaryCards(); track $index) {
|
|
<app-info-card
|
|
[icon]="summary.icon"
|
|
[value]="summary.value.toString()"
|
|
[description]="summary.description" />
|
|
}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
}
|
|
|
|
<ng-template #collaboratorsActionTmp let-element>
|
|
<a
|
|
mat-icon-button
|
|
color="primary"
|
|
[routerLink]="['/person', this.stripOpenAlexIdPrefix(element.id)]">
|
|
<mat-icon>{{ OPEN_IN_NEW_ICON }}</mat-icon>
|
|
</a>
|
|
</ng-template>
|
|
|
|
<ng-template #collaboratorsFrequencyTmp let-element>
|
|
{{ element.works.length }}
|
|
</ng-template>
|
|
|
|
<ng-template #collaboratorsDetailRow let-element>
|
|
<div class="detail-row">
|
|
@if (element.works.length > 0) {
|
|
<span style="font-weight: bold">Publikationen:</span>
|
|
<ul>
|
|
@for (work of element.works; track $index) {
|
|
<a
|
|
class="link"
|
|
[routerLink]="['/publication', this.stripOpenAlexIdPrefix(work.id)]"
|
|
[appComponentTooltip]="AppPublicationTooltipComponent"
|
|
[tooltipInputs]="{
|
|
workId: this.stripOpenAlexIdPrefix(work.id),
|
|
}"
|
|
[tooltipMaxWidth]="'500px'">
|
|
<li>{{ work.display_name }}</li>
|
|
</a>
|
|
}
|
|
</ul>
|
|
}
|
|
@if (element.institutions.length > 0) {
|
|
<span style="font-weight: bold">Institutionen:</span>
|
|
<ul>
|
|
@for (institution of element.institutions; track $index) {
|
|
<a
|
|
class="link"
|
|
[routerLink]="[
|
|
'/institution',
|
|
this.stripOpenAlexIdPrefix(institution.id),
|
|
]"
|
|
[appComponentTooltip]="AppInstitutionTooltipComponent"
|
|
[tooltipInputs]="{
|
|
institutionId: this.stripOpenAlexIdPrefix(institution.id),
|
|
}"
|
|
[tooltipMaxWidth]="'500px'">
|
|
<li>{{ institution.display_name }}</li>
|
|
</a>
|
|
}
|
|
</ul>
|
|
}
|
|
</div>
|
|
</ng-template>
|
|
|
|
<ng-template #publicationsActionTmp let-element>
|
|
<a
|
|
mat-icon-button
|
|
color="primary"
|
|
[routerLink]="['/publication', this.stripOpenAlexIdPrefix(element.id)]">
|
|
<mat-icon>{{ OPEN_IN_NEW_ICON }}</mat-icon>
|
|
</a>
|
|
</ng-template>
|
|
|
|
<ng-template #publicationsCollaborationFrequencyTmp let-element>
|
|
{{ element.authors.length }}
|
|
</ng-template>
|
|
|
|
<ng-template #publicationsDetailRow let-element>
|
|
<div class="detail-row">
|
|
@if (element.authors.length > 0) {
|
|
<span style="font-weight: bold">Mitwirkende:</span>
|
|
<ul>
|
|
@for (collaborator of element.authors; track $index) {
|
|
<li>
|
|
<a
|
|
class="link"
|
|
[routerLink]="[
|
|
'/person',
|
|
this.stripOpenAlexIdPrefix(collaborator.id),
|
|
]"
|
|
[appComponentTooltip]="AppAuthorTooltipComponent"
|
|
[tooltipInputs]="{
|
|
authorId: this.stripOpenAlexIdPrefix(collaborator.id),
|
|
}"
|
|
[tooltipMaxWidth]="'500px'">
|
|
{{ collaborator.display_name }}
|
|
</a>
|
|
</li>
|
|
}
|
|
</ul>
|
|
}
|
|
</div>
|
|
</ng-template>
|
|
|
|
<ng-template #institutionsActionTmp let-element>
|
|
<a
|
|
mat-icon-button
|
|
color="primary"
|
|
[routerLink]="['/institution', this.stripOpenAlexIdPrefix(element.id)]">
|
|
<mat-icon>{{ OPEN_IN_NEW_ICON }}</mat-icon>
|
|
</a>
|
|
</ng-template>
|
|
|
|
<ng-template #institutionsFrequencyTmp let-element>
|
|
{{ element.authors.length }}
|
|
</ng-template>
|
|
|
|
<ng-template #institutionsDetailRow let-element>
|
|
<div class="detail-row">
|
|
@if (element.authors.length > 0) {
|
|
<span style="font-weight: bold">Mitwirkende:</span>
|
|
<ul>
|
|
@for (collaborator of element.authors; track $index) {
|
|
<li>
|
|
<a
|
|
class="link"
|
|
[routerLink]="[
|
|
'/person',
|
|
this.stripOpenAlexIdPrefix(collaborator.id),
|
|
]"
|
|
[appComponentTooltip]="AppAuthorTooltipComponent"
|
|
[tooltipInputs]="{
|
|
authorId: this.stripOpenAlexIdPrefix(collaborator.id),
|
|
}"
|
|
[tooltipMaxWidth]="'500px'">
|
|
{{ collaborator.display_name }}
|
|
</a>
|
|
</li>
|
|
}
|
|
</ul>
|
|
}
|
|
</div></ng-template
|
|
>
|