Merge branch 'dev' into feat/add_site_news
LocationBasedServices/smartguide/pipeline/head This commit looks good
LocationBasedServices/smartguide/pipeline/head This commit looks good
This commit is contained in:
@@ -42,6 +42,12 @@
|
||||
[disabled]="!loginForm.valid || (credentialService.validating | async)">
|
||||
Anmelden
|
||||
</button>
|
||||
|
||||
<div class="field" style="text-align: center; margin-top: -10px">
|
||||
<button mat-button type="button" routerLink="/register">
|
||||
Noch kein Konto? <b>Registrieren</b>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
<p class="progress">
|
||||
@if (credentialService.validating | async) {
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
}
|
||||
|
||||
.field {
|
||||
width: 300px;
|
||||
width: 400px;
|
||||
}
|
||||
|
||||
.progress {
|
||||
|
||||
@@ -13,7 +13,7 @@ import { MatIconModule } from '@angular/material/icon';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { Subscription } from 'rxjs';
|
||||
import { MatSnackBar, MatSnackBarModule } from '@angular/material/snack-bar';
|
||||
import { Router } from '@angular/router';
|
||||
import { Router, RouterLink } from '@angular/router';
|
||||
|
||||
@Component({
|
||||
selector: 'app-app-login',
|
||||
@@ -25,6 +25,7 @@ import { Router } from '@angular/router';
|
||||
MatButtonModule,
|
||||
MatIconModule,
|
||||
MatSnackBarModule,
|
||||
RouterLink,
|
||||
],
|
||||
templateUrl: './app-login.component.html',
|
||||
styleUrl: './app-login.component.scss',
|
||||
|
||||
@@ -0,0 +1,102 @@
|
||||
<div class="container">
|
||||
<form class="form" [formGroup]="registerForm">
|
||||
<h3>Konto erstellen</h3>
|
||||
<p class="field">Bitte gib Deine Daten ein, um Dich zu registrieren.</p>
|
||||
|
||||
<mat-form-field class="field">
|
||||
<mat-label>Benutzername</mat-label>
|
||||
<input matInput formControlName="username" />
|
||||
@if (registerForm.controls['username'].hasError('required')) {
|
||||
<mat-error>Fehler: <b>Benutzername</b> erforderlich.</mat-error>
|
||||
} @else if (registerForm.controls['username'].hasError('minlength')) {
|
||||
<mat-error>Fehler: <b>Benutzername</b> ist unvollständig.</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field class="field">
|
||||
<mat-label>E-Mail</mat-label>
|
||||
<input matInput type="email" formControlName="email" />
|
||||
@if (registerForm.controls['email'].hasError('required')) {
|
||||
<mat-error>Fehler: <b>E-Mail</b> erforderlich.</mat-error>
|
||||
} @else if (registerForm.controls['email'].hasError('email')) {
|
||||
<mat-error>Fehler: Ungültige <b>E-Mail</b> Adresse.</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field class="field">
|
||||
<mat-label>Passwort</mat-label>
|
||||
<input
|
||||
matInput
|
||||
[type]="showPassword ? 'text' : 'password'"
|
||||
formControlName="password" />
|
||||
@if (showPassword) {
|
||||
<mat-icon matSuffix (click)="showPassword = false">visibility</mat-icon>
|
||||
} @else {
|
||||
<mat-icon matSuffix (click)="showPassword = true"
|
||||
>visibility_off</mat-icon
|
||||
>
|
||||
}
|
||||
@if (registerForm.controls['password'].hasError('required')) {
|
||||
<mat-error>Fehler: <b>Passwort</b> erforderlich.</mat-error>
|
||||
} @else if (registerForm.controls['password'].hasError('minlength')) {
|
||||
<mat-error>Fehler: <b>Passwort</b> ist unvollständig.</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field class="field">
|
||||
<mat-label>Institution</mat-label>
|
||||
|
||||
<mat-icon matPrefix>apartment</mat-icon>
|
||||
<input
|
||||
type="text"
|
||||
matInput
|
||||
formControlName="institution"
|
||||
[matAutocomplete]="auto"
|
||||
placeholder="Institution suchen..." />
|
||||
@if (registerForm.controls['institution'].hasError('required')) {
|
||||
<mat-error>Fehler: <b>Institution</b> erforderlich.</mat-error>
|
||||
}
|
||||
<mat-autocomplete
|
||||
#auto="matAutocomplete"
|
||||
(optionSelected)="onInstitutionSelected($event)">
|
||||
@for (institution of institutionOptions(); track institution.id) {
|
||||
<mat-option
|
||||
[value]="institution.display_name"
|
||||
style="font-size: 16px">
|
||||
<div>
|
||||
<span>{{ institution.display_name }}</span>
|
||||
</div>
|
||||
@if (institution.hint) {
|
||||
<small>{{ institution.hint }}</small>
|
||||
}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-autocomplete>
|
||||
</mat-form-field>
|
||||
|
||||
<div class="field checkbox-container">
|
||||
<mat-checkbox formControlName="superadmin"
|
||||
>Superadmin Rechte</mat-checkbox
|
||||
>
|
||||
</div>
|
||||
|
||||
<button
|
||||
mat-raised-button
|
||||
class="button"
|
||||
(click)="submit()"
|
||||
[disabled]="
|
||||
!registerForm.valid || (credentialService.validating | async)
|
||||
">
|
||||
Registrieren
|
||||
</button>
|
||||
|
||||
<div class="field" style="text-align: center; margin-top: -10px">
|
||||
<button mat-button type="button" routerLink="/login">
|
||||
Bereits ein Konto? <b>Anmelden</b>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
<p class="progress">
|
||||
<!-- Statusanzeige analog zum Login-Formular -->
|
||||
</p>
|
||||
</div>
|
||||
@@ -0,0 +1,56 @@
|
||||
.container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: linear-gradient(160deg, #f4f6fb, #e8ecf7);
|
||||
}
|
||||
|
||||
.form {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
background: #fff;
|
||||
border: none;
|
||||
border-radius: 12px;
|
||||
box-shadow:
|
||||
0 2px 12px #1a3a6e1a,
|
||||
0 1px 4px #0000000f;
|
||||
gap: 20px;
|
||||
padding: 36px 32px 28px;
|
||||
|
||||
h3 {
|
||||
margin: 0 0 4px;
|
||||
font-weight: 600;
|
||||
color: #1a3a6e;
|
||||
}
|
||||
}
|
||||
|
||||
.button {
|
||||
min-height: 48px;
|
||||
min-width: 140px;
|
||||
border-radius: 8px;
|
||||
font-weight: 500;
|
||||
letter-spacing: 0.02em;
|
||||
}
|
||||
|
||||
.field {
|
||||
width: 400px;
|
||||
}
|
||||
|
||||
.checkbox-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.progress {
|
||||
padding-top: 5px;
|
||||
width: 300px;
|
||||
height: 2em;
|
||||
text-align: center;
|
||||
font-size: small;
|
||||
color: #585f71;
|
||||
}
|
||||
@@ -0,0 +1,173 @@
|
||||
import {
|
||||
Component,
|
||||
inject,
|
||||
OnDestroy,
|
||||
signal,
|
||||
DestroyRef,
|
||||
OnInit,
|
||||
} from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
||||
import { Router, RouterLink } from '@angular/router';
|
||||
import {
|
||||
FormBuilder,
|
||||
FormGroup,
|
||||
ReactiveFormsModule,
|
||||
Validators,
|
||||
} from '@angular/forms';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatFormFieldModule } from '@angular/material/form-field';
|
||||
import { MatInputModule } from '@angular/material/input';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { MatCheckboxModule } from '@angular/material/checkbox';
|
||||
import { CredentialService } from '../../shared/services/credential.service';
|
||||
import { MatSnackBar, MatSnackBarModule } from '@angular/material/snack-bar';
|
||||
import {
|
||||
Subscription,
|
||||
map,
|
||||
switchMap,
|
||||
debounceTime,
|
||||
distinctUntilChanged,
|
||||
catchError,
|
||||
of,
|
||||
} from 'rxjs';
|
||||
import {
|
||||
MatAutocompleteModule,
|
||||
MatAutocompleteSelectedEvent,
|
||||
} from '@angular/material/autocomplete';
|
||||
import { InstitutionsService } from '../../api';
|
||||
@Component({
|
||||
selector: 'app-register',
|
||||
standalone: true,
|
||||
imports: [
|
||||
CommonModule,
|
||||
ReactiveFormsModule,
|
||||
MatButtonModule,
|
||||
MatFormFieldModule,
|
||||
MatInputModule,
|
||||
MatIconModule,
|
||||
MatCheckboxModule,
|
||||
RouterLink,
|
||||
MatSnackBarModule,
|
||||
MatAutocompleteModule,
|
||||
],
|
||||
templateUrl: './app-register.component.html',
|
||||
styleUrl: './app-register.component.scss',
|
||||
})
|
||||
export class AppRegisterComponent implements OnDestroy, OnInit {
|
||||
private readonly fb = inject(FormBuilder);
|
||||
protected readonly credentialService = inject(CredentialService);
|
||||
private readonly router = inject(Router);
|
||||
private readonly snackBar = inject(MatSnackBar);
|
||||
private readonly destroyRef = inject(DestroyRef);
|
||||
private subscription?: Subscription;
|
||||
private institutionsService = inject(InstitutionsService);
|
||||
registerForm: FormGroup = this.fb.group({
|
||||
username: ['', [Validators.required, Validators.minLength(4)]],
|
||||
email: ['', [Validators.required, Validators.email]],
|
||||
password: ['', [Validators.required, Validators.minLength(8)]],
|
||||
institution: ['', [Validators.required]],
|
||||
superadmin: [false],
|
||||
});
|
||||
readonly institutionOptions = signal<any[]>([]);
|
||||
showPassword = false;
|
||||
|
||||
constructor() {
|
||||
this.setupInstitutionAutocomplete();
|
||||
}
|
||||
ngOnInit(): void {
|
||||
this.subscription = this.credentialService.validating.subscribe(
|
||||
(validating) => {
|
||||
if (validating) {
|
||||
this.registerForm.disable();
|
||||
} else {
|
||||
this.registerForm.enable();
|
||||
this.checkEnter();
|
||||
}
|
||||
},
|
||||
);
|
||||
if (!this.credentialService.validating) {
|
||||
this.checkEnter();
|
||||
}
|
||||
}
|
||||
ngOnDestroy(): void {
|
||||
this.subscription?.unsubscribe();
|
||||
}
|
||||
|
||||
checkEnter(): void {
|
||||
if (this.credentialService.authenticated.value) {
|
||||
this.router.navigate(['/dashboard']);
|
||||
}
|
||||
}
|
||||
submit() {
|
||||
if (this.registerForm.valid) {
|
||||
this.credentialService.validating.next(true);
|
||||
this.registerForm.disable();
|
||||
|
||||
this.subscription = this.credentialService
|
||||
.registerAccount(this.registerForm.value)
|
||||
.subscribe({
|
||||
next: () => {
|
||||
this.credentialService.validating.next(false);
|
||||
this.snackBar.open(
|
||||
'Konto erfolgreich erstellt! Du kannst Dich jetzt anmelden.',
|
||||
'OK',
|
||||
{ duration: 5000 },
|
||||
);
|
||||
this.router.navigate(['/login']);
|
||||
},
|
||||
error: (err) => {
|
||||
this.credentialService.validating.next(false);
|
||||
this.registerForm.enable();
|
||||
const message =
|
||||
err.error?.message ||
|
||||
'Fehler bei der Registrierung. Bitte versuche es später erneut.';
|
||||
this.snackBar.open(message, 'Schließen', {
|
||||
panelClass: ['error-snackbar'],
|
||||
duration: 5000,
|
||||
});
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private setupInstitutionAutocomplete(): void {
|
||||
this.registerForm.controls['institution'].valueChanges
|
||||
.pipe(
|
||||
debounceTime(250),
|
||||
map((value) => (typeof value === 'string' ? value.trim() : '')),
|
||||
distinctUntilChanged(),
|
||||
switchMap((query) => {
|
||||
if (query.length < 2) {
|
||||
this.institutionOptions.set([]);
|
||||
return of([]);
|
||||
}
|
||||
|
||||
return this.searchInstitutions(query).pipe(
|
||||
catchError((ev) => {
|
||||
console.log(ev);
|
||||
return of([]);
|
||||
}),
|
||||
);
|
||||
}),
|
||||
takeUntilDestroyed(this.destroyRef),
|
||||
)
|
||||
.subscribe((options) => {
|
||||
this.institutionOptions.set(options);
|
||||
});
|
||||
}
|
||||
|
||||
private searchInstitutions(query: string) {
|
||||
return this.institutionsService
|
||||
.autocompleteInstitutions(query, undefined, undefined, 10)
|
||||
.pipe(map((response) => response.results ?? []));
|
||||
}
|
||||
|
||||
onInstitutionSelected(event: MatAutocompleteSelectedEvent): void {
|
||||
const val = event.option.value;
|
||||
this.registerForm.controls['institution'].setValue(val, {
|
||||
emitEvent: false,
|
||||
});
|
||||
this.institutionOptions.set([]);
|
||||
}
|
||||
}
|
||||
@@ -5,15 +5,7 @@
|
||||
{{ getInitials(person.display_name) }}
|
||||
</div>
|
||||
<div class="header-main">
|
||||
<div class="rating-and-bookmark">
|
||||
@if (person.relevance_rating) {
|
||||
<span
|
||||
[skText]="loading"
|
||||
class="suitability-badge"
|
||||
[ngClass]="getRatingClass(person.relevance_rating)">
|
||||
{{ person.relevance_rating }}
|
||||
</span>
|
||||
}
|
||||
<div class="bookmark">
|
||||
<button
|
||||
class="bookmark-btn"
|
||||
(click)="
|
||||
@@ -26,16 +18,20 @@
|
||||
}}</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
<h2 [skText]="loading" class="person-name">{{ person.display_name }}</h2>
|
||||
<h2
|
||||
[skText]="loading"
|
||||
class="person-name"
|
||||
[title]="person.display_name ?? ''">
|
||||
{{ person.display_name ?? '' }}
|
||||
</h2>
|
||||
<p [skText]="loading" class="person-id">
|
||||
{{ getDistinguishingId(person) }}
|
||||
{{ getDistinguishingId(person) ?? '' }}
|
||||
</p>
|
||||
<p [skText]="loading" class="stats">
|
||||
Publikationen: {{ person.works_count }} · Zitationen:
|
||||
{{ person.cited_by_count }}
|
||||
{{ getStatsString() }}
|
||||
</p>
|
||||
<p [skText]="loading" class="stats">
|
||||
h_index: {{ person.summary_stats?.h_index }}
|
||||
{{ getHIndexString() }}
|
||||
</p>
|
||||
</div>
|
||||
</a>
|
||||
@@ -60,9 +56,12 @@
|
||||
"
|
||||
>apartment</mat-icon
|
||||
>
|
||||
<span [skText]="loading" style="vertical-align: middle">{{
|
||||
inst.display_name ?? '' | truncate: 30
|
||||
}}</span>
|
||||
<span
|
||||
[skText]="loading"
|
||||
class="institution-name"
|
||||
style="vertical-align: middle"
|
||||
>{{ inst.display_name ?? '' }}</span
|
||||
>
|
||||
@if (inst.country_code && !loading) {
|
||||
<img
|
||||
alt=""
|
||||
@@ -71,6 +70,7 @@
|
||||
height="10"
|
||||
style="margin-left: 6px; vertical-align: middle" />
|
||||
<span
|
||||
class="country-code"
|
||||
style="font-size: 9px; margin-left: 2px; vertical-align: middle"
|
||||
>{{ inst.country_code.toUpperCase() }}</span
|
||||
>
|
||||
|
||||
@@ -108,6 +108,11 @@
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
color: var(--sg-text);
|
||||
min-height: 24px;
|
||||
line-height: 24px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.institution {
|
||||
display: flex;
|
||||
@@ -133,6 +138,26 @@
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
transition: all 0.2s ease;
|
||||
max-width: 100%;
|
||||
box-sizing: border-box;
|
||||
|
||||
.institution-name {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
min-width: 0;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.flag-img {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.country-code {
|
||||
display: inline-block;
|
||||
flex-shrink: 0;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background: var(--sg-primary);
|
||||
@@ -143,13 +168,15 @@
|
||||
|
||||
.flag-img {
|
||||
border: 1px solid;
|
||||
vertical-align: -10px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.person-id {
|
||||
margin: 2px 0 0;
|
||||
font-size: 10px;
|
||||
color: var(--sg-text-soft);
|
||||
min-height: 15px;
|
||||
line-height: 15px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
@@ -159,6 +186,11 @@
|
||||
margin: 4px 0 0;
|
||||
font-size: 10px;
|
||||
color: var(--sg-text-muted);
|
||||
min-height: 15px;
|
||||
line-height: 15px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.card-body {
|
||||
@@ -186,6 +218,11 @@
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease;
|
||||
max-width: 100%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
box-sizing: border-box;
|
||||
|
||||
&:hover {
|
||||
background: var(--sg-primary-soft);
|
||||
|
||||
@@ -3,18 +3,11 @@ import { CommonModule } from '@angular/common';
|
||||
import { RouterLink } from '@angular/router';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { CustomAuthor, DehydratedInstitution, WorkTopic } from '../../api';
|
||||
import { TruncatePipe } from '../../shared/pipes/truncate.pipe';
|
||||
import { SkTextDirective } from '../../custom-directives/sk-text.directive';
|
||||
@Component({
|
||||
selector: 'app-person-card',
|
||||
standalone: true,
|
||||
imports: [
|
||||
CommonModule,
|
||||
RouterLink,
|
||||
MatIconModule,
|
||||
TruncatePipe,
|
||||
SkTextDirective,
|
||||
],
|
||||
imports: [CommonModule, RouterLink, MatIconModule, SkTextDirective],
|
||||
templateUrl: './person-card.component.html',
|
||||
styleUrl: './person-card.component.scss',
|
||||
})
|
||||
@@ -62,8 +55,11 @@ export class PersonCardComponent {
|
||||
if (topic.field?.display_name) parts.push(topic.field.display_name);
|
||||
if (topic.subfield?.display_name) parts.push(topic.subfield.display_name);
|
||||
|
||||
if (parts.length === 0) return topic.display_name || '';
|
||||
return parts.join(' - ');
|
||||
const path = parts.join(' - ');
|
||||
if (topic.display_name) {
|
||||
return path ? `${topic.display_name}\n(${path})` : topic.display_name;
|
||||
}
|
||||
return path;
|
||||
}
|
||||
|
||||
getDistinguishingId(person: CustomAuthor): string {
|
||||
@@ -74,6 +70,30 @@ export class PersonCardComponent {
|
||||
return '';
|
||||
}
|
||||
|
||||
getStatsString(): string {
|
||||
const works = this.person.works_count;
|
||||
const citations = this.person.cited_by_count;
|
||||
const hasWorks = works !== undefined && works !== null;
|
||||
const hasCitations = citations !== undefined && citations !== null;
|
||||
|
||||
if (hasWorks && hasCitations) {
|
||||
return `Publikationen: ${works} · Zitationen: ${citations}`;
|
||||
} else if (hasWorks) {
|
||||
return `Publikationen: ${works}`;
|
||||
} else if (hasCitations) {
|
||||
return `Zitationen: ${citations}`;
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
getHIndexString(): string {
|
||||
const hIndex = this.person.summary_stats?.h_index;
|
||||
if (hIndex !== undefined && hIndex !== null) {
|
||||
return `h_index: ${hIndex}`;
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
toggleBookmark(): void {
|
||||
this.bookmarkToggle.emit(this.person);
|
||||
}
|
||||
|
||||
@@ -303,17 +303,6 @@
|
||||
}
|
||||
} @else {
|
||||
<div class="funding-container">
|
||||
<div class="funding-summary">
|
||||
<p class="summary-line">
|
||||
<span class="summary-value">{{ getUniquePublicationCount() }}</span>
|
||||
<span class="summary-label"> Einzigartige Publikationen</span>
|
||||
</p>
|
||||
<p class="summary-line">
|
||||
<span class="summary-value">{{ filteredFunders.length }}</span>
|
||||
<span class="summary-label"> Förderer</span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="funding-content">
|
||||
<!-- Linke Seite: Tabelle -->
|
||||
<div class="funding-list">
|
||||
@@ -321,22 +310,30 @@
|
||||
<div class="filter-bar">
|
||||
<span>Filter nach Position:</span>
|
||||
<button
|
||||
type="button"
|
||||
[class.active]="activeFilter === 'all'"
|
||||
[attr.aria-pressed]="activeFilter === 'all'"
|
||||
(click)="setFilter('all')">
|
||||
Alle
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
[class.active]="activeFilter === 'first'"
|
||||
[attr.aria-pressed]="activeFilter === 'first'"
|
||||
(click)="setFilter('first')">
|
||||
Erstautor
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
[class.active]="activeFilter === 'middle'"
|
||||
[attr.aria-pressed]="activeFilter === 'middle'"
|
||||
(click)="setFilter('middle')">
|
||||
Mitautor
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
[class.active]="activeFilter === 'last'"
|
||||
[attr.aria-pressed]="activeFilter === 'last'"
|
||||
(click)="setFilter('last')">
|
||||
Letztautor
|
||||
</button>
|
||||
@@ -466,7 +463,44 @@
|
||||
</div>
|
||||
} @else {
|
||||
<div class="funding-detail empty">
|
||||
<p>Klicke auf einen Förderer für Details.</p>
|
||||
<div class="empty-overview">
|
||||
@if (activeFilter !== 'all') {
|
||||
<span class="empty-overview__filter">
|
||||
Filter: {{ getPositionLabel(activeFilter) }}
|
||||
</span>
|
||||
}
|
||||
<h3 class="empty-overview__title">Förderübersicht</h3>
|
||||
<p class="empty-overview__subtitle">
|
||||
@if (activeFilter === 'all') {
|
||||
Alle geförderten Publikationen dieser Person im Überblick.
|
||||
} @else {
|
||||
Nur Publikationen mit der gewählten Autorenposition.
|
||||
}
|
||||
</p>
|
||||
<div class="empty-overview__stats">
|
||||
<div class="empty-overview__stat">
|
||||
<span class="empty-overview__stat-value">{{
|
||||
getUniquePublicationCount()
|
||||
}}</span>
|
||||
<span class="empty-overview__stat-label"
|
||||
>Einzigartige Publikationen</span
|
||||
>
|
||||
</div>
|
||||
<div class="empty-overview__stat">
|
||||
<span class="empty-overview__stat-value">{{
|
||||
filteredFunders.length
|
||||
}}</span>
|
||||
<span class="empty-overview__stat-label">Förderer</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="empty-overview__hint">
|
||||
<span class="material-icons" aria-hidden="true">touch_app</span>
|
||||
<p>
|
||||
Wähle links einen Förderer aus, um die zugehörigen Publikationen
|
||||
anzuzeigen.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
@@ -23,38 +23,58 @@
|
||||
|
||||
button {
|
||||
padding: 6px 14px;
|
||||
border: 1px solid #ccc;
|
||||
border: 1px solid transparent;
|
||||
border-radius: 20px;
|
||||
background: white;
|
||||
background: #fff;
|
||||
cursor: pointer;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
|
||||
&:hover {
|
||||
background: #f0f0f0;
|
||||
&.active {
|
||||
font-weight: 600;
|
||||
border-width: 2px;
|
||||
padding: 5px 13px;
|
||||
}
|
||||
}
|
||||
|
||||
button:nth-child(2) {
|
||||
background: #f0f6ff;
|
||||
color: #0b63ce;
|
||||
border-color: #bdd4ff;
|
||||
color: #3b82c4;
|
||||
border-color: #c7dcfa;
|
||||
&.active {
|
||||
color: #0b4f9e;
|
||||
background: #e8f2ff;
|
||||
border-color: #3b82c4;
|
||||
}
|
||||
}
|
||||
|
||||
button:nth-child(3) {
|
||||
background: #effaf3;
|
||||
color: #24834f;
|
||||
border-color: #bdebcf;
|
||||
color: #3d9a66;
|
||||
border-color: #b8e6cb;
|
||||
&.active {
|
||||
color: #1a6b3f;
|
||||
background: #e8f7ee;
|
||||
border-color: #3d9a66;
|
||||
}
|
||||
}
|
||||
|
||||
button:nth-child(4) {
|
||||
background: #f6f0ff;
|
||||
color: #7255d9;
|
||||
border-color: #d8cafe;
|
||||
color: #7c65d9;
|
||||
border-color: #d5c8f8;
|
||||
&.active {
|
||||
color: #5b3fc9;
|
||||
background: #f0ebff;
|
||||
border-color: #7c65d9;
|
||||
}
|
||||
}
|
||||
|
||||
button:nth-child(5) {
|
||||
background: #fff7e8;
|
||||
color: #c67500;
|
||||
border-color: #ffd796;
|
||||
color: #d1435f;
|
||||
border-color: #f8c4ce;
|
||||
&.active {
|
||||
color: #a61e3a;
|
||||
background: #ffe8ec;
|
||||
border-color: #d1435f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -119,11 +139,6 @@
|
||||
|
||||
tr {
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
background: #f5f5f5;
|
||||
}
|
||||
|
||||
&.selected {
|
||||
background: #f0f0f0;
|
||||
}
|
||||
@@ -152,18 +167,26 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #999;
|
||||
min-height: 200px;
|
||||
min-height: 280px;
|
||||
padding: 24px;
|
||||
background:
|
||||
radial-gradient(
|
||||
circle at 100% 0%,
|
||||
rgba(200, 217, 255, 0.35),
|
||||
transparent 45%
|
||||
),
|
||||
linear-gradient(160deg, #fff 0%, #f8faff 100%);
|
||||
border-color: #dbe3f2;
|
||||
}
|
||||
|
||||
h3 {
|
||||
margin: 0 0 16px 0;
|
||||
margin: 0 0 16px;
|
||||
font-size: 16px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
h4 {
|
||||
margin: 16px 0 8px 0;
|
||||
margin: 16px 0 8px;
|
||||
font-size: 14px;
|
||||
color: #555;
|
||||
}
|
||||
@@ -172,16 +195,13 @@
|
||||
.position-stats {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
margin-bottom: 16px;
|
||||
margin: 0 auto 16px;
|
||||
width: fit-content;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
|
||||
.stat {
|
||||
flex: 0 auto;
|
||||
min-width: 100px;
|
||||
text-align: center;
|
||||
background: white;
|
||||
background: #fff;
|
||||
border: 1px solid #e0e0e0;
|
||||
border-radius: 8px;
|
||||
padding: 10px;
|
||||
@@ -200,20 +220,50 @@
|
||||
color: #333;
|
||||
}
|
||||
}
|
||||
.stat-first {
|
||||
background: #effaf3;
|
||||
border-color: #bdebcf;
|
||||
}
|
||||
}
|
||||
|
||||
.stat-middle {
|
||||
background: #f6f0ff;
|
||||
border-color: #d8cafe;
|
||||
}
|
||||
.stat-first,
|
||||
.position-badge--first,
|
||||
.hero-highlight--open,
|
||||
.publication-detail-grid .access-badge--open {
|
||||
background: #effaf3;
|
||||
}
|
||||
|
||||
.stat-last {
|
||||
background: #fff7e8;
|
||||
border-color: #ffd796;
|
||||
}
|
||||
.stat-first {
|
||||
border-color: #bdebcf;
|
||||
}
|
||||
|
||||
.position-badge--first {
|
||||
color: #24834f;
|
||||
border: 1px solid #bdebcf;
|
||||
}
|
||||
|
||||
.hero-highlight--open,
|
||||
.publication-detail-grid .access-badge--open {
|
||||
border-color: #bdebcf;
|
||||
color: #24834f;
|
||||
}
|
||||
|
||||
.stat-middle,
|
||||
.position-badge--middle {
|
||||
background: #f6f0ff;
|
||||
border-color: #d8cafe;
|
||||
}
|
||||
|
||||
.position-badge--middle {
|
||||
color: #7255d9;
|
||||
border: 1px solid #d8cafe;
|
||||
}
|
||||
|
||||
.stat-last,
|
||||
.position-badge--last {
|
||||
background: #fff1f2;
|
||||
border-color: #fda4af;
|
||||
}
|
||||
|
||||
.position-badge--last {
|
||||
color: #be123c;
|
||||
border: 1px solid #fda4af;
|
||||
}
|
||||
|
||||
.publication-list {
|
||||
@@ -241,7 +291,7 @@
|
||||
padding: 4px 10px;
|
||||
border: 1px solid #d0d0d0;
|
||||
border-radius: 6px;
|
||||
background: white;
|
||||
background: #fff;
|
||||
cursor: pointer;
|
||||
font-size: 12px;
|
||||
|
||||
@@ -257,22 +307,87 @@
|
||||
}
|
||||
}
|
||||
|
||||
.funding-summary {
|
||||
margin-bottom: 16px;
|
||||
.empty-overview {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
|
||||
.summary-line {
|
||||
margin: 0 0 4px 0;
|
||||
font-size: 14px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.summary-label {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.summary-value {
|
||||
&__filter {
|
||||
display: inline-block;
|
||||
margin-bottom: 12px;
|
||||
padding: 4px 12px;
|
||||
border: 1px solid #dbe3f2;
|
||||
border-radius: 999px;
|
||||
background: rgba(255, 255, 255, 0.9);
|
||||
color: #475569;
|
||||
font-size: 0.75rem;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
&__title {
|
||||
margin: 0 0 8px;
|
||||
font-size: 1.125rem;
|
||||
color: #1e3a5f;
|
||||
}
|
||||
|
||||
&__subtitle {
|
||||
margin: 0 0 20px;
|
||||
color: #64748b;
|
||||
font-size: 0.875rem;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
&__stats {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 12px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
&__stat {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
padding: 16px 12px;
|
||||
border: 1px solid #e0e6f0;
|
||||
border-radius: 10px;
|
||||
background: rgba(255, 255, 255, 0.85);
|
||||
}
|
||||
|
||||
&__stat-value {
|
||||
font-size: 1.75rem;
|
||||
font-weight: 700;
|
||||
line-height: 1.1;
|
||||
color: #1e3a5f;
|
||||
}
|
||||
|
||||
&__stat-label {
|
||||
font-size: 0.8rem;
|
||||
line-height: 1.35;
|
||||
color: #64748b;
|
||||
}
|
||||
|
||||
&__hint {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 10px;
|
||||
padding: 12px 14px;
|
||||
border: 1px dashed #c7d5ea;
|
||||
border-radius: 10px;
|
||||
background: rgba(255, 255, 255, 0.7);
|
||||
text-align: left;
|
||||
|
||||
.material-icons {
|
||||
font-size: 20px;
|
||||
color: #3b82c4;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0;
|
||||
color: #475569;
|
||||
font-size: 0.875rem;
|
||||
line-height: 1.45;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -280,15 +395,25 @@
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
.publication-detail-back {
|
||||
.publication-detail-back,
|
||||
.publication-more-info {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
border: 0;
|
||||
background: transparent;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.publication-detail-back {
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.publication-more-info {
|
||||
gap: 4px;
|
||||
margin-top: 6px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.publication-detail-hero {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
@@ -326,7 +451,6 @@
|
||||
font-size: 0.75rem;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.02em;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -362,7 +486,6 @@
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
flex-shrink: 0;
|
||||
padding: 10px 16px;
|
||||
border: 1px solid #bdd4ff;
|
||||
border-radius: 8px;
|
||||
@@ -371,11 +494,6 @@
|
||||
font-weight: 600;
|
||||
font-size: 0.875rem;
|
||||
text-decoration: none;
|
||||
white-space: nowrap;
|
||||
|
||||
&:hover {
|
||||
background: #e3efff;
|
||||
}
|
||||
|
||||
.material-icons {
|
||||
font-size: 18px;
|
||||
@@ -383,21 +501,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 720px) {
|
||||
.publication-detail-hero {
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
|
||||
&__action {
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.hero-highlight {
|
||||
display: inline-flex;
|
||||
flex-direction: column;
|
||||
min-width: 72px;
|
||||
padding: 8px 12px;
|
||||
border: 1px solid #e0e6f0;
|
||||
border-radius: 8px;
|
||||
@@ -414,7 +520,6 @@
|
||||
font-size: 0.7rem;
|
||||
color: #64748b;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.03em;
|
||||
}
|
||||
|
||||
&--badge {
|
||||
@@ -426,12 +531,6 @@
|
||||
color: #475569;
|
||||
}
|
||||
|
||||
&--open {
|
||||
border-color: #bdebcf;
|
||||
background: #effaf3;
|
||||
color: #24834f;
|
||||
}
|
||||
|
||||
&--closed {
|
||||
border-color: #e0e6f0;
|
||||
background: #f8fafc;
|
||||
@@ -447,24 +546,6 @@
|
||||
font-size: 0.8rem;
|
||||
font-weight: 700;
|
||||
|
||||
&--first {
|
||||
background: #effaf3;
|
||||
color: #24834f;
|
||||
border: 1px solid #bdebcf;
|
||||
}
|
||||
|
||||
&--middle {
|
||||
background: #f6f0ff;
|
||||
color: #7255d9;
|
||||
border: 1px solid #d8cafe;
|
||||
}
|
||||
|
||||
&--last {
|
||||
background: #fff7e8;
|
||||
color: #c67500;
|
||||
border: 1px solid #ffd796;
|
||||
}
|
||||
|
||||
&--unknown {
|
||||
background: #f1f5f9;
|
||||
color: #64748b;
|
||||
@@ -472,179 +553,125 @@
|
||||
}
|
||||
}
|
||||
|
||||
.publication-detail-grid {
|
||||
$g: '.publication-detail-grid';
|
||||
|
||||
#{$g} {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.publication-detail-main,
|
||||
.publication-detail-side {
|
||||
display: grid;
|
||||
gap: 12px;
|
||||
min-width: 0;
|
||||
}
|
||||
#{$g} .publication-detail-main,
|
||||
#{$g} .publication-detail-side {
|
||||
display: grid;
|
||||
gap: 12px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.publication-detail-section {
|
||||
border: 1px solid #e0e6f0;
|
||||
border-radius: 10px;
|
||||
padding: 18px;
|
||||
background: #fff;
|
||||
#{$g} .publication-detail-section {
|
||||
border: 1px solid #e0e6f0;
|
||||
border-radius: 10px;
|
||||
padding: 18px;
|
||||
background: #fff;
|
||||
|
||||
h3 {
|
||||
margin: 0 0 14px;
|
||||
font-size: 1rem;
|
||||
color: #1e3a5f;
|
||||
}
|
||||
|
||||
&--funding {
|
||||
background: #fafbfd;
|
||||
}
|
||||
}
|
||||
|
||||
.publication-overview,
|
||||
.publication-abstract {
|
||||
margin: 0;
|
||||
color: #334155;
|
||||
line-height: 1.65;
|
||||
}
|
||||
|
||||
.publication-detail-facts {
|
||||
display: grid;
|
||||
gap: 12px;
|
||||
margin: 0;
|
||||
|
||||
div {
|
||||
display: grid;
|
||||
grid-template-columns: 130px minmax(0, 1fr);
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
dt {
|
||||
color: #64748b;
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
|
||||
dd {
|
||||
margin: 0;
|
||||
word-break: break-word;
|
||||
color: #1e293b;
|
||||
}
|
||||
}
|
||||
|
||||
.tag-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 6px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
|
||||
&--compact .tag {
|
||||
font-size: 0.75rem;
|
||||
padding: 3px 8px;
|
||||
}
|
||||
}
|
||||
|
||||
.tag {
|
||||
padding: 4px 10px;
|
||||
border-radius: 999px;
|
||||
background: #f0f6ff;
|
||||
border: 1px solid #dbeafe;
|
||||
color: #1e40af;
|
||||
font-size: 0.8rem;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.access-badge {
|
||||
display: inline-flex;
|
||||
padding: 4px 10px;
|
||||
border-radius: 999px;
|
||||
font-size: 0.8rem;
|
||||
font-weight: 600;
|
||||
background: #f1f5f9;
|
||||
color: #64748b;
|
||||
|
||||
&--open {
|
||||
background: #effaf3;
|
||||
color: #24834f;
|
||||
}
|
||||
|
||||
&--closed {
|
||||
background: #f8fafc;
|
||||
color: #475569;
|
||||
}
|
||||
}
|
||||
|
||||
.access-actions {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 10px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.inline-action {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
color: #0b63ce;
|
||||
font-weight: 600;
|
||||
font-size: 0.875rem;
|
||||
text-decoration: none;
|
||||
|
||||
.material-icons {
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
.warning-badge {
|
||||
display: inline-flex;
|
||||
padding: 4px 10px;
|
||||
border-radius: 999px;
|
||||
background: #fef2f2;
|
||||
border: 1px solid #fecaca;
|
||||
color: #b91c1c;
|
||||
font-size: 0.8rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.citation-year-table {
|
||||
border-collapse: collapse;
|
||||
|
||||
th,
|
||||
td {
|
||||
padding: 2px 0;
|
||||
font-weight: normal;
|
||||
text-align: left;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
th {
|
||||
padding-right: 20px;
|
||||
font-weight: 600;
|
||||
color: #334155;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
td {
|
||||
color: #1e293b;
|
||||
}
|
||||
h3 {
|
||||
margin: 0 0 14px;
|
||||
font-size: 1rem;
|
||||
color: #1e3a5f;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 960px) {
|
||||
.publication-detail-grid {
|
||||
grid-template-columns: 1fr;
|
||||
#{$g} .publication-overview,
|
||||
#{$g} .publication-abstract {
|
||||
margin: 0;
|
||||
color: #334155;
|
||||
line-height: 1.65;
|
||||
}
|
||||
|
||||
#{$g} .publication-detail-facts {
|
||||
display: grid;
|
||||
gap: 12px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#{$g} .publication-detail-facts div {
|
||||
display: grid;
|
||||
grid-template-columns: 130px minmax(0, 1fr);
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
#{$g} .publication-detail-facts dt {
|
||||
color: #64748b;
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
|
||||
#{$g} .publication-detail-facts dd {
|
||||
margin: 0;
|
||||
word-break: break-word;
|
||||
color: #1e293b;
|
||||
}
|
||||
|
||||
#{$g} .tag-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 6px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
#{$g} .tag,
|
||||
#{$g} .access-badge,
|
||||
#{$g} .warning-badge {
|
||||
display: inline-flex;
|
||||
padding: 4px 10px;
|
||||
border-radius: 999px;
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
|
||||
#{$g} .tag {
|
||||
background: #f0f6ff;
|
||||
border: 1px solid #dbeafe;
|
||||
color: #1e40af;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
#{$g} .access-badge {
|
||||
font-weight: 600;
|
||||
background: #f1f5f9;
|
||||
color: #64748b;
|
||||
}
|
||||
|
||||
#{$g} .access-badge--closed {
|
||||
background: #f8fafc;
|
||||
color: #475569;
|
||||
}
|
||||
|
||||
#{$g} .inline-action {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
color: #0b63ce;
|
||||
font-weight: 600;
|
||||
font-size: 0.875rem;
|
||||
text-decoration: none;
|
||||
|
||||
.material-icons {
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
#{$g} .warning-badge {
|
||||
background: #fef2f2;
|
||||
border: 1px solid #fecaca;
|
||||
color: #b91c1c;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.publication-item {
|
||||
padding: 8px 0;
|
||||
border-bottom: 2px solid #5b5555;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
background: #f9f9f9;
|
||||
}
|
||||
}
|
||||
|
||||
.publication-title {
|
||||
@@ -654,30 +681,39 @@
|
||||
word-break: break-word;
|
||||
display: block;
|
||||
}
|
||||
.publication-more-info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
margin-top: 6px;
|
||||
border: 0;
|
||||
background: transparent;
|
||||
padding: 0;
|
||||
cursor: pointer;
|
||||
|
||||
.mehr-infos-label,
|
||||
.publication-link-icon {
|
||||
color: #1976d2;
|
||||
}
|
||||
|
||||
.mehr-infos-label {
|
||||
font-size: 0.8rem;
|
||||
color: #1976d2;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.publication-link-icon {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #1976d2;
|
||||
flex-shrink: 0;
|
||||
|
||||
.material-icons {
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 720px) {
|
||||
.publication-detail-hero {
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
|
||||
&__action {
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 960px) {
|
||||
#{$g} {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
+39
-6
@@ -225,6 +225,10 @@
|
||||
type="button"
|
||||
class="main-topic-button"
|
||||
[disabled]="!getMainTopicItem(item)?.id"
|
||||
[matTooltip]="getTopicDescription(getMainTopicItem(item))"
|
||||
[matTooltipDisabled]="
|
||||
!hasTopicDescription(getMainTopicItem(item))
|
||||
"
|
||||
(click)="
|
||||
selectTopic(getMainTopicItem(item), [item.year])
|
||||
">
|
||||
@@ -261,8 +265,17 @@
|
||||
[ngClass]="getColorClass(index)"
|
||||
[disabled]="!topic.id"
|
||||
(click)="selectTopic(topic, [item.year])">
|
||||
<span class="topic-name">{{ topic.name }}</span>
|
||||
<span class="topic-count">{{ topic.count }}</span>
|
||||
<span
|
||||
class="topic-name"
|
||||
[matTooltip]="getTopicDescription(topic)"
|
||||
[matTooltipDisabled]="!hasTopicDescription(topic)">
|
||||
{{ topic.name }}
|
||||
</span>
|
||||
<span
|
||||
class="topic-count"
|
||||
[matTooltip]="getYearTopicCountTooltip(topic, item)">
|
||||
{{ topic.count }}
|
||||
</span>
|
||||
</button>
|
||||
</ng-container>
|
||||
|
||||
@@ -322,6 +335,10 @@
|
||||
type="button"
|
||||
class="main-topic-button"
|
||||
[disabled]="!phase.primaryTopic.id"
|
||||
[matTooltip]="getTopicDescription(phase.primaryTopic)"
|
||||
[matTooltipDisabled]="
|
||||
!hasTopicDescription(phase.primaryTopic)
|
||||
"
|
||||
(click)="
|
||||
selectTopic(phase.primaryTopic, getPhaseYears(phase))
|
||||
">
|
||||
@@ -341,8 +358,17 @@
|
||||
[ngClass]="getColorClass(index)"
|
||||
[disabled]="!topic.id"
|
||||
(click)="selectTopic(topic, getPhaseYears(phase))">
|
||||
<span class="topic-name">{{ topic.name }}</span>
|
||||
<span class="topic-count">{{ topic.count }}</span>
|
||||
<span
|
||||
class="topic-name"
|
||||
[matTooltip]="getTopicDescription(topic)"
|
||||
[matTooltipDisabled]="!hasTopicDescription(topic)">
|
||||
{{ topic.name }}
|
||||
</span>
|
||||
<span
|
||||
class="topic-count"
|
||||
[matTooltip]="getPhaseTopicCountTooltip(topic, phase)">
|
||||
{{ topic.count }}
|
||||
</span>
|
||||
</button>
|
||||
</ng-container>
|
||||
|
||||
@@ -413,8 +439,15 @@
|
||||
class="mini-topic-chip"
|
||||
[disabled]="!topic.id"
|
||||
(click)="selectTopic(topic, [year.year])">
|
||||
<span>{{ topic.name }}</span>
|
||||
<strong>{{ topic.count }}</strong>
|
||||
<span
|
||||
[matTooltip]="getTopicDescription(topic)"
|
||||
[matTooltipDisabled]="!hasTopicDescription(topic)">
|
||||
{{ topic.name }}
|
||||
</span>
|
||||
<strong
|
||||
[matTooltip]="getYearTopicCountTooltip(topic, year)">
|
||||
{{ topic.count }}
|
||||
</strong>
|
||||
</button>
|
||||
</ng-container>
|
||||
|
||||
|
||||
+3
-3
@@ -409,7 +409,6 @@
|
||||
|
||||
.topic-count {
|
||||
display: inline-flex;
|
||||
flex: 0 0 auto;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-width: 18px;
|
||||
@@ -453,7 +452,6 @@
|
||||
}
|
||||
|
||||
.phase-marker {
|
||||
flex: 0 0 auto;
|
||||
width: 11px;
|
||||
height: 11px;
|
||||
margin-top: 5px;
|
||||
@@ -493,7 +491,6 @@
|
||||
|
||||
.phase-publications-button {
|
||||
display: inline-flex;
|
||||
flex: 0 0 auto;
|
||||
width: fit-content;
|
||||
color: #68748f;
|
||||
font-size: 12px;
|
||||
@@ -602,6 +599,9 @@
|
||||
}
|
||||
|
||||
strong {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 2px;
|
||||
color: var(--accent);
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
+49
@@ -17,6 +17,7 @@ export interface TopicTimelineTopic {
|
||||
id?: string;
|
||||
name: string;
|
||||
count: number;
|
||||
description?: string;
|
||||
}
|
||||
|
||||
export interface TopicTimelineElement {
|
||||
@@ -330,6 +331,31 @@ export class ResearchTimelineComponent implements OnChanges, AfterViewChecked {
|
||||
);
|
||||
}
|
||||
|
||||
getTopicDescription(topic: TopicTimelineTopic | undefined): string {
|
||||
return (topic?.description ?? '').trim();
|
||||
}
|
||||
|
||||
hasTopicDescription(topic: TopicTimelineTopic | undefined): boolean {
|
||||
return this.getTopicDescription(topic).length > 0;
|
||||
}
|
||||
|
||||
getYearTopicCountTooltip(
|
||||
topic: TopicTimelineTopic,
|
||||
item: TopicTimelineElement,
|
||||
): string {
|
||||
return this.getTopicCountTooltip(topic, `im Jahr ${item.year}`);
|
||||
}
|
||||
|
||||
getPhaseTopicCountTooltip(
|
||||
topic: TopicTimelineTopic,
|
||||
phase: ResearchTimelinePhase,
|
||||
): string {
|
||||
return this.getTopicCountTooltip(
|
||||
topic,
|
||||
this.getPhasePublicationTooltipPeriod(phase),
|
||||
);
|
||||
}
|
||||
|
||||
togglePhase(phase: ResearchTimelinePhase): void {
|
||||
if (this.expandedPhaseIds.has(phase.id)) {
|
||||
this.expandedPhaseIds.delete(phase.id);
|
||||
@@ -462,6 +488,17 @@ export class ResearchTimelineComponent implements OnChanges, AfterViewChecked {
|
||||
return `Insgesamt ${count} ${publicationLabel} ${period} veröffentlicht.`;
|
||||
}
|
||||
|
||||
private getTopicCountTooltip(
|
||||
topic: TopicTimelineTopic,
|
||||
period: string,
|
||||
): string {
|
||||
const publicationLabel =
|
||||
topic.count === 1 ? 'Publikation' : 'Publikationen';
|
||||
const verb = topic.count === 1 ? 'hat' : 'haben';
|
||||
|
||||
return `${topic.count} ${publicationLabel} ${period} ${verb} das Topic ${topic.name}.`;
|
||||
}
|
||||
|
||||
private getPhasePublicationTooltipPeriod(
|
||||
phase: ResearchTimelinePhase,
|
||||
): string {
|
||||
@@ -608,6 +645,7 @@ export class ResearchTimelineComponent implements OnChanges, AfterViewChecked {
|
||||
const primaryTopicName = primaryTopic.name;
|
||||
let count = 0;
|
||||
let id = primaryTopic.id;
|
||||
let description = primaryTopic.description;
|
||||
|
||||
for (const year of years) {
|
||||
for (const topic of year.primary_topics ?? []) {
|
||||
@@ -620,6 +658,10 @@ export class ResearchTimelineComponent implements OnChanges, AfterViewChecked {
|
||||
if (!id && topic.id) {
|
||||
id = topic.id;
|
||||
}
|
||||
|
||||
if (!description && topic.description) {
|
||||
description = topic.description;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -627,6 +669,7 @@ export class ResearchTimelineComponent implements OnChanges, AfterViewChecked {
|
||||
id,
|
||||
name: primaryTopicName,
|
||||
count: count > 0 ? count : primaryTopic.count,
|
||||
description,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -637,6 +680,7 @@ export class ResearchTimelineComponent implements OnChanges, AfterViewChecked {
|
||||
const counts = new Map<string, number>();
|
||||
const originalNames = new Map<string, string>();
|
||||
const ids = new Map<string, string>();
|
||||
const descriptions = new Map<string, string>();
|
||||
|
||||
for (const year of years) {
|
||||
for (const topic of year.topics ?? []) {
|
||||
@@ -652,6 +696,10 @@ export class ResearchTimelineComponent implements OnChanges, AfterViewChecked {
|
||||
ids.set(normalizedName, topic.id);
|
||||
}
|
||||
|
||||
if (topic.description) {
|
||||
descriptions.set(normalizedName, topic.description);
|
||||
}
|
||||
|
||||
counts.set(
|
||||
normalizedName,
|
||||
(counts.get(normalizedName) ?? 0) + topic.count,
|
||||
@@ -664,6 +712,7 @@ export class ResearchTimelineComponent implements OnChanges, AfterViewChecked {
|
||||
id: ids.get(normalizedName),
|
||||
name: originalNames.get(normalizedName) ?? normalizedName,
|
||||
count,
|
||||
description: descriptions.get(normalizedName),
|
||||
}))
|
||||
.sort((left, right) => {
|
||||
if (right.count !== left.count) {
|
||||
|
||||
@@ -453,6 +453,7 @@ export class PersonOverviewComponent implements OnInit {
|
||||
id: topic.id ?? undefined,
|
||||
name: topic.name,
|
||||
count: topic.count ?? 0,
|
||||
description: topic.description ?? undefined,
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user