91 lines
2.7 KiB
HTML
91 lines
2.7 KiB
HTML
<div class="university-hierarchy">
|
|
@if (loading()) {
|
|
<div class="uh-loader-overlay">
|
|
<mat-spinner diameter="40"></mat-spinner>
|
|
<span class="uh-loader-text">Lade Daten...</span>
|
|
</div>
|
|
}
|
|
|
|
@if (!loading()) {
|
|
<div class="uh-spacer">
|
|
<mat-chip-set
|
|
class="uh-breadcrumb"
|
|
aria-label="Pfad durch die Hierarchie">
|
|
@for (level of levels(); track level.id; let i = $index) {
|
|
<mat-chip
|
|
(click)="jumpToLevel(i)"
|
|
[class.uh-chip-active]="i === levels().length - 1">
|
|
<span class="uh-chip-index">{{ i + 1 }}</span>
|
|
{{ level.title }}
|
|
</mat-chip>
|
|
}
|
|
</mat-chip-set>
|
|
<div>
|
|
<button
|
|
mat-icon-button
|
|
(click)="toggleLanguage()"
|
|
[matTooltip]="
|
|
lang() === 'de' ? 'Switch to English' : 'Auf Deutsch wechseln'
|
|
">
|
|
<mat-icon>translate</mat-icon>
|
|
</button>
|
|
<button
|
|
mat-icon-button
|
|
(click)="resetToRoot()"
|
|
[disabled]="levels().length <= 1"
|
|
matTooltip="Zurücksetzen">
|
|
<mat-icon>restart_alt</mat-icon>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
<div class="uh-row">
|
|
@for (
|
|
level of levels();
|
|
track level.id;
|
|
let i = $index;
|
|
let last = $last
|
|
) {
|
|
@if (!last) {
|
|
<button
|
|
type="button"
|
|
class="uh-strip"
|
|
(click)="jumpToLevel(i)"
|
|
[matTooltip]="level.title"
|
|
matTooltipPosition="right">
|
|
<span class="uh-strip-index">{{ i + 1 }}</span>
|
|
<span class="uh-strip-label">{{ level.title }}</span>
|
|
</button>
|
|
} @else {
|
|
<mat-card class="uh-level-card" appearance="outlined">
|
|
<div class="uh-level-header">
|
|
<div class="uh-level-titles">
|
|
<span class="uh-level-index">Ebene {{ i + 1 }}</span>
|
|
<span class="uh-level-name">{{ level.title }}</span>
|
|
</div>
|
|
@if (i > 0) {
|
|
<button
|
|
mat-icon-button
|
|
class="uh-level-close"
|
|
(click)="removeLevelsFrom(i)"
|
|
matTooltip="Diese Ebene schließen">
|
|
<mat-icon>close</mat-icon>
|
|
</button>
|
|
}
|
|
</div>
|
|
|
|
<mat-card-content class="uh-chart-viewport">
|
|
<div
|
|
echarts
|
|
[options]="level.options"
|
|
[autoResize]="true"
|
|
(chartClick)="onNodeClick($event, i)"
|
|
class="uh-chart"
|
|
[style.height.px]="level.height"></div>
|
|
</mat-card-content>
|
|
</mat-card>
|
|
}
|
|
}
|
|
</div>
|
|
}
|
|
</div>
|