81 lines
2.1 KiB
HTML
81 lines
2.1 KiB
HTML
<section class="organizations-page">
|
|
<header class="page-header">
|
|
<h1>Organisationen</h1>
|
|
<div class="page-header-meta">
|
|
<p>
|
|
Organisationen verwalten, OpenAlex-Institutionen zuordnen und Status
|
|
festlegen
|
|
</p>
|
|
<button
|
|
mat-flat-button
|
|
color="primary"
|
|
type="button"
|
|
(click)="startCreate()">
|
|
<mat-icon>{{ ADD_BUSINESS_ICON }}</mat-icon>
|
|
Neue Organisation
|
|
</button>
|
|
</div>
|
|
</header>
|
|
|
|
<mat-card appearance="outlined">
|
|
<mat-card-content>
|
|
<app-data-table
|
|
[columns]="organizationColumns"
|
|
[data]="organizationPage().items" />
|
|
</mat-card-content>
|
|
</mat-card>
|
|
<app-query-param-paginator [total]="organizationPage().total" />
|
|
</section>
|
|
|
|
<ng-template #organizationStatusTmp let-row>
|
|
<span class="status" [class.status--deleted]="row.deleted">
|
|
{{ (row.deleted ? 'inactive' : 'active') | status }}
|
|
</span>
|
|
</ng-template>
|
|
|
|
<ng-template #organizationInstitutionsTmp let-row>
|
|
@if ($any(row).institutions.length > 0) {
|
|
<span>
|
|
@for (
|
|
institution of $any(row).institutions;
|
|
track institution.id;
|
|
let index = $index
|
|
) {
|
|
@if (index < 3) {
|
|
{{ institution.display_name
|
|
}}{{
|
|
index < 2 && index < $any(row).institutions.length - 1 ? ', ' : ''
|
|
}}
|
|
}
|
|
}
|
|
@if ($any(row).institutions.length > 3) {
|
|
<span class="more-institutions">
|
|
+ {{ $any(row).institutions.length - 3 }} weitere
|
|
</span>
|
|
}
|
|
</span>
|
|
} @else {
|
|
<span class="no-institutions">Keine Institutionen</span>
|
|
}
|
|
</ng-template>
|
|
|
|
<ng-template #organizationActionsTmp let-row>
|
|
<div class="row-actions">
|
|
<button
|
|
mat-icon-button
|
|
type="button"
|
|
aria-label="Bearbeiten"
|
|
(click)="startEdit(row)">
|
|
<mat-icon>{{ EDIT_ICON }}</mat-icon>
|
|
</button>
|
|
<button
|
|
mat-icon-button
|
|
type="button"
|
|
aria-label="Deaktivieren"
|
|
[disabled]="row.deleted || isCurrentOrganization(row)"
|
|
(click)="deleteOrganization(row)">
|
|
<mat-icon>{{ DELETE_ICON }}</mat-icon>
|
|
</button>
|
|
</div>
|
|
</ng-template>
|