diff --git a/service/src/main/inse/funders/logic.py b/service/src/main/inse/funders/logic.py index a04eb6fd..95a7493e 100644 --- a/service/src/main/inse/funders/logic.py +++ b/service/src/main/inse/funders/logic.py @@ -290,6 +290,7 @@ def _collect_funders_from_publications( "unknown": [], }, "publication_urls": {}, + "publication_titles": {}, } entry = funder_counts[key] @@ -298,3 +299,7 @@ def _collect_funders_from_publications( entry["publication_ids"][author_position].append(publication_id) if publication_id and publication_url: entry["publication_urls"][publication_id] = publication_url + if publication_id: + title = publication.get("display_name") or publication.get("title") or publication_id + entry["publication_titles"][publication_id] = title + diff --git a/service/src/main/inse/funders/model.py b/service/src/main/inse/funders/model.py index d2207541..982737b3 100644 --- a/service/src/main/inse/funders/model.py +++ b/service/src/main/inse/funders/model.py @@ -34,6 +34,7 @@ class FunderByAuthor(BaseModel): author_position_count: AuthorPositionCount publication_ids: PublicationIdsByAuthorPosition publication_urls: dict[str, str] = {} + publication_titles: dict[str, str] = {} class FundersByAuthorResponse(BaseModel): diff --git a/webapp/src/app/modules/person-funding/person-funding.component.html b/webapp/src/app/modules/person-funding/person-funding.component.html index ff01f61e..6b2b0ce4 100644 --- a/webapp/src/app/modules/person-funding/person-funding.component.html +++ b/webapp/src/app/modules/person-funding/person-funding.component.html @@ -20,14 +20,33 @@
Filter nach Position: - - - - + + + +
-
@@ -51,11 +70,20 @@
@if (hasFunderListPagination()) {
- - Seite {{ selectedFunderListPage }} von {{ getFunderListPageCount() }} -
@@ -68,41 +96,75 @@

{{ selectedFunder.funder_name }}

- @if (shouldShowPosition('first')) { -
- Erstautor - {{ selectedFunder.author_position_count.first }} -
+ @if (shouldShowPosition("first")) { +
+ Erstautor + {{ + selectedFunder.author_position_count.first + }} +
} - @if (shouldShowPosition('middle')) { -
- Mitautor - {{ selectedFunder.author_position_count.middle }} -
+ @if (shouldShowPosition("middle")) { +
+ Mitautor + {{ + selectedFunder.author_position_count.middle + }} +
} - @if (shouldShowPosition('last')) { -
- Letztautor - {{ selectedFunder.author_position_count.last }} -
+ @if (shouldShowPosition("last")) { +
+ Letztautor + {{ + selectedFunder.author_position_count.last + }} +
}

Publikationen

@if (hasPublicationPagination()) {
- - Seite {{ selectedPublicationPage }} von {{ getSelectedPublicationPageCount() }} -
@@ -113,7 +175,6 @@

Klicke auf einen Förderer für Details.

} -
} diff --git a/webapp/src/app/modules/person-funding/person-funding.component.scss b/webapp/src/app/modules/person-funding/person-funding.component.scss index b9f511c9..c1a80450 100644 --- a/webapp/src/app/modules/person-funding/person-funding.component.scss +++ b/webapp/src/app/modules/person-funding/person-funding.component.scss @@ -33,17 +33,30 @@ &:hover { background: #f0f0f0; } - - &.active { - background: - radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.78), transparent 34%), - linear-gradient(145deg, #c8d9ff, #f7faff 48%, #88a9ee); - color: var(--sg-primary); - border-color: var(--sg-border); - font-weight: 600; - box-shadow: var(--sg-shadow-sm); - } } + button:nth-child(2) { + background: #f0f6ff; + color: #0b63ce; + border-color: #bdd4ff; +} + +button:nth-child(3) { + background: #effaf3; + color: #24834f; + border-color: #bdebcf; +} + +button:nth-child(4) { + background: #f6f0ff; + color: #7255d9; + border-color: #d8cafe; +} + +button:nth-child(5) { + background: #fff7e8; + color: #c67500; + border-color: #ffd796; +} } .funding-content { @@ -93,7 +106,7 @@ } .funding-detail { - width: 340px; + width: 440px; border: 1px solid #e0e0e0; border-radius: 8px; padding: 20px; @@ -124,9 +137,13 @@ display: flex; gap: 12px; margin-bottom: 16px; + width: fit-content; + margin-left: auto; + margin-right: auto; .stat { - flex: 1; + flex: 0.0 auto; + min-width: 100px; text-align: center; background: white; border: 1px solid #e0e0e0; @@ -147,6 +164,20 @@ color: #333; } } + .stat-first { + background: #effaf3; + border-color: #bdebcf; + } + + .stat-middle { + background: #f6f0ff; + border-color: #d8cafe; + } + + .stat-last { + background: #fff7e8; + border-color: #ffd796; + } } .publication-list { @@ -158,7 +189,7 @@ li { padding: 6px 0; - border-bottom: 1px solid #f0f0f0; + border-bottom: 1px solid #5b5555; font-size: 13px; a { @@ -219,3 +250,49 @@ color: #333; } } +.publication-item { + padding: 8px 0; + border-bottom: 2px solid #5b5555; + cursor: pointer; + + &:hover { + background: #f9f9f9; + } +} + +.publication-title { + font-size: 0.875rem; + color: #333; + white-space: normal; + word-break: break-word; + display: block; +} +.publication-more-info { + display: flex; + align-items: center; + flex-direction: row; + gap: 4px; + margin-top: 6px; +} + +.mehr-infos-label { + font-size: 0.8rem; + color: #1976d2; + font-weight: 500; +} + +.publication-link-icon { + display: flex; + align-items: center; + color: #1976d2; + text-decoration: none; + flex-shrink: 0; + + .material-icons { + font-size: 16px; + } + + &:hover { + color: #0d47a1; + } +} diff --git a/webapp/src/app/modules/person-funding/person-funding.component.ts b/webapp/src/app/modules/person-funding/person-funding.component.ts index 4e0a074d..72609509 100644 --- a/webapp/src/app/modules/person-funding/person-funding.component.ts +++ b/webapp/src/app/modules/person-funding/person-funding.component.ts @@ -28,6 +28,7 @@ export class PersonFundingComponent implements OnInit { activeFilter: 'all' | 'first' | 'middle' | 'last' = 'all'; loading = true; error = false; + expandedPublicationId: string | null = null; ngOnInit(): void { this.route.parent?.paramMap.subscribe(params => { @@ -257,4 +258,13 @@ export class PersonFundingComponent implements OnInit { } return parsed; } + getPublicationTitle(publicationId: string): string { + const title = this.selectedFunder?.publication_titles?.[publicationId]; + if (title) return title; + const parts = publicationId.split('/'); + return parts[parts.length - 1] ?? publicationId; + } + togglePublication(id: string): void { + this.expandedPublicationId = this.expandedPublicationId === id ? null : id; +} }