From 8a418a99b4d41c09b2967ca28a558bc801dff703 Mon Sep 17 00:00:00 2001 From: genja Date: Sun, 16 Aug 2026 21:38:01 +0200 Subject: [PATCH] enabled project detail row only for projects where highlighted content is persistent --- .../bund-project-table.component.html | 111 +++++----- .../bund-project-table.component.ts | 4 +- .../dfg-project-table.component.html | 203 +++++++++--------- .../dfg-project-table.component.ts | 4 +- .../eu-project-table.component.html | 133 ++++++------ .../eu-project-table.component.ts | 3 + 6 files changed, 231 insertions(+), 227 deletions(-) diff --git a/webapp/src/app/shared/ui/bund-project-table/bund-project-table.component.html b/webapp/src/app/shared/ui/bund-project-table/bund-project-table.component.html index e5656409..7e2241e9 100644 --- a/webapp/src/app/shared/ui/bund-project-table/bund-project-table.component.html +++ b/webapp/src/app/shared/ui/bund-project-table/bund-project-table.component.html @@ -1,7 +1,7 @@ @@ -108,59 +108,60 @@ -
-
- @if (project.highlight?.topic.length > 0) { -
-

Titel

- -
- } + @if (project.highlight) { + @let highlight = project.highlight; +
+
+ @if (highlight.topic.length > 0) { +
+

Titel

+ +
+ } - @if (project.highlight?.recipient.length > 0) { -
-

Zuwendungsempfänger

- -
- } - @if (project.highlight?.joint_project.length > 0) { -
-

Verbundprojekt

- -
- } - @if (project.highlight?.executing_agency.length > 0) { -
-

Ausführende Stelle

- -
- } -
-
+ @if (highlight.recipient.length > 0) { +
+

Zuwendungsempfänger

+ +
+ } + @if (highlight.joint_project.length > 0) { +
+

Verbundprojekt

+ +
+ } + @if (highlight.executing_agency.length > 0) { +
+

Ausführende Stelle

+ +
+ } +
+
+ }
diff --git a/webapp/src/app/shared/ui/bund-project-table/bund-project-table.component.ts b/webapp/src/app/shared/ui/bund-project-table/bund-project-table.component.ts index 33243ad7..ee723d0c 100644 --- a/webapp/src/app/shared/ui/bund-project-table/bund-project-table.component.ts +++ b/webapp/src/app/shared/ui/bund-project-table/bund-project-table.component.ts @@ -66,7 +66,9 @@ export class BundProjectTableComponent implements OnInit { topicFilterEnabled = input(false); elements = computed(() => this.page().elements ?? []); - + highlightRowEnabled = computed(() => { + return this.elements()[0]?.highlight ? true : false; + }); queryParamMap = toSignal(this.activatedRoute.queryParamMap, { initialValue: this.activatedRoute.snapshot.queryParamMap, }); diff --git a/webapp/src/app/shared/ui/dfg-project-table/dfg-project-table.component.html b/webapp/src/app/shared/ui/dfg-project-table/dfg-project-table.component.html index 7fdc1821..828a5c93 100644 --- a/webapp/src/app/shared/ui/dfg-project-table/dfg-project-table.component.html +++ b/webapp/src/app/shared/ui/dfg-project-table/dfg-project-table.component.html @@ -1,7 +1,7 @@ @@ -63,108 +63,107 @@ -
-
-
- - -
-
- -
- @if (getPanelLanguage(project) === 'de') { - @if (project.highlight?.title_de.length > 0) { -
-

Titel

- -
- } - - @if (project.highlight?.abstract_de.length > 0) { -
-

Zusammenfassung

- -
- } - } @else { - @if (project.highlight?.title_en.length > 0) { -
-

Title

- -
- } - - @if (project.highlight?.abstract_en.length > 0) { -
-

Abstract

- -
- } - } - @if (project.highlight.subject_classifications?.length > 0) { -
-

Fachsystematik

- @for ( - classification of getProjectClassifications(project); - track $index - ) { - - } @empty { - - + @if (project.highlight) { + @let highlight = project.highlight; +
+
+
+ + +
+
+ +
+ @if (getPanelLanguage(project) === 'de') { + @if (highlight.title_de.length > 0) { +
+

Titel

+ +
} -
- } -
-
+ + @if (project.highlight?.abstract_de.length > 0) { +
+

Zusammenfassung

+ +
+ } + } @else { + @if (project.highlight?.title_en.length > 0) { +
+

Title

+ +
+ } + + @if (highlight.abstract_en.length > 0) { +
+

Abstract

+ +
+ } + } + @if (project.highlight?.subject_classifications?.length > 0) { +
+

Fachsystematik

+ @for ( + classification of getProjectClassifications(project); + track $index + ) { + + } @empty { + - + } +
+ } + + + }
@let projectAuthors = getProjectAuthors(project); diff --git a/webapp/src/app/shared/ui/dfg-project-table/dfg-project-table.component.ts b/webapp/src/app/shared/ui/dfg-project-table/dfg-project-table.component.ts index c60e5852..f785d1ba 100644 --- a/webapp/src/app/shared/ui/dfg-project-table/dfg-project-table.component.ts +++ b/webapp/src/app/shared/ui/dfg-project-table/dfg-project-table.component.ts @@ -64,7 +64,9 @@ export class DfgProjectTableComponent implements OnInit { topicFilterEnabled = input(false); elements = computed(() => this.page().elements ?? []); - + highlightRowEnabled = computed(() => { + return this.elements()[0]?.highlight ? true : false; + }); queryParamMap = toSignal(this.activatedRoute.queryParamMap, { initialValue: this.activatedRoute.snapshot.queryParamMap, }); diff --git a/webapp/src/app/shared/ui/eu-project-table/eu-project-table.component.html b/webapp/src/app/shared/ui/eu-project-table/eu-project-table.component.html index c7921e71..026b639b 100644 --- a/webapp/src/app/shared/ui/eu-project-table/eu-project-table.component.html +++ b/webapp/src/app/shared/ui/eu-project-table/eu-project-table.component.html @@ -1,7 +1,7 @@ @@ -148,72 +148,69 @@ -
-
- @if (project.highlight?.title.length > 0) { -
-

Titel

- -
- } + @if (project.highlight) { + @let highlight = project.highlight; +
+
+ @if (highlight.title.length > 0) { +
+

Titel

+ +
+ } - @if (project.highlight?.objective.length > 0) { -
-

Zusammenfassung

- -
- } - @if (project.highlight?.acronym.length > 0) { -
-

Akronym

- -
- } - @if (project.highlight?.cordis_topic_text.length > 0) { -
-

Cordis-Thema

- -
- } - @if (project.highlight?.keywords.length > 0) { -
-

Schlüsselwörter

- -
- } -
-
+ @if (highlight.objective.length > 0) { +
+

Zusammenfassung

+ +
+ } + @if (highlight.acronym.length > 0) { +
+

Akronym

+ +
+ } + @if (highlight.cordis_topic_text.length > 0) { +
+

Cordis-Thema

+ +
+ } + @if (highlight.keywords.length > 0) { +
+

Schlüsselwörter

+ +
+ } +
+
+ }
diff --git a/webapp/src/app/shared/ui/eu-project-table/eu-project-table.component.ts b/webapp/src/app/shared/ui/eu-project-table/eu-project-table.component.ts index 9641bdd8..585b9b30 100644 --- a/webapp/src/app/shared/ui/eu-project-table/eu-project-table.component.ts +++ b/webapp/src/app/shared/ui/eu-project-table/eu-project-table.component.ts @@ -84,6 +84,9 @@ export class EuProjectTableComponent { return this.page()?.total ?? 0; }); + highlightRowEnabled = computed(() => { + return this.projects()[0]?.highlight ? true : false; + }); queryParamMap = toSignal(this.activatedRoute.queryParamMap, { initialValue: this.activatedRoute.snapshot.queryParamMap, });