diff --git a/webapp/src/app/modules/person-network/person-network.component.html b/webapp/src/app/modules/person-network/person-network.component.html index ca4cd5be..5c27db13 100644 --- a/webapp/src/app/modules/person-network/person-network.component.html +++ b/webapp/src/app/modules/person-network/person-network.component.html @@ -1,117 +1,110 @@ -
-
-
Netzwerk
-

Zusammenarbeit und Verbindungen im wissenschaftlichen Netzwerk.

-
+@if (this.isPending()) { + +} @else if (this.isFailed()) { +
+ error + {{ + this.collaborationGraphError() + ? this.collaborationGraphError() + : 'Fehler beim Laden des Netzwerks. Bitte versuchen Sie es später erneut.' + }} - @if (this.isPending()) { - - } @else if (this.isFailed()) { -
- error - {{ - this.collaborationGraphError() - ? this.collaborationGraphError() - : 'Fehler beim Laden des Netzwerks. Bitte versuchen Sie es später erneut.' - }} + + +
+} @else { +
+
+ + + + + +
+
+
+ + + Kollaborierende + + Publikationen + + Institutionen + + + +
+ + - -
- } @else { -
-
- - - - - -
-
-
- - - Kollaborierende - - Publikationen - - Institutionen - - - -
- - - - - - - @if (this.displayedTable() === 'collaborator') { - - } @else if (this.displayedTable() === 'publication') { - - } @else if (this.displayedTable() === 'institution') { - - } - - -
- -
-
- @for (summary of this.summaryCards(); track $index) { - + + + @if (this.displayedTable() === 'collaborator') { + + } @else if (this.displayedTable() === 'publication') { + + } @else if (this.displayedTable() === 'institution') { + } -
+ + +
+ +
+
+ @for (summary of this.summaryCards(); track $index) { + + }
- } -
+
+} -
-
Nachrichten
-

Aktuelle Nachrichten zu dieser Person.

-
- - - - -
+ + + + diff --git a/webapp/src/app/modules/person-news/person-news.component.scss b/webapp/src/app/modules/person-news/person-news.component.scss index 6cad4cdb..f661a8be 100644 --- a/webapp/src/app/modules/person-news/person-news.component.scss +++ b/webapp/src/app/modules/person-news/person-news.component.scss @@ -1,5 +1,4 @@ .page { - padding: 28px 32px 42px; max-width: 100%; margin: 0 auto; } diff --git a/webapp/src/app/modules/person-overview/person-overview.component.scss b/webapp/src/app/modules/person-overview/person-overview.component.scss index f41a127d..02d0ba58 100644 --- a/webapp/src/app/modules/person-overview/person-overview.component.scss +++ b/webapp/src/app/modules/person-overview/person-overview.component.scss @@ -1,7 +1,6 @@ .person-overview { width: 100%; display: block; - padding: 1.5rem 1.5rem 0; box-sizing: border-box; } diff --git a/webapp/src/app/modules/person-projects/person-projects.component.html b/webapp/src/app/modules/person-projects/person-projects.component.html index 3d42eb98..9c379c25 100644 --- a/webapp/src/app/modules/person-projects/person-projects.component.html +++ b/webapp/src/app/modules/person-projects/person-projects.component.html @@ -1,9 +1,4 @@ + + + Publikationsliste + {{ total() >= 10000 ? 'mehr als' : '' }} + {{ total() }} Publikationen + + + + +} @else { + +}
} - + @let activeLink = this.activeLink(); + @if (activeLink) { +
+ @if (activeLink.label) { +
{{ activeLink.label }}
+ } + @if (activeLink.description) { + {{ activeLink.description }} + } +
+ } +
+ +
diff --git a/webapp/src/app/modules/person/person.component.scss b/webapp/src/app/modules/person/person.component.scss index 60f4b087..f8407fc7 100644 --- a/webapp/src/app/modules/person/person.component.scss +++ b/webapp/src/app/modules/person/person.component.scss @@ -372,3 +372,24 @@ opacity: 0.7; } } + +.description-container { + margin: 3rem 3rem 2rem 3rem; + display: flex; + flex-direction: column; + gap: 0.5rem; + + h5 { + margin: 0; + } +} + +.description { + color: var(--sg-text-muted); + font-size: 14px; + line-height: 1.5; +} + +.content { + margin: 1rem 4rem; +} diff --git a/webapp/src/app/modules/person/person.component.ts b/webapp/src/app/modules/person/person.component.ts index 7db8c0e8..a34e38b6 100644 --- a/webapp/src/app/modules/person/person.component.ts +++ b/webapp/src/app/modules/person/person.component.ts @@ -24,6 +24,14 @@ import { PersonDataResolved } from '../../resolvers/person.resolver'; import { BookmarkService } from '../../shared/services/bookmark.service'; import { collaborationGraphQueryParamKeys } from '../../resolvers/collaboration-graph.resolver'; +type PersonLink = { + label: string; + description?: string; + path: string; + queryParams?: Record; + disabled: boolean; +}; + @Component({ selector: 'app-person', imports: [ @@ -57,7 +65,9 @@ export class PersonComponent { readonly params = toSignal(this.activatedRoute.paramMap); readonly routerEvents = toSignal(this.router.events); - readonly currentUrl = computed(() => this.router.url); + readonly currentUrl = toSignal( + this.router.events.pipe(switchMap(() => of(this.router.url))), + ); // derive authorID directly from route private readonly authorId = toSignal( @@ -233,10 +243,16 @@ export class PersonComponent { { initialValue: [] }, ); - readonly links = computed(() => [ - { label: 'Übersicht', path: 'overview', disabled: false }, + readonly links = computed(() => [ + { + label: 'Übersicht', + description: 'Übersicht über die Person', + path: 'overview', + disabled: false, + }, { label: 'Projekte', + description: 'Übersicht der durchgeführten Projekte der Person', path: 'projects', queryParams: { page: 0, @@ -247,9 +263,15 @@ export class PersonComponent { }, disabled: false, }, - { label: 'Publikationen', path: 'publications', disabled: false }, + { + label: 'Publikationen', + description: 'Übersicht der Publikationen der Person', + path: 'publications', + disabled: false, + }, { label: 'Netzwerk', + description: 'Kooperationsnetzwerk der Person', path: 'network', disabled: false, queryParams: { @@ -263,16 +285,52 @@ export class PersonComponent { ? [ { label: 'Unternehmen', + description: 'Unternehmen, mit denen die Person verbunden ist', path: 'company-connections', disabled: false, }, ] : []), - { label: 'Förderungen', path: 'funding', disabled: false }, - { label: 'Nachrichten', path: 'news', disabled: false }, - { label: 'Patente', path: 'patents', disabled: false }, + { + label: 'Förderungen', + description: 'Übersicht der Förderungen der Person', + path: 'funding', + disabled: false, + }, + { + label: 'Nachrichten', + description: 'Nachrichten über die Person', + path: 'news', + disabled: false, + }, + { + label: 'Patente', + description: 'Patente der Person', + path: 'patents', + disabled: false, + }, ]); + readonly activeLink = computed(() => { + const currentUrl = this.currentUrl(); + if (!currentUrl) { + return null; + } + + for (const link of this.links()) { + const linkUrl = this.router + .createUrlTree([link.path], { + relativeTo: this.activatedRoute, + }) + .toString(); + + if (linkUrl.startsWith(currentUrl) || currentUrl.startsWith(linkUrl)) { + return link; + } + } + return null; + }); + onInterestingTagClick(selection: { id: string; name: string;