105 lines
3.3 KiB
HTML
105 lines
3.3 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 $index; 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>
|
|
<!-- @if (hierarchySaved() !== null) {
|
|
<app-interaction-feedback
|
|
[success]="hierarchySaved() ?? false"
|
|
[status]="200" />
|
|
} -->
|
|
|
|
@if (can_edit() || can_suggest()) {
|
|
<app-hierarchy-edit-dialog
|
|
[data]="editorTree()"
|
|
[numberOfSuggestions]="
|
|
can_edit() ? 1 : number_of_suggestion_slots()
|
|
"
|
|
[isManager]="can_edit()"
|
|
[editorStatus]="
|
|
pendingSuggestion()?.status === 'new' ? 'in-progress' : null
|
|
"
|
|
(saved)="onHierarchySaved($event)">
|
|
</app-hierarchy-edit-dialog>
|
|
}
|
|
<!-- -->
|
|
<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 $index; 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">
|
|
@if (expanded()) {
|
|
<div
|
|
#chartHost
|
|
appPassiveWheel
|
|
class="uh-chart"
|
|
[style.height.px]="level.height"></div>
|
|
}
|
|
</mat-card-content>
|
|
</mat-card>
|
|
}
|
|
}
|
|
</div>
|
|
}
|
|
</div>
|